/* Askwork screen styles (design/DESIGN_GUIDE.md v1).
   Colours, sizes and shapes come only from tokens.css (var(--aw-*)). Do not add raw colour values here. */

/* ---------- Base ---------- */
html, body {
  font-family: var(--aw-font);
  color: var(--aw-text);
  background: var(--aw-page);
}
h1, h2, h3, h4, h5, h6 { font-family: var(--aw-font); }

/* Korean, Chinese and Japanese: Noto Sans (self-hosted) covers Latin only, so these fall through to the
   phone's own CJK font. Android ships Noto Sans CJK, so most workers see the same Noto family.
   P-09: the same fonts for a part that carries its own lang on a page in another language (a Korean answer on an
   English screen, the name on the language button), and for headings inside it. Plain "zh" uses the Simplified
   fonts, zh-TW the Traditional ones like zh-HK. */
html:lang(ko) body, html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3,
body [lang]:lang(ko), body :is(h1, h2, h3, h4, h5, h6):lang(ko) {
  font-family: 'Noto Sans', 'Noto Sans CJK KR', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}
html:lang(ko) body, body [lang]:lang(ko) { word-break: keep-all; }  /* Korean: break lines between words, not inside them */
html:lang(zh-CN) body, html:lang(zh-CN) h1, html:lang(zh-CN) h2, html:lang(zh-CN) h3,
html:lang(zh) body, body [lang]:lang(zh), body :is(h1, h2, h3, h4, h5, h6):lang(zh) {
  font-family: 'Noto Sans', 'Noto Sans CJK SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
html:lang(zh-HK) body, html:lang(zh-HK) h1, html:lang(zh-HK) h2, html:lang(zh-HK) h3,
body [lang]:lang(zh-HK), body :is(h1, h2, h3, h4, h5, h6):lang(zh-HK),
html:lang(zh-TW) body, body [lang]:lang(zh-TW), body :is(h1, h2, h3, h4, h5, h6):lang(zh-TW) {
  font-family: 'Noto Sans', 'Noto Sans CJK HK', 'Noto Sans CJK TC', 'Noto Sans TC', 'PingFang HK', 'Microsoft JhengHei', system-ui, sans-serif;
}
html:lang(ja) body, html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3,
body [lang]:lang(ja), body :is(h1, h2, h3, h4, h5, h6):lang(ja) {
  font-family: 'Noto Sans', 'Noto Sans CJK JP', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
}

/* Focus: white 3px + blue ring. Never remove it. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--aw-focus);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.aw-icon { flex-shrink: 0; }
[hidden] { display: none !important; }
.aw-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--aw-surface); color: var(--aw-primary);
  padding: 12px 16px; border-radius: var(--aw-radius-button); font-weight: 600; }
.aw-skip:focus { left: 16px; }

/* Layout helpers. Phone first; two columns from 960px. */
@media (max-width: 959px) { .aw-desktop-only { display: none !important; } }
@media (min-width: 960px) { .aw-mobile-only { display: none !important; } }
.aw-container { max-width: var(--aw-container); margin: 0 auto; padding: 0 var(--aw-gutter-mobile); }
@media (min-width: 960px) { .aw-container { padding: 0 24px; } }

/* ---------- Header ---------- */
.aw-header { position: relative; z-index: 30; }
.aw-header--soft { background: var(--aw-primary-soft); }
.aw-header-inner { max-width: var(--aw-container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px var(--aw-gutter-mobile); min-height: 68px; }
@media (min-width: 960px) { .aw-header-inner { padding: 16px 24px; min-height: 84px; } }
.aw-logo-link { display: inline-flex; align-items: center; gap: 12px; border-radius: var(--aw-radius-chip); }
.aw-logo { height: 24px; width: auto; display: block; aspect-ratio: 4236 / 938; }
/* D-2 (H1, D14, out in round R-2): logo draft 1 has a larger dot, so its viewBox is 10 units taller (4236 by 948) */
.aw-logo[data-logo="d1"] { aspect-ratio: 4236 / 948; }  /* the shape of the wordmark (its viewBox), so it takes its room before the picture has loaded */
@media (min-width: 960px) { .aw-logo { height: 28px; } }
/* N3 (Jay's request 3 of 2026-11-19, B-10, out in round R-2: every header has data-logo="d1"): on a wide screen the
   draft wordmark is 32px high and 143px wide (the viewBox gives 142.99), a size close to whole pixels where Chrome on
   Windows at device scale factor 1 draws its edges with the fewest blurred pixels of the sizes from 28 to 33px.
   docs/askwork-third-answers-n-logo.md has the comparison. Below 960px it stays 24px (the phone header keeps the robot). */
@media (min-width: 960px) { .aw-header .aw-logo[data-logo="d1"] { height: 32px; width: 143px; } }
.aw-header-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aw-nav-link { display: inline-flex; align-items: center; min-height: var(--aw-tap-header); padding: 0 12px; color: var(--aw-text);
  font-size: var(--aw-text-ui); font-weight: 500; border-radius: var(--aw-radius-pill); text-decoration: none; }
.aw-nav-link:hover { color: var(--aw-primary); }
.aw-lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header); max-width: 220px; padding: 0 18px;
  background: var(--aw-surface); color: var(--aw-primary); border: 0; border-radius: var(--aw-radius-pill);
  box-shadow: var(--aw-shadow); font-size: var(--aw-text-ui); font-weight: 600; cursor: pointer; }
.aw-lang-btn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-header-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--aw-surface); display: inline-flex;
  align-items: center; justify-content: center; overflow: hidden; }
.aw-header-avatar img { width: 34px; height: 34px; }

/* Preview address only (PREVIEW_MODE): one line at the very top. The primary colour with white bold text, as on a
   primary button, so that a reviewer sees at once that this is not the live service (Jay, 2026-11-13) */
.aw-preview-line { position: fixed; top: 0; left: 0; right: 0; z-index: 70; margin: 0; padding: 6px var(--aw-gutter-mobile);
  background: var(--aw-primary); font-size: var(--aw-text-small); font-weight: 700; color: var(--aw-surface); text-align: center; }
/* Fixed, with the page starting under it: a line that only sticks left the screen when a full screen was opened on a
   page that had been scrolled, and the page showed through above that screen (found 2026-11-13). */
body.aw-preview { padding-top: var(--aw-preview-h, 33px); }
/* it stays above the full screens, which start below it, and above the phone chat header */
.aw-preview .aw-screen { top: var(--aw-preview-h, 33px); }
@media (max-width: 959px) {
  body.aw-preview[data-chat="on"] .aw-chat-page .aw-chat-header { top: var(--aw-preview-h, 33px); }
}

/* "Your state: NSW · Change" */
.aw-state-line { max-width: var(--aw-container); margin: 0 auto; padding: 0 var(--aw-gutter-mobile) 8px;
  font-size: var(--aw-text-small); color: var(--aw-text-muted); }
@media (min-width: 960px) { .aw-state-line { padding: 0 24px 8px; } }
/* D-07: a link inside a line of text is underlined, so it is not told apart by colour alone (the report screen's
   "The person who runs Askwork" had no style at all and looked like the words around it) */
a.aw-link { color: var(--aw-primary); text-decoration: underline; }
.aw-link-btn { background: none; border: 0; padding: 4px 2px; margin: -4px 0; color: var(--aw-primary); font: inherit;
  font-weight: 600; text-decoration: underline; cursor: pointer; border-radius: 4px; }

/* ---------- Buttons ---------- */
.aw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border: 0; border-radius: var(--aw-radius-button); font: inherit; font-size: var(--aw-text-ui); font-weight: 600;
  text-decoration: none; cursor: pointer; }
.aw-btn--primary { background: var(--aw-primary); color: var(--aw-surface); }
.aw-btn--primary:hover { background: var(--aw-primary-hover); }
.aw-btn--secondary { background: var(--aw-lavender-bg); color: var(--aw-lavender-fg); }
.aw-btn--soft { background: var(--aw-primary-soft); color: var(--aw-primary); }
.aw-btn--block { width: 100%; }
.aw-btn:disabled { background: var(--aw-surface-muted); color: var(--aw-text-muted); cursor: not-allowed; }
.aw-text-btn { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap); padding: 0 4px; background: none;
  border: 0; color: var(--aw-text-muted); font: inherit; font-size: var(--aw-text-small); cursor: pointer; }
.aw-text-btn:hover { color: var(--aw-text); }
.aw-round-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--aw-tap); height: var(--aw-tap);
  flex-shrink: 0; border: 0; border-radius: 50%; background: var(--aw-surface); color: var(--aw-primary); cursor: pointer; }

/* ---------- Full-screen panels (no dark overlay: the guide has no overlay colour) ---------- */
body.aw-screen-open { overflow: hidden; }
.aw-screen { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--aw-page); }
.aw-screen-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; min-height: 68px;
  padding: 10px var(--aw-gutter-mobile); background: var(--aw-primary-soft); }
.aw-screen-head > .aw-screen-head-end { margin-left: auto; }
.aw-screen-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--aw-text); }
.aw-screen-body { max-width: 640px; margin: 0 auto; padding: 16px var(--aw-gutter-mobile) 32px; }
@media (min-width: 960px) { .aw-screen-head { padding: 12px 24px; } .aw-screen-body { padding: 24px 24px 48px; } }

/* Language screen */
.aw-lang-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .aw-lang-grid { grid-template-columns: 1fr 1fr; } }
.aw-lang-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 18px;
  background: var(--aw-surface); border: 0; border-radius: var(--aw-radius-button); box-shadow: var(--aw-shadow); color: var(--aw-text);
  text-align: left; cursor: pointer; font: inherit; }
.aw-lang-option[aria-current="true"] { background: var(--aw-primary-soft); color: var(--aw-primary); }
.aw-lang-option-text { display: flex; flex-direction: column; min-width: 0; }
.aw-lang-native { font-size: var(--aw-text-ui); font-weight: 600; }
.aw-lang-eng { font-size: var(--aw-text-small); color: var(--aw-text-muted); }

/* ---------- Cards and form fields ---------- */
.aw-card { background: var(--aw-surface); border-radius: var(--aw-radius-card); box-shadow: var(--aw-shadow); padding: 20px; }
.aw-field-label { display: block; margin-bottom: 6px; font-size: var(--aw-text-small); font-weight: 600; color: var(--aw-text); }
.aw-field { width: 100%; min-height: var(--aw-tap); padding: 10px 16px; border: 0; border-radius: var(--aw-radius-button);
  background: var(--aw-page); color: var(--aw-text); font: inherit; font-size: var(--aw-text-ui); box-shadow: var(--aw-field-edge); }
/* B-4 of 2026-11-23: the edge stays with the focus ring (the ring alone is the rule for every other control) */
.aw-field:focus-visible { box-shadow: var(--aw-field-edge), var(--aw-focus); }
.aw-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--aw-radius-button);
  background: var(--aw-surface-muted); color: var(--aw-text); font-size: 15px; line-height: 1.5; cursor: pointer; }
.aw-check input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--aw-primary); }
/* Links inside a checkbox line (agreement screen: Terms, Privacy): same inline link style as answers and legal pages */
.aw-check a { color: var(--aw-primary); text-decoration: underline; font-weight: 500; }
.aw-note { font-size: var(--aw-text-meta); color: var(--aw-text-muted); line-height: 1.5; }
.aw-form { display: flex; flex-direction: column; gap: 16px; }
.aw-form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .aw-form-grid { grid-template-columns: 1fr 1fr; } }
.aw-form-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* The report screen: its Send button stays at the bottom of the screen while the text above it scrolls. */
.aw-report-actions { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 0; background: var(--aw-surface); }
/* E-01 (E1 to E5, out in round R-2): U7 at the top of the report screen (the colours of "Worth checking"), and the preview of what will be
   saved (the box of the consent tick). */
.aw-report-warn { margin: 0; padding: 12px 16px; border-radius: var(--aw-radius-button); background: var(--aw-yellow-bg);
  color: var(--aw-yellow-fg); font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.5; }
.aw-report-preview { padding: 14px 16px; border-radius: var(--aw-radius-button); background: var(--aw-surface-muted); }
.aw-report-preview .aw-card-title { margin: 0 0 12px; scroll-margin-top: 140px; }  /* below the head of the screen (and the preview line) */
#report-contact a { white-space: nowrap; }  /* a phone number is not broken over two lines */
/* The diff review of 2026-11-25 (F1): "Urgent help" on the agreement screen opens the Get help screen, which must be
   seen before agreeing. While the agreement screen is up, the Get help screen is the one screen above it. */
