/* Tight Ship site: the home page, rebuilt for desktop (Nov 14). Probe B's look (serif and plain talk);
   the shared parts are in base.css, the drawn pictures in cards.css.
   Phone first (390), holds at 360. From 640 px the tools are cards two to a row; from 1000 px the
   page uses the width: a two-column hero, a three-column grid and two-column bands. */

/* Settings this file adds to the tokens */
:root {
  --card: #fbf9f3;                          /* a card a shade lighter than the page */
  --sheet: #fffdf8;                         /* the drawn page of the sample file */
  --lift: 0 1px 0 rgba(12, 22, 37, .04), 0 18px 36px -30px rgba(12, 22, 37, .5);
  --lift-hover: 0 1px 0 rgba(12, 22, 37, .05), 0 26px 44px -28px rgba(12, 22, 37, .55);
}

main > section { padding-block: var(--band); scroll-margin-top: 12px; }
.label { margin-bottom: 10px; }
.more {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap);
  color: var(--green); font-weight: 600; text-underline-offset: 3px;
}
.more .chev { transition: transform .2s var(--move); }

/* ---------- 1. the hero ---------- */
main > .hero { padding-block: 14px 24px; text-align: center; }
.hero h1 span { display: block; }
.kicker { color: var(--orange-text); letter-spacing: .18em; margin-bottom: 12px; }
.kicker::before {
  content: ""; display: block; width: 36px; height: 4px; background: var(--orange);
  margin: 0 auto 12px;
}
.lede { margin: 14px auto 20px; max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.comfort { margin-top: 10px; color: var(--steel); font-size: var(--fs-small); }
.hero-set { margin-top: 2px; }
.hero-set a { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); color: var(--green); font-weight: 600; text-underline-offset: 3px; }
.hero-set a:hover .chev { transform: translateX(3px); }
.hero-set .chev { width: 20px; height: 20px; transition: transform .2s var(--move); }
.hero-art { display: none; }

/* ---------- 2. every tool, one grid ---------- */
main > .tools { padding-top: 30px; }
.sec-head { text-align: center; }
.grid { margin-top: 24px; }

/* the set: the grid's first card, green, with the plain comparison */
.tool-set {
  scroll-margin-top: 16px; display: grid; gap: 20px; padding: 26px 22px 24px;
  background: var(--green); color: var(--paper); border-radius: var(--r-lg);
  box-shadow: 0 22px 44px -26px rgba(12, 22, 37, .6);
}
.ts-name { font: 400 26px/1.2 var(--serif); }
.ts-price { margin-top: 10px; }
.ts-price strong { font: 700 52px/1 var(--text); letter-spacing: -.01em; }
.ts-price span { margin-left: 6px; color: rgba(246, 242, 233, .82); }
.ts-line { margin-top: 12px; color: rgba(246, 242, 233, .9); font-size: var(--fs-small); line-height: 1.5; }
.tool-set .set-math { border-top: 1px solid rgba(246, 242, 233, .28); }
.tool-set .set-math div { border-bottom: 1px solid rgba(246, 242, 233, .28); }
.tool-set .set-math .set-save { border-bottom: 0; }
.tool-set .set-save dd { color: var(--orange); }
.ts-buy .btn { width: 100%; margin-top: 18px; background: var(--paper); color: var(--green); border-color: var(--paper); }
.ts-buy .btn:hover, .ts-buy .btn:active { background: #fff; border-color: #fff; }
/* the set's list and total, folded under "Buy the set" at every width; it moved here from the
   closing band when Hank cut the second copy of the set (his pick, Nov 17, 2026) */
.ts-list { margin-top: 14px; border-top: 1px solid rgba(246, 242, 233, .28); }
.ts-list > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 48px; padding-top: 6px; cursor: pointer; list-style: none;
  font: 600 16px/1.3 var(--text); color: var(--paper);
}
.ts-list > summary::-webkit-details-marker { display: none; }
.ts-list .chev { color: var(--paper); transition: transform .16s ease; transform: rotate(90deg); }
.ts-list[open] > summary .chev { transform: rotate(-90deg); }
.ts-list .math li { border-bottom-color: rgba(246, 242, 233, .2); }
.ts-list .math em { color: rgba(246, 242, 233, .78); }
.ts-pics { display: none; }
.ts-pics li { border-radius: 10px; overflow: hidden; box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .6); }

