/* Request pages (ae-apps#28-31), from designer's mockup (arc-eng/brand#22). Same base as the site home: the design system's tokens (dark), 17 px, one 714 px column. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --fill: #F6F7F8; --you: #F1F3F6; --field-line: #868C93; } /* page-specific surfaces, not in the system: boxes and fields, Marco's messages, a field's edge (3.4:1) */
html { font-size: 17px; }
body { background: var(--page); color: var(--text); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--frame-line); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.col { max-width: var(--col); margin: 0 auto; }
main p, main li { max-width: 33em; text-wrap: pretty; }
.updates li, .steps li { max-width: none; }  /* rows and steps span the column; their text still stops at 33em */

header { border-bottom: 1px solid var(--line); }
header .col { display: flex; align-items: center; justify-content: space-between; gap: 17px; padding: 17px 0; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; }
.brand .name { margin-left: 10px; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.who { font-size: 15px; color: var(--text-3); }
.who a { color: var(--text-2); }

main .col { padding: 42px 0 68px; }
h1 { font-family: var(--font-heading); font-size: 32px; line-height: 1.375; font-weight: 400; }
h2 { font-family: var(--font-heading); font-size: 21px; line-height: 1.4; font-weight: 400; }
h3 { font-size: 17px; font-weight: 400; }
.sub { margin-top: 12px; color: var(--text-2); line-height: 1.625; }
section { margin-top: 51px; }
section > h2 { margin-bottom: 17px; }
.small { font-family: var(--font); font-size: 15px; color: var(--text-3); }

/* Form: the question is the label (one thing per page) */
.field + .field { margin-top: 42px; }
label h1, label h2 { display: block; }
.hint { display: block; margin-top: 6px; font-size: 15px; color: var(--text-2); }
textarea { display: block; width: 100%; margin-top: 17px; padding: 13px 15px; background: var(--fill); color: var(--text);
  border: 1px solid var(--frame-line); border-radius: var(--radius); font: 17px/1.55 var(--font); resize: vertical; }
textarea::placeholder { color: var(--text-3); }
.actions { margin-top: 42px; display: flex; align-items: center; gap: 21px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--text); color: var(--page); border: 0; text-decoration: none; font: 17px var(--font);
  letter-spacing: .02em; padding: 11px 21px; border-radius: var(--radius); cursor: pointer; }

/* His words, quoted */
.words { border-left: 2px solid var(--frame-line); padding: 2px 0 2px 17px; color: var(--text); white-space: pre-line; }
.words + .words-label, .words-label { font-size: 15px; color: var(--text-3); margin-bottom: 8px; }

/* Stage: seven steps in plain words */
.stage .now { font-size: 21px; font-family: var(--font-heading); }
.stage .means { margin-top: 6px; color: var(--text-2); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 21px; }
.steps li { border-top: 4px solid var(--line); padding-top: 8px; font-size: 13px; line-height: 1.3; color: var(--text-3); }
.steps li.done { border-top-color: var(--text-2); color: var(--text-2); }
.steps li.current { border-top-color: var(--text); color: var(--text); }

/* What the team needs from him: first on the page */
.ask { background: var(--fill); border: 1px solid var(--frame-line); border-top: 4px solid var(--text); border-radius: var(--radius); padding: 21px 25px 25px; }
.ask + .ask { margin-top: 17px; }
.ask .tag { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.ask h2 { margin-top: 6px; }
.ask .body { margin-top: 13px; }
.ask .body p + *, .ask .body ol + *, .ask .body ul + * { margin-top: 13px; }
.ask .body ol, .ask .body ul { padding-left: 21px; }
.ask .body li + li { margin-top: 4px; }
.ask .shot { display: block; margin-top: 13px; border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }
.ask label { display: block; margin-top: 25px; }
.ask textarea { margin-top: 8px; background: var(--page); }
.ask .actions { margin-top: 17px; }

/* Live */
.live { border: 1px solid var(--frame-line); border-radius: var(--radius); padding: 25px; }
.live h2 { font-size: 26px; }
.live p { margin-top: 8px; color: var(--text-2); }
.live .btn { margin-top: 21px; }

/* Updates, newest first */
.updates { list-style: none; }
.updates li { display: grid; grid-template-columns: 120px 1fr; column-gap: 21px; padding: 17px 0; border-top: 1px solid var(--line); }
.updates time { font-size: 15px; color: var(--text-3); }
.updates .from { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.updates p + p { margin-top: 10px; }
.updates img { display: block; margin-top: 10px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }

/* The open request on the start page */
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 21px 25px; text-decoration: none; }
.card .words { margin-top: 10px; }
.card .go { display: inline-block; margin-top: 17px; text-decoration: underline; text-decoration-color: var(--frame-line); text-underline-offset: 3px; }

footer { border-top: 1px solid var(--line); padding: 25px 0; font-size: 15px; color: var(--text-3); }
footer .col { display: flex; justify-content: space-between; gap: 17px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .col { padding-left: 21px !important; padding-right: 21px !important; }
  .brand img { height: 28px; } .brand .name { font-size: 12px; letter-spacing: .1em; }
  main .col { padding-top: 30px; }
  h1 { font-size: 27px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { border-top: 0; border-left: 4px solid var(--line); padding: 3px 0 3px 12px; font-size: 15px; }
  .steps li.done { border-left-color: var(--text-2); } .steps li.current { border-left-color: var(--text); }
  .steps li.done, .steps li.todo { display: none; }  /* phone: only the current step, plus the count */
  .ask { padding: 17px 17px 21px; }
  .updates li { grid-template-columns: 1fr; row-gap: 4px; }
  .actions .btn, .live .btn { width: 100%; text-align: center; padding: 13px 21px; }  /* a full-width target for the thumb */
}
.page-label { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text-3); margin-bottom: 17px; }

/* Built pages only (not in the mockup): sign-out is a POST, styled as the mockup's link; form errors; and his words
   break inside a long link or word, so they never widen the page on a phone (qa on ae-apps#35). */
.words, .card, .ask .body, .updates div { overflow-wrap: anywhere; }
.who form { display: inline; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--frame-line); text-underline-offset: 3px; }
.link:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.error { display: block; margin-top: 8px; font-size: 15px; color: var(--text); }
textarea[aria-invalid="true"] { border-color: var(--text); }
/* Images in GitHub's rendering of a question have no class: give them the mockup's .shot look and keep them in the card. */
.ask .body img { display: block; margin-top: 13px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 100%; height: auto; }
/* Code blocks and tables in GitHub's rendering scroll inside their card instead of widening the page at 390. */
.updates li > *, .ask .body { min-width: 0; }
.updates pre, .updates table, .ask .body pre, .ask .body table { display: block; max-width: 100%; overflow-x: auto; }
.updates td, .updates th, .ask .body td, .ask .body th { overflow-wrap: normal; }
.ask .more { margin-top: 13px; }
.ask .more summary { cursor: pointer; color: var(--text-2); }

