/* refarch-ask.css — the agentic-spec-kit gate walkthrough
   (/architecture/agentic-spec-kit/).
   Loads after refarch.css. The stage (nodes, flow, caption, controls, drawer) is
   refarch.css's; what is here is the page chrome around it: the nine stops of
   one real change as tab panels, a profile switch, a table and a limits panel,
   all on refarch.css's tokens and follows the light
   and reading themes through the same remap. Every font-size is
   calc(<px> * var(--fs, 1)) at a 12px floor, like the rest of the site.

   All nine stops are in the HTML. Without the script they read as one long
   page; the script adds .ask-on, which is what turns them into tab panels. */

  .ra-ask .title p{max-width:820px; line-height:1.5}
/* The controls that need the script carry [hidden] until it runs. The display
   values below would otherwise win over the attribute and show dead buttons. */
  .ask [hidden], .ra-ask [data-needs-script][hidden]{display:none}
  .ra-ask .drawer{width:min(440px,90vw); padding:24px 26px 40px}
/* The stage's own gates: Lite leaves four out, said in words on the node and
   repeated by the dashed border. */
  .ra-ask .node.ask-off{border-style:dashed}
  .ra-ask .node.ask-off .ntag{color:var(--amber)}
  .ra-ask .ask-rail-note{margin:10px 0 14px}