/* the plain comparison, used on the green card and in the closing band */
.set-math { margin: 0; }
.set-math div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 12px 0; line-height: 1.3;
}
.set-math dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.set-math .set-save { padding-bottom: 0; font-weight: 700; font-size: 20px; }
.set-math .set-save dd { font-weight: 700; }
.set-math .set-save dd span { display: inline-block; padding: 0 4px; margin-right: -4px; }

/* one tool. The name is the link, stretched over the whole card. */
.tool { position: relative; scroll-margin-top: 16px; min-width: 0; }
.tool-a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
.tool-a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tool-a:focus-visible { outline: none; }
.tool:has(.tool-a:focus-visible) { outline: 3px solid var(--orange-text); outline-offset: 3px; }
.tool:hover .tool-a { text-decoration: underline; }
.tool-pic { border-radius: var(--r); overflow: hidden; }
.tool-pic .viz { border-radius: var(--r); }
.tool-cat { margin-bottom: 4px; }
.tool-price { font: 600 16px/1.4 var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; border-radius: 6px; }
.tool-has {
  align-self: flex-start; margin: 10px 0 0; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 116, 25, .13); color: var(--orange-text);
}
.tool-line { margin-top: 10px; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }
.tool-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
.opens { color: var(--steel); font-size: var(--fs-small); line-height: 1.35; }
.tool-foot .more { white-space: nowrap; }
.tool:hover .tool-foot .chev { transform: translateX(4px); }
.tool-chev { display: none; }
/* arriving at a card from a link (index.html#p-tracker): its price flashes once */
.tool:target .tool-price { animation: flash var(--t-enter) var(--out) .25s both; }

/* The phone: the set's card, then all nine tools as rows in price order, each with its drawn
   thumbnail on the left (Hank, Nov 13: "actual thumbnails"), and its one-line description across the
   row under them (Hank, Nov 16, "Build fixes 1-6", fix 4: without it the $49 and the $19 looked alike).
   The words box steps aside (display: contents) so the description can take the row's whole width; the
   category, name and price sit in the middle of the thumbnail's height, as before. */
@media (max-width: 639.98px) {
  .grid { display: grid; }
  .tool-set { margin-bottom: 14px; }
  .tool {
    display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; column-gap: 14px; align-items: center;
    grid-template-rows: 1fr auto auto auto 1fr auto;
    grid-template-areas: "pic . chev" "pic cat chev" "pic name chev" "pic price chev" "pic . chev" "line line line";
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .tool-words, .tool-head { display: contents; }
  .tool-pic { grid-area: pic; }
  .tool-cat { grid-area: cat; }
  .tool-name { grid-area: name; }
  .tool-price { grid-area: price; }
  .tool-chev { grid-area: chev; }
  .tool .tool-line { display: block; grid-area: line; margin-top: 10px; }
  .tool:last-child { border-bottom: 0; }
  .tool:active { background: rgba(22, 51, 43, .08); }
  .tool-pic { box-shadow: 0 8px 16px -12px rgba(12, 22, 37, .5); }
  .tool-cat { margin-bottom: 2px; font-size: 14px; letter-spacing: .1em; }
  .tool-name { font: 400 19px/1.25 var(--serif); }
  /* the name's link reaches 44 px tall without moving anything (the whole row is the link anyway) */
  .tool-a { display: block; padding-block: 11px; margin-block: -11px; }
  .tool-price { margin-top: 2px; color: var(--steel); font-weight: 500; }
  .tool-has, .tool-foot { display: none; }
  .tool-chev { display: block; }
  .tool:hover .tool-a { text-decoration: none; }
}

/* ---------- 3. what you get: the filled-in example ---------- */
.see-words { text-align: center; }
.see-lede { margin: 12px auto 0; max-width: 34em; color: var(--ink-soft); }
.see-lede + .see-lede { margin-top: 8px; }
.see-points { display: grid; gap: 10px; margin: 22px auto 0; max-width: 30em; text-align: left; }
.see-points li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.see-points .check { margin-top: 2px; }
.drawn { margin-top: 30px; }
.sheet {
  padding: 22px 18px 20px; background: var(--sheet);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--lift);
}
.drawn figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px;
  margin-top: 14px; padding-inline: 4px; color: var(--steel); font-size: var(--fs-small); line-height: 1.45;
}
.drawn .more:hover .chev { transform: translateX(4px); }