body:has(#chat-consent-overlay:not([hidden])) #gethelp-screen { z-index: 62; }
.aw-visa-tel { white-space: nowrap; }  /* J-365: the phone number in an answer of a visa page, a call link on one line */
.aw-report-preview .aw-draft-text { margin-bottom: 12px; }
.aw-report-preview > :last-child .aw-draft-text, .aw-report-preview > .aw-draft-text:last-child { margin-bottom: 0; }
.aw-consent-list { margin: 0 0 16px; padding-left: 22px; list-style: decimal; font-size: var(--aw-text-ui); line-height: 1.55; }  /* Tailwind's reset removes numbers */
.aw-consent-list li { margin-bottom: 8px; }
/* The first screen (Jay, 2026-11-13): the agreement button is in reach after a short scroll on a phone. Same sizes and
   colours, less space between the parts. */
/* M4 (review of 2026-11-25): the agreement screen is on top of every other screen of the page (they share z-index 60 and
   the later one in the page would be on top), under the line of the review address (70) */
#chat-consent-overlay { z-index: 61; }
#chat-consent-overlay .aw-screen-body { padding-top: 12px; }
#chat-consent-overlay .aw-card { padding: 16px; }
.aw-consent-lang { margin-bottom: 12px; }
.aw-consent-lang .aw-card-title { margin-bottom: 8px; }
/* All twenty languages at once (Jay, 2026-11-14): three in a row on a phone, five on a wide screen. The buttons are
   .aw-btn as everywhere (52 high or more, 16px). A long name goes onto a second line. It is never cut. */
.aw-consent-lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 960px) { .aw-consent-lang-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.aw-consent-lang-grid .aw-btn { width: 100%; padding: 6px 8px; line-height: 1.25; text-align: center; overflow-wrap: break-word; }
.aw-consent-card .aw-consent-list { margin-bottom: 12px; line-height: var(--aw-line); }
.aw-consent-card .aw-consent-list li { margin-bottom: 4px; }
.aw-consent-card .aw-check { padding: 12px 14px; }

/* ---------- Chat page ---------- */
.aw-chat-page { background-color: var(--aw-page); background-image: var(--aw-hero); background-size: 100% 840px;
  background-repeat: no-repeat; min-height: 100vh; }
.aw-chat-page .aw-chat-header { background: transparent; }
body:not([data-chat="on"]) .aw-chat-only { display: none !important; }
@media (max-width: 959px) {
  /* Phone, once a conversation starts: soft header that stays on top, input fixed at the bottom. */
  body[data-chat="on"] .aw-chat-page .aw-chat-header { position: sticky; top: 0; background: var(--aw-primary-soft); }
  body[data-chat="on"] .aw-home-only-mobile { display: none !important; }
  body:not([data-chat="on"]) .aw-chat-only-mobile { display: none !important; }
}
@media (min-width: 960px) { .aw-chat-only-mobile { display: none !important; } }
/* 3-07: on a phone during a conversation the hero is not seen, but its H1 stays the heading of the page for screen
   readers (visually hidden, the rest of the hero is not shown). */
@media (max-width: 959px) {
  body[data-chat="on"] .aw-hero.aw-home-only-mobile { display: block !important; position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  body[data-chat="on"] .aw-hero.aw-home-only-mobile > :not(.aw-hero-text),
  body[data-chat="on"] .aw-hero.aw-home-only-mobile .aw-hero-text > :not(.aw-h1) { display: none !important; }
}

.aw-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 8px; padding-bottom: 32px; }
.aw-main { flex: 999 1 560px; min-width: 0; }
.aw-side { flex: 1 1 300px; min-width: 0; }

/* Conversation */
.aw-messages { display: flex; flex-direction: column; gap: 14px; }
#chat-log { display: flex; flex-direction: column; gap: 14px; }
.aw-msg { display: flex; }
.aw-msg--user { justify-content: flex-end; }
.aw-bubble-user { max-width: 82%; padding: 14px 18px; background: var(--aw-primary); color: var(--aw-surface);
  border-radius: var(--aw-bubble-user); font-size: var(--aw-text-body); line-height: var(--aw-line); white-space: pre-wrap;
  overflow-wrap: anywhere; }
.aw-bubble-bot { width: 100%; padding: 18px 18px 16px; background: var(--aw-surface); color: var(--aw-text);
  border-radius: var(--aw-bubble-bot); box-shadow: var(--aw-shadow); font-size: var(--aw-text-body); line-height: 1.55;
  overflow-wrap: anywhere; }
.aw-bubble-bot a { color: var(--aw-primary); text-decoration: underline; font-weight: 500; }
.aw-msg-tools { display: flex; justify-content: flex-end; }
.aw-pending { display: flex; align-items: center; gap: 12px; color: var(--aw-text-muted); font-size: var(--aw-text-ui); }
.aw-avatar { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.aw-avatar-img { width: 40px; height: 40px; border-radius: 50%; background: var(--aw-primary-soft); display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.aw-avatar-img img { width: 34px; height: 34px; }
.aw-avatar-name { font-size: var(--aw-text-meta); font-weight: 600; color: var(--aw-text); }
.aw-dots { display: inline-flex; gap: 5px; }
.aw-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--aw-primary); opacity: .35; animation: aw-dot 1.2s infinite ease-in-out; }
.aw-dots span:nth-child(2) { animation-delay: .2s; }
.aw-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes aw-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
/* 4-07: with less motion asked for, the page lights one dot after the other, once a second, with no animation
   (data-step, templates/chat.html), so a long wait never looks frozen */
.aw-dots[data-step="0"] span:nth-child(1), .aw-dots[data-step="1"] span:nth-child(2), .aw-dots[data-step="2"] span:nth-child(3) { opacity: 1; }

/* Input */
.aw-composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 20px; background: var(--aw-surface);
  border-radius: var(--aw-radius-input); box-shadow: var(--aw-composer-edge), var(--aw-shadow-raised); }
.aw-composer textarea { flex: 1; min-width: 0; min-height: var(--aw-tap); max-height: 140px; padding: 12px 0; border: 0;
  background: transparent; color: var(--aw-text); font: inherit; font-size: var(--aw-text-body); line-height: 1.4; resize: none; }
.aw-composer textarea::placeholder { color: var(--aw-text-muted); }
.aw-composer textarea:focus-visible { box-shadow: none; }
.aw-composer:focus-within { box-shadow: var(--aw-composer-edge), var(--aw-shadow-raised), var(--aw-focus); }
.aw-send { display: inline-flex; align-items: center; justify-content: center; width: var(--aw-tap); height: var(--aw-tap);
  flex-shrink: 0; border: 0; border-radius: var(--aw-radius-button); background: var(--aw-primary); color: var(--aw-surface); cursor: pointer; }
.aw-send:hover { background: var(--aw-primary-hover); }
.aw-send:disabled { background: var(--aw-surface-muted); color: var(--aw-text-muted); cursor: not-allowed; }  /* same as .aw-btn:disabled */
.aw-tip { margin: 8px 4px 0; font-size: var(--aw-text-meta); color: var(--aw-text-muted); }
.aw-tip + .aw-tip { margin-top: 2px; }
.aw-composer-wrap { margin-top: 16px; }
@media (max-width: 959px) {
  body[data-chat="on"] .aw-composer-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0;
    padding: 10px var(--aw-gutter-mobile) calc(10px + env(safe-area-inset-bottom)); background: var(--aw-surface);
    border-top: 1px solid var(--aw-border); }
  body[data-chat="on"] .aw-composer { background: var(--aw-page); box-shadow: var(--aw-composer-edge); }
  body[data-chat="on"] .aw-composer:focus-within { box-shadow: var(--aw-composer-edge), var(--aw-focus); }
  body[data-chat="on"] .aw-chat-page { padding-bottom: 240px; }  /* the message box, "New chat" above it, two lines under it */
  body[data-chat="on"] .aw-messages { padding-top: 12px; }
}
/* 4-06: a short window on a phone, as when the on-screen keyboard is up. The header (with "Help now") and "New chat"
   stay. The two lines under the message box wait until the window is tall again, and the box grows to three lines and
   then scrolls inside, so the end of the conversation can still be seen above it. */
@media (max-width: 959px) and (max-height: 520px) {
  body[data-chat="on"] .aw-composer-wrap { padding-top: 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  body[data-chat="on"] .aw-composer-wrap .aw-tip { display: none; }
  body[data-chat="on"] .aw-composer textarea { max-height: 72px; }
  body[data-chat="on"] .aw-chat-page { padding-bottom: 150px; }
}
@media (min-width: 960px) {
  .aw-chatcard { background: var(--aw-surface); border-radius: var(--aw-radius-card); box-shadow: var(--aw-shadow); padding: 24px; }
  .aw-chatcard .aw-messages { max-height: max(300px, calc(100vh - 560px)); overflow-y: auto; padding: 4px; }
  /* Once a conversation has started the box takes the height of the screen (Jay, 2026-11-13: 300 high, a set of
     questions had to be answered inside a small window). The card, with the message box and New chat under it, fits
     one screen: 230 is the card's own padding, the gap and the message box. */
  body[data-chat="on"] .aw-chatcard .aw-messages { max-height: max(300px, calc(100vh - 230px - var(--aw-preview-h, 0px))); }
  .aw-chatcard .aw-bubble-bot { background: var(--aw-page); box-shadow: none; width: auto; max-width: 92%; }
  /* the answer box has the colour of a field here, so a field inside it is white (Jay, 2026-11-13) */
  .aw-chatcard .aw-bubble-bot .aw-field { background: var(--aw-surface); }
  .aw-chatcard .aw-composer { background: var(--aw-page); box-shadow: var(--aw-composer-edge); }
  .aw-chatcard .aw-composer:focus-within { box-shadow: var(--aw-composer-edge), var(--aw-focus); }
  /* Before the first question the card holds the box for the question alone (Jay, 2026-11-16: the greeting bar and
     the box under it looked like two bars). The empty list of messages takes no room until the conversation starts. */
  body:not([data-chat="on"]) .aw-chatcard .aw-messages { display: none; }
  body:not([data-chat="on"]) .aw-chatcard .aw-composer-wrap { margin-top: 0; }
}

/* ---------- Answer ---------- */
.aw-msg--bot { flex-direction: column; align-items: stretch; gap: 10px; }
.aw-answer-text { margin-bottom: 4px; }
/* Traffic light: always a text label with the colour */
.aw-light { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 14px; border-radius: var(--aw-radius-pill);
  font-size: var(--aw-text-ui); font-weight: 700; }
.aw-light-dot { width: 12px; height: 12px; border-radius: 50%; }
.aw-light--yellow { background: var(--aw-yellow-bg); color: var(--aw-yellow-fg); }
.aw-light--yellow .aw-light-dot { background: var(--aw-yellow-dot); }
.aw-light--red { background: var(--aw-red-bg); color: var(--aw-red-fg); }
.aw-light--red .aw-light-dot { background: var(--aw-red-solid); }
.aw-light--green { background: var(--aw-green-bg); color: var(--aw-green-fg); }
.aw-light--green .aw-light-dot { background: var(--aw-green-dot); }
.aw-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.aw-bubble-bot .aw-source { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: var(--aw-radius-chip);
  background: var(--aw-surface-muted); color: var(--aw-primary); font-size: var(--aw-text-small); font-weight: 500; text-decoration: none; }
.aw-bubble-bot .aw-source:hover { text-decoration: underline; }
@media (max-width: 959px) { .aw-source-title { display: none; } }
.aw-notice { margin: 12px 0 0; font-size: var(--aw-text-meta); line-height: 1.5; color: var(--aw-text-muted); }
.aw-notice + .aw-notice { margin-top: 4px; }
.aw-chip { display: inline-block; padding: 1px 8px; border-radius: var(--aw-radius-chip); background: var(--aw-surface-muted);
  color: var(--aw-text); font-weight: 600; }
.aw-card-slot { margin-top: 14px; }
.aw-bubble-bot .copy-btn { margin-top: 12px; min-height: var(--aw-tap); }
/* "Was this helpful?" over the buttons of a full answer: a small line, Yes and No as text buttons, 48 high to press */
.aw-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 2px 0 12px; font-size: var(--aw-text-small);
  color: var(--aw-text-muted); }
.aw-helpful .aw-link-btn { padding: 12px 8px; margin: -12px 0; }
.aw-helpful-more { flex-basis: 100%; margin: 6px 0 0; }
.aw-next { display: flex; flex-direction: column; gap: 10px; }
.aw-next .aw-btn { width: 100%; }
.aw-next .act-ask-else { flex-basis: 100%; }  /* a row of its own on a wide screen too */
@media (min-width: 960px) { .aw-next { flex-direction: row; flex-wrap: wrap; } .aw-next .aw-btn { width: auto; } }
/* D-02 (D6, D9, out in round R-2): "Next steps" opens the actions under an answer in place. The quiet outline is for a button the worker
   does not have to press (the actions, the buttons of a question the AI wrote): white, the text colour, a 1px line in
   the muted text colour. Colours from design/tokens.css only. */