/* ---- Key facts: the answer first, for readers and for crawlers ----------- */
  .ask-facts{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; margin:0 0 14px}
  .ask-facts > div{min-width:0; padding:8px 12px; border-radius:13px; border:1px solid var(--line); background:var(--panel)}
  .ask-facts dt{margin:0 0 3px; font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
  .ask-facts dd{margin:0; font-size:calc(13.5px * var(--fs, 1)); line-height:1.5; color:var(--ink); overflow-wrap:anywhere}
  .ask-facts a{color:var(--teal); text-decoration:underline; text-underline-offset:2px}

/* ---- The honesty strip under the title ----------------------------------- */
  .ask-truth{margin:0 0 14px; padding:10px 14px; border-radius:13px; border:1px solid var(--line);
    border-left:3px solid var(--amber); background:var(--panel);
    font-size:calc(13.5px * var(--fs, 1)); line-height:1.55; color:var(--ink); max-width:none}
  .ask-truth b{color:var(--amber)}

/* ---- Profile switch ------------------------------------------------------ */
  .ask-steer{display:grid; gap:10px; margin:0 0 14px; padding:12px 14px;
    background:var(--panel); border:1px solid var(--line); border-radius:13px}
  .ask-row{display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap}
  .ask-label{font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.08em; text-transform:uppercase;
    color:var(--muted)}
  .ask-seg{flex-wrap:wrap; gap:2px; max-width:100%}
  .ask-seg button{min-height:34px}
  .ask-readout{margin:0; font-size:calc(13.5px * var(--fs, 1)); color:var(--muted); line-height:1.55; max-width:900px}
  .ask-readout b{color:var(--ink)}
  .ask-readout + .ask-readout{margin-top:6px}

/* ---- The rail: one tab per gate ------------------------------------------ */
  .ask-rail{display:grid; grid-template-columns:repeat(9,minmax(0,1fr)); gap:6px; margin:0 0 6px}
  .ask-tab{font:inherit; display:grid; gap:2px; align-content:start; justify-items:start; text-align:left;
    min-width:0; min-height:64px; padding:8px 9px; border-radius:11px; cursor:pointer;
    background:var(--panel); border:1px solid var(--line); color:var(--ink);
    transition:border-color .2s, background .2s}
  .ask-tab:hover{border-color:var(--blue2)}
  .ask-tab-id{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace; font-size:calc(12px * var(--fs, 1));
    font-weight:700; color:var(--blue2); letter-spacing:.04em}
/* The two long names carry a soft hyphen in the HTML, so on a 320px screen they
   break as words do; anywhere is only the last resort at the largest text size. */
  .ask-tab-name{font-size:calc(13px * var(--fs, 1)); font-weight:800; line-height:1.2; hyphens:manual; overflow-wrap:anywhere}
  .ask-tab-state{font-size:calc(12px * var(--fs, 1)); font-weight:600; line-height:1.25; color:var(--muted); overflow-wrap:anywhere}
/* Selection is carried by aria-selected and repeated by the fill, the border
   and the bar under the tab; no state on this page is told by colour alone. */
  .ask-tab[aria-selected="true"]{background:var(--panel2); border-color:var(--blue2); box-shadow:inset 0 -3px 0 var(--blue2)}
/* A gate the chosen profile does not require: said in words on the tab
   (.ask-tab-off), with a dashed border as the repeat. Not dimmed, because
   dimmed text under 4.5:1 is the usual price of that. */
  .ask-tab-off{display:none; font-size:calc(12px * var(--fs, 1)); font-weight:700; line-height:1.25; color:var(--amber); overflow-wrap:anywhere}
  .ask[data-profile="lite"] .ask-tab[data-lite="no"]{border-style:dashed}
  .ask[data-profile="lite"] .ask-tab[data-lite="no"] .ask-tab-off{display:block}
  .ask[data-profile="lite"] .ask-tab[data-lite="no"] .ask-tab-state{display:none}
  .ask-rail-note{margin:0 0 14px; font-size:calc(12.5px * var(--fs, 1)); color:var(--muted); line-height:1.5}
  @media (max-width:1000px){ .ask-rail{grid-template-columns:repeat(5,minmax(0,1fr))} }
  @media (max-width:640px){ .ask-rail{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ---- A stop -------------------------------------------------------------- */
  .ask-stop{margin:0 0 18px; padding:16px 18px 18px; background:var(--panel); border:1px solid var(--line);
    border-radius:16px; box-shadow:var(--glow); min-width:0; scroll-margin-top:96px}
  .ask-on .ask-stop{margin-bottom:0}
  .ask-on .ask-stop[hidden]{display:none}
  .ask-stop:focus-visible{outline:2px solid var(--blue2); outline-offset:3px}
  .ask-stop-head h2{margin:0; font-size:calc(clamp(18px,2.2vw,23px) * var(--fs, 1)); font-weight:800; letter-spacing:-.015em; color:var(--ink)}
  .ask-gid{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace; font-size:.8em; color:var(--blue2); margin-right:.35em}
  .ask-state{margin:8px 0 0; font-size:calc(13.5px * var(--fs, 1)); line-height:1.5; color:var(--ink)}
  .ask-state b{display:inline-block; margin-right:6px; padding:2px 9px; border-radius:999px; border:1px solid currentColor;
    font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--rose)}
  .ask-need{margin:8px 0 0; font-size:calc(13px * var(--fs, 1)); line-height:1.5; color:var(--muted)}
  .ask-need span{display:block}
  .ask[data-profile] .ask-need span{display:none}
  .ask[data-profile="lite"] .ask-need [data-p="lite"],
  .ask[data-profile="standard"] .ask-need [data-p="standard"],
  .ask[data-profile="regulated"] .ask-need [data-p="regulated"]{display:block}
  .ask[data-profile] .ask-readout{display:none}
  .ask[data-profile="lite"] .ask-readout[data-p="lite"],
  .ask[data-profile="standard"] .ask-readout[data-p="standard"],
  .ask[data-profile="regulated"] .ask-readout[data-p="regulated"]{display:block}

  .ask-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px}
  .ask-card{min-width:0; padding:12px 14px; border-radius:12px; border:1px solid var(--line); background:var(--panel2)}
  .ask-card.wide{grid-column:1 / -1}
  .ask-card h3{margin:0 0 6px; font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
  .ask-card p, .ask-card li{font-size:calc(14px * var(--fs, 1)); line-height:1.55; color:var(--ink); overflow-wrap:anywhere}
  .ask-card p{margin:0}
  .ask-card p + p{margin-top:8px}
  .ask-card ul, .ask-card ol{margin:0; padding-left:20px}
/* style.css resets list markers site-wide; these lists are real lists. */
  .ask-card ul, .ask-limits ul{list-style:disc}
  .ask-card ol{list-style:decimal}
  .ask-card li::marker, .ask-limits li::marker{color:var(--muted)}
  .ask-card li + li{margin-top:6px}
  .ask-card p + ul, .ask-card p + ol{margin-top:6px}
  .ask-card ul + p, .ask-card ol + p{margin-top:8px}
  .ask-card code, .ask-limits code, .ask-profiles code{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace; font-size:calc(12.5px * var(--fs, 1));
    color:var(--ink); background:rgba(255,255,255,.05); border:1px solid var(--line); border-radius:6px; padding:1px 5px; overflow-wrap:anywhere}
/* Who acts: the word says whether it is an agent or a person; the colour of
   the badge only repeats it. */
  .ask-card .ask-who{list-style:none; padding-left:0}
  .ask-who li{display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 10px; align-items:start}
  .ask-badge{display:inline-block; justify-self:start; min-width:5.2em; text-align:center; padding:2px 8px; border-radius:999px; border:1px solid currentColor;
    font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.05em; text-transform:uppercase; line-height:1.5; white-space:nowrap}
  .ask-badge.agent{color:var(--blue2)}
  .ask-badge.person{color:var(--amber)}
  .ask-card.real{border-left:3px solid var(--amber)}
  .ask-card.found{border-left:3px solid var(--mint)}
  @media (max-width:820px){ .ask-grid{grid-template-columns:minmax(0,1fr)} }
  @media (max-width:420px){ .ask-who li{grid-template-columns:minmax(0,1fr)} .ask-stop{padding:14px 13px 15px} }

/* ---- Previous / next ----------------------------------------------------- */
  .ask-nav{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:12px 0 0}
  .ask-btn{font:inherit; font-size:calc(13px * var(--fs, 1)); font-weight:700; line-height:1.2; color:var(--ink);
    background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 14px; min-height:40px; cursor:pointer;
    transition:border-color .2s, background .2s}
  .ask-btn:hover{border-color:var(--blue2)}
  .ask-btn.primary{background:var(--blue-fill); border-color:var(--blue-fill); color:#fff}
  .ask-btn[disabled]{cursor:default; opacity:1; color:var(--faint); background:transparent; border-style:dashed}
  .ask-btn.primary[disabled]{color:var(--faint); background:transparent; border-color:var(--line)}
  .ask-count{margin:0 0 0 auto; font-size:calc(13px * var(--fs, 1)); font-weight:700; color:var(--muted)}
  @media (max-width:520px){ .ask-count{margin-left:0; width:100%} }

/* ---- Gates by profile ---------------------------------------------------- */
  .ask-section{margin-top:26px}
  .ask-section > h2{margin:0; font-size:calc(clamp(17px,2vw,21px) * var(--fs, 1)); font-weight:800; letter-spacing:-.01em; color:var(--ink)}
  .ask-section > p{margin:4px 0 0; color:var(--muted); font-size:calc(13.5px * var(--fs, 1)); line-height:1.55; max-width:820px}
  .ask-tablewrap{margin-top:12px; overflow-x:auto; border:1px solid var(--line); border-radius:13px; background:var(--panel)}
  .ask-tablewrap:focus-visible{outline:2px solid var(--blue2); outline-offset:3px}
  .ask-profiles{width:100%; min-width:520px; border-collapse:collapse; font-size:calc(13.5px * var(--fs, 1)); line-height:1.45}
  .ask-profiles th, .ask-profiles td{padding:9px 12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); color:var(--ink)}
  .ask-profiles tr:last-child th, .ask-profiles tr:last-child td{border-bottom:0}
  .ask-profiles thead th{font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
  .ask-profiles tbody th{font-weight:700}
  .ask-profiles .no{color:var(--muted)}
/* The chosen profile's column: a heavier edge and a fill, with the word
   "chosen" added to its heading by the script. */
  .ask[data-profile="lite"] .ask-profiles :is(th,td)[data-col="lite"],
  .ask[data-profile="standard"] .ask-profiles :is(th,td)[data-col="standard"],
  .ask[data-profile="regulated"] .ask-profiles :is(th,td)[data-col="regulated"]{background:var(--panel2); box-shadow:inset 2px 0 0 var(--blue2), inset -2px 0 0 var(--blue2)}

/* ---- What the kit does not do -------------------------------------------- */
  .ask-limits{margin-top:26px; padding:16px 18px 18px; border-radius:16px; border:1px solid var(--line);
    border-left:3px solid var(--rose); background:var(--panel)}
  .ask-limits h2{margin:0; font-size:calc(clamp(17px,2vw,21px) * var(--fs, 1)); font-weight:800; letter-spacing:-.01em; color:var(--ink)}
  .ask-limits > p{margin:4px 0 0; color:var(--muted); font-size:calc(13.5px * var(--fs, 1)); line-height:1.55; max-width:820px}
  .ask-limits-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 26px; margin-top:12px}
  .ask-limits-grid > div{min-width:0}
  .ask-limits h3{margin:0 0 4px; font-size:calc(12px * var(--fs, 1)); font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--rose)}
  .ask-limits ul{margin:0 0 6px; padding-left:20px}
  .ask-limits li{font-size:calc(14px * var(--fs, 1)); line-height:1.55; color:var(--ink); overflow-wrap:anywhere}
  .ask-limits li + li{margin-top:5px}
/* Underlined: a link inside a sentence must not be told by colour alone. */
  .ask-limits a{color:var(--teal); text-decoration:underline; text-underline-offset:2px}
  @media (max-width:820px){ .ask-limits-grid{grid-template-columns:minmax(0,1fr)} }

/* ---- Light and reading themes: the translucent fill assumes a dark page --- */
  html[data-scheme="light"] .ra .ask-card code,
  html[data-scheme="light"] .ra .ask-limits code,
  html[data-scheme="light"] .ra .ask-profiles code{background:rgba(10,25,41,.04)}

  @media (prefers-reduced-motion: reduce){
    .ask-tab, .ask-btn{transition:none}
  }
  @media print{
    .ask-rail, .ask-nav, .ask-steer .ask-row{display:none}
    .ask-on .ask-stop[hidden]{display:block}
  }
