/* The free tools (pages/tools.html and each tool; docs/mocks/site/tools.html), after outer/bands.css and
   outer/feature-editorial.css: a tool opens on the night with the tool itself where the night turns to dawn
   (fragments/tool-page.html :: hero), as a feature page's lead screen stands there, and closes on the same job in the
   app (:: close); the toolkit lists the tools as cards, below. */

/* the tool on its stage: the page's paper lifted off the dawn, its words the page's own again */
.night-hero__visual .tool-stage {
  max-width: 1160px; margin-inline: auto; text-align: start;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-strong) 10%, transparent), 0 30px 60px -30px rgba(var(--shadow-rgb), .4),
    0 70px 120px -60px rgba(var(--shadow-rgb), .35);
}

/* the close: its one line under the title, its quiet way in on the night, then the app doing the same job */
.tool-close .credit-note { margin-inline: auto; }
.tool-close .page-head__cta .btn--ghost { background: transparent; color: var(--inv-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-strong) 40%, transparent); }
.tool-close .page-head__cta .btn--ghost:hover { background: color-mix(in srgb, var(--inv-strong) 12%, transparent); }
.tool-close .app-window { margin-top: clamp(40px, 5vw, 64px); }

/* the hub's starters on the night (pages/tools.html): a task to begin with, and a Net 30 date to answer at once */
.tools-date { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-5); max-width: 880px; margin-inline: auto; padding: clamp(20px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-panel); color: var(--ink); text-align: left; box-shadow: var(--shadow-pop); }
.tools-date h2 { font-family: var(--font-display); font-size: clamp(25px, 2.2vw, 34px); line-height: 1.1; }
.tools-date p { max-width: 38ch; margin-top: var(--space-2); color: var(--text-muted); }
.tools-date__controls { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.tools-date label { font-size: var(--fs-sm); font-weight: 600; }
.tools-date input[type=date] { display: block; margin-top: var(--space-1); padding: var(--space-2); min-height: 44px; max-width: 100%; border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); font: inherit; color: var(--ink); }

@media (max-width: 640px) {
  .tools-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-inline: 0; padding-inline: 0; overflow: visible; }
  .tools-start a { justify-content: center; min-height: 44px; white-space: normal; text-align: center; padding-inline: var(--space-2); }
}

/* ---------- The toolkit (pages/tools.html): a .detail-card (outer/bands.css) per tool under the band's one line. It
   opens on its tool's specimen, then its words and its ways; its first way is the card's link, so the whole card
   answers to it ---------- */
.tool-grid { margin-top: clamp(32px, 4vw, 48px); }
.tool-grid + .guide-link { margin-top: var(--space-6); }
.tool-card { grid-template-rows: auto 1fr auto; gap: 0; padding: 0; }
.tool-card:has(a:focus-visible) { outline: 2px solid var(--m); outline-offset: 3px; }
.tool-card__copy { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-6) var(--space-6) var(--space-2); }
.tool-card .tool-card__note { font-size: var(--fs-xs); color: var(--caption); }
.tool-card__ways { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; padding: var(--space-3) var(--space-6) var(--space-6); list-style: none; }
.tool-card__ways a { display: inline-flex; align-items: center; gap: var(--icon-gap-sm); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-decoration: none; }
.tool-card__ways a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--m); }
.tool-card__ways .bg-icon { color: var(--m); }
.tool-card__ways li:first-child a::after { content: ""; position: absolute; inset: 0; }
.tool-card__ways li:not(:first-child) a { position: relative; z-index: 1; }
/* a phone's detail card sets an icon beside its words; this one has none */
@media (max-width: 640px) { .tool-card { grid-template-columns: minmax(0, 1fr); padding: 0; row-gap: 0; } }

/* A tool's specimen (fragments/tool-specimen.html): the answer the tool gives, set on the card itself with sample
   data, no picture and no box. A label, one figure on the row's shared baseline (its fixed track keeps the rows level),
   one hairline drawing of the tool's idea, and a rule to the card's words, inset to their edge. A figure keeps to one
   line and to its card: its size follows the specimen's width (cqi) under a cap, set by the widest sample (numbers:
   "Dec 8, 2026", 4.4em; words: the reminder's quote, 8.3em). */