.aw-btn--quiet { background: var(--aw-surface); color: var(--aw-text); box-shadow: inset 0 0 0 1px var(--aw-text-muted); }
.aw-btn--quiet:hover { background: var(--aw-surface-muted); }
.aw-btn--quiet:disabled { box-shadow: none; }
.act-next-toggle[aria-expanded="true"] .aw-icon { transform: rotate(180deg); }
.aw-next-panel { display: flex; flex-direction: column; gap: 10px; }
/* M-order (B-5, out in round R-2): the actions inside the answer, under its cards. */
.aw-bubble-bot > .aw-next { margin-top: 16px; }
.aw-bubble-bot > .aw-next a.aw-btn { font-weight: 600; text-decoration: none; }
.aw-bubble-bot > .aw-next a.aw-btn--quiet { color: var(--aw-text); }
@media (min-width: 960px) { .aw-next-panel { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; } }
/* D-04 (D5, out in round R-2): the box that asks before a number is sent */
.aw-pii-check { margin: 0 0 10px; padding: 16px; scroll-margin-top: 140px; }
.aw-pii-list { margin: 0; padding-left: 20px; font-size: var(--aw-text-small); color: var(--aw-text); overflow-wrap: anywhere; }
.aw-pii-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.aw-pii-actions .aw-btn { width: 100%; min-height: var(--aw-tap); }
/* the agreement screen's danger line at the end of the box, in its style; 000 a phone link in the same red */
.aw-pii-check .aw-pii-danger { margin: 12px 0 0; }
.aw-pii-danger a { padding: 10px 4px; margin: 0 -4px; color: inherit; text-decoration: underline; text-underline-offset: 2px; }  /* 44px or more to press, the line stays as it is */
/* on a phone during a conversation the message box is fixed to the bottom: while the box asks, the lines under the
   message box wait, so the box, the message box and the header fit on a small phone (320x693) */
@media (max-width: 959px) { body[data-chat="on"] .aw-composer-wrap:has(.aw-pii-check) .aw-tip { display: none; } }
.aw-stub { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 18px; border: 0;
  border-radius: var(--aw-bubble-bot); background: var(--aw-surface); box-shadow: var(--aw-shadow); color: var(--aw-primary);
  font: inherit; text-align: left; cursor: pointer; }
.aw-stub span { display: flex; flex-direction: column; }
.aw-stub strong { color: var(--aw-text); font-size: var(--aw-text-ui); }
.aw-stub span span { font-size: var(--aw-text-small); color: var(--aw-primary); font-weight: 600; }
@media (min-width: 960px) { .aw-chatcard .aw-stub { background: var(--aw-page); box-shadow: none; width: auto; } }

/* ---------- Contact cards (dismissal, red flag, Get help) ---------- */
.aw-ccard { padding: 18px 16px 16px; border-radius: var(--aw-radius-card); }
.aw-ccard--soft { background: var(--aw-primary-soft); }
.aw-ccard--red { background: var(--aw-red-bg); }
.aw-ccard-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.3;
  color: var(--aw-text); }
.aw-ccard--red .aw-ccard-title { color: var(--aw-red-fg); }
.aw-ccard-intro { margin: 0 0 14px; font-size: var(--aw-text-ui); line-height: 1.5; color: var(--aw-text); }
.aw-orgs { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.aw-org { padding: 14px 16px 6px; background: var(--aw-surface); border-radius: 14px; }
.aw-org p { margin: 0; }
.aw-org .aw-org-label, .aw-helpline-label { margin-bottom: 2px; font-size: var(--aw-text-small); font-weight: 600; color: var(--aw-text); }
.aw-org-name { font-size: var(--aw-text-ui); font-weight: 700; line-height: 1.35; color: var(--aw-text); }
.aw-org .aw-org-note { margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--aw-text); }
.aw-org .aw-org-hours { margin-top: 4px; font-size: var(--aw-text-small); line-height: 1.45; color: var(--aw-text-muted); }
.aw-org .aw-org-cond { margin-top: 4px; font-size: var(--aw-text-small); line-height: 1.45; color: var(--aw-peach-fg); }
.aw-org-phone, .aw-bubble-bot .aw-org-phone { display: flex; align-items: center; gap: 10px; min-height: var(--aw-tap); margin-top: 4px;
  font-size: 18px; font-weight: 700; color: var(--aw-primary); text-decoration: none; border-radius: var(--aw-radius-chip); }
.aw-ccard--red .aw-org-phone, .aw-bubble-bot .aw-ccard--red .aw-org-phone { color: var(--aw-red-solid); }
.aw-ccard-footer { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--aw-text); }
.aw-ccard-rephrase { margin: 8px 0 0; font-size: var(--aw-text-meta); line-height: 1.5; color: var(--aw-text-muted); }
.aw-bubble-bot > .aw-light + .aw-card-slot { margin-top: 0; }
/* Jay, 2026-11-30: a card made from the worker's own figures stands above the answer's text (static/js/chat.js,
   aw-card-slot--first). At the top of the bubble it has no space above it, and the text under it keeps the space a
   card slot has. */
.aw-bubble-bot > .aw-card-slot--first:first-child { margin-top: 0; }
.aw-bubble-bot > .aw-card-slot--first + .aw-answer-text { margin-top: 14px; }

/* ---------- Fixed cards made by code (the second plan, 2026-11-17, drafts: static/js/chat.js fixedCardHtml) ----------
   The notice table, the visa card, the two kinds of dismissal application. Only the colours and shapes that are
   there already: the soft card, the white box of a contact, the phone row and the link row. A marked row or sentence
   is bold and has aria-current, so it is never marked by colour alone. */
.aw-fixed { display: flex; flex-direction: column; gap: 10px; }
.aw-ccard > .aw-ccard-title + .aw-fixed { margin-top: 8px; }
.aw-orgs + .aw-fixed { margin-top: 10px; }
.aw-fixed > p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--aw-text); }
.aw-fixed > .aw-fixed-said { font-size: var(--aw-text-ui); }
.aw-fixed > .aw-fixed-note { color: var(--aw-text); }
.aw-fixed [aria-current="true"] { font-weight: 700; }
.aw-fixed-box { padding-bottom: 14px; }
.aw-fixed-box > .aw-org-phone { margin-bottom: -8px; }
.aw-fixed-box > .aw-org-link { align-items: flex-start; padding: 12px 0; font-size: var(--aw-text-ui); line-height: 1.35; overflow-wrap: anywhere; }
.aw-fixed-box > .aw-org-link .aw-icon { flex: none; margin-top: 1px; }
.aw-fixed-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; color: var(--aw-text); }
.aw-fixed-table th, .aw-fixed-table td { padding: 10px 8px 10px 0; text-align: left; vertical-align: top; font-weight: 400;
  border-top: 1px solid var(--aw-border); }
.aw-fixed-table td { padding-right: 0; white-space: nowrap; }
.aw-fixed-table thead th { padding-top: 0; border-top: 0; font-size: var(--aw-text-small); font-weight: 600; }
.aw-fixed-table thead th + th { padding-right: 0; }
.aw-fixed-table tr[aria-current="true"] th, .aw-fixed-table tr[aria-current="true"] td { font-weight: 700; background: var(--aw-primary-soft); }
.aw-fixed-table tr[aria-current="true"] th { padding-left: 8px; }
.aw-fixed-table tr[aria-current="true"] td { padding-right: 8px; }
.aw-fixed-box .aw-fixed-sentence { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--aw-border); }
.aw-bubble-bot a.aw-link-card { margin-top: 0; text-decoration: none; }
/* what the button "How to apply to the Fair Work Commission" opens: a row of its own under the buttons */
.aw-next .aw-fixed-apply { flex-basis: 100%; }
.aw-fixed-apply[hidden] { display: none; }
/* G2: G-03, a fixed question with its buttons (a draft): the buttons of the pay question set, one under the other */
.aw-fixed-ask { display: flex; flex-direction: column; gap: 10px; }
.aw-fixed-ask-q { margin: 0; font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.4; color: var(--aw-text); }
.aw-fixed-ask-options { display: flex; flex-direction: column; gap: 8px; }
.aw-fixed-ask-options .aw-btn { justify-content: flex-start; padding: 10px 16px; text-align: left; line-height: 1.35; overflow-wrap: anywhere; }
.aw-fixed-ask-options .act-ask[aria-pressed="false"] > .aw-icon { display: none; }
.aw-fixed-ask-options .act-ask > .aw-icon { flex: none; }
.aw-fixed-ask-shown[hidden] { display: none; }
/* the same block on the "Where to send this" card of the dismissal form's message for the Commission */
.aw-send-to .aw-fixed-apply { margin-top: 12px; }

/* Screens with the helper speaking first (message draft, situation summary) */
.aw-bot-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aw-avatar-img--lg { width: 48px; height: 48px; }
.aw-avatar-img--lg img { width: 40px; height: 40px; }
.aw-bot-intro-text { flex: 1; margin: 0; padding: 14px 18px; background: var(--aw-surface); border-radius: var(--aw-radius-card);
  font-size: var(--aw-text-body); line-height: var(--aw-line); color: var(--aw-text); }
.aw-choices { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }
.aw-choice { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: var(--aw-radius-button);
  background: var(--aw-page); cursor: pointer; }
.aw-choice:has(input:checked) { background: var(--aw-primary-soft); }
.aw-choice input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--aw-primary); }
.aw-choice-text { display: flex; flex-direction: column; }
.aw-choice-text strong { font-size: var(--aw-text-ui); color: var(--aw-text); }
.aw-choice-note { font-size: var(--aw-text-small); color: var(--aw-primary); font-weight: 600; }
.aw-card-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--aw-primary); }
/* A blank of a draft or a summary, filled in where it stands: the text of the draft, underlined, on the soft colour */
.aw-blank { display: inline-block; max-width: 100%; min-height: 28px; padding: 0 4px; border: 0; border-bottom: 2px solid var(--aw-primary);
  border-radius: 0; background: var(--aw-primary-soft); color: var(--aw-text); font: inherit; vertical-align: baseline; }
.aw-blank::placeholder { color: var(--aw-primary); opacity: 1; }
.aw-blank:focus { outline: none; box-shadow: var(--aw-focus); }
/* "Where to send this": a card under Copy and Share. A button, then the sentence that belongs to it */
.aw-send-to .aw-btn { margin: 12px 0 0; padding: 8px 16px; text-align: center; text-decoration: none; }
.aw-send-to .aw-btn + .aw-send-line { margin-top: 8px; }
/* the steps on the organisation's own site, numbered, under the button that opens it */
.aw-send-steps { margin: 8px 0 8px; padding-left: 22px; list-style: decimal; font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); }
.aw-send-steps li { margin-bottom: 2px; }
.aw-send-to .aw-send-line + .aw-send-address { margin-top: 12px; }  /* the address, after the lines of the phone */
.aw-send-to .aw-send-line:last-child { margin-bottom: 0; }
.aw-send-to .aw-link-btn { padding: 12px 6px; margin: -12px 0; }  /* "Copy address": small to look at, 48 high to press */
/* The check line of the draft, shown once when a blank is still in square brackets: the soft colour, bold text */
.aw-send-check { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--aw-radius-chip); background: var(--aw-primary-soft);
  font-size: var(--aw-text-ui); font-weight: 600; line-height: var(--aw-line); color: var(--aw-text); }
.aw-send-line { margin: 0 0 4px; font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); overflow-wrap: anywhere; }
.aw-send-line a { color: var(--aw-primary); text-decoration: underline; font-weight: 500; }
.aw-draft-text { white-space: pre-wrap; font-size: var(--aw-text-ui); line-height: 1.6; color: var(--aw-text); margin-bottom: 12px;
  overflow-wrap: anywhere; }
.aw-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.aw-btn-row .aw-btn { width: 100%; padding: 0 12px; }
/* D-07: the check mark of the chosen answer sits in the button's corner, so it takes no width from the words (the
   state buttons are four in a row on a phone) */
.aw-btn-row .act-answer { position: relative; }
.aw-btn-row .act-answer > .aw-icon { position: absolute; top: 5px; right: 5px; width: 14px; height: 14px; }
/* four in a row (the states, 2026-11-18, for everyone): at 320px a button is 56px wide, so less side padding, and a word
   ("NSW", "QLD") never breaks inside itself. The height (52px) and the gap stay. */
.aw-btn-row--four .aw-btn { padding: 0 4px; overflow-wrap: normal; word-break: keep-all; }
.aw-btn-row--four .act-answer > .aw-icon { top: 3px; right: 3px; width: 12px; height: 12px; }  /* clear of the letters of a word that fills the button */
.aw-center { align-self: center; }

/* "My situation" */
.aw-summary-card { padding: 18px 20px 16px; }
.aw-summary-made { margin: 0 0 10px; font-size: var(--aw-text-small); color: var(--aw-text-muted); }
.aw-summary-text { font-size: var(--aw-text-ui); line-height: 1.6; color: var(--aw-text); overflow-wrap: anywhere; }
.aw-summary-text .aw-md-h { display: inline-block; margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--aw-primary); }
.aw-summary-edit { min-height: 280px; line-height: 1.5; resize: vertical; }
.aw-summary-foot { margin: 14px 0 0; font-size: var(--aw-text-meta); line-height: 1.5; color: var(--aw-text-muted); }
.aw-summary-next { margin-top: 12px; }