/* ---------- 4. made for the desk, and the maker's note ---------- */
.talk-in {
  text-align: center; padding: 44px 22px 46px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 1px 0 rgba(12, 22, 37, .04), 0 24px 48px -32px rgba(12, 22, 37, .3);
}
.talk-in::before {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: var(--orange); margin: 0 auto 22px;
}
.talk h2 { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.12; max-width: 16em; margin: 0 auto 20px; }
.talk-in p { font-size: 18px; line-height: 1.65; color: var(--ink-soft); max-width: 33em; margin-inline: auto; }
.talk-in p + p { margin-top: 16px; }
.note { margin-top: 44px; }
.note .big { font: 400 22px/1.5 var(--serif); }
.sign { margin-top: 20px; font: italic 400 21px/1.3 var(--serif); }
.note .fold { margin-top: 26px; }
.how { margin: 0; color: var(--ink); }
.how-wide { display: none; }
.plain li { padding: 12px 0 12px 20px; border-bottom: 1px solid var(--line); position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: 24px; width: 8px; height: 2px; background: var(--orange); }

/* ---------- 5. the set, one line and its button ---------- */
.bundle-in { text-align: center; }
.bundle .set-buy { display: flex; width: 100%; margin-top: 20px; }
.math li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.math em { display: block; font-style: normal; color: var(--steel); font-size: var(--fs-small); }
.math .sum { border-bottom: 0; font-weight: 600; padding-top: 16px; }
.math .sum .pr { font-size: 20px; }
.n { flex: 1 1 auto; min-width: 0; }
.pr { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---------- 6. questions, and the rows that open ---------- */
.faq h2 { text-align: center; }
.rows { margin-top: 24px; border-top: 1px solid var(--line-strong); }
.rows details, .fold { border-bottom: 1px solid var(--line-strong); }
.rows summary, .fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 12px 2px; cursor: pointer; list-style: none;
  font: 600 18px/1.3 var(--text);
}
.rows summary::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.rows summary .chev, .fold > summary .chev { transition: transform .16s ease; transform: rotate(90deg); }
.rows details[open] summary .chev, .fold[open] > summary .chev { transform: rotate(-90deg); }
.rows details p { padding: 0 2px 14px; color: var(--ink-soft); }
.rows details p:last-child { padding-bottom: 20px; }
.fold { margin-top: 20px; border-top: 1px solid var(--line-strong); }
.fold .plain li:last-child { border-bottom: 0; }

/* The phone: "Made for the desk" keeps to its first paragraph */
@media (max-width: 639.98px) {
  .talk-in p + p { display: none; }
}

/* ---------- from 640 px: cards two to a row ---------- */
@media (min-width: 640px) {
  .wide { padding-inline: 24px; }
  main > .hero { padding-block: 56px 40px; }
  main > .tools { padding-top: 48px; }
  .kicker { margin-bottom: 20px; }
  .kicker::before { margin-bottom: 16px; }
  .lede { margin: 20px auto 28px; }
  .comfort { margin-top: 14px; }
  .hero-set { margin-top: 6px; }
  .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
  .tool-set {
    grid-column: 1 / -1; padding: 34px 34px 30px; gap: 26px 44px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  }
  .ts-pics { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
  .tool-set:has(.ts-list[open]) .ts-main { align-self: start; }   /* the name stays put when the list opens */
  .tool {
    display: flex; flex-direction: column; padding: 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--lift);
    transition: box-shadow .2s var(--out), border-color .2s var(--out);
  }
  .tool:hover { box-shadow: var(--lift-hover); border-color: rgba(12, 22, 37, .26); }
  /* the words: the category and the price on one line, the name under them at full width,
     and the foot at the bottom, so the feet line up along a row */
  .tool-words {
    display: grid; flex: 1 1 auto; padding: 16px 8px 2px; column-gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas: "cat price" "name name" "has has" "line line" "foot foot";
  }
  .tool-head { display: contents; }
  .tool-cat { grid-area: cat; align-self: baseline; margin: 0; }
  .tool-price { grid-area: price; align-self: baseline; font-size: 18px; }
  .tool-name { grid-area: name; margin-top: 6px; font: 400 23px/1.25 var(--serif); }
  .tool-has { grid-area: has; justify-self: start; }
  .tool-line { grid-area: line; }
  .tool-foot { grid-area: foot; align-items: flex-end; align-items: last baseline; }
  /* two to a row leaves the ninth alone: it takes the whole row, picture on the left */
  .grid > .tool:last-child { grid-column: 1 / -1; flex-direction: row; gap: 24px; align-items: stretch; }
  .grid > .tool:last-child .tool-pic { flex: 0 0 calc(50% - 24px); align-self: flex-start; }
  .grid > .tool:last-child .tool-words { padding: 8px 8px 2px 0; }

  .see-words { max-width: 640px; margin-inline: auto; }
  .sheet { padding: 34px 36px 30px; }
  .drawn { margin-top: 40px; }

  .talk-in { padding: 64px 48px 68px; }
  .talk-in p + p { margin-top: 18px; }
  .note { max-width: 640px; margin: 56px auto 0; }
  /* The folded lists read as plain open text here. motion.js opens them, so the summary
     is only put away once a script has run; with JavaScript off it stays, and still opens. */
  .js .fold { border: 0; }
  .js .fold > summary { display: none; }
  .js .how-wide { display: block; }
  .js .note .fold .plain { margin-top: 10px; }

  .bundle .set-buy { display: inline-flex; width: auto; min-width: 240px; }
  .faq-in { max-width: 760px; }
}

