
/* Paper, ink, accents and type map onto the AAR brand system tokens (theme.css). */
:root {
  --paper: var(--aar-white); --ink: var(--aar-ink);
  --brick: var(--aar-green); --slate: var(--aar-cobalt); --navy: var(--aar-cobalt); --mustard: var(--aar-yellow); --olive: var(--aar-green-deep); --mist: var(--aar-mint);
  --person: color-mix(in srgb, var(--brick) 14%, var(--paper));
  --ai: color-mix(in srgb, var(--mist) 70%, var(--paper));
  --gate: color-mix(in srgb, var(--mustard) 30%, var(--paper));
  --wash: color-mix(in srgb, var(--ink) 5.5%, var(--paper));
  --soft: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --serif: var(--aar-font); --sans: var(--aar-font);
  --strip: clamp(24px, 6.2vw, 96px);
  --r: 14px;
  --body: 19px; --small: 17px;
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 450; font-size: var(--body); line-height: 1.42; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, textarea, input { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2 { text-wrap: balance; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.018em; }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.12; }
h3 { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2; }
.lead { font-size: clamp(21px, 1.7vw, 24px); line-height: 1.36; max-width: 30em; }
.small { font-size: var(--small); }
.muted { color: var(--soft); }

/* Page frame: paper on the left, the marbled sheet down the right edge. */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.app.home { --strip: clamp(24px, 34vw, 560px); }
.strip { display: none; }
.content { padding: 26px clamp(18px, 4vw, 56px) 96px clamp(18px, 4.6vw, 64px); min-width: 0; }
.top { display: flex; flex-flow: row wrap; align-items: center; gap: 12px 24px; }
.top .tools { margin-left: auto; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 25px; background: none; border: 0; padding: 0; cursor: pointer; }
.wordmark img { display: block; }
/* Logo shown in AAR red, at the client's request: the SVG is used as a mask. */
.wordmark { position: relative; }
.wordmark img { visibility: hidden; }
.wordmark::after { content: ""; position: absolute; inset: 0; background: var(--aar-red); -webkit-mask: var(--aar-logo-url) center / contain no-repeat; mask: var(--aar-logo-url) center / contain no-repeat; }
.tools { display: flex; flex-flow: row wrap; align-items: center; gap: 10px 14px; }

/* Controls */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; padding: 9px 20px; font-weight: 600; font-size: var(--small); line-height: 1.2; cursor: pointer; transition: background-color .14s ease, color .14s ease; }
.btn:hover { background: var(--wash); }
.btn.next { background: var(--brick); border-color: var(--brick); color: var(--paper); padding: 11px 24px; font-size: var(--body); }
.btn.next:hover { background: color-mix(in srgb, var(--brick) 88%, var(--ink)); }
.btn.quiet { border-color: transparent; padding: 9px 6px; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; font-weight: 500; }
.btn.tiny { padding: 5px 12px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn kbd { font: inherit; font-weight: 450; opacity: .75; font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: var(--small); cursor: pointer; transition: background-color .14s ease, color .14s ease; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-flow: row wrap; gap: 8px; }
.chip { border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 6px 15px; font-size: var(--small); font-weight: 550; cursor: pointer; transition: background-color .14s ease, color .14s ease; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip.sm { padding: 3px 12px; font-size: 16px; }

/* Fields: flat rounded areas, no boxes drawn. */
textarea, input[type="text"] { display: block; width: 100%; border: 0; border-radius: 12px; background: var(--wash); padding: 10px 14px; line-height: 1.4; resize: none; overflow: hidden; transition: background-color .14s ease; }
textarea::placeholder, input::placeholder { color: color-mix(in srgb, var(--ink) 48%, var(--paper)); }
textarea:focus, input[type="text"]:focus { outline: 2px solid var(--ink); outline-offset: 0; background: var(--paper); }
textarea.big { min-height: 240px; max-height: 68vh; overflow: auto; font-size: 20px; padding: 18px 20px; border-radius: 18px; }
textarea.out { min-height: 200px; overflow: auto; }
label, .label { display: block; font-weight: 650; font-size: var(--small); margin-bottom: 6px; }
.field { margin-top: 22px; max-width: 46em; }
.field .hint { font-weight: 450; color: var(--soft); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-top: 8px; max-width: 46em; }
.x { border: 0; background: transparent; border-radius: 999px; padding: 8px 10px; font-size: 16px; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; color: var(--soft); }
.x:hover { color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

/* Home */
.hero { margin-top: clamp(48px, 7vw, 104px); }
.hero .lead { margin-top: 22px; }
.actions { display: flex; flex-flow: row wrap; gap: 12px 14px; align-items: center; margin-top: 30px; }
.section { margin-top: clamp(56px, 6vw, 88px); border-top: 1px solid var(--ink); padding-top: 22px; max-width: 880px; }
.rows { margin-top: 18px; border-bottom: 1px solid var(--ink); }
.rows > li, .rows > div { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); column-gap: 24px; padding: 14px 0; border-top: 1px solid var(--ink); }
.rows .name { font-weight: 650; }
.loopline { margin-top: 18px; font-weight: 600; }
.loopline span { white-space: nowrap; }
.jobs li { display: flex; flex-flow: row wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--ink); }
.jobs { border-bottom: 1px solid var(--ink); margin-top: 18px; }
.joblink { background: none; border: 0; padding: 0; font-weight: 650; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.legal { margin-top: 72px; border-top: 1px solid var(--ink); padding-top: 16px; font-size: var(--small); max-width: 46em; }

/* Workspace */
.work { display: grid; grid-template-columns: 264px minmax(0, 1fr); column-gap: clamp(28px, 4vw, 60px); margin-top: 38px; align-items: start; }
.side { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
.nav { }
.nav .group { margin-top: 16px; font-size: 16px; font-weight: 700; padding-left: 12px; }
.nav .group:first-child { margin-top: 0; }
.nav button { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 12px; padding: 7px 12px; font-size: var(--small); line-height: 1.25; cursor: pointer; transition: background-color .14s ease; }
.nav button:hover { background: var(--wash); }
.nav button[aria-current="step"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.nav .n { font-variant-numeric: tabular-nums; }
.nav .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); margin-left: 6px; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite; }
.top input.jobtitle { font-family: var(--serif); font-weight: 700; font-size: 20px; background: transparent; padding: 6px 10px; width: auto; flex: 1 1 14em; min-width: 10em; max-width: 26em; text-overflow: ellipsis; }
.top input.jobtitle:hover { background: var(--wash); }
.step h1 { font-size: clamp(34px, 3.6vw, 48px); }
.step .purpose { margin-top: 14px; max-width: 34em; }
.more { margin-top: 10px; max-width: 40em; padding: 14px 18px; border-radius: var(--r); background: var(--wash); font-size: var(--small); }
.foot { display: flex; flex-flow: row wrap; gap: 12px 16px; align-items: center; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--ink); }
.foot .spacer { flex: 1; }
.note { margin-top: 22px; padding: 14px 18px; border-radius: var(--r); background: var(--gate); max-width: 46em; }
.note.plain { background: var(--wash); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--small); color: var(--slate); font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--slate); animation: pulse 1.6s ease-in-out infinite; }
.err { color: var(--brick); font-weight: 600; font-size: var(--small); }
.aibar { display: flex; flex-flow: row wrap; gap: 10px 14px; align-items: center; margin-top: 20px; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Items: information and steps */
.item { margin-top: 14px; padding: 16px 18px 18px; border-radius: var(--r); background: var(--wash); max-width: 52em; }
.item textarea, .item input[type="text"] { background: var(--paper); }
.item .head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.item .num { font-family: var(--serif); font-weight: 700; font-size: 22px; padding-top: 6px; min-width: 1.2em; }
.item .name { font-weight: 650; }
.item .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 12px; }
.item .grid label { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.item .ctl { display: flex; gap: 2px; align-items: center; }
.item.file .head { align-items: center; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.item.person { background: var(--person); }
.item.ai { background: var(--ai); }
.item.shared { background: linear-gradient(90deg, var(--person) 0 50%, var(--ai) 50% 100%); }

/* What went where */
.placed { margin-top: 18px; border-bottom: 1px solid var(--ink); max-width: 880px; }
.placed > li { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); column-gap: 20px; padding: 12px 0; border-top: 1px solid var(--ink); align-items: start; }
.placed .q { font-style: italic; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 16px; font-weight: 650; background: var(--wash); white-space: nowrap; }
.tag.g { background: var(--person); } .tag.i { background: var(--ai); } .tag.s { background: var(--gate); }
.tag.t { background: var(--ink); color: var(--paper); } .tag.e { background: var(--navy); color: var(--paper); } .tag.w { background: color-mix(in srgb, var(--olive) 28%, var(--paper)); }

/* Interview */
.ask { margin-top: 30px; max-width: 40em; }
.ask .q { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.18; }
.ask textarea { margin-top: 16px; min-height: 96px; font-size: 20px; padding: 14px 16px; }
.ask .aside { margin-top: 14px; padding: 12px 16px; border-radius: var(--r); background: var(--ai); font-size: var(--small); }
.sofar { margin-top: 40px; border-top: 1px solid var(--ink); padding-top: 18px; max-width: 46em; }
.sofar dl { margin: 12px 0 0; display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 8px 20px; font-size: var(--small); }
.sofar dt { font-weight: 650; } .sofar dd { margin: 0; white-space: pre-wrap; }

/* Process map */
.map { position: relative; margin-top: 26px; max-width: 900px; }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); font-weight: 700; font-size: var(--small); padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.lanes span:first-child { text-align: right; } .lanes span:last-child { grid-column: 3; }
.spine { position: absolute; left: 50%; top: 44px; bottom: 0; width: 1px; background: var(--ink); }
.mrow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: start; margin-top: 14px; }
.mrow .mark { grid-column: 2; grid-row: 1; justify-self: center; margin-top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--serif); font-weight: 700; font-size: 16px; display: grid; place-items: center; z-index: 1; }
.node { grid-row: 1; padding: 14px 16px 16px; border-radius: var(--r); }
.node.person { grid-column: 1; background: var(--person); }
.node.ai { grid-column: 3; background: var(--ai); }
.node.none { grid-column: 1 / 4; background: var(--wash); padding-top: 56px; }
.node.shared { grid-column: 1 / 4; background: linear-gradient(90deg, var(--person) 0 50%, var(--ai) 50% 100%); padding-top: 56px; }
.mrow.shared .mark { align-self: start; }
.node textarea, .node input[type="text"] { background: color-mix(in srgb, var(--paper) 72%, transparent); padding: 7px 11px; }
.node textarea:focus, .node input[type="text"]:focus { background: var(--paper); }
.node .who { display: flex; flex-flow: row wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.node .name textarea { font-weight: 650; }
.node .line { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; margin-top: 8px; font-size: var(--small); }
.node .line > span { font-weight: 650; padding-top: 7px; }
.node .ctl { display: flex; flex-flow: row wrap; gap: 0 4px; margin-top: 8px; }
.gate { grid-column: 1 / 4; grid-row: 1; background: var(--gate); border-radius: var(--r); padding: 14px 16px 16px 16px; }
.mrow.isgate .mark { border-radius: 4px; transform: rotate(45deg); background: var(--mustard); width: 22px; height: 22px; margin-top: -8px; }
.gate .gh { font-weight: 700; display: flex; flex-flow: row wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.gate .gl { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 8px; align-items: start; margin-top: 8px; font-size: var(--small); }
.gate .gl > span { font-weight: 650; padding-top: 7px; }
.gate textarea, .gate input[type="text"] { background: color-mix(in srgb, var(--paper) 72%, transparent); padding: 7px 11px; }
.between { position: relative; display: flex; justify-content: center; gap: 0; margin-top: 10px; z-index: 1; }
.between .btn { background: var(--paper); border-color: transparent; font-weight: 500; font-size: 15px; padding: 2px 10px; color: var(--soft); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.between .btn:hover { color: var(--ink); background: var(--paper); }
.endnode { position: relative; z-index: 1; margin-top: 14px; padding: 16px 18px 18px; border-radius: var(--r); border: 1px solid var(--ink); background: var(--paper); }
.endnode.eval { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.endnode .gl { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 8px; align-items: start; margin-top: 8px; font-size: var(--small); }
.endnode .gl > span { font-weight: 650; padding-top: 7px; }
.findings { margin-top: 14px; border-bottom: 1px solid var(--ink); max-width: 900px; }
.findings > li { display: flex; flex-flow: row wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--ink); }
.findings > li > span { flex: 1 1 22em; }

/* Loop */
.round { margin-top: 26px; max-width: 880px; }
.part { margin-top: 30px; border-top: 1px solid var(--ink); padding-top: 16px; }
.part h3 { display: flex; flex-flow: row wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
.crit { margin-top: 12px; border-bottom: 1px solid var(--ink); }
.crit > li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--ink); font-size: var(--small); }
.crit b { font-weight: 700; }
.verdict { font-family: var(--serif); font-weight: 700; font-size: 26px; }
.sq { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 8px; background: var(--ink); }
.sq.pass, .sq.yes, .sq.green { background: var(--olive); } .sq.revise, .sq.unclear, .sq.amber { background: var(--mustard); } .sq.blocked, .sq.no, .sq.red { background: var(--brick); }
.edits > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--ink); align-items: start; }
.edits { border-bottom: 1px solid var(--ink); margin-top: 12px; }
.edits input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--ink); }
.history { margin-top: 16px; border-bottom: 1px solid var(--ink); }
.history > li { padding: 14px 0; border-top: 1px solid var(--ink); }
.history .hh { display: flex; flex-flow: row wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between; }
.history .hb { margin-top: 10px; font-size: var(--small); display: grid; gap: 8px; }
.history pre { margin: 0; white-space: pre-wrap; font: inherit; padding: 12px 16px; border-radius: var(--r); background: var(--wash); max-height: 320px; overflow: auto; }