/* ---------- Home ---------- */
.aw-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 4px 0 20px; }
.aw-hero-robot { width: 104px; height: auto; flex-shrink: 0; }
.aw-hero-bubble { flex: 1 1 160px; margin: 0; padding: 14px 16px; background: var(--aw-surface); color: var(--aw-text);
  border-radius: var(--aw-radius-card); font-size: var(--aw-text-body); line-height: var(--aw-line); }
.aw-hero-text { flex: 1 1 100%; }
.aw-h1 { margin: 4px 0 12px; font-size: var(--aw-h1-mobile); font-weight: 700; line-height: 1.22; color: var(--aw-text); }
.aw-hero-sub { margin: 0 0 12px; font-size: var(--aw-text-body); line-height: var(--aw-line); color: var(--aw-text-muted); }
.aw-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.aw-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 12px; border-radius: var(--aw-radius-chip);
  font-size: var(--aw-text-small); font-weight: 600; }
.aw-badge--mint { background: var(--aw-mint-bg); color: var(--aw-mint-fg); }
.aw-badge--lavender { background: var(--aw-lavender-bg); color: var(--aw-lavender-fg); }
.aw-badge--peach { background: var(--aw-peach-bg); color: var(--aw-peach-fg); }
@media (min-width: 960px) {
  .aw-hero { flex-wrap: nowrap; gap: 28px; padding: 0 0 24px 16px; }
  .aw-hero-robot { width: 140px; }
  .aw-hero-text { flex: 1 1 auto; }
  .aw-h1 { font-size: var(--aw-h1-desktop); margin: 0 0 8px; }
}

/* Topic tiles (phone, 2 x 2) and topic list (sidebar) */
.aw-tile--mint { background: var(--aw-mint-bg); color: var(--aw-mint-fg); }
.aw-tile--lavender { background: var(--aw-lavender-bg); color: var(--aw-lavender-fg); }
.aw-tile--peach { background: var(--aw-peach-bg); color: var(--aw-peach-fg); }
.aw-tile--butter { background: var(--aw-butter-bg); color: var(--aw-butter-fg); }
.aw-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.aw-tile { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 14px; min-height: 92px;
  padding: 14px; border: 0; border-radius: var(--aw-radius-tile); font: inherit; text-align: left; cursor: pointer; }
.aw-tile span { color: var(--aw-text); font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.3; }
.aw-topics { display: flex; flex-direction: column; gap: 10px; }
.aw-topic { display: flex; align-items: center; gap: 14px; min-height: var(--aw-tap); padding: 10px 16px; border: 0;
  border-radius: var(--aw-radius-button); font: inherit; text-align: left; cursor: pointer; }
.aw-topic span { color: var(--aw-text); font-size: var(--aw-text-ui); font-weight: 600; }

/* "Unsafe or in danger?" */
.aw-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 16px 16px 16px 20px;
  background: var(--aw-red-bg); border-radius: var(--aw-radius-card); }
.aw-danger-title { margin: 0 0 2px; font-size: 18px; font-weight: 700; color: var(--aw-red-fg); }
.aw-danger-sub { margin: 0; font-size: var(--aw-text-small); line-height: 1.45; color: var(--aw-text-muted); }
.aw-danger-btn { flex-shrink: 0; min-height: var(--aw-tap); padding: 0 20px; border: 0; border-radius: var(--aw-radius-pill);
  background: var(--aw-red-solid); color: var(--aw-surface); font: inherit; font-size: var(--aw-text-ui); font-weight: 700; cursor: pointer; }
/* Step 0 of D1b (not a draft, 2026-11-18): on a narrow phone the card's button may take two lines, so the card fits
   the screen in every language (Tongan, Samoan and Tagalog were wider than 320px). The words do not change. */
.aw-danger-text { flex: 1 1 0; }  /* the button keeps its one line while there is room, then gives way */
.aw-danger > .aw-danger-btn { flex: 0 1 auto; padding: 6px 18px; line-height: 1.2; text-align: center; }
.aw-danger--side { flex-direction: column; align-items: flex-start; margin-top: 0; padding: 20px 20px 22px; gap: 14px; }

/* Sidebar */
.aw-side { display: flex; flex-direction: column; gap: 16px; }
.aw-side-card { padding: 20px; }
.aw-side-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--aw-text); }
.aw-helplines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.aw-helpline { display: flex; flex-direction: column; justify-content: center; min-height: var(--aw-tap); padding: 4px 0;
  text-decoration: none; border-radius: var(--aw-radius-chip); }
.aw-helpline-name { font-size: 15px; color: var(--aw-text); }
.aw-helpline-phone { font-size: 18px; font-weight: 700; color: var(--aw-primary); text-decoration: underline; }
.aw-disclaimer { margin: 16px 0 0; text-align: center; font-size: var(--aw-text-meta); line-height: 1.5; color: var(--aw-text-muted); }
.aw-disclaimer--side { margin: 0; text-align: left; }

/* Small screens: pay, hours */
.aw-screen-lead { margin: 0 0 16px; font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); }
.aw-link-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; min-height: 64px; padding: 14px 18px;
  background: var(--aw-primary-soft); color: var(--aw-primary); border-radius: var(--aw-radius-button); text-decoration: none; }
.aw-link-card span { display: flex; flex-direction: column; }
.aw-link-card strong { font-size: var(--aw-text-ui); }
.aw-link-card span span { font-size: var(--aw-text-small); color: var(--aw-text); }

/* ---------- About, Privacy, Terms ---------- */
.aw-doc { max-width: 760px; margin: 0 auto; padding: 24px var(--aw-gutter-mobile) 48px; color: var(--aw-text); }
.aw-doc-title { margin: 0 0 8px; font-size: var(--aw-h1-mobile); font-weight: 700; line-height: 1.22; }
@media (min-width: 960px) { .aw-doc { padding-top: 40px; } .aw-doc-title { font-size: var(--aw-h1-desktop); } }
.aw-doc-sub { margin: 0 0 8px; font-size: var(--aw-text-body); line-height: var(--aw-line); color: var(--aw-text-muted); }
.aw-doc-updated { margin: 0 0 20px; font-size: var(--aw-text-small); color: var(--aw-text-muted); }
.aw-doc-section { margin-top: 14px; }
.aw-doc-summary { background: var(--aw-primary-soft); box-shadow: none; }
.aw-doc-h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.aw-doc-section p { margin: 0 0 10px; font-size: var(--aw-text-ui); line-height: 1.6; }
.aw-doc-section p:last-child { margin-bottom: 0; }
/* round maint3 (2026-11-30): a word longer than the line (a licence address on /about) wraps inside its card at
   320 and 390 wide instead of running out of it. Words that fit a line are not touched. */
.aw-doc-section p, .aw-doc-list li { overflow-wrap: anywhere; }
.aw-doc-list { margin: 0 0 10px; padding-left: 22px; list-style: disc; font-size: var(--aw-text-ui); line-height: 1.6; }
.aw-doc-list:last-child { margin-bottom: 0; }
.aw-doc-list li { margin-bottom: 6px; }
.aw-doc a { color: var(--aw-primary); text-decoration: underline; font-weight: 500; }
/* /resources reuses the chat contact cards: keep their phone row as in the chat (no underline, bold). */
.aw-doc .aw-org-phone { text-decoration: none; font-weight: 700; }
.aw-doc-foot { margin: 20px 0 0; font-size: var(--aw-text-meta); line-height: 1.5; color: var(--aw-text-muted); }
.aw-doc-back { margin: 20px 0 0; font-size: var(--aw-text-ui); }

/* Slim footer on the chat page */
.aw-footer { padding: 24px 0 32px; font-size: var(--aw-text-meta); color: var(--aw-text-muted); line-height: 1.6; }
.aw-footer a { color: var(--aw-primary); }
.aw-footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; font-size: var(--aw-text-small); }
.aw-footer-links a { display: inline-flex; align-items: center; min-height: 32px; }
.aw-footer p { margin: 0 0 8px; }
@media (max-width: 959px) { body[data-chat="on"] .aw-footer { display: none; } }

/* ---------- 4-05: the phone chat screen and touch targets ----------
   During a conversation on a phone the links of the slim footer (About, Resources, Terms, Privacy) stay at the end of
   the conversation, above the message box. The conversation is in sessionStorage, so it is there again after Back or
   the logo. The rest of the footer stays hidden there, as before.
   Touch targets: about 44px. Text links and small text buttons get --aw-tap-header (44px), buttons keep --aw-tap. The
   negative margins keep the text where it was: only the area to press grows. */
@media (max-width: 959px) {
  body[data-chat="on"] .aw-footer { display: block; padding: 0 0 240px; }
  body[data-chat="on"] .aw-footer .aw-container > :not(.aw-footer-links) { display: none; }
  body[data-chat="on"] .aw-chat-page { padding-bottom: 8px; }
}
.aw-logo-link { min-height: var(--aw-tap-header); }
.aw-link-btn { padding: 12px 8px; margin: -12px -6px; min-width: var(--aw-tap-header); }
.aw-helpful .aw-link-btn { min-width: var(--aw-tap-header); }
.aw-bubble-bot .aw-source { min-height: var(--aw-tap-header); }
.aw-footer-links a { min-height: var(--aw-tap-header); }
.aw-doc-back a, .aw-doc-section p > a:only-child, .aw-doc-list li > a:only-child, .aw-org .aw-org-hours a, .aw-foot-tap {
  display: inline-flex; align-items: center; min-height: var(--aw-tap-header); }
/* round maint3: a mail link inside a sentence ("contact us at help@askwork.ai." on /privacy and /terms) stays in the
   line like the phone number of P-193: padding above and below gives the 44px place to press without changing the line
   height (also when the link wraps or the text is zoomed) */
.aw-doc-section p > a[href^="mailto:"]:only-child { display: inline; min-height: 0;
  padding: calc((var(--aw-tap-header) - 1em) / 2) 0; }
.aw-footer-links a, .aw-foot-tap { min-width: var(--aw-tap-header); justify-content: center; }
/* /resources: a row that is a page to open (no phone number) has its link as a row of its own, like the phone row */
.aw-doc .aw-org-link { text-decoration: none; font-size: var(--aw-text-ui); overflow-wrap: anywhere; }

/* 4-01 and 4-02 (drafts): the source card of an answer's figures and the organisations an answer names use the contact
   card (.aw-ccard--soft, .aw-org). A page or web address is a link row like the phone row, in the size of the text. */
.aw-bubble-bot .aw-org-link { font-size: var(--aw-text-ui); text-decoration: none; overflow-wrap: anywhere; }
.aw-bubble-bot .aw-org-link .aw-icon { flex: none; }
.aw-org--source { padding-bottom: 14px; }
.aw-org--source .aw-org-link { align-items: flex-start; margin: -12px 0 0; padding: 12px 0 6px; font-weight: 700; line-height: 1.35; }
.aw-org--source .aw-org-link .aw-icon { margin-top: 1px; }
.aw-org--source .aw-org-note { margin-top: 4px; }
/* ---------- 6-01, 6-03 (drafts): the guide pages, the interpreter card, the way in on /resources ----------
   Colours and shapes from tokens.css only. The PALM marker uses the "Visa and PALM workers" pair (butter). The large
   letters of the interpreter card are the one new size: 32px on a phone, 44px from 960px wide. */
.aw-guide-list, .aw-tools-list, .aw-guide-links, .aw-guide-sources ul { margin: 0; padding: 0; list-style: none; }
.aw-guide-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.aw-guide-item { display: flex; align-items: center; gap: 14px; min-height: var(--aw-tap); padding: 16px 18px; background: var(--aw-surface);
  border-radius: var(--aw-radius-card); box-shadow: var(--aw-shadow); color: var(--aw-primary); text-decoration: none; }
.aw-doc a.aw-guide-item { text-decoration: none; }
.aw-guide-item:hover { box-shadow: var(--aw-shadow-raised); }
.aw-guide-item > .aw-icon { flex: none; }
.aw-guide-item-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.aw-guide-item-title { font-size: var(--aw-text-ui); font-weight: 700; line-height: 1.35; color: var(--aw-primary); }
.aw-guide-item-sum { font-size: var(--aw-text-small); font-weight: 400; line-height: 1.45; color: var(--aw-text); }
.aw-guide-tag { display: inline-block; align-self: flex-start; padding: 2px 10px; border-radius: var(--aw-radius-chip);
  background: var(--aw-butter-bg); color: var(--aw-butter-fg); font-size: var(--aw-text-small); font-weight: 600; line-height: 1.5; }
.aw-guide-tag-line { margin: 0 0 8px; }
.aw-guide-back { margin: 0 0 8px; font-size: var(--aw-text-ui); }
.aw-doc .aw-guide-back a { display: inline-flex; align-items: center; gap: 4px; min-height: var(--aw-tap-header); text-decoration: none; }
.aw-guide-note { padding: 12px 14px; border-radius: var(--aw-radius-chip); background: var(--aw-butter-bg); color: var(--aw-butter-fg); }
.aw-guide-links { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.aw-doc .aw-guide-links a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header); font-size: var(--aw-text-ui);
  line-height: 1.35; overflow-wrap: anywhere; }
