/* Preview of Michael's October 8 picks (preview.html only), on top of options.css. Nothing here is on the live page yet. */

/* ============ Header and hero: the logo size and the space under the nav ============
   The logo file carries about 10% padding on each side, so 38px reads at about the CTA button's height. The footer logo
   matches the nav (it's 30px against 34px on the live page). */
[data-logo="38"] .brand img {
  height: 33px;
}
[data-logo="42"] .brand img {
  height: 36px;
}
@media (min-width: 768px) {
  [data-logo="38"] .brand img {
    height: 38px;
  }
  [data-logo="42"] .brand img {
    height: 42px;
  }
}
[data-logo="38"] .foot-brand img {
  height: 38px;
}
[data-logo="42"] .foot-brand img {
  height: 42px;
}
/* The eyebrow belongs to the headline, so it should sit clearly further from the nav than from the H1. */
[data-herospace="16"] .hero {
  padding-top: calc(clamp(7.5rem, 15vh, 8.5rem) + 1rem);
}
[data-herospace="24"] .hero {
  padding-top: calc(clamp(7.5rem, 15vh, 8.5rem) + 1.5rem);
}
[data-herospace="32"] .hero {
  padding-top: calc(clamp(7.5rem, 15vh, 8.5rem) + 2rem);
}

/* The gap from a section head to what follows is 4rem everywhere, as on the live page (dept-rows, crew). */
.sec-head + .wwb,
.sec-head + .tmc-crew,
.sec-head + .hwb {
  margin-top: 4rem;
}

/* ============ 2. The problem: the five cards as separate boxes, and three ways to set the question ============ */
.pv-problem {
  margin-top: clamp(2.75rem, 1.75rem + 2.75vw, 4rem);
}
.pb-grid {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pb-grid .pain-card {
  border: 1px solid var(--n200);
  transition:
    border-color 0.2s,
    box-shadow 0.25s;
}
.pb-grid .pain-card:hover {
  border-color: var(--n300);
  box-shadow: 0 10px 28px rgb(28 28 28 / 0.06);
}
@media (min-width: 768px) {
  .pb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-grid .pain-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1024px) {
  .pb-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .pb-grid .pain-card,
  .pb-grid .pain-card:last-child {
    grid-column: span 2;
  }
  .pb-grid .pain-card:nth-child(n + 4) {
    grid-column: span 3;
  }
}
/* B. The question keeps the live strip, as a box of its own on the same gap as the cards */
.pq-box {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--n200);
}
@media (min-width: 1024px) {
  .pq-box {
    margin-bottom: 1.5rem;
  }
}
/* C. The question as a quiet line: body size, regular weight, the lead's grey */
.pq-line {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--n700);
}
/* D. The question under the lead, on its column and at its size, closing the statement before the cards */
.pq-under {
  margin-top: 1.75rem;
}
.pq-ask {
  margin-bottom: 3rem;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink);
}
@media (min-width: 1024px) {
  .pq-under {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    margin-top: 2rem;
  }
  .pq-ask {
    grid-column: 7 / span 6;
    margin-bottom: 4rem;
  }
  .pq-under .pb-grid {
    grid-column: 1 / -1;
  }
}

/* ============ 3. What we do: the pillars boxed on the left (the lines between them as before), the feed on the right ============ */
.wd {
  margin-top: 4rem;
}
.wd .pillar h3 {
  max-width: 12em;
}
.wd .pillar .pillar-foot {
  margin-bottom: 1.5rem;
}
.wdb {
  display: grid;
  gap: 3rem;
}
.wdb-box {
  border: 1px solid var(--n200);
}
.wdb-box .wdb-pillar {
  padding: 2rem 1.5rem;
}
.wdb-box .wdb-pillar + .wdb-pillar {
  border-top: 1px solid var(--n200);
}
.wdb-feed .feed {
  max-width: 34rem;
  margin-inline: auto;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 24px 48px -24px rgb(28 28 28 / 0.18);
}
@media (min-width: 640px) {
  .wdb-box .wdb-pillar {
    padding: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .wdb {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: center;
  }
  .wdb-pillars {
    grid-column: 1 / span 6;
  }
  .wdb-feed {
    grid-column: 8 / span 5;
  }
  .wdb-feed .feed {
    margin-inline: 0;
  }
}

/* ============ 6. How it works: B, then 'What it asks of you' as the live card, placed on the grid ============ */
@media (min-width: 900px) {
  .hwb-steps {
    column-gap: 3.5rem;
  }
  .hwb-step .step-node {
    margin-bottom: 2rem;
  }
}
.ask-place {
  display: grid;
  margin-top: 4rem;
}
.ask-place .asks {
  max-width: none;
  margin-top: 0;
}
/* Where it starts and how many columns it spans, both on the 12-column grid */
#how {
  --ask-start: 7;
  --ask-span: 6;
}
#how[data-asks="left"] {
  --ask-start: 1;
}
#how[data-asks="indent"] {
  --ask-start: 2;
}
#how[data-askw="fit"] {
  --ask-span: 5;
}
/* 'Words': as wide as its longest line, its left edge still on the grid */
#how[data-askw="words"] .ask-place .asks {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}
/* Fitted to the words, the card has no slack to hide a tight edge, so its sides take the next step on the spacing scale:
   24px, up from 20px, on the title row too so the title still lines up with the icons. */