/* Export sheet */
.sheet { position: fixed; inset: 0; background: color-mix(in srgb, var(--paper) 94%, transparent); display: grid; place-items: start center; padding: 6vh 20px; overflow: auto; z-index: 10; }
.sheet .inner { width: min(820px, 100%); }
.sheet .inner.wide { width: min(1120px, 100%); }
.sheet.solid { background: var(--paper); }
.sheet textarea { margin-top: 16px; height: 52vh; overflow: auto; font-size: 16px; font-family: ui-monospace, Menlo, monospace; }

/* The picture of the plan */
.pic { margin-top: 22px; border-top: 1px solid var(--ink); padding-top: 14px; }
.pic h2 { font-size: 20px; }
.pic p { margin-top: 8px; line-height: 1.3; }
.pic svg, .bigpic svg, .dumppic svg { display: block; width: 100%; height: auto; }
.picbtn { display: block; width: 100%; margin-top: 10px; padding: 0; border: 0; background: var(--paper); border-radius: var(--r); overflow: hidden; cursor: zoom-in; }
.picact { display: flex; flex-flow: row wrap; gap: 2px 14px; margin-top: 2px; }
.pic .hide { display: none; }
.pic.off .hide { display: inline-flex; }
.bigpic { margin-top: 18px; border-top: 1px solid var(--ink); }
.bigpic + .pickey { margin-top: 0; }
.pickey { font-size: var(--small); }
.pickey + .picsteps { margin-top: 18px; }
.dumppic { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 16px 36px; align-items: center; margin-top: 16px; }
.dumppic .pickey { margin-top: 0; }
.picsteps { margin-top: 0; border-top: 1px solid var(--ink); padding-top: 12px; columns: 2 320px; column-gap: 40px; font-size: var(--small); }
.picsteps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 5px 0; break-inside: avoid; }
.picsteps .n { font-family: var(--serif); font-weight: 700; }
.picsteps .g .n { font-family: var(--sans); font-weight: 650; }