.aw-guide-links a > .aw-icon { flex: none; }
.aw-guide-help .aw-doc-h2 { color: var(--aw-text); }
.aw-guide-orgs { margin-top: 14px; }
/* the rows keep the sizes of /resources inside a section of the guide (.aw-doc-section p would change them) */
.aw-guide-orgs .aw-org p { margin: 0; line-height: 1.45; }
.aw-guide-orgs .aw-org .aw-org-label { margin-bottom: 2px; font-size: var(--aw-text-small); }
.aw-guide-orgs .aw-org .aw-org-name { font-size: var(--aw-text-ui); line-height: 1.35; }
.aw-guide-orgs .aw-org .aw-org-note { margin-top: 2px; font-size: 15px; }
.aw-guide-orgs .aw-org .aw-org-hours, .aw-guide-orgs .aw-org .aw-org-cond { margin-top: 4px; font-size: var(--aw-text-small); }
.aw-org--danger .aw-org-phone { color: var(--aw-red-solid); }
.aw-guide-sources li { display: flex; flex-direction: column; margin-bottom: 8px; }
.aw-guide-sources li:last-child { margin-bottom: 0; }
.aw-doc .aw-guide-sources a { display: inline-flex; align-items: center; min-height: var(--aw-tap-header); font-size: var(--aw-text-ui);
  line-height: 1.35; overflow-wrap: anywhere; }
.aw-guide-checked { font-size: var(--aw-text-small); color: var(--aw-text-muted); }
.aw-tools-list { display: flex; flex-direction: column; gap: 10px; }
.aw-tools-list .aw-link-card { margin-top: 0; }
.aw-doc a.aw-link-card { text-decoration: none; }
.aw-link-card > .aw-icon { flex: none; }

/* ---------- The library (a draft): templates/library.html ----------
   Colours, sizes and shapes from tokens.css only. The lists of links have the look of the "Sources" of a guide. */
.aw-lib-h3 { margin: 18px 0 6px; font-size: var(--aw-text-ui); font-weight: 700; line-height: 1.35; color: var(--aw-text); }
.aw-lib .aw-doc-section p.aw-lib-award { margin: 12px 0 0; font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.35; }
.aw-lib-links { margin: 0; padding: 0; list-style: none; }
.aw-lib-links li { display: flex; flex-direction: column; margin-bottom: 10px; }
.aw-lib-links li:last-child { margin-bottom: 0; }
.aw-lib-links + .aw-lib-links { margin-top: 14px; }
.aw-doc .aw-lib-links a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header); font-size: var(--aw-text-ui);
  font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.aw-lib-links a > .aw-icon { flex: none; }
.aw-lib-by { font-size: var(--aw-text-small); font-weight: 600; color: var(--aw-text); }
.aw-lib-note { font-size: var(--aw-text-small); line-height: 1.45; color: var(--aw-text); }
.aw-lib .aw-guide-note { margin-top: 14px; }
/* a part reached from the list at the top is not hidden under the line of the review address */
.aw-lib section.aw-doc-section, .aw-lib .aw-lib-h3 { scroll-margin-top: calc(var(--aw-tap) * 2); }
.aw-lib .aw-icard-pick { margin: 14px 0 4px; }
.aw-lib .aw-guide-orgs { margin: 10px 0; }
.aw-lib .aw-guide-orgs .aw-guide-tag-line { margin: 0 0 6px; }

.aw-icard-pick { margin: 18px 0 14px; }
.aw-icard-label { display: block; margin-bottom: 6px; font-size: var(--aw-text-ui); font-weight: 600; }
.aw-icard-select { width: 100%; min-height: var(--aw-tap); padding: 0 14px; border: 2px solid var(--aw-primary); border-radius: var(--aw-radius-button);
  background: var(--aw-surface); color: var(--aw-text); font: inherit; font-size: var(--aw-text-ui); }
.aw-icard-select:focus-visible { outline: none; box-shadow: var(--aw-focus); }
.aw-icard { margin-top: 14px; padding: 24px 20px; background: var(--aw-surface); border-radius: var(--aw-radius-card); box-shadow: var(--aw-shadow); }
.aw-icard-need, .aw-icard-lang { margin: 0 0 12px; font-size: 32px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.aw-icard-need { color: var(--aw-text); }
.aw-icard-lang { color: var(--aw-primary); }
.aw-icard-own { margin: 0 0 12px; font-size: 28px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.aw-icard-tis { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--aw-border); }
.aw-icard-tis p { margin: 0; }
.aw-icard-tis .aw-org-note { margin-top: 4px; font-size: 15px; line-height: 1.45; }
.aw-icard-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.aw-icard-actions .aw-btn[hidden] { display: none; }
@media (min-width: 960px) {
  .aw-icard { padding: 36px 40px; }
  .aw-icard-need, .aw-icard-lang { font-size: 44px; }
  .aw-icard-own { font-size: 36px; }
  .aw-icard-actions { flex-direction: row; flex-wrap: wrap; }
}
@media print {
  body:has(.aw-icard-page) > :not(main), body:has(.aw-icard-page) .aw-header,
  .aw-icard-page .aw-icard-pick, .aw-icard-page .aw-icard-actions, .aw-icard-page .aw-doc-sub, .aw-icard-page .aw-icard-private { display: none !important; }
  body:has(.aw-icard-page) { background: var(--aw-surface); }
  .aw-icard-page { padding: 0; }
  .aw-icard { box-shadow: none; break-inside: avoid; }
  .aw-icard-need, .aw-icard-lang { font-size: 36pt; }
  .aw-icard-own { font-size: 28pt; }
  .aw-icard-tis .aw-org-phone { font-size: 24pt; }
}
/* ---------- 6-02: the work record helper (/work-record, a draft) ----------
   Only the tokens of design/tokens.css. Buttons, fields, the checkbox line and the cards are the shared ones. */
.aw-wr-private { margin: 0 0 8px; padding: 12px 16px; border-radius: var(--aw-radius-button); background: var(--aw-primary-soft);
  font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); }
.aw-wr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.aw-wr-actions .aw-btn { flex: 1 1 140px; }
.aw-wr-alert { margin: 0; padding: 10px 12px; border-radius: var(--aw-radius-chip); background: var(--aw-butter-bg);
  color: var(--aw-butter-fg); font-size: var(--aw-text-ui); font-weight: 600; line-height: var(--aw-line); }
.aw-doc-section .aw-wr-nocalc { font-size: var(--aw-text-small); color: var(--aw-text-muted); }
.aw-doc-section .aw-wr-status:empty { display: none; }
.aw-doc-section .aw-wr-status { font-size: var(--aw-text-small); font-weight: 600; color: var(--aw-mint-fg); }
.aw-doc-section .aw-wr-empty { color: var(--aw-text-muted); }
.aw-wr-days { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.aw-wr-day { padding: 14px 16px; border-radius: var(--aw-radius-button); background: var(--aw-page); }
.aw-doc-section .aw-wr-day p { margin: 0 0 2px; }
.aw-doc-section .aw-wr-day .aw-wr-day-date { margin-bottom: 6px; font-weight: 700; }
.aw-wr-day-label { color: var(--aw-text-muted); }
.aw-wr-day-note { overflow-wrap: anywhere; }
.aw-wr-day .aw-wr-actions { margin-top: 10px; }
#wr-delete-confirm .aw-field-label { margin: 12px 0 10px; font-size: var(--aw-text-ui); }
@media print {
  body:has(.aw-wr) header, body:has(.aw-wr) footer, body:has(.aw-wr) .aw-skip, body:has(.aw-wr) .aw-preview-line,
  .aw-wr .aw-wr-noprint { display: none !important; }
  .aw-wr .aw-card { box-shadow: none; padding: 0; }
  .aw-wr .aw-wr-day { break-inside: avoid; background: none; border-bottom: 1px solid var(--aw-border); border-radius: 0; }
}

/* U6-2 (accessibility, K2 to K5): a focus put by the page on text that is not a control (a heading, a line, a box), so
   the focus is not lost. It is not a Tab stop and shows no ring, so nothing looks different. */
.aw-focus-quiet:focus, .aw-focus-quiet:focus-visible { outline: none; box-shadow: none; }

/* ---------- D-01 (Jay, 2026-11-17, not a draft): the header and the first screen ----------
   docs/askwork-second-plan-d-home.md. Only existing colours and shapes: "Get help" is the button of the "Unsafe or in
   danger?" card (.aw-danger-btn: the solid red, white bold text, the pill), at the height of the other header pills.
   The header is one line at every width: the logo, "Get help" next to it, the language button at the end (the links
   About and Resources before it from 960px). When the line is short the language button gives way first: it shows the
   name of the language only when the whole name fits, else the globe alone (its aria-label names the language,
   static/js/base.js). Only when even the globe alone does not leave room does "Get help" go onto two lines. */
.aw-header-start { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.aw-header-start .aw-logo-link { flex-shrink: 0; }
.aw-header-help { display: inline-flex; align-items: center; justify-content: center; min-height: var(--aw-tap-header);
  padding: 4px 18px; line-height: 1.15; text-align: center; text-decoration: none; white-space: nowrap; }
.aw-header-help--wrap { flex-shrink: 1; white-space: normal; }
.aw-header-nav { flex: 0 1 auto; }
/* neither end of the line gets narrower than its own buttons at their narrowest (2026-11-18: the end was 3px too narrow
   at 320px in French and Thai, so the globe went into the side margin) */
.aw-header-start, .aw-header-nav { min-width: min-content; }
.aw-header-nav .aw-lang-btn { flex: 0 1 auto; min-width: var(--aw-tap-header); }
.aw-lang-btn > svg { flex-shrink: 0; }
.aw-lang-btn-name { min-width: 0; }
.aw-lang-btn.aw-lang-btn--icon { width: var(--aw-tap-header); padding: 0; justify-content: center; }
.aw-lang-btn--icon .aw-lang-btn-name { display: none; }
@media (max-width: 959px) {
  .aw-header-inner, .aw-header-start { gap: 8px; }
}
@media (max-width: 429px) {
  .aw-chat-header .aw-chat-only-mobile.aw-header-avatar { display: none; }  /* the robot next to the logo during a conversation: no room */
  .aw-header-help { padding: 4px 14px; }
  .aw-lang-btn { padding: 0 14px; gap: 6px; }
}
@media (max-width: 359px) {
  .aw-logo { height: 20px; }
}

/* The first screen of a phone (D-01, Jay's picture 01, right half): the robot small next to the greeting, then the
   title, the badges and the box for the question, so the box is at the top of the screen. 2026-11-18 (not a draft,
   layout only, the same words and text sizes): a smaller robot (48px) gives the greeting more width, and less space
   between the parts, the badges and the box, so the box is at 330px or less at 390x844 in every language but Fijian
   (docs/askwork-second-plan-d-home.md). Nothing changes from 960px up. */
@media (max-width: 959px) {
  .aw-hero { gap: 8px 10px; padding: 0 0 12px; }
  .aw-hero-robot { width: 48px; }
  .aw-hero-bubble { padding: 9px 12px; font-size: var(--aw-text-ui); line-height: 1.38; }
  .aw-h1 { margin: 0 0 8px; }
  .aw-hero .aw-badges { gap: 6px; }
  .aw-hero .aw-badge { min-height: 28px; padding: 2px 8px; }
  body:not([data-chat="on"]) .aw-composer-wrap { margin-top: 8px; }
}
/* ---------- D-02 (D1, out in round R-2): Quick exit at the end of the header ----------
   In the page whenever the route gives quick_exit (templates/base.html quick_exit_button). Red is for emergency help only, so the
   nearest fitting existing button is used: the solid primary of the main buttons and the send button (--aw-primary
   with --aw-surface text), in the pill shape of the header buttons, with the "x" icon. When the header line has no room
   (static/js/base.js): first the language button shows the globe alone, then the wordmark gives way to the robot
   (aw-header--compact), and last "Get help" and "Quick exit" may go onto two lines. */
.aw-quick-exit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0;
  min-height: var(--aw-tap-header); padding: 4px 14px; border-radius: var(--aw-radius-pill); background: var(--aw-primary);
  color: var(--aw-surface); font-size: var(--aw-text-ui); font-weight: 700; line-height: 1.15; text-align: center;
  text-decoration: none; white-space: nowrap; }
.aw-quick-exit:hover { background: var(--aw-primary-hover); }
.aw-quick-exit--wrap { flex-shrink: 1; white-space: normal; padding: 4px 10px; font-size: var(--aw-text-small); }
.aw-quick-exit--wrap > svg { display: none; }
/* the last step, only with Quick exit in the header: "Get help" in the smaller size of the header too */
.aw-header--qe .aw-header-help--wrap { padding: 4px 10px; font-size: var(--aw-text-small); }
.aw-logo-mark { display: none; }
.aw-header--compact .aw-logo-mark { display: inline-flex; }
.aw-header--compact .aw-logo, .aw-header--compact .aw-chat-only-mobile.aw-header-avatar { display: none; }
@media (max-width: 429px) {
  .aw-quick-exit { padding: 4px 12px; gap: 4px; }
}
/* Item 3 (Jay, 2026-11-22, O-2, out in round R-2): found by the language button's data-lang-rotate
   (templates/base.html, 1-2). The headers of every page and of the chat page are covered. From 390px, when the header has no room
   (aw-header-help--wrap, static/js/base.js), "Urgent help" stays on one line in the smallest text size of the design
   guide (--aw-text-meta) with less padding, in place of going onto two lines. */
@media (min-width: 390px) {
  .aw-header--fit:has([data-lang-rotate]) .aw-header-help.aw-header-help--wrap { flex-shrink: 0; white-space: nowrap;
    padding: 4px 8px; font-size: var(--aw-text-meta); }
}

/* ---------- D1b (D3, D8, out in round R-2): the saved values under the box, the menu button in the footer links, the lines under the
   topic tiles ---------- */
.aw-profile-line .aw-link-btn { font-size: var(--aw-text-meta); }
.aw-footer-btn { display: inline-flex; align-items: center; min-height: var(--aw-tap-header); min-width: var(--aw-tap-header);
  padding: 0; border: 0; background: none; color: var(--aw-primary); font: inherit; cursor: pointer; }
/* one grey line under the title of each tile: --aw-text-muted on the four tile colours is 4.72:1 (lavender) to 5.13:1
   (butter), over the 4.5:1 of WCAG AA for small text */
.aw-tile span .aw-tile-sub, .aw-topic span .aw-tile-sub { display: block; margin-top: 4px; color: var(--aw-text-muted);
  font-size: var(--aw-text-small); font-weight: 400; line-height: 1.35; }
/* D-9 (Jay, 2026-11-18): at 360px and below the grey line is hidden (it took two or three lines there), shown above.
   The tile's screen reader name then has the title alone. */
@media (max-width: 360px) {
  .aw-tile span .aw-tile-sub, .aw-topic span .aw-tile-sub { display: none; }
}

/* D-05 (D4, out in round R-2): U15 under the agree button. The note's size and grey, the two numbers as links in the primary
   colour, 44px high to press */
/* The two phone links keep a finger-size tap area (44px or more) with padding on an inline link, which does not make
   the line taller, so the paragraph keeps the line height of the notes around it (2026-11-18: the lines were 44px
   apart). 14px above the line keeps the tap area clear of the agree button. */
.aw-consent-under18 { margin: 14px 0 0; }
.aw-consent-under18 a { display: inline; padding: 14px 2px; margin: 0 -2px; color: var(--aw-primary);
  font-weight: 700; text-decoration: underline; }

/* ---------- The header before static/js/base.js has measured it, or without the script (2026-11-18, not a draft) ----------
   On a slow phone the page is drawn before the script runs. Without help the header would then be in its widest state
   (the language name, the wordmark, one-line buttons) and could overflow, with the globe over "Get help". So the state
   without the script is the narrow, safe one, by the screen width alone: below 960px the language button is the globe
   alone (its aria-label names the language), and "Get help" (and Quick exit) may go onto two lines. With Quick exit (a
   draft, aw-header--qe) below 480px the wordmark gives way to the robot, and the two buttons have the 14px size, Quick
   exit without its icon. The script then sets aw-header--fit, which turns these rules off, and widens what fits (the
   language name, the wordmark, one-line buttons) in the same task, so nothing is drawn in between. */
@media (max-width: 959px) {
  .aw-header:not(.aw-header--fit) .aw-lang-btn { width: var(--aw-tap-header); padding: 0; justify-content: center; }
  .aw-header:not(.aw-header--fit) .aw-lang-btn-name { display: none; }
  .aw-header:not(.aw-header--fit) .aw-header-help, .aw-header:not(.aw-header--fit) .aw-quick-exit { flex-shrink: 1; white-space: normal; }
}
@media (max-width: 479px) {
  .aw-header--qe:not(.aw-header--fit) .aw-logo-mark { display: inline-flex; }
  .aw-header--qe:not(.aw-header--fit) .aw-logo,
  .aw-header--qe:not(.aw-header--fit) .aw-chat-only-mobile.aw-header-avatar { display: none; }
  .aw-header--qe:not(.aw-header--fit) .aw-header-help,
  .aw-header--qe:not(.aw-header--fit) .aw-quick-exit { padding: 4px 10px; font-size: var(--aw-text-small); }
  .aw-header--qe:not(.aw-header--fit) .aw-quick-exit > svg { display: none; }
}

/* G1 (G-01 of stage G, out in round R-2): the link "How Askwork helps" under the topic tiles (and as a line of the "Topics" card
   on a wide screen), and its screen #howto-screen. Existing colours and shapes only: the link is .aw-link-btn, the
   urgent line has the look of the danger card of the first screen (the Get help entry), the steps are a numbered list.
   A long word of a Pacific language wraps instead of making the screen wider. */
.aw-home-link { margin: 16px 0 0; font-size: var(--aw-text-ui); line-height: var(--aw-line); }
.aw-home-link .aw-link-btn { text-align: left; overflow-wrap: anywhere; }
.aw-side-line { margin-top: 14px; }
.aw-howto-urgent { margin: 0 0 16px; overflow-wrap: anywhere; }
.aw-howto-urgent-line { margin: 0; font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); }
.aw-howto-card { overflow-wrap: anywhere; }
.aw-howto-steps { margin: 0; padding-left: 24px; list-style: decimal; color: var(--aw-text); }
.aw-howto-steps li + li { margin-top: 16px; }
.aw-howto-steps li::marker { font-weight: 700; }
.aw-howto-step { margin: 0; font-size: var(--aw-text-ui); font-weight: 700; line-height: var(--aw-line); }
.aw-howto-line { margin: 2px 0 0; font-size: var(--aw-text-ui); line-height: var(--aw-line); }
.aw-howto-fwo { margin: 8px 0 0; font-size: var(--aw-text-small); color: var(--aw-text); }