.ask-place .asks-title,
.ask-place .asks ul {
  padding-inline: 1.5rem;
}
@media (min-width: 1024px) {
  .ask-place {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .ask-place .asks {
    grid-column: var(--ask-start) / span var(--ask-span);
  }
}

/* ============ 7. Who we are: the promise panel, its colour and its lines ============ */
#team .tmc-promise,
#team .fit {
  margin-top: 3rem;
}
@media (min-width: 1024px) {
  #team .tmc-promise,
  #team .fit {
    margin-top: 4.5rem;
  }
}
[data-panel="navy"] .tmc-promise {
  background: #172340;
}
[data-panel="graphite"] .tmc-promise {
  background: #2a2d33;
}
[data-plines="none"] .tmc-principles li,
[data-plines="marks"] .tmc-principles li,
[data-plines="cols"] .tmc-principles li {
  padding-top: 0;
  border-top: 0;
}
[data-plines="none"] .tmc-principles h3,
[data-plines="cols"] .tmc-principles h3 {
  margin-top: 0.625rem;
}
[data-plines="marks"] .tmc-principles li::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-bottom: 1.125rem;
  background: var(--accent);
}
@media (min-width: 1100px) {
  [data-plines="cols"] .tmc-principles {
    column-gap: 0;
  }
  [data-plines="cols"] .tmc-principles li {
    padding: 0.25rem 0 0.25rem 1.75rem;
    border-left: 1px solid rgb(255 255 255 / 0.16);
  }
}

/* ============ 9. Apply: calmer versions. No steps, no email (it's in the footer), and the labels in the sans ============ */
.pv-apply .field label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--n700);
}
/* The form in a box: one white card, like every other card on the page, so the fields read as one object */
.apply-formcard {
  padding: 2rem 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}
@media (min-width: 640px) {
  .apply-formcard {
    padding: 2.5rem;
  }
}
/* Split: the lead on the left, the boxed form a gutter away with the tops level. The box's own border and padding
   already separate the two, so the gutter is enough; it's the same split as the lead case card. */
@media (min-width: 1024px) {
  .apply-boxed .apply-copy {
    grid-column: 1 / span 5;
  }
  .apply-boxed .apply-formcard {
    grid-column: 6 / span 7;
  }
}
/* Head: the lead on the right below the heading, as in every other section head, then the form centred on the grid */
.ah-lead {
  max-width: 37rem;
  margin-top: 2rem;
}
.apply-headform .apply-formcard {
  margin-top: 3rem;
}
@media (min-width: 1024px) {
  .apply-headform {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .apply-headform > * {
    grid-column: 1 / -1;
  }
  .apply-headform .ah-lead {
    grid-column: 7 / span 6;
    margin-top: 3rem;
  }
  .apply-headform .apply-formcard {
    grid-column: 3 / span 8;
    margin-top: 4rem;
  }
}
/* D. Everything centred, the form boxed below the lead: the page's one centred moment, at its end */
.apply-centre {
  text-align: center;
}
.ac-lead {
  max-width: 36rem;
  margin: 2rem auto 0;
}
.apply-centre .apply-formcard {
  max-width: 46rem;
  margin: 3.5rem auto 0;
  text-align: left;
}
@media (min-width: 1024px) {
  .ac-lead {
    margin-top: 2.5rem;
  }
  .apply-centre .apply-formcard {
    margin-top: 4rem;
  }
}

/* ============ The options panel (tool chrome, not part of the design) ============ */
.opt-bar.pv-panel {
  left: auto;
  right: 1rem;
  bottom: 1rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 25rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 6rem);
  padding: 0.75rem 0.875rem 0.875rem;
  overflow-x: hidden;
  overflow-y: auto;
  transform: none;
}
.pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.14);
  font-size: 0.75rem;
  color: rgb(255 255 255 / 0.7);
}
.pv-toggle {
  padding: 0.25rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: transparent;
  font: 500 0.6875rem/1 var(--sans);
  color: var(--white);
  cursor: pointer;
}
.pv-panel .opt-group {
  justify-content: flex-end;
}
.pv-panel .opt-group a {
  flex: 1;
  min-width: 0;
  margin-right: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opt-group button.opt-word {
  width: auto;
  padding: 0 0.5rem;
  font: 500 0.75rem/1 var(--sans);
}
.pv-panel.is-collapsed {
  width: auto;
}
.pv-panel.is-collapsed .opt-group {
  display: none;
}
.pv-panel.is-collapsed .pv-head {
  gap: 1rem;
  padding-bottom: 0;
  border-bottom: 0;
}