@media (max-width: 900px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; overflow: visible; }
  .pic { border-top: 0; padding-top: 0; margin: 0 0 30px; max-width: 380px; }
  .pic .hide, .pic.off .hide { display: inline-flex; }
  .dumppic { grid-template-columns: minmax(0, 1fr); }
  .nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; margin-bottom: 26px; border-bottom: 1px solid var(--ink); }
  .nav .group { display: none; }
  .nav button { width: auto; white-space: nowrap; grid-template-columns: auto auto; }
  .rows > li, .rows > div, .placed > li { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .item .grid { grid-template-columns: minmax(0, 1fr); }
  .item .head { grid-template-columns: auto minmax(0, 1fr); } .item .ctl { grid-column: 1 / -1; flex-wrap: wrap; gap: 6px; }
  .app.home { --strip: clamp(24px, 6.2vw, 96px); }
  .lanes { grid-template-columns: 44px minmax(0, 1fr); } .lanes span:first-child { display: none; } .lanes span:last-child { grid-column: 2; }
  .lanes span:last-child::before { content: "People and "; }
  .spine { left: 22px; }
  .mrow { grid-template-columns: 44px minmax(0, 1fr); }
  .mrow .mark { grid-column: 1; }
  .node.person, .node.ai, .node.shared, .node.none, .gate { grid-column: 2; }
  .node.shared, .node.none { padding-top: 14px; }
  .between { justify-content: flex-start; padding-left: 44px; }
  .gate .gl, .endnode .gl, .node .line { grid-template-columns: minmax(0, 1fr); gap: 2px; } .gate .gl > span, .endnode .gl > span, .node .line > span { padding-top: 4px; }
  .sofar dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .sofar dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