/* G3 (stage G, out in round R-2): the reminder under a message to the employer and on the summary screen. The date field and
   its button open under the reminder button. Only existing colours and shapes. */
.aw-g3-remind-box { margin-top: 10px; }
.aw-g3-remind-box .aw-btn { margin-top: 10px; }
.aw-g3-remind-box .aw-send-line { margin-top: 8px; }
.aw-g3-remind-summary { margin-top: 10px; }
.aw-g3-remind-summary .aw-send-line { margin: 8px 0 0; font-size: var(--aw-text-ui); line-height: var(--aw-line); color: var(--aw-text); }
#sum-guide { margin-top: 12px; }
.aw-send-to .aw-g3-remind + .aw-send-line { margin-top: 14px; }
/* Round 26 (a draft): the line and the button at the end of the box under a message to the employer, the spacing of
   the lines above it (no new colour or shape) */
.aw-org-after { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--aw-border); }
.aw-org-after .aw-btn { margin-top: 10px; }
/* ---------- G4 of stage G (G6, out in round R-2): "My employer replied" ---------- */
/* The line on the first screen and in the Topics card: the shape of the text buttons (.aw-text-btn) in the primary
   colour, as a link. 48 high to press. */
.aw-reply-entry { margin: 12px 0 0; }
.aw-reply-link { color: var(--aw-primary); font-weight: 600; text-align: left; }
.aw-reply-link:hover { color: var(--aw-primary-hover); text-decoration: underline; }
/* N2 (N-1 to N-5 and B-9, out in round R-2): the buttons under a message that put a line in or take it out, and the Resources line (a link) */
.aw-draft-add { display: flex; flex-wrap: wrap; column-gap: 16px; margin: 0 0 8px; }
a.aw-reply-link { text-decoration: none; }
.aw-reply-note { margin: 0; }
.aw-reply-note + .aw-field { margin-top: 6px; }
.aw-reply-result-part + .aw-reply-result-part { margin-top: 16px; }
#reply-result { scroll-margin-top: 140px; }  /* below the head of the screen (and the preview line), as .aw-pii-check */
.aw-reply-asked { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: var(--aw-text-ui);
  line-height: 1.5; color: var(--aw-text); overflow-wrap: anywhere; }
.aw-reply-plain { margin: 0; font-size: var(--aw-text-ui); line-height: 1.6; color: var(--aw-text); white-space: pre-wrap;
  overflow-wrap: anywhere; }
/* ---------- Round M, M1 (Jay's answers of 2026-11-19, B-1, B-2, out in round R-2) ----------
   docs/askwork-third-answers-m-screens.md. Existing colours, sizes and shapes only. */
/* 1-1: the top of the agreement screen. The wordmark of logo draft 1 (the header's size on a phone), the first screen's
   heading and its badges (the badges of the first screen of a phone), in the soft band of the screen's head. The rest of
   the screen is a little tighter, so the agree button is not pushed down on a phone (the numbers are in the document). */
.aw-consent-intro { padding: 12px var(--aw-gutter-mobile) 2px; background: var(--aw-primary-soft); }
.aw-consent-intro .aw-logo { height: 24px; }
.aw-consent-intro-title { margin: 6px 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--aw-text); }
.aw-consent-intro .aw-badges { gap: 6px; }
.aw-consent-intro .aw-badge { min-height: 28px; padding: 2px 8px; }
.aw-consent--intro .aw-screen-head { min-height: 0; padding-top: 8px; padding-bottom: 10px; }
#chat-consent-overlay.aw-consent--intro .aw-screen-body { padding-top: 10px; }
.aw-consent--intro .aw-consent-lang { margin-bottom: 10px; padding: 14px; }
.aw-consent--intro .aw-consent-lang-grid { gap: 6px; }
.aw-consent--intro .aw-consent-lang-grid .aw-btn { min-height: 48px; padding: 4px 6px; }
.aw-consent--intro .aw-consent-card { padding: 14px; }
.aw-consent--intro .aw-consent-card .aw-consent-list li { margin-bottom: 2px; }
.aw-consent--intro .aw-consent-card .aw-check { padding: 10px 12px; }
.aw-consent--intro .aw-screen-title { font-size: 20px; }
@media (min-width: 960px) {
  .aw-consent-intro { padding: 16px 24px 2px; }
  .aw-consent--intro .aw-screen-head { padding-top: 8px; padding-bottom: 12px; }
}
/* N3 (B-10, as 1-1): the wordmark on top of the agreement screen is larger than the header's, 32px high and 143px wide
   on a phone (the header: 24px) and 40px high and 179px wide from 960px (the header: 32px). */
.aw-consent-intro .aw-logo[data-logo="d1"] { height: 32px; width: 143px; }
@media (min-width: 960px) { .aw-consent-intro .aw-logo[data-logo="d1"] { height: 40px; width: 179px; } }

/* 1-2: the names of the languages go round in the header's language button (static/js/base.js). Every name sits in
   the same grid cell, so the slot is as wide as the longest name and the header does not move when the name changes.
   Without the script and with "reduce motion" the button is as before (.aw-lang-rot stays hidden).
   Where the header line has room: the slot in the pill, in the place of the name (aw-lang-btn--rot).
   Where it has not (a phone): the globe alone, as before, and the name in small letters under it (aw-lang-btn--under),
   in a strip at the bottom of the header (aw-header--rot-under: the header is 72px high, the buttons 8px from the top).
   The small letters are the note size (13px, the smallest the design guide allows) in the button's colour. A long name
   is shown whole: the strip is as wide as the longest name and stays inside the line (the script moves it when the
   globe is near an end). */
.aw-lang-rot { display: none; }
.aw-lang-rot-name { grid-area: 1 / 1; white-space: nowrap; text-align: center; visibility: hidden; opacity: 0; transition: opacity 0.3s ease; }
.aw-lang-rot-name.is-on { visibility: visible; opacity: 1; }
.aw-lang-btn.aw-lang-btn--rot { max-width: none; flex-shrink: 0; }
.aw-lang-btn--rot .aw-lang-btn-name { display: none; }
.aw-lang-btn--rot .aw-lang-rot { display: inline-grid; justify-items: center; align-items: center; }  /* round Q: a one-line name in the middle, beside the globe */
/* placed from the links and buttons at the end of the line (their box is the frame), so the button itself keeps its
   size and does not count as cut: the script sets the middle of the globe (--aw-rot-mid) and the move (--aw-rot-shift) */
.aw-header--rot-under .aw-header-nav { position: relative; }
.aw-lang-btn--under .aw-lang-rot { display: grid; justify-items: center; position: absolute; top: calc(100% + 2px);
  left: var(--aw-rot-mid, 50%); transform: translateX(calc(-50% + var(--aw-rot-shift, 0px))); font-size: var(--aw-text-meta);
  font-weight: 600; line-height: 16px; color: var(--aw-primary); pointer-events: none; }
.aw-header--rot-under .aw-header-inner { min-height: 72px; padding-top: 8px; padding-bottom: 20px; }
/* 2-3 (round Q, Jay 2026-11-23, out in round R-2): on a phone the name turns inside the button, beside the globe, in the note
   size (13px, the smallest the design guide allows). A long name may take two or three lines when the script has made
   the slot narrower (static/js/base.js fitInside). When the line has no room even with the robot in place of the
   wordmark, the robot (the link home) leaves the header (aw-header--nomark): the footer's wordmark is a link home. */