.tool-specimen {
  position: relative; display: grid; grid-template-rows: auto 58px 1fr; height: 196px; container-type: inline-size;
  padding: var(--space-7) var(--space-6) var(--space-6); font-variant-numeric: lining-nums tabular-nums;
}
.tool-specimen::after { content: ""; position: absolute; inset: auto var(--space-6) 0; height: 1px; background: var(--line); }
.tool-specimen__label { font-size: var(--fs-xs); font-weight: 600; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: var(--m); }
.tool-specimen__figure {
  display: flex; align-items: flex-end; gap: 6px; white-space: nowrap;
  font-family: var(--font-serif); font-size: min(46px, 22cqi); line-height: 1; letter-spacing: -.035em; color: var(--ink);
}
.tool-specimen__figure small { padding-bottom: 5px; font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; color: var(--text-muted); }
.tool-specimen__figure--words { font-size: min(34px, 11.5cqi); letter-spacing: -.025em; }
.tool-specimen__foot { align-self: end; display: grid; gap: 9px; font-size: var(--fs-sm); line-height: 1.3; color: var(--text-muted); }
.tool-specimen__foot b { font-weight: 600; color: var(--ink); }
.tool-specimen__split { display: flex; justify-content: space-between; gap: var(--space-3); }

/* an invoice: its total ruled twice, as a ledger closes, over its terms and the day it is due */
.tool-specimen__figure--total span { text-decoration: underline double color-mix(in srgb, var(--ink) 70%, transparent); text-decoration-thickness: 1px; text-underline-offset: 9px; }
.tool-specimen__terms { padding-top: 10px; border-top: 1px solid var(--line); }

/* a whole in parts, each as long as its amount (--part): what came before, this payment, what is left */
.tool-specimen__bar { display: flex; gap: 3px; height: 6px; }
.tool-specimen__bar i { flex: var(--part) 1 0; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tool-specimen__bar .is-before { background: color-mix(in srgb, var(--m) 35%, var(--bg-panel)); }
.tool-specimen__bar .is-now { background: var(--m); }

/* a share (--share) as a ring, its words beside it */
.tool-specimen__ring { display: flex; align-items: center; gap: var(--space-3); }
.tool-specimen__ring i {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(var(--m) var(--share), color-mix(in srgb, var(--ink) 8%, transparent) 0);
  mask: radial-gradient(circle, transparent 9px, #000 9.5px);
}

/* a working day on a ruler, a tick an hour (eight), filled to the hours worked (--share) */
.tool-specimen__ruler { position: relative; height: 6px; margin-bottom: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tool-specimen__ruler::after { content: ""; position: absolute; inset: 9px 0 -7px; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 25%, transparent) 1px, transparent 0) 0 0 / calc((100% - 1px) / 8) 100%; }
.tool-specimen__ruler i { position: absolute; inset: 0 auto 0 0; width: var(--share); border-radius: inherit; background: var(--m); }

/* stops on a line, first and last at its ends, the current one filled */
.tool-specimen__line { position: relative; display: flex; justify-content: space-between; padding-top: 16px; }
.tool-specimen__line::before { content: ""; position: absolute; inset: 4px 4px auto; height: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.tool-specimen__line span { position: relative; display: grid; justify-items: center; gap: 1px; text-align: center; }
.tool-specimen__line span::before {
  content: ""; position: absolute; top: -16px; left: calc(50% - 4.5px); width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-panel); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 30%, transparent);
}
.tool-specimen__line span:first-child { justify-items: start; text-align: start; }
.tool-specimen__line span:first-child::before { left: 0; }
.tool-specimen__line span:last-child { justify-items: end; text-align: end; }
.tool-specimen__line span:last-child::before { left: auto; right: 0; }
.tool-specimen__line small { font-size: var(--fs-xs); color: var(--caption); }
.tool-specimen__line .is-now { font-weight: 600; color: var(--ink); }
.tool-specimen__line .is-now small { font-weight: 400; }
.tool-specimen__line .is-now::before { background: var(--m); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m) 18%, transparent); }

/* a ledger's lines, dotted to their amounts */
.tool-specimen__ledger { display: grid; gap: 5px; }
.tool-specimen__ledger span { display: flex; align-items: baseline; gap: var(--space-2); }
.tool-specimen__ledger span::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted color-mix(in srgb, var(--ink) 25%, transparent); }
.tool-specimen__ledger b { order: 2; }

/* the line a client signs */
.tool-specimen__sign { padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); font-family: var(--font-serif); font-size: 18px; line-height: 1; color: var(--m); }

/* what holds, each with its check */
.tool-specimen__checks { display: flex; flex-wrap: wrap; gap: 6px var(--space-4); }
.tool-specimen__checks span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tool-specimen__checks .bg-icon { color: var(--m); }