/* ---------- from 1000 px: the page uses the width ---------- */
@media (min-width: 1000px) {
  .wide { padding-inline: 32px; max-width: 1184px; }

  /* the hero: words on the left, three drawn cards on the right */
  main > .hero { padding-block: 36px 48px; text-align: left; }
  main > .tools { padding-top: 56px; }
  .hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
  .hero h1 { font-size: clamp(46px, 4.5vw, 64px); line-height: 1.08; }
  .kicker::before { margin: 0 0 16px; }
  .lede { margin: 22px 0 30px; max-width: 30em; font-size: 20px; }
  .hero-act { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
  .hero-act .comfort { margin: 0; }
  .hero-set { margin-top: 14px; }
  .hero-art { display: block; position: relative; aspect-ratio: 1 / 1.04; }
  .hv {
    position: absolute; width: 58%; border-radius: var(--r-lg); overflow: hidden;
    box-shadow: 0 2px 0 rgba(12, 22, 37, .04), 0 30px 50px -28px rgba(12, 22, 37, .55);
  }
  .hv .viz { border-radius: var(--r-lg); }
  .hv-1 { left: 0; top: 13%; transform: rotate(-7deg); }
  .hv-2 { right: 0; top: 1%; transform: rotate(6deg); }
  .hv-3 { left: 22%; top: 44%; transform: rotate(-1.5deg); box-shadow: 0 2px 0 rgba(12, 22, 37, .05), 0 36px 60px -26px rgba(12, 22, 37, .6); }

  /* the grid: the set across the top, then three to a row */
  .sec-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap;
    text-align: left; padding-bottom: 18px; border-bottom: 1px solid var(--line-strong);
  }
  .sec-head .sub { margin: 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 32px; }
  .grid > .tool:last-child { grid-column: auto; flex-direction: column; gap: 0; }
  .grid > .tool:last-child .tool-pic { flex: none; align-self: auto; }
  .grid > .tool:last-child .tool-words { padding: 16px 8px 2px; }
  .tool-set { padding: 40px 44px 36px; gap: 30px 64px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ts-name { font-size: 32px; }
  .ts-price strong { font-size: 56px; }
  .ts-line { font-size: 17px; max-width: 26em; }
  .ts-pics { gap: 12px; }

  /* what you get: the words on the left, the drawn page on the right */
  .see-in { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 64px; align-items: center; }
  .see-words { max-width: none; margin: 0; text-align: left; }
  .see-lede { margin-left: 0; font-size: 19px; }
  .see-points { margin: 26px 0 0; }
  .drawn { margin-top: 0; }

  /* the desk beside the maker's note */
  .talk-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 64px; align-items: center; }
  .talk-in { text-align: left; padding: 64px 56px 68px; }
  .talk-in::before { margin: 0 0 24px; }
  .talk h2 { margin: 0 0 22px; }
  .talk-in p { font-size: 19px; margin: 0; }
  .note { max-width: none; margin: 0; }

  /* the closing band: the line and its button side by side */
  .bundle-in { display: flex; align-items: center; justify-content: center; gap: 20px 40px; flex-wrap: wrap; }
  .bundle .set-buy { margin-top: 0; }

  /* questions: the heading on the left, the rows on the right */
  .faq-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; align-items: start; max-width: 1184px; }
  .faq h2 { text-align: left; }
  .faq .rows { margin-top: 0; }
}

/* Reduced motion means no movement: nothing slides or turns (base.css stops the rest). */
@media (prefers-reduced-motion: reduce) {
  .tool:hover .tool-foot .chev, .hero-set a:hover .chev, .drawn .more:hover .chev { transform: none; }
}