@media (max-width: 959px) {
  .aw-lang-btn--rot { padding: 0 8px; gap: 4px; }
  .aw-lang-btn--rot .aw-lang-rot { font-size: var(--aw-text-meta); font-weight: 600; line-height: 14px; }
  .aw-lang-btn--rot .aw-lang-rot-name { white-space: normal; }
}
.aw-header--nomark .aw-logo-link { display: none; }
/* 2-1 of round Q (Jay 2026-11-23, 3.16, out in round R-2): on a phone the first
   screen is the title, the badges, then the robot with the greeting just above the box for the question. From 960px
   nothing changes. */
@media (max-width: 959px) {
  .aw-hero--q .aw-hero-text { order: -1; }
}
/* 1-1 of round Q (5P-1, out in round R-2): the line that the screen was translated by AI, under "General information only. Not legal
   advice." in the same small grey text. From 960px that line is in the side column, so this one stands under the box. */
.aw-q-notice .aw-disclaimer { margin: 4px 0 0; }
@media (min-width: 960px) {
  .aw-q-notice .aw-disclaimer { margin: 8px 4px 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-lang-rot-name { transition: none; }
}

/* Round 1 part C (2026-11-23, drafts): the entry "Your visa" under the topic tiles and the visa pages (/visa/<slug>).
   Existing colours and shapes only: the links have the butter pair of "Visa and PALM workers" (tokens.css) with the
   chip radius, two to a row on a phone (two rows), one to a row in the Topics card of a wide screen. */
.aw-visa-entry { margin-top: 16px; }
.aw-side-card .aw-visa-entry { margin-top: 14px; }
.aw-visa-entry-title { margin: 0 0 8px; font-size: var(--aw-text-small); font-weight: 700; line-height: 1.3; color: var(--aw-text-muted); }
.aw-visa-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.aw-visa-links li { display: flex; min-width: 0; }
/* the Topics card of a wide screen: one column, so each name stays on one line (two columns wrapped
   "Working holiday (backpacker)" into three lines) */
.aw-side-card .aw-visa-links { grid-template-columns: 1fr; gap: 6px; }
.aw-visa-link { display: flex; align-items: center; flex: 1; min-height: var(--aw-tap); padding: 6px 12px;
  border-radius: var(--aw-radius-chip); background: var(--aw-butter-bg); color: var(--aw-text); font-size: var(--aw-text-small);
  font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.aw-visa-link:hover { text-decoration: underline; }
.aw-visa-top { background: var(--aw-butter-bg); box-shadow: none; }
.aw-visa-top p { color: var(--aw-text); }
.aw-visa-fact + .aw-visa-fact { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--aw-border); }
/* a further link of the same group (the two specified work pages): under the one before it, no line between */
.aw-visa-fact + .aw-visa-fact.aw-visa-follow { margin-top: 4px; padding-top: 0; border-top: 0; }
.aw-doc-section .aw-visa-fact p { margin: 0; }
.aw-doc .aw-visa-src a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header); font-size: var(--aw-text-ui);
  line-height: 1.35; overflow-wrap: anywhere; }
.aw-visa-src a > .aw-icon { flex: none; }
.aw-doc-section .aw-visa-fact p.aw-guide-checked { font-size: var(--aw-text-small); line-height: 1.4; }
/* Round 1b (2026-11-23, drafts): the questions of a visa page. Existing pieces only: each question is an .aw-card
   (white, card radius, card shadow) with a <details> row like the footer's (base.html), the tap token for the row,
   the chevron-down icon turning when open, the small muted heading of the entry for a group heading. The design
   guide has no folding row: written in the open items. */
.aw-visa-group { margin-top: 22px; }
.aw-visa-group-h { margin: 0 0 8px; font-size: var(--aw-text-small); font-weight: 700; line-height: 1.3; color: var(--aw-text-muted); }
.aw-visa-q { padding: 0; }
.aw-visa-q + .aw-visa-q { margin-top: 10px; }
.aw-visa-q-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--aw-tap);
  padding: 10px 16px 10px 20px; border-radius: var(--aw-radius-card); cursor: pointer; list-style: none;
  font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.35; color: var(--aw-text); overflow-wrap: anywhere; }
.aw-visa-q-row::-webkit-details-marker { display: none; }
.aw-visa-q-row:focus-visible { outline: none; box-shadow: var(--aw-focus); }
.aw-visa-q-row > span { min-width: 0; }
.aw-visa-q-row > .aw-icon { flex: none; color: var(--aw-primary); transition: transform 0.15s ease; }
.aw-visa-q[open] > .aw-visa-q-row > .aw-icon { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .aw-visa-q-row > .aw-icon { transition: none; } }
.aw-visa-q-body { padding: 0 20px 16px; }
.aw-visa-q-body p { margin: 0 0 8px; font-size: var(--aw-text-ui); line-height: 1.6; overflow-wrap: anywhere; }
.aw-visa-q-body p.aw-visa-src { margin: 0; }
.aw-visa-q-body p.aw-guide-checked { margin: 4px 0 0; font-size: var(--aw-text-small); line-height: 1.4; }
.aw-visa-group > .aw-card.aw-doc-section { margin-top: 10px; }
/* Round 26 (a draft): the occupation list of the Core Skills stream (templates/_occupations_482.html). The colours,
   radii and sizes of the page (the field of the profile screen, the neutral chip, the hairline), nothing new */
.aw-occ-search { margin: 12px 0 8px; }
.aw-occ-input { font-size: var(--aw-text-ui); }
.aw-visa-q-body p.aw-occ-count, .aw-visa-q-body p.aw-occ-none { margin: 0 0 6px; font-size: var(--aw-text-small); color: var(--aw-text-muted); }
.aw-occ-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: var(--aw-text-ui); line-height: 1.4; }
.aw-occ-table th { text-align: left; font-size: var(--aw-text-small); font-weight: 700; color: var(--aw-text-muted); padding: 6px 8px 6px 0; }
.aw-occ-table td { padding: 8px 8px 8px 0; border-top: 1px solid var(--aw-border); vertical-align: top; overflow-wrap: anywhere; }
.aw-occ-table th:last-child, .aw-occ-table td.aw-occ-code { padding-right: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aw-occ-cond { display: inline-block; margin: 4px 0 0 8px; padding: 1px 8px; border-radius: var(--aw-radius-chip); background: var(--aw-surface-muted);
  font-size: var(--aw-text-small); color: var(--aw-text); }
.aw-occ-more { margin: 4px 0 10px; }
.aw-occ-source { overflow-wrap: anywhere; }
.aw-visa-group > .aw-card > .aw-guide-orgs { margin-top: 0; }
.aw-visa-glance .aw-doc-list { margin-bottom: 0; }
.aw-visa-glance li { overflow-wrap: anywhere; }
/* the "view in my language" link under an official link (visa pages, /library, /resources, the guides) */
.aw-doc a.aw-visa-translate { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header);
  font-size: var(--aw-text-small); line-height: 1.35; overflow-wrap: anywhere; }
.aw-visa-translate > .aw-icon { flex: none; }
.aw-doc-list li > a.aw-visa-translate, .aw-guide-links li > a.aw-visa-translate, .aw-guide-sources li > a.aw-visa-translate { display: flex; width: fit-content; }
.aw-visa-lang p a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--aw-tap-header); overflow-wrap: anywhere; }
.aw-visa-lang p a > .aw-icon { flex: none; }

/* ---------- Round 2 of the 10th instruction (2026-11-25) ----------
   E5: the menu button of the header (every page, every width) and its screen "More" (#menu-screen, the pattern of the
   language screen). Existing colours and shapes only: the button is the white pill of the language button at the
   header's tap size, with the line icon "menu" in the primary colour. The rows of the screen are the rows of the
   language screen (white, --aw-radius-button, --aw-shadow), the visa links the butter chips of the first screen. */
.aw-menu-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--aw-tap-header);
  height: var(--aw-tap-header); border-radius: var(--aw-radius-pill); background: var(--aw-surface); color: var(--aw-primary);
  box-shadow: var(--aw-shadow); text-decoration: none; }
.aw-menu-btn:hover { color: var(--aw-primary-hover); }
.aw-menu-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.aw-menu-link { display: flex; align-items: center; min-height: var(--aw-tap); padding: 10px 18px; background: var(--aw-surface);
  border-radius: var(--aw-radius-button); box-shadow: var(--aw-shadow); color: var(--aw-text); font-size: var(--aw-text-ui);
  font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.aw-menu-link:hover { color: var(--aw-primary); }
#menu-screen .aw-visa-entry { margin-top: 24px; }
/* E9: the one footer of every page. The sub pages have the urgent part on top, in the colours of the danger card
   (--aw-red-bg, the title in --aw-red-fg), with the three call buttons of before (token pairs, G7-1). */
.aw-footer--page { margin-top: 24px; border-top: 1px solid var(--aw-border); }
.aw-footer-urgent { margin: 0 0 16px; padding: 16px; background: var(--aw-red-bg); border-radius: var(--aw-radius-card); }
.aw-footer-urgent-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--aw-red-fg); }
.aw-footer-calls { display: flex; flex-wrap: wrap; gap: 10px; }
.aw-footer-calls .emergency-btn { font-size: var(--aw-text-small); overflow-wrap: anywhere; }
.aw-footer-calls .emergency-btn > svg { flex-shrink: 0; }
.aw-footer p.aw-footer-interp { margin: 12px 0 0; font-size: var(--aw-text-small); color: var(--aw-text); }
.aw-footer p.aw-footer-home { margin: 0; }
.aw-footer-logo { display: block; height: 24px; width: auto; aspect-ratio: 4236 / 948; }
/* E7: on a wide screen, the left side under the box for the question on the first screen (not during a conversation):
   the steps of "How Askwork helps" in the card of the side column, and (a draft) the example questions above them, each
   a full-width soft button (--aw-primary-soft with --aw-primary, the soft button pair) at the tap size. */
