/* Harbor's asking page. It loads the console's style first (/console/console.css: the tokens,
   type, light and dark themes, the navigator, controls, tables, the sign-in page), so the two
   faces of Harbor are one product; this file adds only what asking needs. The look's rules are
   kit docs/kit.md section 6: one accent, no cards, no tiles, no pills, charts below the numbers. */
/* the two lines of a chart: the accent, solid; the comparison in the muted ink, dashed (told apart by lightness and by the dash) */
:root { --series-a: var(--accent); --series-b: #A0918A; --reading: 760px; --wide: 1120px; }
:root[data-theme=dark] { --series-b: #96847B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --series-b: #96847B; } }

/* the panel: the navigator's look; Recent scrolls inside it, the person stays at its foot */
.app.ask .ask-side { position: sticky; top: 0; height: 100vh; min-height: 0; }
.ask-side .new-q { margin: 14px 0 6px; justify-content: center; }
.ask-side .recent-head { font-size: 12.5px; font-weight: 600; color: var(--side-muted); margin: 14px 8px 6px; }
.ask-side .recent { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; margin: 0 -4px; padding: 0 4px 16px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.recent-item { display: block; padding: 7px 10px 8px; color: var(--side-ink); border-radius: 0 3px 3px 0; }
.recent-item:hover { text-decoration: none; background: rgba(255,255,255,.06); }
.recent-item.sel { background: var(--side-sel); box-shadow: inset 2px 0 0 var(--side-mark); }
.recent-item .q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; }
.recent-item .sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--side-muted); }
.recent-item .sub.ink-warn { color: #F0A63C; }
.recent-day { font-size: 12px; color: var(--side-muted); margin: 10px 10px 2px; }
.recent-day:first-child { margin-top: 0; }
.ask-side .none { color: var(--side-muted); font-size: 13px; padding: 4px 10px; }
.ask-side .who { margin-top: 10px; }
.ask-side .who a { display: inline-block; margin-top: 2px; }

/* the reading column: a comfortable measure; tables and charts may take more of a wide window */
.reading { max-width: var(--wide); }
.reading > *, .answer > * { max-width: var(--reading); }
.reading > .question { max-width: var(--wide); }
.question > *, .answer > * { max-width: var(--reading); }
.question > .answer, .answer > .block.wide { max-width: var(--wide); }
.title { font-size: 28px; font-weight: 600; line-height: 1.2; margin-bottom: 18px; }
.say { font-size: 19px; line-height: 1.45; overflow-wrap: anywhere; }
.para { margin-top: 12px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.say + .rule { margin-top: 10px; }
.buttons { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.scroll { overflow-x: auto; }

/* the question box */
textarea { font: inherit; color: inherit; }
.askbox textarea.field { display: block; width: 100%; height: auto; min-height: 84px; padding: 10px 11px; line-height: 1.45; resize: vertical; }
.more .askbox textarea.field { min-height: 58px; }
.askrow { display: flex; justify-content: flex-end; margin-top: 10px; }
.askbox .failed { margin-top: 10px; }

/* ruled lists: the models, the remembered choices, the models to choose from */
ul.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.rows li { padding: 10px 0 11px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.rows li b, .pick b { font-weight: 600; }
.rows .about, .pick .about { color: var(--ink); }
.rows .sub, .pick .sub, .asked .sub { color: var(--muted); font-size: 13px; }
.rows li.choice { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 20px; }
.rows li.choice > span { display: flex; flex-direction: column; min-width: 0; }
.rows li.choice a { white-space: nowrap; }
.picks { margin-top: 16px; border-top: 1px solid var(--border); }
/* a model to choose: the whole row is the button, with a chevron at its end; hover and focus mark it */
.pick { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 12px 12px 13px; background: none; border: 0; border-bottom: 1px solid var(--hair); cursor: pointer; overflow-wrap: anywhere; }
.pick .what { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.pick .go { flex: none; width: 9px; height: 9px; border-top: 2px solid var(--link); border-right: 2px solid var(--link); transform: rotate(45deg); margin-right: 6px; }
.pick:hover, .pick:focus-visible { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.pick:focus-visible { outline-offset: -2px; }
.pick:hover .go { border-color: var(--accent); }
.check { color: var(--muted); }

/* a conversation: each question, then what became of it */
.question { margin-bottom: 40px; }
.question.follow > .asked { border-top: 1px solid var(--border); padding-top: 30px; }  /* the rule as wide as the reading column */
.asked { margin-bottom: 16px; }
.asked h1 { font-size: 22px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.asked .sub { display: block; margin-top: 4px; }
/* working: an indeterminate line, a soft glint that keeps travelling, never a fill that implies how far along */
.track { height: 2px; margin: 16px 0 14px; background: var(--hair); position: relative; overflow: hidden; }
.track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: slide 1.4s linear infinite; }
@keyframes slide { from { left: -22%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .track::after { animation: pulse 2s ease-in-out infinite; left: 0; width: 100%; } }
@keyframes pulse { 50% { opacity: .25; } }
.more { margin-top: 0; }
/* a long question: the body's larger size in regular weight, whole (never cut) */
.asked h1.long { font-size: 19px; font-weight: 400; line-height: 1.45; }
.nowrap { white-space: nowrap; }

/* an answer: what it rests on in one quiet line; the blocks; the full account beside them from 1600 px, after them below */
.rests-line { color: var(--muted); font-size: 13.5px; margin: -6px 0 18px; }
.rests-line .flag { margin-left: 4px; }
.q-body { max-width: var(--wide); }
.q-main > *, .q-after { max-width: var(--reading); }
.q-main > .answer { max-width: var(--wide); }
.q-aside { max-width: var(--reading); }
.q-aside .block.rests-on { margin-top: 36px; }
.q-aside .block > h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
/* THE WIDTH RULE (one for the whole asking page): from 1600 px the content is a composed block
   CENTRED in the work surface, 1224 px on every screen: the reading column (760 px) at its left
   and, where a screen has one (an answer's account, the remembered choices), the aside at its
   right; choices side by side span it. So every screen starts at one left edge, and what is left
   over is two balanced margins, never an empty right half. Below 1600 the column sits at the
   left as before. */
@media (min-width: 1600px) {
  /* every screen's block has the composed width, so a stopped state starts where an answer starts */
  .reading { max-width: calc(var(--reading) + 64px + 400px); margin: 0 auto; }
  .reading.composed > .question, .reading.composed .q-body { max-width: none; }
  .reading.composed > .q-body.has-aside > .q-main > * { max-width: var(--reading); }
  .q-aside > .blk:first-child { margin-top: 0; }
  .q-aside .keeping { margin-top: 18px; }
  .reading.composed .question > .picks[class*="side-"] { max-width: none; display: grid; border-top: 1px solid var(--border); }
  .picks.side-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picks.side-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picks[class*="side-"] .pick { align-items: flex-start; padding: 16px 20px 18px; border-bottom: 1px solid var(--hair); }
  .picks[class*="side-"] .pick + .pick { border-left: 1px solid var(--hair); }
  .picks[class*="side-"] .pick .go { margin-top: 6px; }
  .q-body.has-aside { display: grid; grid-template-columns: minmax(0, var(--reading)) 400px; column-gap: 64px; grid-template-areas: "main aside" "after aside"; align-items: start; }
  .q-body.has-aside > .q-main { grid-area: main; }
  .q-body.has-aside > .q-after { grid-area: after; }
  .q-body.has-aside > .q-aside { grid-area: aside; position: sticky; top: 24px; padding-left: 28px; border-left: 1px solid var(--border); }
  .q-body.has-aside .answer > .block.wide { max-width: var(--reading); }
  .q-aside .block.rests-on { margin-top: 0; }
  .q-aside dl.rests { grid-template-columns: 110px minmax(0, 1fr); border-top: 0; }
  .q-aside .block > h2 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
}

/* an answer's blocks: more space before a section than inside it */
.answer .block { margin-top: 36px; }
.answer .block > h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.answer .where { margin-top: 24px; color: var(--muted); }
.answer .where b { color: var(--ink); font-weight: 600; }
.answer .where p + p { margin-top: 4px; }
.lead { display: flex; flex-direction: column; margin-top: 24px; }
.lead .label { color: var(--muted); }
.lead .fig { font-size: 52px; font-weight: 600; line-height: 1.1; font-variant-numeric: proportional-nums lining-nums; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.lead .caption { color: var(--muted); margin-top: 4px; }
.t.compare td:first-child { width: 40%; }
.t td.change { white-space: nowrap; }
.t .pct { color: var(--muted); margin-left: 10px; }
.t td.n, .t th.n { white-space: nowrap; }
/* a table's words are Harbor's: the row's label, and a cell's own part of the engine's label above its figure */
.t td.row-label { color: var(--ink); }
.t .cell-label { display: block; color: var(--muted); font-size: 12.5px; white-space: normal; }
/* the engine's own words in What This Rests On: its state of the version, its notes, one per line */
.rests dd .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.rests .engine-note { display: block; }
.rests .engine-note + .engine-note { margin-top: 4px; }
/* what the version used from another model's version, in Harbor's words (step E, E.5): one per line */
.rests .taken-from { display: block; }
.rests .taken-from + .taken-from { margin-top: 4px; }
.answer .t td { overflow-wrap: break-word; }  /* a long word may break; a table never squeezes words to letters: it scrolls */
/* What This Rests On: one rule at the top, rows parted by space (not a ladder of rules) */
dl.rests { grid-template-columns: 150px minmax(0, 1fr); border-top: 1px solid var(--border); padding-top: 4px; }
.rests dt, .rests dd { overflow-wrap: anywhere; padding: 4px 0 5px; }
.rests dt { font-size: 13.5px; }
.flag { font-weight: 600; }

/* the chart: a value axis with light rules, Harbor's tick text and the unit at the axis; each line named at its end */
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.chart-key i { display: inline-block; width: 22px; border-top: 2px solid var(--series-a); vertical-align: middle; margin-right: 7px; }
.chart-key i.b { border-top: 2px dashed var(--series-b); }
svg.chart { display: block; max-width: 100%; height: auto; margin-top: 6px; }
.chart text { fill: var(--muted); font: 12px var(--font); font-variant-numeric: tabular-nums; }
.chart text.unit { font-weight: 600; }
.chart text.name.a { fill: var(--ink); font-weight: 600; }
.chart .base { stroke: var(--faint); stroke-width: 1; fill: none; }
.chart .grid { stroke: var(--hair); stroke-width: 1; fill: none; }
.chart polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart polyline.a { stroke: var(--series-a); stroke-width: 2.5; } .chart polyline.b { stroke: var(--series-b); stroke-dasharray: 6 4; }
.chart circle.dot-a, .chart circle.dot-b { stroke: var(--surface); stroke-width: 2; }
.chart .dot-a { fill: var(--series-a); } .chart .dot-b { fill: var(--series-b); }
.chart .hit { fill: transparent; stroke: none; }

/* the figures in the engine's words (an answer with a table or a chart): behind a quiet disclosure, closed; open when printed */
details.numbers { margin-top: 18px; max-width: var(--reading); }
details.numbers.words td.n { white-space: nowrap; }
/* a figure resting on another basis than the answer's shared one: a dagger, and the basis line that starts with it */
.dagger { font-size: 0.75em; margin-left: 2px; color: var(--ink, inherit); font-weight: 600; }  /* numbered: read without hovering (D3) */
/* each what-if as run, in What This Rests On: its title, then the product's own command lines, small */
.change-title { display: block; color: var(--ink); }
.as-run { display: block; margin: 2px 0 8px; }
.as-run .cue { display: block; color: var(--muted); font-size: 12px; }
.as-run code { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
details.as-run-all { margin: 4px 0 8px; }
details.as-run-all > summary { cursor: pointer; color: var(--link); font-size: 13px; width: max-content; }
.rests-line .change-titles { color: var(--ink); }
details.numbers > summary { cursor: pointer; color: var(--link); font-size: 13.5px; width: max-content; }
details.numbers[open] > summary { margin-bottom: 8px; }
@media print {
  details.numbers > summary, details.as-run-all > summary { display: none; }
  .app.ask .ask-side, .more, .keeping, .demo { display: none; }
  .app.ask { display: block; }
}

.narrow-only { display: none; }

/* a narrow window: the panel becomes a bar along the top; Recent moves onto the Ask screen */
@media (max-width: 760px) {
  .app.ask { display: block; }
  .app.ask .ask-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 0 16px 10px; }
  .ask-side .brand { height: 48px; padding: 0; }
  .ask-side .org { display: none; }
  .ask-side .recent-head, .ask-side .recent { display: none; }
  .ask-side .new-q { margin: 0 0 0 auto; }
  .ask-side .who { margin: 0; padding: 0; border: 0; width: 100%; display: flex; justify-content: space-between; }
  .ask-side .who b { display: inline; }
  .narrow-only { display: block; }
  .narrow-only .recent-item { color: var(--ink); border-bottom: 1px solid var(--hair); border-radius: 0; padding: 9px 0; }
  .narrow-only .recent-item.sel { box-shadow: none; background: none; }
  .narrow-only .recent-item .sub { color: var(--muted); }
  .narrow-only .recent { border-top: 1px solid var(--border); }
  .narrow-only .none { color: var(--muted); }
  .main { padding: 20px 16px 48px; }
  .demo { margin: -20px -16px 16px; padding: 8px 16px; }
  .lead .fig { font-size: 40px; }
  dl.rests { grid-template-columns: 110px minmax(0, 1fr); }
  .rows li.choice { flex-direction: column; gap: 4px; }
  .t .pct { display: block; margin-left: 0; }
  .t.compare td:first-child { width: auto; }
}

/* a kept what-if (P1.11): a quiet action under the answer, then the line that says where it is */
.keeping { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hair); }
.keeping .keep { font-size: 14px; }
.keeping .kept { color: var(--muted); font-size: 14px; }
.keeping .kept b { color: var(--ink); font-weight: 600; }
.keeping .kept + .kept, .keeping .kept + .keep { margin-top: 4px; }
.dialog .line.top { align-items: start; }
.dialog .calls { display: flex; flex-direction: column; gap: 4px; }
.dialog .calls .check { display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.dialog .failed { margin-top: 12px; }
.dialog .means { color: var(--muted); margin-bottom: 14px; }

/* a model's page (step F, F.6): each version, newest first, its sign-off on Harbor, and Sign... under it */
.rows .model-open { font-size: 13.5px; margin-top: 3px; width: max-content; }
.rows .signoff { color: var(--muted); font-size: 13px; }
.rows .signoff .signoff-fact { font-size: 13px; }
.versions { margin-top: 8px; border-top: 1px solid var(--border); }
.version { padding: 18px 0 20px; border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
.version h2 { font-size: 17px; font-weight: 600; }
.version h2 .muted { font-weight: 400; }
.version .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.version .sub.ink-warn { color: var(--warn); }
.version .about { margin-top: 6px; }
.version .sign-state { margin-top: 12px; }
.version .sign-state h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.version .withdraw-link { font-size: 13px; margin-left: 6px; white-space: nowrap; }
.version .recorded { margin-top: 10px; padding-left: 10px; box-shadow: inset 2px 0 0 var(--accent); font-size: 14px; }
.version .buttons { margin-top: 12px; }
.version.gone h2 { color: var(--muted); }
.dialog textarea.field { display: block; height: auto; min-height: 72px; padding: 8px 9px; line-height: 1.45; resize: vertical; }
.dialog .sign-named { grid-template-columns: 170px minmax(0, 1fr); column-gap: 14px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin-bottom: 8px; }
.dialog .sign-named dt, .dialog .sign-named dd { padding: 3px 0 4px; overflow-wrap: anywhere; }
.dialog .line .sub { color: var(--muted); }
.dialog.sign .calls .check { margin-top: 0; padding: 3px 0; }
.dialog.sign .line.top > label { padding-top: 3px; }
@media (max-width: 760px) {
  .dialog .line { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .dialog .sign-named { grid-template-columns: 90px minmax(0, 1fr); column-gap: 10px; }
  .dialog { padding: 18px 18px 18px; max-width: calc(100vw - 24px); }
  .veil { padding-top: 4vh; }
  /* a phone's tap: Withdraw... on a line of its own under the statement, its facts and its note, 40 px high */
  .version .signoff-line .withdraw-link { display: none; }
  .version .signoff-act { display: block; }
  .version .signoff-act .withdraw-link { display: flex; align-items: center; width: max-content; min-height: 40px; margin: 0; font-size: 14px; }
}