/* Status at a glance (ae-apps#41), from designer's mockup (arc-eng/brand#34). Annunciator logic: the page stays unlit grey; only what has a state lights up,
   and every lamp carries words or an icon, never colour alone. Amber = needs you (caution), blue = moving
   (Boeing's "in transit"), green = done, red = went wrong (warning). On a tinted surface, text stays --text; the
   status colour goes on the border, icon and label. All colours pass AA as text on --page and --fill. */
:root {
  /* Light, for white (ae-apps#80, designer's arc-eng/brand design/ae-apps/light). Each passes 4.5:1 as text on white,
     on its tint and on --fill. Colour is never alone: the word and icon stay. */
  --ask: #8F5600;    --ask-tint: #FFF5E0;      /* amber as text and icons: waits on you. 6.0:1 */
  --ask-fill: #F2B035;                         /* amber as a surface: the answer button, the card's edge and bar */
  --moving: #1A5CC0; --moving-tint: #EEF3FC;   /* blue: work in progress. 6.3:1 */
  --done: #007A33;   --done-tint: #EBF5EE;     /* District green: done or live. Never a filled box: that's an action */
  --wrong: #B3261E;  --wrong-tint: #FDF1F0;    /* red: went wrong. 6.5:1 */
}
/* Icons: one shape each, drawn in the chart's line weight, coloured by currentColor */
.i { display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor; vertical-align: -3px;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.i-ask { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='7.6'/%3E%3Cpath d='M9 4.6v5.6' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13' r='.6' fill='%23000'/%3E%3C/svg%3E"); }
.i-moving { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='7.6' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M9 4a5 5 0 0 1 0 10z' fill='%23000'/%3E%3C/svg%3E"); }
.i-done { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='7.6'/%3E%3Cpath d='M5.6 9.2l2.3 2.3 4.5-4.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-wrong { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='M9 1.8L16.6 15.4H1.4z' stroke-linejoin='round'/%3E%3Cpath d='M9 6.6v4.2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13' r='.6' fill='%23000'/%3E%3C/svg%3E"); }
.i-todo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8' stroke-dasharray='2.6 2.4'%3E%3Ccircle cx='9' cy='9' r='7.6'/%3E%3C/svg%3E"); }

/* A lamp: icon + words in the status colour */
.lamp { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.lamp-ask { color: var(--ask); } .lamp-moving { color: var(--moving); } .lamp-done { color: var(--done); } .lamp-wrong { color: var(--wrong); }

/* Needs you: the question lights amber, and lights up once on arrival */
.ask { border-top-color: var(--ask); background: linear-gradient(var(--ask-tint), var(--fill) 120px); animation: lamp-on .9s ease-out 1; }
.ask .tag { display: none; } /* replaced by the lamp */
@keyframes lamp-on { from { border-top-color: var(--fill); } to { border-top-color: var(--ask); } }
.card.has-ask { border-color: var(--ask); border-left-width: 4px; }
.card .lamp { display: flex; margin-bottom: 8px; }

/* Stage: done is green with a check, the current step blue with a light running along it, the rest unlit */
.stage .now { display: flex; align-items: center; gap: 10px; color: var(--text); }
.stage .now .i { color: var(--moving); width: 20px; height: 20px; }
.steps li.done { border-top-color: var(--done); color: var(--done); }
.steps li.current { position: relative; border-top-color: var(--moving-tint); color: var(--moving); }
.steps li.current::before { content: ""; position: absolute; top: -4px; left: 0; height: 4px; width: 40%; background: var(--moving);
  animation: transit 2.8s ease-in-out infinite alternate; }
@keyframes transit { from { left: 0; } to { left: 60%; } }
.live .lamp { margin-bottom: 6px; }
.live { border-color: var(--done); background: linear-gradient(var(--done-tint), var(--page) 140px); }

/* Who is talking: the chart's marks. A tick and the role for an agent (the PA's picture where it has one),
   a ring and "You" for Marco, whose words sit on his own rule like his request does. */
.updates .from { display: flex; align-items: center; gap: 8px; letter-spacing: .04em; text-transform: none; font-size: 15px; color: var(--text-2); }
.updates .from::before { content: ""; width: 14px; height: 2px; background: var(--text-3); }
.updates .from.you { color: var(--text); }
.updates .from.you::before { width: 10px; height: 10px; border: 2px solid var(--text); border-radius: 50%; background: none; }
.updates .from.pa::before { display: none; }
.updates .from .face { width: 22px; height: 22px; border-radius: 50%; }
.updates .said { border-left: 2px solid var(--text); padding-left: 13px; }
.updates .answered { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--done); font-size: 15px; }

/* Went wrong: a red banner at the top (the team flagged a problem), or red under the thing that failed */
.problem { border: 1px solid var(--wrong); border-left: 4px solid var(--wrong); background: var(--wrong-tint); border-radius: var(--radius);
  padding: 15px 17px; margin-bottom: 17px; }
.problem p { margin-top: 6px; }
.problem .from { margin-top: 8px; font-size: 15px; color: var(--text-2); }
.send-error { display: flex; gap: 10px; align-items: flex-start; margin-top: 13px; padding: 11px 13px; border-left: 4px solid var(--wrong);
  background: var(--wrong-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.send-error .i { color: var(--wrong); margin-top: 3px; }

/* Detector fixes: the live panel's text sits on a green tint, so it's --text; the problem lamp's word sits on a red
   tint, so the word is --text and only the icon is red; a coloured top rule gets square top corners. */
.live h2 { display: flex; align-items: center; gap: 12px; }
.live h2 .i { color: var(--done); width: 24px; height: 24px; }
.live p { color: var(--text); }
.problem .lamp-wrong { color: var(--text); }
.problem .lamp-wrong .i { color: var(--wrong); }
.ask { border-radius: 0 0 var(--radius) var(--radius); }

@media (prefers-reduced-motion: reduce) {
  .ask { animation: none; }
  .steps li.current::before { animation: none; left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .steps li.current { border-left-color: var(--moving); }
  .steps li.current::before { display: none; }
  .steps li.current { animation: transit-phone 2.8s ease-in-out infinite alternate; }
}
@keyframes transit-phone { from { border-left-color: var(--moving-tint); } to { border-left-color: var(--moving); } }
@media (prefers-reduced-motion: reduce) and (max-width: 760px) { .steps li.current { animation: none; } }

/* Built pages only (not in the mockup): who asked a question, the live stage's icon, his words in a question's
   thread on his own rule like in the updates. */
.ask .from { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 15px; color: var(--text); }  /* on the amber tint: --text */
.ask .from::before { content: ""; width: 14px; height: 2px; background: var(--text-3); }  /* the chart's tick, like the update bylines */
.ask .from.pa::before { display: none; }
.ask .from .face { width: 22px; height: 22px; border-radius: 50%; }
.stage .now .i-done { color: var(--done); }
.ask .words.said { border-left: 2px solid var(--text); padding-left: 13px; }
@media (max-width: 760px) {
  .steps li.done[aria-current] { display: block; border-left-color: var(--done); }  /* live: the phone shows its step, done */
}

/* Not invited: the account they used, so someone with two Google accounts sees which one it was (ae-apps#63). */
.account { color: var(--text); overflow-wrap: anywhere; }

/* ============ Light (ae-apps#80): the core brand's white page with District green, from designer's mockup ============ */
/* Actions in District green, white text (5.5:1), like the site. */
.btn { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* What waits on you keeps bright amber with dark ink: the answer button, the card's edge and its current step. */
.btn-ask { background: var(--ask-fill); border-color: var(--ask-fill); color: var(--text); }
.btn-ask:hover { background: #E09E1F; border-color: #E09E1F; }
.p-card.needs, .pin.ask { border-color: var(--ask-fill); }
.p-card.needs .track li.c::before { background: var(--ask-fill); }
.card.ask, .spec { border-top-color: var(--ask-fill); }
.btn-quiet { background: none; color: var(--text); border-color: var(--field-line); }
.btn-quiet:hover { background: var(--fill); }
/* The site's header rule, so the apps and the site read as one brand (brand#56). */
header.site { border-bottom: 3px solid var(--accent); }
a, .card .go { text-decoration-color: var(--accent); }
textarea, input[type="text"], input[type="email"] { background: var(--page); border-color: var(--field-line); }