.aw-home-wide { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
body[data-chat="on"] .aw-home-wide { display: none !important; }
/* J-357 (Jay, 2026-11-25): where the steps card is on the screen (a wide first screen) the Topics card has no second
   "How Askwork helps". During a conversation the card is gone and the link is there again. */
body:not([data-chat="on"]) #howto-link-d { display: none; }
.aw-examples-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.aw-example { display: flex; align-items: center; width: 100%; min-height: var(--aw-tap); padding: 10px 16px; border: 0;
  border-radius: var(--aw-radius-button); background: var(--aw-primary-soft); color: var(--aw-primary); font: inherit;
  font-size: var(--aw-text-ui); font-weight: 600; line-height: 1.4; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.aw-example:hover { background: var(--aw-surface-muted); }
/* E10: the four topic tiles of a phone have the same inner spacing: the title starts 14px under the icon in each tile,
   whatever the length of its words (with space-between a tile with shorter words had a larger gap in the middle). */
.aw-tiles .aw-tile { justify-content: flex-start; }
/* the entry "Your visa" in the left column of a wide screen (moved from the Topics card): a card of the side column's
   size, the links two to a row as on a phone */
.aw-home-card { padding: 20px; }
.aw-home-card .aw-visa-entry { margin-top: 0; }
/* J-355 (Jay, 2026-11-25): the menu button is in the header from 960px only (templates/base.html), so the phone
   header has its 8px between the end buttons and its robot again (the two E5 rules for the button are gone) */
/* P-63: in a small credit line the focus ring of a link stands above the lines around it (the next line's text covered
   it) and is drawn whole on each line of a link that wraps */
.aw-credit a:focus-visible { position: relative; z-index: 1; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Row 1 of the list of 2026-11-25 (Jay: "화면이 깨지는데?", the agreement screen on a 1900px screen). Above 1200px the
   row "Urgent help" and "Quick exit" (#consent-top, an .aw-header-inner) kept the page container's 1200px with its
   blue inside a centred box, while the band of the logo, the title and the badges and the band "Before we begin" ran
   the full width with their content at the far left. Now the three bands run the full width, one colour, and their
   content keeps the edges of the page header (the 1200px container and its 24px inside), as "Urgent help" and "Quick
   exit" have them. Below 1248px nothing changes (max() gives the 24px of before). The cards stay in their centred
   640px column. */
@media (min-width: 960px) {
  #chat-consent-overlay #consent-top { max-width: none; }
  #chat-consent-overlay #consent-top, #chat-consent-overlay .aw-consent-intro, #chat-consent-overlay .aw-screen-head {
    padding-left: max(24px, calc((100% - var(--aw-container)) / 2 + 24px));
    padding-right: max(24px, calc((100% - var(--aw-container)) / 2 + 24px)); }
}
/* Row 6 of the list of 2026-11-25 (Jay: "모바일에서 두개가 살짝 떨어져야 보기 좋아"): the two ticks of the agreement screen
   stood edge to edge (two grey boxes, no gap). 8px between them, at every width. No text changes. */
.aw-consent-card .aw-check + .aw-check { margin-top: 8px; }
/* Row 5 of the list of 2026-11-25 (R5-1, out for everyone in the take-out of 2026-11-26): "Back to the top" on a long page (templates/base.html,
   static/js/base.js). It stays in the lower right corner once the worker has scrolled well down, and takes them back to
   the page's index (the list "Where to start" of the library) or to the top. Colours and shape of the existing soft
   buttons. */
.aw-back-top { position: fixed; right: var(--aw-gutter-mobile); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--aw-tap); padding: 8px 16px;
  border-radius: var(--aw-radius-button); background: var(--aw-surface); color: var(--aw-primary); box-shadow: var(--aw-shadow);
  font-size: var(--aw-text-small); font-weight: 600; text-decoration: none; }
.aw-back-top[hidden] { display: none; }
.aw-back-top:focus-visible { box-shadow: var(--aw-shadow), var(--aw-focus); outline: none; }
@media (min-width: 960px) { .aw-back-top { right: 24px; bottom: 24px; } }
@media print { .aw-back-top { display: none !important; } }

/* ===== The picture guides (templates/explainer.html, static/js/explainer.js, a draft, 2026-11-26) =====
   A stage 4 wide and 3 high with the picture, the line "EXAMPLE ONLY" above it in every part, the buttons, then the
   caption. On a phone the stage runs from edge to edge so the payslip's letters stay readable at 320 wide. The pen is
   --aw-primary (red is for danger only). Every colour is a token. */
.aw-explainer { margin-top: 16px; }
.aw-explainer-stage { max-width: 560px; margin: 0 auto; background: var(--aw-surface); border-radius: var(--aw-radius-card);
  box-shadow: var(--aw-shadow); overflow: hidden; }
@media (max-width: 599px) { .aw-explainer-stage { max-width: none; margin: 0 calc(-1 * var(--aw-gutter-mobile)); border-radius: 0; } }
.aw-explainer-band { margin: 0; padding: 8px 12px; background: var(--aw-butter-bg); color: var(--aw-butter-fg);
  font-size: var(--aw-text-meta); font-weight: 600; line-height: 1.35; text-align: center; }
.aw-explainer-art { display: block; width: 100%; height: auto; font-family: var(--aw-font); }
.aw-explainer.is-player .aw-explainer-art { aspect-ratio: 4 / 3; }
/* nothing moves when the page opens: the moves begin only after the player's first picture (.is-ready) */
.aw-explainer.is-ready .aw-explainer-world { transition: transform .7s ease; }
/* the example payslip and the small drawings */
.aw-ex-paper { fill: var(--aw-surface); stroke: var(--aw-text-muted); stroke-width: .8; }
.aw-ex-band { fill: var(--aw-surface-muted); }
.aw-ex-band--net { fill: var(--aw-border); }
.aw-ex-rule { fill: none; stroke: var(--aw-text-muted); stroke-width: .5; }
.aw-ex-line { fill: none; stroke: var(--aw-text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.aw-ex-tickmark { fill: none; stroke: var(--aw-text-muted); stroke-width: 1; stroke-linecap: round; }
.aw-ex-folder { fill: var(--aw-butter-bg); stroke: var(--aw-text); stroke-width: 1.4; stroke-linejoin: round; }
.aw-ex-sticky { fill: var(--aw-butter-bg); }
.aw-ex-day { fill: var(--aw-surface); stroke: var(--aw-text-muted); stroke-width: .8; }
.aw-ex-day--pay { fill: var(--aw-mint-bg); }
.aw-ex-cover { fill: var(--aw-surface); display: none; }
.aw-ex-slide { transform: translateY(34px); }
.aw-ex-t { fill: var(--aw-text); font-size: 11px; }
.aw-ex-l { fill: var(--aw-text-muted); font-size: 9px; }
.aw-ex-h { fill: var(--aw-text); font-size: 9px; font-weight: 700; letter-spacing: .3px; }
.aw-ex-b { fill: var(--aw-text); font-size: 10.5px; font-weight: 700; }
.aw-ex-big { font-size: 15px; }
.aw-ex-title { fill: var(--aw-text); font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.aw-ex-r { text-anchor: end; }
.aw-ex-m { text-anchor: middle; }
/* the pen */
.aw-pen { fill: none; stroke: var(--aw-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0; }
.aw-pen-num { fill: var(--aw-primary); font-size: 10.5px; font-weight: 700; text-anchor: middle; }
.aw-pen-note { fill: var(--aw-primary); font-size: 11px; font-weight: 600; font-style: italic; }
.aw-pen-note--middle { text-anchor: middle; }
.aw-pen-note--end { text-anchor: end; }
.aw-pen-note--big { font-size: 19px; font-weight: 700; }
.aw-pen-note--plain { fill: var(--aw-butter-fg); }
.aw-pen-dot { fill: var(--aw-primary); }
/* with the player: a mark is in the picture only in its part (.is-live), and drawn from its second (.is-on) */
.aw-explainer.is-player [data-scene]:not(.is-live) { display: none; }
.aw-explainer.is-player .aw-pen { stroke-dashoffset: 1; }
/* the pen moves only while the guide plays (.is-playing). A still part, and a part that starts again, is there at once */
.aw-explainer.is-playing .aw-pen { transition: stroke-dashoffset .8s ease; }
.aw-explainer.is-player .aw-pen.is-on, .aw-explainer.is-player .is-on > .aw-pen { stroke-dashoffset: 0; }
.aw-explainer.is-playing .is-on > .aw-pen--late { transition-delay: .6s; }
.aw-explainer.is-player .aw-pen-note, .aw-explainer.is-player .aw-pen-dot, .aw-explainer.is-player .aw-pen-group > :not(.aw-pen) {
  opacity: 0; }
.aw-explainer.is-playing .aw-pen-note, .aw-explainer.is-playing .aw-pen-dot, .aw-explainer.is-playing .aw-pen-group > :not(.aw-pen) {
  transition: opacity .5s ease; }
.aw-explainer.is-player .aw-pen-note.is-on, .aw-explainer.is-player .aw-pen-dot.is-on,
.aw-explainer.is-player .aw-pen-group.is-on > :not(.aw-pen) { opacity: 1; }
.aw-explainer.is-player .aw-ex-cover.is-live { display: block; transform-box: fill-box; transform-origin: 50% 100%; }
.aw-explainer.is-playing .aw-ex-cover.is-live { transition: transform 1.6s ease; }
.aw-explainer.is-player .aw-ex-cover.is-on { transform: scaleY(0); }
.aw-explainer.is-player .aw-ex-slide { transform: none; }
.aw-explainer.is-playing .aw-ex-slide { transition: transform .9s ease; }
.aw-explainer.is-player .aw-ex-slide.is-on { transform: translateY(34px); }
/* the buttons and the caption */
.aw-explainer-controls { max-width: 560px; margin: 12px auto 0; }
.aw-explainer-bar { display: flex; gap: 4px; }
.aw-explainer-bar span { flex: 1; height: 4px; border-radius: var(--aw-radius-pill); background: var(--aw-border); }
.aw-explainer-bar span.is-done { background: var(--aw-primary); }
.aw-explainer-buttons { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.aw-explainer-play { min-width: 168px; }
.aw-explainer-play .aw-icon { fill: currentColor; }
.aw-explainer-ico-pause, .aw-explainer.is-playing .aw-explainer-ico-play { display: none; }
.aw-explainer.is-playing .aw-explainer-ico-pause { display: inline; }
.aw-explainer-step { background: var(--aw-primary-soft); color: var(--aw-primary); border: 0; border-radius: var(--aw-radius-pill); cursor: pointer; }
.aw-explainer-step[aria-disabled="true"] { background: var(--aw-surface-muted); color: var(--aw-text-muted); cursor: not-allowed; }
.aw-explainer-step--next .aw-icon { transform: scaleX(-1); }
.aw-explainer-count { margin: 8px 0 0; font-size: var(--aw-text-small); color: var(--aw-text-muted); text-align: center; }
.aw-explainer-captions { max-width: 560px; margin: 12px auto 0; padding: 0 0 0 24px; list-style: decimal;
  font-size: var(--aw-text-body); line-height: var(--aw-line); }
.aw-explainer-captions li { margin-bottom: 12px; }
.aw-explainer-captions p { margin: 0 0 8px; }
.aw-explainer.is-player .aw-explainer-captions { padding-left: 0; list-style: none; min-height: 7.5em; }
.aw-explainer.is-player .aw-explainer-captions li { margin-bottom: 0; }
.aw-explainer-sources { margin-top: 24px; }
.aw-doc-section.aw-explainer-sources p.aw-guide-checked { margin: 10px 0 0; }
/* a wide and low screen (a laptop): the stage is smaller so the caption under it stays on the screen */
@media (min-width: 600px) { .aw-explainer-stage, .aw-explainer-controls, .aw-explainer-captions {
  max-width: clamp(340px, calc((100vh - 500px) * 1.333), 560px); } }

/* ===== Round 21 (2026-11-26, for everyone since the take-out of 2026-11-28): the picture guides 2 and 6, and the text
   cards with official links =====
   Only existing tokens. A card sits inside a part of the library, tinted like the dismissal card (--aw-primary-soft). */
.aw-explainer-videos { margin-top: 16px; }
.aw-explainer-card { margin-top: 18px; padding: 16px; border-radius: var(--aw-radius-card); background: var(--aw-primary-soft); }
.aw-explainer-card-title { margin: 0 0 8px; font-size: var(--aw-text-ui); font-weight: 700; line-height: 1.35; color: var(--aw-text); }
.aw-explainer-card p { margin: 0 0 10px; }
.aw-explainer-card .aw-lib-links { margin-bottom: 10px; }
.aw-explainer-agencies { margin: 0 0 10px; padding: 0; list-style: none; }
/* only the rows of the table and their own agency link: the official videos inside a row (.aw-video-list) keep the look
   of every other video list (the review J-411, F7, 2026-11-28) */
.aw-explainer-agencies > li { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-height: var(--aw-tap-header); }
.aw-explainer-agency-state { min-width: 9.5em; font-weight: 600; color: var(--aw-text); }
.aw-explainer-agencies > li > a { display: inline-flex; align-items: center; min-height: var(--aw-tap-header); color: var(--aw-primary); }
.aw-explainer-agencies > li > .aw-lib-links { flex: 0 0 100%; margin-bottom: 8px; }
/* a phone: the state's name on a line of its own and the agency under it, in every row. Side by side, a short name
   ("ACT") had its agency beside it and a long one ("Queensland") under it (the captions of round 21, 2026-11-28) */
@media (max-width: 599px) { .aw-explainer-agency-state { flex: 0 0 100%; } }
/* the drawings of the official tools: a window, a field, a button, a bar of a list. Never their real look */
.aw-ex-window { fill: var(--aw-surface); stroke: var(--aw-text-muted); stroke-width: .9; }
.aw-ex-address { fill: var(--aw-surface-muted); }
.aw-ex-field { fill: var(--aw-surface); stroke: var(--aw-text-muted); stroke-width: .8; }
.aw-ex-button { fill: var(--aw-primary-soft); stroke: var(--aw-primary); stroke-width: .8; }
.aw-ex-bar { fill: var(--aw-border); }
.aw-ex-tile { fill: var(--aw-surface-muted); stroke: var(--aw-text-muted); stroke-width: .6; }
.aw-ex-road { fill: none; stroke: var(--aw-text-muted); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.aw-ex-way { fill: none; stroke: var(--aw-primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.aw-ex-way-off { fill: none; stroke: var(--aw-border); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.aw-ex-sign { fill: var(--aw-butter-bg); stroke: var(--aw-text); stroke-width: 1; }
.aw-ex-cell { fill: var(--aw-surface); stroke: var(--aw-text-muted); stroke-width: .6; }
.aw-ex-cell--on { fill: var(--aw-mint-bg); }
.aw-pen-note--huge { font-size: 38px; font-weight: 700; }
/* a phone number inside the running text of a card stays in the line (the rule ".aw-doc-section p > a:only-child" makes
   a lone link a 44px box, which broke "(13 13 94)" over two lines). P-193 (2026-11-28): it was 22px high. Padding above
   and below makes the place to press 44px or more without moving the lines (padding of an inline box does not change
   the line height) */
.aw-doc-section .aw-explainer-card p > a.aw-visa-tel { display: inline; min-height: 0;
  padding: calc((var(--aw-tap-header) - 1em) / 2) 0; }
/* round 21: the other language versions of an official video, a wrapping row of tap targets (44px high each). Since
   2026-11-28 each is a neutral chip (the colour and radius of the source chip), so the 44px rows read as buttons and
   not as empty gaps between small words (the captions of round 21) */
.aw-doc .aw-video-others { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.aw-doc .aw-video-others a { display: inline-flex; align-items: center; min-height: var(--aw-tap-header); padding: 0 12px;
  border-radius: var(--aw-radius-chip); background: var(--aw-surface-muted); font-size: var(--aw-text-small); }
