@font-face{font-family:"Noto Sans App";src:url("/assets/fonts/NotoSans-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans App";src:url("/assets/fonts/NotoSans-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"Noto Sans Tamil";src:url("/assets/fonts/NotoSansTamil-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans Tamil";src:url("/assets/fonts/NotoSansTamil-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"Noto Sans Malayalam";src:url("/assets/fonts/NotoSansMalayalam-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans Malayalam";src:url("/assets/fonts/NotoSansMalayalam-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"Noto Sans Telugu";src:url("/assets/fonts/NotoSansTelugu-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans Telugu";src:url("/assets/fonts/NotoSansTelugu-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"Noto Sans Devanagari";src:url("/assets/fonts/NotoSansDevanagari-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans Devanagari";src:url("/assets/fonts/NotoSansDevanagari-Bold.ttf") format("truetype");font-weight:700;font-display:swap}

:root {
  --navy:#183b43; --navy-dark:#102e35; --blue:#087e83; --blue-soft:#eaf6f4;
  --bg:#f5f7f7; --surface:#fff; --surface-2:#f7f9fa;
  --line:#dce5e6; --line-soft:#edf1f2; --ink:#1c3440; --muted:#6b7b84;
  --ok:#247d60; --ok-soft:#ecf7f1; --warn:#8a610e; --warn-soft:#fff7e8;
  --bad:#b6403a; --bad-soft:#fdf0ef;
  --r-sm:7px; --r:10px; --r-lg:18px;
  --shadow:0 2px 5px rgb(22 48 57 / 2%),0 9px 30px rgb(22 48 57 / 3%);
  --shadow-lg:0 8px 30px rgb(22 48 57 / 10%),0 2px 8px rgb(22 48 57 / 4%);
  --step:180ms cubic-bezier(.4,0,.2,1); --header-h:78px; --stepper-h:62px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
/* A PANEL WITH NOTHING IN IT MUST NOT APPEAR.
   These are shown by script setting `hidden = false` and filling their text
   in the same breath. If the two ever come apart — a cached script looking
   for ids this markup does not have, an early return between the two lines —
   the result is a coloured box with a tick and two blank buttons sitting in
   the middle of the conversation, which is what a citizen reported.
   `:empty` on the heading is the tell, and it costs nothing to check. */
.kiosk-done:has(> .kd-text > h3:empty),
.answer-check:has(> .ac-text > .ac-value:empty),
.voice-error-banner:has(> #voiceErrorText:empty){display:none!important}
html{min-height:100%;scroll-behavior:smooth;scroll-padding-top:96px}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 "Noto Sans App","Noto Sans Tamil","Segoe UI",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
:lang(ta),[lang="ta"]{font-family:"Noto Sans Tamil","Noto Sans App","Nirmala UI",system-ui,sans-serif}
:lang(ml),[lang="ml"]{font-family:"Noto Sans Malayalam","Noto Sans App","Nirmala UI",system-ui,sans-serif}
:lang(te),[lang="te"]{font-family:"Noto Sans Telugu","Noto Sans App","Nirmala UI",system-ui,sans-serif}
:lang(hi),[lang="hi"]{font-family:"Noto Sans Devanagari","Noto Sans App","Nirmala UI",system-ui,sans-serif}
:focus-visible{outline:3px solid #5db1b5;outline-offset:3px;border-radius:var(--r-sm)}
button,select,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.48}
button,a,select{touch-action:manipulation}
svg{width:20px;height:20px;flex:none;display:block}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:12px;left:12px;z-index:100;padding:10px 16px;color:white;background:var(--navy);border-radius:8px;transform:translateY(-180%)}
.skip-link:focus{transform:translateY(0)}
::selection{background:#c6e9e5;color:var(--navy)}

/* Brand and workspace context. */
header.app{position:sticky;top:0;z-index:40;min-height:var(--header-h);display:flex;align-items:center;gap:20px;padding:14px max(32px,calc((100vw - 1424px)/2));background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);backdrop-filter:blur(16px)}
.brand{display:flex;align-items:center;gap:13px;min-width:0}
/* The Tamil Nadu state emblem. No tinted box behind it and no shadow on it:
   it is a multicoloured mark on a white field, and a coloured plate under it
   reads as a logo somebody designed rather than as the emblem itself. */
.emblem{width:42px;height:46px;flex:none;display:grid;place-items:center}
.emblem img{width:100%;height:100%;object-fit:contain;display:block}

.brand-text{min-width:0}
.brand-text h1{margin:0;font-size:16px;font-weight:700;line-height:1.45;letter-spacing:-.35px}
.brand-text p{margin:2px 0 0;font-size:11px;letter-spacing:.3px;color:var(--muted)}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:9px}
.hbtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;padding:8px 13px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:12px;font-weight:700;white-space:nowrap;transition:background var(--step),border-color var(--step),transform var(--step)}
.hbtn svg{width:17px;height:17px}
.hbtn:hover:not(:disabled){background:var(--surface-2);border-color:#a9c2c5}
.hbtn.primary{background:var(--navy);border-color:var(--navy);color:white}
.hbtn.primary:hover:not(:disabled){background:#24525b;transform:translateY(-1px)}
.hbtn.help-btn{border-color:transparent;color:var(--muted);font-weight:400}
.hbtn.voice-listening,.hbtn.voice-user_speaking{color:var(--bad);background:var(--bad-soft);border-color:#e6bbb6}
/* The state value is `assistant_speaking`, not `speaking`: the rule this
   replaced never matched anything, so the button stayed grey while the
   assistant talked. `generating` is the long wait, coloured apart from the
   short one so a two-minute composition does not look like a hang. */
/* Reading an answer back is the assistant speaking, and looks like it. */
.hbtn.voice-assistant_speaking,.hbtn.voice-reading_back{color:var(--ok);background:var(--ok-soft);border-color:#bcdccd}
/* Waiting for the citizen to agree. The microphone IS open, so this keeps
   the listening colour — a header button that goes neutral here reads as
   voice having stopped, and the citizen presses Start Voice again. */
.hbtn.voice-waiting_confirmation{color:var(--bad);background:var(--bad-soft);border-color:#e6bbb6}
.hbtn.voice-generating{color:var(--warn);background:var(--warn-soft);border-color:#eedfbb}
select.lang{min-height:39px;padding:8px 29px 8px 12px;border:1px solid var(--line);border-radius:8px;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 5 3 3 3-3' fill='none' stroke='%236b7b84' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;color:var(--ink);font-size:12px;appearance:none}
select.lang:hover{border-color:#a9c2c5}
.workspace-intro{max-width:1488px;margin:0 auto;padding:31px 32px 27px;display:flex;align-items:center;justify-content:space-between;gap:32px}
.intro-copy{max-width:850px}
.eyebrow{margin:0 0 7px;color:var(--blue);font-size:10px;font-weight:700;letter-spacing:1.65px}
.workspace-intro h2{margin:0;font-size:30px;line-height:1.3;font-weight:700;letter-spacing:-1.1px;color:var(--navy)}
.workspace-intro #workspaceSubtitle{margin:9px 0 0;color:var(--muted);font-size:12.5px;line-height:1.65}
.intro-meta{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:11px}
.lifecycle{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid #d5e7e1;background:#edf7f2;border-radius:100px;color:#3b6a59;font-size:10.5px;font-weight:700;line-height:1.5;white-space:nowrap}
.lifecycle .dot{width:6px;height:6px;flex:none;border-radius:50%;background:#428266;box-shadow:0 0 0 3px rgb(66 130 102 / 9%)}
.lifecycle.is-review{color:#836216;background:var(--warn-soft);border-color:#eedfbb}
.lifecycle.is-review .dot{background:#b08a2f;box-shadow:0 0 0 3px rgb(176 138 47 / 9%)}
.lifecycle.is-generating .dot{animation:pulse 1.1s infinite}
.lifecycle.is-stopped{color:var(--bad);background:var(--bad-soft);border-color:#edcec9}
.lifecycle.is-stopped .dot{background:var(--bad)}
.save-status{font-size:10.5px;color:var(--muted)}
.connection-banner{max-width:1424px;margin:0 auto 16px;display:flex;align-items:center;gap:12px;padding:13px 18px;background:var(--warn-soft);color:var(--warn);border:1px solid #efdcac;border-radius:var(--r);font-size:12.5px}
.connection-banner>span{flex:1}
.connection-banner .btn{min-height:32px;padding:6px 12px;font-size:11px}

/* The five real workflow stages. */
.stepper{max-width:1424px;margin:0 auto;min-height:var(--stepper-h);display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 24px;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow-x:auto;scrollbar-width:none}
.stepper::-webkit-scrollbar{display:none}
.step{display:flex;align-items:center;gap:9px;padding:5px 8px;border-radius:7px;font-size:11px;font-weight:400;color:#85929a;white-space:nowrap;flex:none;transition:background var(--step),color var(--step)}
.step .marker{width:25px;height:25px;flex:none;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-size:9px;font-weight:700;color:#829096;background:var(--surface)}
.step.active{font-weight:700;color:var(--blue)}
.step.active .marker{border-color:var(--blue);background:var(--blue);color:white;box-shadow:0 0 0 4px #eaf6f4}
.step.done{color:var(--ok)}
.step.done .marker{background:var(--ok-soft);border-color:#cce5d8;color:var(--ok)}
.step-arrow{font-size:15px;color:#b6c4c8;flex:none}

/* A spacious conversation paired with a readable record. */
main.workspace{display:grid;grid-template-columns:minmax(0,1fr) 346px;max-width:1488px;margin:0 auto;gap:20px;padding:22px 32px 28px;height:calc(100dvh - 290px - var(--footer-h));min-height:575px;align-items:stretch}
/* ONE layout from the moment the petition starts being made, and it does not
   move again.

   The drafting panel and the finished petition are the SAME slot. The
   animation plays in the middle column and the document appears exactly
   where it was playing — not below the conversation, and not by rearranging
   the page around the citizen while they are reading it. A change made
   afterwards, by typing or by voice, plays in that same slot too.

   `.generating` wins the slot whenever it is present: during the first draft
   the document column is empty anyway, and during a later change the stage
   stands in front of the document it is about to replace. */
main.workspace.generating,main.workspace.done{grid-template-columns:minmax(0,1fr) minmax(380px,1.45fr) 300px}
main.workspace.generating .left,main.workspace.done .left{grid-column:1;grid-row:1}
main.workspace.generating .genpanel,main.workspace.generating .middle,main.workspace.done .middle{grid-column:2;grid-row:1}
main.workspace.generating .right,main.workspace.done .right{grid-column:3;grid-row:1}
main.workspace.generating .middle{display:none}
.left,.right,.middle{display:flex;flex-direction:column;min-width:0;min-height:0;gap:16px}
.middle .banner{flex:none}
.middle #docCard{flex:1;min-height:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow);display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.card-head{display:flex;align-items:center;gap:11px;padding:20px 24px;border-bottom:1px solid var(--line-soft);flex:none}
.card-head h2{margin:0;font-size:13.5px;font-weight:700;letter-spacing:-.1px}
.card-head .sub{display:flex;align-items:center;gap:6px;margin:3px 0 0;font-size:10px;color:var(--muted)}
.card-head .sub .dot{width:5px;height:5px;flex:none;border-radius:50%;background:#43856b}
.ai-badge{width:37px;height:37px;flex:none;display:grid;place-items:center;background:var(--blue-soft);border:1px solid #dcefeb;border-radius:11px;color:var(--blue)}
.ai-badge svg{width:23px;height:23px}
.card-body{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#ccd8d9 transparent}
/* The spoken-replies toggle, on the panel whose voice it controls. It keeps
   the same shape as the Details button beside it so the two read as one pair
   of panel controls rather than as a button and a stray. */
.voice-toggle{display:inline-flex;margin-left:auto;align-items:center;gap:6px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer;font-family:inherit;transition:background var(--step),border-color var(--step),color var(--step)}
.voice-toggle svg{width:16px;height:16px;flex:none}
.voice-toggle:hover{border-color:var(--blue);color:var(--blue)}
/* Speaking, so the state is visible without reading the label. */
.voice-toggle[aria-pressed="true"]{border-color:var(--blue);color:var(--blue)}
.voice-toggle:disabled{opacity:.5;cursor:not-allowed}
/* The auto margin now lives on whichever of the pair comes first. */
.voice-toggle + .details-toggle{margin-left:8px}
.details-toggle{display:none;margin-left:auto;align-items:center;gap:6px;padding:8px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--blue);font-size:11px}
.details-toggle svg{width:17px;height:17px}

/* Conversation turns preserve full text and meaningful status cues. */
#log{padding:25px 24px;display:flex;flex-direction:column;gap:21px;scroll-behavior:smooth;background:linear-gradient(180deg,#fff 75%,#fcfdfd)}
.turn{display:flex;align-items:flex-start;gap:10px;max-width:100%;animation:rise var(--step)}
.avatar{width:28px;height:28px;flex:none;display:grid;place-items:center;margin-top:3px;border-radius:10px;font-size:13px}
.avatar svg{width:16px;height:16px}
.turn.assistant .avatar{background:var(--blue-soft);color:var(--blue)}
.turn.system .avatar{background:var(--warn-soft);color:var(--warn)}
.bubble{padding:14px 17px;max-width:85%;border-radius:12px;font-size:12.5px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}
.turn.assistant .bubble{background:#f4f7f8;border:1px solid #edf1f2;border-top-left-radius:3px;color:#364e5a}
.turn.citizen{justify-content:flex-end}
.turn.citizen .bubble{max-width:76%;background:var(--navy);border-top-right-radius:3px;color:white;box-shadow:0 2px 4px rgb(24 59 67 / 8%)}
.turn.system .bubble{background:var(--warn-soft);border:1px solid #efdfbc;color:#7b5919;font-size:12px}
.turn.system.error .bubble{background:var(--bad-soft);border-color:#efccc6;color:var(--bad)}
.q-label{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-bottom:7px;font-size:9px;font-weight:700;letter-spacing:.85px;text-transform:uppercase;color:var(--blue)}
.q-label .req{font-size:8px;letter-spacing:0;padding:1px 5px;border:1px solid #dae7e7;border-radius:4px;color:#6c8588;text-transform:none;background:#fff}
.spin-dot{display:inline-block;width:13px;height:13px;margin-right:8px;border:1.5px solid var(--blue);border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes rise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes slide{0%{margin-left:-34%}100%{margin-left:100%}}

/* Response input and progressively disclosed actions. */
.composer{flex:none;padding:16px 20px 15px;border-top:1px solid var(--line-soft);background:var(--surface)}
.composer-row{display:flex;align-items:flex-end;gap:8px;padding:6px 6px 6px 0;border:1px solid #cddcde;border-radius:12px;background:white;box-shadow:0 2px 3px rgb(22 48 57 / 2%);transition:border-color var(--step),box-shadow var(--step)}
.composer-row:focus-within{border-color:#68aeb0;box-shadow:0 0 0 3px #e6f3f2}
.composer textarea{flex:1;min-width:0;min-height:40px;max-height:148px;padding:10px 4px 9px 15px;resize:none;border:0;border-radius:8px;background:transparent;font-size:12px;line-height:1.6;outline:none}
.composer textarea:focus-visible{outline:none}
.composer textarea::placeholder{color:#98a7ad}
.composer textarea:disabled{background:transparent}
.icon-btn{width:37px;height:39px;flex:none;display:grid;place-items:center;border:0;border-radius:8px;background:white;color:#7b9299;transition:background var(--step),color var(--step)}
.icon-btn svg{width:19px;height:19px}
.icon-btn:hover:not(:disabled){background:var(--blue-soft);color:var(--blue)}
.icon-btn.listening{background:var(--bad-soft);color:var(--bad);animation:pulse 1s infinite}
.send-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:39px;max-width:45%;padding:9px 14px;border:1px solid var(--blue);border-radius:8px;background:var(--blue);color:white;font-size:11px;font-weight:700;line-height:1.4;transition:background var(--step)}
.send-btn svg{width:17px;height:17px}
.send-btn:hover:not(:disabled){background:#076a70}
.send-btn:disabled{opacity:.45}
.composer-hint{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:9px 2px 0;color:#88979e;font-size:9px;line-height:1.6}
#inputCount{flex:none;font-variant-numeric:tabular-nums}
#inputCount.at-limit{color:var(--bad)}
.composer-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.composer-actions:has(> [hidden]):has(> [hidden] + [hidden]):has(> [hidden] + [hidden] + [hidden]){margin-top:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 13px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:11px;font-weight:700;line-height:1.5;white-space:normal;text-align:center;transition:background var(--step),border-color var(--step),color var(--step)}
.btn:hover:not(:disabled){background:var(--blue-soft);border-color:#b6d7d6;color:var(--blue)}
.btn.primary{background:var(--blue);border-color:var(--blue);color:white}
.btn.primary:hover:not(:disabled){background:#076a70;border-color:#076a70;color:white}
.btn.danger{color:var(--bad);border-color:#f0dfdd;background:transparent}
.btn.danger:hover:not(:disabled){background:var(--bad-soft);border-color:#e5bab3;color:var(--bad)}
.btn.grow{flex:1}
/* START OVER IS A BUTTON AND NOW LOOKS LIKE ONE. It had a transparent
   border, muted grey and normal weight, which is the styling of a text link:
   it read as a caption under the composer rather than as something to press.
   It keeps the border, the ink and the weight that .btn gives it, and stays
   smaller than Confirm so the primary action is still the obvious one.

   CANCEL IS DELIBERATELY QUIETER and keeps the old treatment. It abandons
   the petition, and a destructive action does not compete for the eye with
   the two that carry the work forward. */
.composer-actions #restart{padding:6px 13px;min-height:32px;font-size:10.5px}
.composer-actions #cancel{padding:5px 10px;min-height:30px;font-size:10px;border-color:transparent;color:#7c8c93;font-weight:400}
.composer-actions #cancel{margin-left:auto}
.composer-actions #cancel:hover{color:var(--bad)}
.composer-actions #confirm{width:100%;flex-basis:100%;padding:12px;font-size:12px}
a.btn{text-decoration:none}
a.btn.off{opacity:.45;pointer-events:none}

/* Details are a live checklist. Current and completed fields look distinct. */
.right .card-head{padding:21px 22px 18px}
.details-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.details-icon{color:#90a2a8}
.details-icon svg{width:18px;height:18px}
.details-hint{margin:5px 0 18px;font-size:10.5px;color:var(--muted)}
.progress-note{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:9.5px;color:var(--muted)}
#progressPct{font-weight:700;font-size:11px;color:var(--blue)}
.progress-track{height:5px;border-radius:3px;overflow:hidden;background:#edf2f2;margin-top:8px}
.progress-track progress{display:block;width:100%;height:5px;border:0;appearance:none;background:#edf2f2}
.progress-track progress::-webkit-progress-bar{background:#edf2f2}
.progress-track progress::-webkit-progress-value{border-radius:3px;background:var(--blue);transition:width 320ms cubic-bezier(.4,0,.2,1)}
.progress-track progress::-moz-progress-bar{border-radius:3px;background:var(--blue)}
.section-label{padding:21px 22px 10px;font-size:9px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:#8b9aa0}
.field-row{display:flex;align-items:flex-start;gap:10px;margin:0 12px;padding:11px 10px;border-bottom:1px solid var(--line-soft);transition:background var(--step);border-radius:0}
.field-row:last-child{border-bottom:0}
.field-row.awaiting{margin:0 12px 3px;border:1px solid #dcece9;border-radius:9px;background:#f0f8f6}
.field-row.changed{animation:flash 900ms ease-out}
@keyframes flash{from{background:var(--ok-soft)}to{background:transparent}}
.field-mark{width:15px;height:15px;flex:none;margin-top:3px;display:grid;place-items:center;border:1px solid #d8e2e4;border-radius:50%;color:transparent;background:white;font-size:8px}
.field-row.awaiting .field-mark{border:4px solid var(--blue);background:white;box-shadow:0 0 0 2px #def0eb}
.field-row.filled .field-mark{background:var(--ok-soft);border-color:#c5e1d4;color:var(--ok)}
.field-main{flex:1;min-width:0}
.field-label{font-size:10px;font-weight:400;color:var(--muted)}
.field-row.awaiting .field-label{color:#307369;font-weight:700}
.field-value{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:11.5px;font-weight:400;overflow-wrap:anywhere;line-height:1.75;color:var(--ink)}
.field-value.pending{color:#a1adb2;font-size:10.5px}
.field-row.awaiting .field-value.pending{color:#74918b}
.field-err{display:block;width:100%;margin-top:2px;font-size:10px;font-weight:400;color:var(--bad)}
.mini{width:28px;height:28px;flex:none;display:grid;place-items:center;border:1px solid transparent;border-radius:7px;background:transparent;color:#8ba0a6;font-size:12px;transition:background var(--step),color var(--step)}
.mini svg{width:15px;height:15px}
.mini:hover:not(:disabled){background:var(--blue-soft);color:var(--blue);border-color:#d8e8e6}
.edit-form{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.edit-form input,.edit-form textarea{flex:1 1 100%;min-width:0;padding:8px 10px;border:1px solid #72aeb0;border-radius:7px;background:white;font-size:11px}
.edit-form textarea{min-height:70px;resize:vertical}
.edit-form button{min-height:30px;padding:5px 11px;border:1px solid var(--blue);border-radius:6px;background:var(--blue);color:white;font-size:10px;font-weight:700}
.edit-form button.ghost{border-color:var(--line);background:white;color:var(--muted)}
details.drawer{border-top:1px solid var(--line-soft)}
details.drawer:first-of-type{margin-top:16px}
details.drawer>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:13px 22px;font-size:10.5px;font-weight:400;color:var(--muted);transition:background var(--step)}
details.drawer>summary::-webkit-details-marker{display:none}
details.drawer>summary:hover{background:var(--surface-2);color:var(--ink)}
details.drawer>summary .chev{margin-left:auto;font-size:10px;transition:transform var(--step)}
details.drawer[open]>summary .chev{transform:rotate(180deg)}
details.drawer>summary .count{padding:1px 6px;background:var(--blue-soft);color:var(--blue);border-radius:10px;font-size:9px}
.drawer-body{padding:0 22px 15px;font-size:10.5px;color:var(--muted);overflow-wrap:anywhere}
.status-line{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:10.5px}
.status-line .ic{width:14px;flex:none;text-align:center}
.status-line.ok{color:var(--ok)}
.status-line.bad{color:var(--bad)}
.correction{padding:8px 0;border-bottom:1px solid var(--line-soft);font-size:10.5px;color:var(--ink)}
.correction:last-child{border-bottom:0}

/* AI Petition Analysis — advisory findings from the government knowledge base.
   Deliberately quieter than the citizen's own details beside it: this is a
   document search, and it must not read as though it carries the same weight
   as something the citizen stated or something an officer has verified. */
.an-section{margin:0 0 12px}
.an-section h4{margin:0 0 5px;font-size:9.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted)}
.an-section ul{margin:0;padding:0;list-style:none}
.an-section li{padding:5px 0;border-bottom:1px solid var(--line-soft);font-size:10.5px;color:var(--ink);line-height:1.6}
.an-section li:last-child{border-bottom:0}
.an-cite{margin-left:3px;padding:0 3px;background:var(--blue-soft);color:var(--blue);border-radius:3px;font-size:8px;font-weight:700;vertical-align:super}
.an-empty{margin:4px 0 0;padding:10px 12px;background:var(--surface-2);border-left:2px solid var(--line);border-radius:0 var(--r-sm) var(--r-sm) 0;font-size:10.5px;line-height:1.6;color:var(--muted)}
.an-sources{margin-top:14px;padding-top:12px;border-top:1px solid var(--line-soft)}
.an-sources h4{margin:0 0 7px;font-size:9.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted)}
.an-sources ol{margin:0;padding:0;list-style:none}
.an-sources li{display:flex;gap:8px;padding:8px 0;border-bottom:1px solid var(--line-soft)}
.an-sources li:last-child{border-bottom:0}
.an-sources li>div{min-width:0}
.an-n{flex:none;width:15px;height:15px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue);border-radius:3px;font-size:8.5px;font-weight:700}
.an-sources b{display:inline;font-size:10.5px;font-weight:700;color:var(--ink)}
.an-tag{margin-left:5px;padding:1px 5px;border-radius:3px;font-size:8px;font-weight:700;white-space:nowrap}
.an-official{background:var(--ok-soft);color:var(--ok)}
.an-departmental{background:var(--blue-soft);color:var(--blue)}
.an-external{background:var(--warn-soft);color:var(--warn)}
.an-where{display:block;margin-top:2px;font-size:9.5px;color:var(--muted)}
.an-sources q{display:block;margin-top:4px;padding-left:7px;border-left:2px solid var(--line);font-size:9.5px;line-height:1.6;color:var(--muted);quotes:none}
.an-sources a{display:block;margin-top:3px;font-size:9.5px;color:var(--blue);overflow-wrap:anywhere}
.an-note{margin:12px 0 0;padding:8px 10px;background:var(--warn-soft);border-radius:var(--r-sm);font-size:9.5px;line-height:1.55;color:var(--warn)}
.correction b{color:var(--navy)}
.correction .from{color:var(--muted);text-decoration:line-through}
.notice{margin:12px;padding:10px 12px;border:1px solid #ecdbb6;border-radius:8px;background:var(--warn-soft);color:#7a591b;font-size:10.5px}
.review-head{padding:17px 22px;border-bottom:1px solid var(--line-soft)}
.review-head h3{margin:0 0 5px;font-size:14px}
.review-head p{margin:0;font-size:11px;color:var(--muted)}

/* The completed document becomes the primary workspace. */
.banner{display:flex;align-items:flex-start;gap:12px;flex:none;padding:18px 20px;border:1px solid #c9e4d6;border-radius:13px;background:var(--ok-soft)}
.banner.bad{border-color:#efcbc6;background:var(--bad-soft)}
/* THE SUCCESS MARK. A filled circle with a drawn tick, and a ring that
   settles around it once — the moment a citizen has been working towards is
   worth marking, and a character in a square was not reading as one. */
.banner .ic{position:relative;width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--ok);color:white}
.banner .ic svg{width:22px;height:22px;position:relative;z-index:1}
.banner .ic .ic-ring{position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--ok);opacity:.28;animation:tick-ring .9s ease-out both}
.banner .ic svg path{stroke-dasharray:30;stroke-dashoffset:30;animation:tick-draw .5s .12s ease-out forwards}
@keyframes tick-ring{0%{transform:scale(.72);opacity:.55}100%{transform:scale(1);opacity:.28}}
@keyframes tick-draw{to{stroke-dashoffset:0}}
/* A citizen who has asked for less motion gets the finished mark, drawn. */
@media(prefers-reduced-motion:reduce){
  .banner .ic .ic-ring{animation:none}
  .banner .ic svg path{animation:none;stroke-dashoffset:0}
}
/* Under the document: the action a citizen reaches after reading it. */
.submit-row{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;max-width:710px;margin:18px auto 4px;text-align:center}
.submit-btn{min-width:230px;min-height:44px;font-size:12.5px}
.submit-note{margin:0;font-size:11px;line-height:1.7;color:var(--muted);max-width:430px}
/* What the button becomes. Same mark as the generation banner, so finishing
   reads as finishing both times. */
.submitted-mark{display:flex;align-items:center;gap:14px;width:100%;max-width:710px;margin:18px auto 4px;padding:16px 20px;border:1px solid #c9e4d6;border-radius:13px;background:var(--ok-soft)}
.submitted-mark h3{margin:0 0 3px;font-size:13.5px;color:var(--ok)}
.submitted-mark p{margin:0;font-size:11.5px;line-height:1.7;color:var(--muted)}
.submission-details{display:grid;gap:8px;margin-top:13px;padding-top:12px;border-top:1px solid #d7e9df}
.submission-reference{display:flex;align-items:center;flex-wrap:wrap;gap:9px;font-size:10px}
.submission-reference code{font-size:12px;font-weight:700;color:var(--ink);letter-spacing:.35px}
.submission-details p{display:flex;gap:8px;flex-wrap:wrap}
.submission-details p strong{color:var(--ink)}
.submission-details .btn{justify-self:start}
.btn.small{min-height:28px;padding:5px 10px;font-size:10px}
.sm-tick{position:relative;width:38px;height:38px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--ok);color:white}
.sm-tick svg{width:20px;height:20px;position:relative;z-index:1}
.sm-tick .ic-ring{position:absolute;inset:-5px;border-radius:50%;border:2px solid var(--ok);opacity:.28;animation:tick-ring .9s ease-out both}
.sm-tick svg path{stroke-dasharray:30;stroke-dashoffset:30;animation:tick-draw .5s .12s ease-out forwards}
@media(prefers-reduced-motion:reduce){.sm-tick .ic-ring{animation:none}.sm-tick svg path{animation:none;stroke-dashoffset:0}}
.banner.bad .ic{background:var(--bad)}
.banner.bad .ic .ic-ring{border-color:var(--bad)}
.banner.bad .ic{background:#f4d6d2;color:var(--bad)}
.banner h3{margin:0 0 4px;color:#286247;font-size:13px;font-weight:700}
.banner.bad h3,.banner.bad p{color:var(--bad)}
.banner p{margin:0;color:#567865;font-size:10.5px;line-height:1.7}
.banner .ref{flex:none;margin-left:auto;text-align:right;font-size:9px;color:var(--muted)}
.banner .ref b{display:block;margin-top:3px;font-size:10px;font-weight:700;color:var(--ink);letter-spacing:.3px}
.doc-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:none;padding:15px 18px;border-bottom:1px solid var(--line-soft);background:white}
.doc-toolbar .spacer{margin-left:auto}
.doc-toolbar #pdf{margin-right:auto}
.doc-toolbar .btn{min-height:36px;font-size:10px}
/* Choosing the language the petition is written in.

   A menu rather than a cycle of three: a citizen has to be able to see what
   is on offer before committing, because each choice remakes the document. */
.translate-menu{position:relative;display:inline-flex}
.translate-menu .caret{width:11px;height:11px;opacity:.6}
.translate-list{position:absolute;top:calc(100% + 6px);left:0;z-index:40;min-width:158px;margin:0;padding:5px;list-style:none;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 10px 26px rgb(20 47 55 / 14%)}
.translate-option{display:flex;align-items:center;gap:8px;width:100%;min-height:36px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:11.5px;font-weight:600;text-align:left;cursor:pointer}
.translate-option:hover:not(:disabled){background:var(--blue-soft);color:var(--blue)}
.translate-option:disabled{opacity:.55;cursor:default}
.translate-option .tick{width:13px;flex:none;color:var(--blue);opacity:0;font-size:11px}
.translate-option[aria-current="true"] .tick{opacity:1}
.translate-option[aria-current="true"]{color:var(--blue)}
.paper-wrap{flex:1;min-height:0;overflow-y:auto;background:#eaf0f0;padding:25px;display:flex;justify-content:center}
/* Layout-neutral on screen: the table exists for the printer (see
   index.html) and must not change a single pixel in a browser. */
.paper-sheet{align-self:flex-start;width:100%;max-width:710px;border-collapse:collapse}
.paper-sheet>tbody>tr>td{padding:0}
.paper-sheet>.page-gutter{display:none}
.paper{align-self:flex-start;width:100%;max-width:710px;padding:48px 46px;border:1px solid #dce3e4;border-radius:2px;background:white;box-shadow:var(--shadow-lg);font-size:12.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;color:#263c48}

/* THE CONTINUOUS COMBINED PACKAGE. One white sheet per page, a small gap
   between them, drawn to the same width as the petition sheet so the run
   reads as one document rather than as a gallery of images. */
.preview-modes{display:flex;align-items:center;gap:8px;padding:10px 25px 0;flex-wrap:wrap}
.pm-btn{border:1px solid #dce3e4;background:white;color:#3d5661;border-radius:999px;padding:6px 16px;font-size:12px;cursor:pointer;font-family:inherit}
.pm-btn.on{background:#20424f;border-color:#20424f;color:white}
.pm-btn:disabled{opacity:.45;cursor:not-allowed}
.pm-count{margin-left:auto;font-size:11.5px;color:#5d7079;font-variant-numeric:tabular-nums}
.package-pages{display:flex;flex-direction:column;align-items:center;width:100%;gap:4px}
.pp-page{width:100%;max-width:710px;display:flex;flex-direction:column;align-items:center}
.pp-sheet{width:100%;min-height:320px;background:white;border:1px solid #dce3e4;border-radius:2px;box-shadow:var(--shadow-lg);overflow:hidden;display:flex;align-items:center;justify-content:center}
/* The rendered page fills the sheet's width and keeps its own proportions:
   an A4 scan and a tall photograph must both arrive undistorted. */
.pp-image{display:block;width:100%;height:auto}
.pp-loading{font-size:12px;color:#7d8f97;padding:40px 0}
.pp-failed{padding:36px 20px;text-align:center;font-size:12.5px;color:#5d7079}
.pp-failed p{margin:0 0 10px}
.pp-sheet-note{flex-direction:column;gap:6px;padding:40px 24px;text-align:center;min-height:200px}
.pp-sheet-note p{margin:0;font-size:12px;color:#5d7079}
.pp-number{margin:6px 0 14px;font-size:11px;color:#8a9aa1;font-variant-numeric:tabular-nums}
.pp-status{font-size:12.5px;color:#5d7079;padding:30px 0}
/* The boundary where the citizen's own letter ends and a document they
   brought begins. */
.pp-divider{width:100%;display:flex;flex-direction:column;gap:2px;margin:18px 0 10px;padding:10px 2px;border-top:1px solid #cfdadd;border-bottom:1px solid #cfdadd}
.pp-divider-label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#7d8f97}
.pp-divider strong{font-size:13px;color:#263c48}
@media (max-width:820px){
  .preview-modes{padding:10px 14px 0}
  .pp-page{max-width:none}
}

/* The attached documents, under the letter. Styled as a separate sheet
   rather than as part of the letter, because that is what it is: the
   generated document carries these pages behind an index, not inside the
   body. It exists so "Enclosures: 1. Copy of earlier petition" is something
   the citizen can verify instead of take on trust. */
.enclosures{display:block;width:100%;max-width:710px;margin:18px 0 0;font-size:12.5px;color:#263c48}
.enclosures-title{margin:0 0 10px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#5d7079;font-weight:600}
.enclosure{margin:0 0 14px;padding:14px 16px;border:1px solid #dce3e4;border-radius:2px;background:white;box-shadow:var(--shadow-lg)}
.enclosure figcaption{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;white-space:normal}
.enclosure figcaption strong{font-size:13px}
.enclosure-detail{font-size:11.5px;color:#5d7079;overflow-wrap:anywhere}
.enclosure-view{display:block;width:100%;border:1px solid #e6ecec;border-radius:2px;background:#f7fafa}
img.enclosure-view{height:auto}
.enclosure-note{margin:8px 0 0;font-size:11px;color:#5d7079;white-space:normal}
.enclosure-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.enclosure-actions .btn{font-size:11.5px;padding:5px 12px}
/* The date and the place, where a letter carries them. The body keeps the
   pre-wrap the whole sheet used to have, so nothing else moves. */
.paper-dateline{white-space:pre-wrap;text-align:right;margin-bottom:2px}
.paper-body{white-space:normal;line-height:1.35}
.paper-body-line{white-space:pre-wrap;line-height:inherit}
.paper-body-spacer{height:4pt}
.paper-official-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1.05fr);gap:8px;align-items:start;margin:0 0 14px;line-height:1.25;white-space:normal;color:#1c3440;break-inside:avoid;page-break-inside:avoid}
.paper-header-ref{font-size:9px;overflow-wrap:anywhere}
.paper-header-ref strong{display:block}
.paper-header-qr{display:block;width:64px;height:64px;margin-top:5px;image-rendering:pixelated}
.paper-header-title{padding-top:8px;text-align:center;font-size:12px;font-weight:700;line-height:1.3}
.paper-office-box{min-height:78px;padding:6px;border:1px solid #59666b;text-align:center;font-size:8.5px;font-weight:700;line-height:1.4;white-space:pre-line}
.paper-signature-row{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:12px;margin-top:25px;line-height:1.35;white-space:normal}
.paper-enclosures-count{font-size:11px;font-weight:700}
.paper-signature-name{text-align:right;font-size:11px;font-weight:600}
.paper-note{margin-top:7px;font-size:9.5px;line-height:1.35;font-style:italic;color:#59666b;white-space:normal}
.gp-emblem svg{width:17px;height:17px}
.gp-pencil{color:var(--blue)}
.gp-pencil svg{width:23px;height:23px}

/* ------------------------------------------------------ drafting animation
   Shown only while the server says the petition is being generated, and taken
   down the moment it answers. It is a picture of work that is really
   happening, not a progress bar counting a timer: the stage rail stops at
   "drafting" and the last stage only ticks when the document actually exists.
   The bar is indeterminate on purpose — the service reports no percentage, so
   inventing one would be a number the citizen could not rely on. */

.genpanel { overflow: hidden; }

.gp-stage {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px;
  background:
    radial-gradient(120% 80% at 50% 0%, #eef3fa 0%, var(--surface-2) 60%);
  overflow-y: auto;
}

/* -- the sheet ---------------------------------------------------------- */

.gp-sheet {
  /* Grows to fill the column. The blank area below the last line then reads
     as the rest of the page rather than as a gap in the interface — which is
     what it would be on the paper the citizen is about to be handed. */
  position: relative; flex: 1 1 auto; min-height: 260px;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow-lg);
  padding: 18px 20px 22px;
  overflow: hidden;
  animation: sheet-in 420ms cubic-bezier(.2,.7,.3,1);
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.gp-head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 9px; margin-bottom: 13px;
  border-bottom: 1.5px solid var(--navy);
}
.gp-emblem { font-size: 14px; }
.gp-title { font-size: 12.5px; font-weight: 700; color: var(--navy); letter-spacing: .2px; }
.gp-date { margin-left: auto; font-size: 9.5px; color: var(--muted); }

.gp-body { display: grid; gap: 11px; align-content: start; flex: 1; }
.gp-block { display: grid; gap: 5px; }

.gp-tag {
  font-size: 8.5px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: var(--muted);
}

/* A line of text being written: the dark fill wipes left to right. */
.gp-line {
  height: 6px; border-radius: 3px;
  background: #eef1f6; overflow: hidden;
}
.gp-line i {
  display: block; height: 100%; width: 100%;
  background: #b9c6d8;
  transform-origin: left center;
  transform: scaleX(0);
  animation: write 4.6s cubic-bezier(.35,.8,.4,1) infinite;
}
@keyframes write {
  0%   { transform: scaleX(0); }
  28%  { transform: scaleX(1); }
  86%  { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}
.gp-line.strong i { background: var(--navy); }
.gp-line.mark    { background: #fdf2cf; }
.gp-line.mark i  { background: #e8c86a; }

.w40 { width: 40% } .w50 { width: 50% } .w60 { width: 60% } .w70 { width: 70% }
.w75 { width: 75% } .w85 { width: 85% } .w88 { width: 88% } .w90 { width: 90% }
.w92 { width: 92% } .w95 { width: 95% }

/* The signature, drawn rather than typed. */
.gp-sign { height: 17px; width: 78px; margin-top: 3px; overflow: hidden; }
.gp-sign i {
  display: block; height: 100%; width: 100%;
  background: no-repeat center/contain
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 18'%3E%3Cpath d='M2 13c6-9 9 3 13-4s6 6 11-2 8 5 13-1 9 4 14-2 8 3 12 0' fill='none' stroke='%23163b6d' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  transform-origin: left center; transform: scaleX(0);
  animation: write 4.6s cubic-bezier(.35,.8,.4,1) infinite;
}
.gp-line.delay-1 i{animation-delay:.10s}.gp-line.delay-2 i{animation-delay:.35s}
.gp-line.delay-3 i{animation-delay:.70s}.gp-line.delay-4 i{animation-delay:.95s}
.gp-line.delay-5 i{animation-delay:1.30s}.gp-line.delay-6 i{animation-delay:1.70s}
.gp-line.delay-7 i{animation-delay:1.90s}.gp-line.delay-8 i{animation-delay:2.10s}
.gp-line.delay-9 i{animation-delay:2.30s}.gp-line.delay-10 i{animation-delay:2.55s}
.gp-line.delay-11 i{animation-delay:2.75s}.gp-line.delay-12 i{animation-delay:2.95s}
.gp-line.delay-13 i{animation-delay:3.15s}.gp-line.delay-14 i{animation-delay:3.45s}
.gp-sign.delay-15 i{animation-delay:3.70s}

/* The scanner reading the details, sweeping the page. */
.gp-scan {
  position: absolute; left: 0; right: 0; height: 86px; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(31,94,168,0) 0%,
    rgba(31,94,168,.10) 42%,
    rgba(31,94,168,.20) 50%,
    rgba(31,94,168,.10) 58%,
    rgba(31,94,168,0) 100%);
  border-bottom: 1px solid rgba(31,94,168,.35);
  animation: scan 3.1s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes scan {
  0%   { top: -86px; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* The pencil, travelling down the page as the lines fill in. Positioned in
   percentages so it keeps pace with the sheet at any column width. */
.gp-pencil {
  position: absolute; right: 20px; font-size: 17px; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(16,32,64,.22));
  animation: pencil 4.6s cubic-bezier(.35,.8,.4,1) infinite;
}
@keyframes pencil {
  0%   { top: 14%; transform: rotate(-12deg); opacity: 0; }
  8%   { opacity: 1; }
  25%  { top: 27%; transform: rotate(-4deg); }
  45%  { top: 46%; transform: rotate(-12deg); }
  65%  { top: 63%; transform: rotate(-4deg); }
  85%  { top: 80%; transform: rotate(-12deg); opacity: 1; }
  100% { top: 88%; opacity: 0; }
}

/* What the assistant improved, called out as it does it. */
.gp-callout {
  position: absolute; right: 14px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none;
  animation: callout 4.6s ease-in-out infinite;
}
.gp-callout.c1 { top: 22%; background: var(--blue-soft); color: var(--navy); animation-delay: .5s; }
.gp-callout.c2 { top: 48%; background: #fdf2cf;          color: #7a5a00;     animation-delay: 1.8s; }
.gp-callout.c3 { top: 72%; background: var(--ok-soft);   color: #0b5c3a;     animation-delay: 3.0s; }
@keyframes callout {
  0%, 100% { opacity: 0; transform: translateX(8px); }
  9%, 26%  { opacity: 1; transform: none; }
  34%      { opacity: 0; transform: translateX(8px); }
}

/* -- the stage rail ------------------------------------------------------ */

.gp-rail { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: none; }
.gp-rail li {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--muted);
  transition: color var(--step);
}
.gp-rail li.done { color: var(--ok); }
.gp-rail li.now  { color: var(--ink); font-weight: 600; }
.gp-rail .m {
  width: 17px; height: 17px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 9px;
  border: 1.5px solid var(--line); background: var(--surface); color: transparent;
  transition: all var(--step);
}
.gp-rail li.done .m { background: var(--ok); border-color: var(--ok); color: #fff; }
.gp-rail li.now  .m {
  border-color: var(--blue); border-right-color: transparent;
  animation: spin .7s linear infinite;
}

.gp-bar {
  height: 4px; border-radius: 2px; background: var(--line-soft);
  overflow: hidden; flex: none;
}
.gp-bar i {
  display: block; height: 100%; width: 34%; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--navy));
  animation: slide 1.5s ease-in-out infinite;
}

/* ------------------------------------------------------- the voice field
   A horizontal ribbon of overlapping coloured bands that answers the audio in
   the room. Drawn on a canvas from the Web Audio analyser — no image, no
   library, nothing pre-recorded, so what moves is what is actually being
   heard.

   It sits on a dark panel for one practical reason: these colours are additive
   and they only read as light over a dark ground. On the card's own white they
   would be five washed-out smears. */

.voicebar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--blue-soft), var(--surface));
  border-bottom: 1px solid var(--line-soft);
  flex: none;
  animation: rise var(--step);
}

/* The microphone, as a control rather than a label. Blue while it is
   listening, red while it is muted — the one piece of state a citizen needs to
   read from across a counter. */
.mic-round {
  position: relative; width: 46px; height: 46px; flex: none;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(31, 94, 168, .35);
  transition: background var(--step), box-shadow var(--step), transform var(--step);
}
.mic-round:hover:not(:disabled) { transform: scale(1.04); }
.mic-round:active:not(:disabled) { transform: scale(.97); }
.mic-round svg { width: 22px; height: 22px; display: block; }
.mic-round .slash { display: none; }

.mic-round.muted { background: var(--bad); box-shadow: 0 2px 8px rgba(179, 38, 30, .35); }
.mic-round.muted .slash { display: block; }

/* A ring that breathes while the citizen is being listened to. */
.mic-round::after {
  content: ""; position: absolute; inset: -5px;
  border-radius: 50%; border: 2px solid var(--blue);
  opacity: 0; pointer-events: none;
}
.mic-round.live::after { animation: ring 2.1s ease-out infinite; }
.mic-round.muted::after { border-color: var(--bad); }

.voice-field {
  flex: 1; min-width: 0;
  position: relative;
  border-radius: 12px;
  background: radial-gradient(120% 180% at 50% 50%, #17284a 0%, #0d1a33 70%, #0a1428 100%);
  overflow: hidden;
  padding: 8px 14px 9px;
}
.voice-field canvas { display: block; width: 100%; height: 54px; }

.voice-field .vf-status {
  position: absolute; left: 14px; right: 14px; bottom: 6px;
  display: flex; align-items: baseline; gap: 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: #9fc0ea;
  pointer-events: none;
}
.voice-field .vf-heard {
  font-weight: 500; text-transform: none; letter-spacing: 0;
  color: #cfe1f7; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}

.vb-actions { display: flex; gap: 6px; flex: none; }
.vb-actions .btn { height: 34px; padding: 0 12px; font-size: 12.5px; }

/* The meter and the diagnostics live under the field, out of the way. */
.vb-under { flex: none; width: 100%; }

/* The quiet second line under the voice state: "noise reduction active", or
   the advisory when the room is too loud for that to be enough. Deliberately
   understated — it is reassurance, not an alert. */
.vf-note { font-size: 10.5px; letter-spacing: .2px; opacity: .78; }
.vf-note.warn { opacity: 1; color: var(--warn); font-weight: 600; }

/* ------------------------------------------------------------------ kiosk
   A terminal standing in a government office. The page is the same one; what
   changes is that the ways OFF it are gone — a queue has no use for browsing
   saved petitions, and a citizen who wanders into the library on a shared
   machine is looking at other people's documents. */
body.kiosk .main-nav,
body.kiosk #helpBtn,
body.kiosk [data-route="petitions"],
body.kiosk [data-route="home"] { display: none !important; }
/* The language switch STAYS. A Tamil speaker at a Tamil Nadu counter needs
   it more than anyone, and it is the one control a kiosk must keep. */

/* The first thing a citizen walking up to the terminal sees. Covers the
   workspace rather than replacing it — the page behind is the same page, so
   there is one flow and one implementation. */
.kiosk-welcome{position:fixed;inset:0;z-index:60;display:grid;place-items:center;
  padding:32px;background:var(--surface);animation:fade var(--step)}
.kiosk-welcome .kw-inner{max-width:640px;text-align:center}
.kiosk-welcome .kw-mark{display:block;margin:0 auto 22px}
.kiosk-welcome h2{margin:0 0 14px;font-size:38px;line-height:1.25}
.kiosk-welcome p{margin:0 auto 30px;max-width:520px;font-size:17px;line-height:1.75;
  color:var(--muted)}
/* A target somebody can hit with a thumb, standing up, at a counter. */
.kiosk-welcome .kw-start{min-height:64px;padding:0 44px;font-size:19px;border-radius:14px}
@media(max-width:820px){
  .kiosk-welcome h2{font-size:29px}.kiosk-welcome p{font-size:15px}
  .kiosk-welcome .kw-start{width:100%;min-height:58px;font-size:17px}
}

/* Shown once the petition has gone to the printer. Deliberately large and
   in the way: it is the only thing the citizen needs to read at that point,
   and it carries the countdown that clears their details off the screen. */
.kiosk-done {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 12px 16px 0; padding: 16px 18px;
  border-radius: var(--r); font-size: 14px;
  background: var(--ok-soft); border: 1px solid #bcdccd;
  animation: rise var(--step);
}
.kiosk-done .kd-tick {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: white; background: var(--ok);
}
.kiosk-done .kd-tick svg { width: 20px; height: 20px; }
.kiosk-done .kd-text { min-width: 0; flex: 1 1 240px; }
.kiosk-done h3 { margin: 0; font-size: 15px; }
.kiosk-done p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.kiosk-done .kd-acts { display: flex; gap: 8px; flex: none; }
/* Touch targets, because nobody brings a mouse to a counter. */
.kiosk-done .btn { min-height: 44px; padding: 0 18px; font-size: 13px; }
/* A print that did not happen is not good news, and must not look like it. */
.kiosk-done.failed { background: var(--warn-soft); border-color: #f0dfba; }
.kiosk-done.failed .kd-tick { background: var(--warn); }
.kiosk-done.failed .kd-tick svg { display: none; }
.kiosk-done.failed .kd-tick::before { content: "!"; font-weight: 800; }
@media(max-width:820px){
  .kiosk-done{margin:12px 10px 0}
  .kiosk-done .kd-acts{width:100%}
  .kiosk-done .kd-acts .btn{flex:1 1 0}
}

/* A grievance being told. The live transcript is the point: a citizen who
   can see their sentences arriving knows nothing has been lost, and a blank
   panel with a timer on it proves nothing at all. */
.dictation {
  margin: 10px 16px 0; padding: 12px 14px;
  border-radius: var(--r); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: rise var(--step);
}
.dictation .dc-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
}
.dictation .dc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bad);
  animation: dcpulse 1.4s ease-in-out infinite;
}
@keyframes dcpulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.dictation .dc-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.dictation .dc-count { color: var(--muted); }
/* Capped and scrollable rather than endless: a two-minute grievance would
   otherwise push the composer off the screen while the citizen is still
   talking into it. */
.dictation .dc-text {
  margin: 8px 0 0; max-height: 132px; overflow-y: auto;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dictation .dc-text:empty::before {
  content: attr(data-empty); color: var(--muted); font-style: italic;
}
.dictation .dc-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dictation .btn { height: 36px; padding: 0 16px; font-size: 12.5px; }

/* THE LEVEL METER. Twelve bars, each scaled from the analyser's own reading
   of the microphone. Deliberately not a canvas animation on a timer: a
   panel that keeps dancing while the microphone is muted, unplugged or
   denied is the most misleading thing on this page, because it is the one
   thing a citizen uses to decide whether they are being heard. Silence
   here means silence there. */
.dc-wave {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 3px; height: 34px; margin: 2px 0 12px;
}
.dc-wave i {
  display: block; width: 4px; border-radius: 2px;
  height: 10%; min-height: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2, var(--accent)));
  transform-origin: bottom;
  transition: height 90ms linear;
}
/* Paused, or the assistant is speaking: flat, and visibly so. */
.dictation[data-live="off"] .dc-wave i { height: 4px; opacity: .35; }
.dictation[data-live="off"] .dc-dot { animation: none; background: var(--muted); }

.dictation .dc-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.dictation .dc-marks {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-size: 11.5px; color: var(--muted);
}
.dictation .dc-mark { display: inline-flex; align-items: center; gap: 5px; color: var(--good, #1d7a4d); }
.dictation .dc-mark::before { content: "\2713"; font-weight: 800; }
.dictation .dc-count { margin-left: auto; }

/* Agreed to. Held on screen for a moment while the next question is asked,
   so the citizen sees the complaint accepted instead of inferring it. */
.grievance-done {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 16px 0; padding: 14px 16px;
  border-radius: var(--r); font-size: 13.5px;
  background: color-mix(in srgb, var(--good, #1d7a4d) 10%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--good, #1d7a4d) 35%, var(--line));
  animation: rise var(--step);
}
.grievance-done .gd-tick {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--good, #1d7a4d); color: white;
}
.grievance-done .gd-tick svg { width: 17px; height: 17px; }
.grievance-done .gd-text { display: flex; flex-direction: column; gap: 2px; }
.grievance-done strong { font-size: 14px; }
.grievance-done span { color: var(--muted); }

/* One screen reader announcement, one movement, and nothing that spins. */
@media (prefers-reduced-motion: reduce) {
  .dc-wave i { transition: none; }
  .dictation .dc-dot { animation: none; }
  .grievance-done { animation: none; }
}

/* The answer that was heard, waiting to be agreed with.
   Sits above the error banner and below the waveform, in the citizen's line
   of sight between the microphone and the conversation — this is the one
   thing on the page they have to act on, and it is deliberately not styled
   as a warning: nothing has gone wrong, they are simply being asked. */
.answer-check {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 16px 0; padding: 12px 14px;
  border-radius: var(--r); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: rise var(--step);
}
.answer-check .ac-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.answer-check .ac-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
}
/* The value wraps rather than being cut off. A truncated address is worse
   than a tall panel: the citizen is being asked whether it is right. */
.answer-check .ac-value {
  font-size: 15px; line-height: 1.4; word-break: break-word;
}
.answer-check .ac-ask { font-size: 12px; color: var(--muted); }
.answer-check .ac-acts { margin-left: auto; display: flex; gap: 8px; flex: none; }
.answer-check .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }

/* Voice failed. The petition has not, and the page says so. */
.voice-error-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 10px 16px 0; padding: 11px 13px;
  border-radius: var(--r); font-size: 13px;
  background: var(--warn-soft); border: 1px solid #f0dfba; color: #6b4600;
}
.voice-error-banner .ic { flex: none; }
.voice-error-banner .acts { margin-left: auto; display: flex; gap: 6px; flex: none; }
.voice-error-banner .btn { height: 30px; padding: 0 10px; font-size: 12px; }


/* A level meter, so a citizen can see the microphone is hearing them and an
   operator can see whether the room alone reaches the speech threshold. The
   marker is where speech starts being counted; if the bars sit at or past it
   with nobody talking, the room is too loud for the current settings. */
.vb-meter {
  position: relative; height: 6px; margin-top: 5px;
  border-radius: 3px; background: var(--line-soft); overflow: hidden;
}
.vb-meter i {
  display: block; height: 100%; width: 0%;
  background: var(--blue); border-radius: 3px;
  transition: width 60ms linear, background var(--step);
}
.vb-meter.over i { background: var(--ok); }
.vb-meter u {
  position: absolute; top: -2px; bottom: -2px; width: 2px;
  background: var(--muted); opacity: .55;
}

/* Developer diagnostics. Off unless the service says so, and never carries a
   transcript or a value — only measurements and the reason something was
   discarded. */
.vb-diag {
  margin-top: 6px; padding: 7px 9px;
  border-radius: var(--r-sm); border: 1px dashed var(--line);
  background: var(--surface-2);
  font: 11px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--muted);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 2px 12px;
}
.vb-diag b { color: var(--ink); font-weight: 700; }
.vb-diag .bad { color: var(--bad); }


/* Accessible modal and compact-screen workspace. */
.modal-backdrop{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:20px;background:rgb(16 41 48 / 38%);backdrop-filter:blur(5px);animation:fade var(--step)}
@keyframes fade{from{opacity:0}to{opacity:1}}
.modal{max-width:460px;max-height:calc(100dvh - 40px);overflow-y:auto;width:100%;padding:27px 28px;border:1px solid white;border-radius:18px;background:white;box-shadow:0 20px 80px rgb(16 41 48 / 25%)}
.modal h3{margin:0 0 10px;font-size:19px;line-height:1.5;letter-spacing:-.4px;color:var(--navy)}
.modal p{margin:0 0 22px;font-size:12px;line-height:1.85;color:var(--muted)}
/* Three instructions read as three. They were one paragraph with "1." and
   "2." typed into it, which runs together at this width and reads as prose. */
.modal-steps{margin:0 0 18px;padding-left:22px;display:flex;flex-direction:column;gap:9px;font-size:12.5px;line-height:1.7;color:var(--ink)}
.modal-steps li{padding-left:3px}
.modal-steps li::marker{font-weight:700;color:var(--navy)}
/* The caveats, set apart from the steps: they are not a fourth thing to do. */
.modal-note{margin:0;padding-top:14px;border-top:1px solid var(--line-soft,#e6ecec);font-size:11.5px;line-height:1.8;color:var(--muted)}
.modal-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}
.modal ol{padding-left:20px;color:var(--muted);font-size:12px;line-height:1.85}
.modal li{padding:5px 0}
.modal .help-note{padding:12px 14px;background:var(--blue-soft);border-radius:9px;font-size:11px}
@media(min-width:1600px){main.workspace{min-height:650px}.workspace-intro{padding-top:36px;padding-bottom:32px}.stepper{padding-inline:34px}}
@media(max-width:1488px){.stepper,.connection-banner{margin-left:32px;margin-right:32px}}
/* ------------------------------------------------- reading the petition
   A finished petition is a DOCUMENT, and a document is read at its own
   length.

   It was being shown through a hole. The workspace is a fixed-height grid
   — right for the conversation, where the newest message is at the bottom
   and nothing above it needs to be on screen. Applied to a two-page letter
   on a laptop it left about 274px for the paper: roughly eleven lines of
   forty, behind a nested scrollbar, inside a page that was already
   scrolling. A citizen checking their own address had to scroll a small
   box inside a big one to find it.

   So in the finished state the middle column stops being a panel and
   becomes the page: the paper renders at its full height and the ordinary
   page scroll moves through it. The conversation and the details stick
   beside it instead of being stretched to the height of the letter, which
   is what `align-items:start` would otherwise do to them.

   Only where the three-column layout applies. Below 1180px the columns
   stack and each already gets the full width, with its own height rules
   further down. */
@media(min-width:1181px){
  /* `:not(.generating)` throughout. Both classes are present while a change
     is being drafted against a petition that already exists, and in that
     moment the document is hidden behind the drafting animation — sizing
     the grid to a document nobody can see would make the page jump as the
     animation ends. */
  main.workspace.done:not(.generating){height:auto;align-items:start;
    min-height:calc(100dvh - 290px - var(--footer-h))}
  /* Below the sticky header, and short enough that the footer is reachable
     without the column running under it. Both already scroll internally. */
  main.workspace.done:not(.generating) .left,
  main.workspace.done:not(.generating) .right{
    position:sticky;top:calc(var(--header-h) + 16px);
    height:calc(100dvh - var(--header-h) - 48px)}
  main.workspace.done:not(.generating) .middle{min-height:0}
  main.workspace.done:not(.generating) #docCard{flex:none}
  main.workspace.done:not(.generating) .paper-wrap{flex:none;overflow:visible}
}

@media(max-width:1180px){
  .help-btn .txt{display:none}.hbtn.help-btn{padding:8px}
  main.workspace{grid-template-columns:minmax(0,1fr) 315px}
  /* Two columns instead of three, and the stage and the document still share
     the same cell — above the conversation, never under it. */
  main.workspace.generating,main.workspace.done{grid-template-columns:minmax(0,1fr) 315px;height:auto;min-height:0}
  main.workspace.generating .genpanel,main.workspace.generating .middle,main.workspace.done .middle{grid-column:1;grid-row:1;min-height:570px;max-height:calc(100dvh - 160px)}
  main.workspace.generating .left,main.workspace.done .left{grid-column:1;grid-row:2;height:350px}
  main.workspace.generating .right,main.workspace.done .right{grid-column:2;grid-row:1 / 3;max-height:945px}
  .workspace-intro h2{font-size:27px}.intro-copy{max-width:620px}
  .step{font-size:10px;gap:7px;padding-inline:3px}.stepper{padding-inline:17px}
  .paper{padding:32px 28px}.paper-wrap{padding:18px}.banner{flex-wrap:wrap}.banner .ref{margin-left:43px;text-align:left}
  .card-head{padding:18px}.composer{padding:14px}#log{padding:20px 18px}
}
@media(max-width:940px){
  header.app{padding-inline:22px;gap:12px}.header-actions{gap:7px}.hbtn{padding:8px 10px}.help-btn{display:none}
  .brand-text h1{font-size:14px}.brand-text p{font-size:9px}.emblem{width:37px;height:41px}
  .workspace-intro{padding-inline:22px;gap:20px}.workspace-intro h2{font-size:25px}.workspace-intro #workspaceSubtitle{font-size:11.5px;max-width:520px}
  .intro-meta{max-width:210px}.lifecycle{font-size:9px}.save-status{font-size:9px}
  .stepper,.connection-banner{margin-left:22px;margin-right:22px}
  main.workspace{padding-inline:22px;gap:15px;grid-template-columns:minmax(0,1fr) 290px}
}
@media(max-width:820px){
  :root{--header-h:71px}
  header.app{min-height:71px;padding:13px 17px}
  .brand{gap:9px}.brand-text h1{font-size:13px;max-width:195px}.brand-text p{font-size:8.5px}
  .hbtn.primary{padding:8px 10px}.hbtn.primary .txt{font-size:10px}select.lang{font-size:11px;padding-left:10px}
  .workspace-intro{padding:24px 18px 20px;align-items:flex-start;gap:20px}.workspace-intro h2{font-size:25px;letter-spacing:-.85px}.eyebrow{font-size:8px;letter-spacing:1.3px}.workspace-intro #workspaceSubtitle{font-size:11px;max-width:480px}
  .intro-meta{gap:8px;padding-top:4px}.lifecycle{padding:6px 8px;font-size:9px;white-space:normal}.save-status{max-width:165px;text-align:right;font-size:9px}
  .stepper{margin:0 18px;min-height:60px;gap:7px;padding:10px 13px;justify-content:space-between;border-radius:10px}.step{gap:7px;font-size:10px}.step .marker{width:22px;height:22px;font-size:8px}.step-arrow{font-size:12px}
  .connection-banner{margin:0 18px 15px;align-items:flex-start;font-size:11px}
  main.workspace,main.workspace.generating,main.workspace.done{grid-template-columns:minmax(0,1fr);height:auto;min-height:0;padding:18px 18px 28px;gap:16px}
  .left{min-height:520px;height:calc(100dvh - 285px);max-height:900px}.right{display:none}
  main.workspace.details-open .right{display:flex;grid-column:1;grid-row:1;max-height:none}
  main.workspace.details-open .left{grid-column:1;grid-row:2}
  .details-toggle{display:inline-flex}
  /* One column. Same rule: the stage and the document occupy the same row,
     the conversation sits under them, and that order never changes. */
  main.workspace.generating .genpanel,main.workspace.generating .middle,main.workspace.done .middle{grid-column:1;grid-row:1;min-height:560px;max-height:calc(100dvh - 90px)}
  main.workspace.generating .left,main.workspace.done .left{grid-column:1;grid-row:2;min-height:420px;height:420px}
  main.workspace.generating.details-open .right,main.workspace.done.details-open .right{grid-column:1;grid-row:1;max-height:none}
  main.workspace.generating.details-open .genpanel,main.workspace.generating.details-open .middle,main.workspace.done.details-open .middle{grid-row:2}
  main.workspace.generating.details-open .left,main.workspace.done.details-open .left{grid-row:3}
  .right .card-head{padding:20px 22px}.right .field-row{padding-top:13px;padding-bottom:13px}
  .bubble{font-size:13px}.card-head h2{font-size:14px}.card-head .sub{font-size:10px}
  .composer textarea{font-size:16px;line-height:1.5}.composer-row{gap:4px}.send-btn{min-height:42px;font-size:12px}.icon-btn{height:42px}
  .composer-hint{font-size:9px}.composer-actions #restart,.composer-actions #cancel{min-height:35px;font-size:10.5px}
  .banner .ref{margin-left:auto;text-align:right}.paper{padding:35px 32px;font-size:13px}
}
@media(max-width:570px){
  header.app{flex-wrap:wrap;padding:12px 14px;gap:11px}.brand{flex:1}.brand-text h1{font-size:13px;max-width:185px}.brand-text p{display:none}.emblem{width:31px;height:34px}
  .header-actions{gap:6px}.hbtn.primary{min-height:34px;width:34px;padding:7px}.hbtn.primary .txt{display:none}.hbtn.primary svg{width:19px;height:19px}select.lang{min-height:34px;padding:7px 23px 7px 9px;font-size:10px;background-position:right 7px center}
  .workspace-intro{padding:22px 16px 18px;display:block}.workspace-intro h2{font-size:25px}.workspace-intro #workspaceSubtitle{font-size:11px;line-height:1.85;margin-top:8px}.intro-copy{max-width:430px}
  .intro-meta{max-width:none;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding-top:16px}.lifecycle{font-size:9px;padding:6px 9px}.save-status{font-size:8px;max-width:140px}.eyebrow{font-size:8px;margin-bottom:7px}
  .stepper{margin:0 16px;padding:10px 12px;gap:13px;justify-content:flex-start;min-height:56px}.step{font-size:10px}.step-arrow{display:none}.step:not(.active):not(.done){font-size:0;gap:0}.step.done{font-size:0;gap:0}.step.active{flex:1;font-size:10px;gap:8px}.step .marker{width:24px;height:24px;font-size:9px}.step.active .marker{box-shadow:0 0 0 3px #eaf6f4}
  .connection-banner{margin-inline:16px;padding:12px;gap:9px;flex-wrap:wrap}.connection-banner svg{width:17px;height:17px}.connection-banner .btn{margin-left:26px}
  main.workspace,main.workspace.done,main.workspace.generating{padding:16px 12px 22px}.card{border-radius:13px}.card-head{padding:16px 15px;gap:9px}.ai-badge{width:33px;height:33px}.card-head h2{font-size:12px}.card-head .sub{font-size:8.5px}.details-toggle{font-size:9px;padding:7px}.details-toggle svg{width:14px;height:14px}
  .left{height:590px;min-height:490px;max-height:calc(100dvh - 95px)}#log{padding:20px 14px;gap:18px}.turn{gap:7px}.avatar{width:24px;height:24px;border-radius:8px;font-size:11px}.bubble{padding:11px 13px;font-size:12px;max-width:89%;line-height:1.9}.turn.citizen .bubble{max-width:84%}.q-label{font-size:8px;letter-spacing:.45px}.q-label .req{font-size:7px}
  .composer{padding:12px}.composer textarea{padding-left:10px}.send-btn{padding:9px 11px;gap:5px}.send-btn svg{width:16px;height:16px}.icon-btn{width:30px}.composer-hint{font-size:8px;gap:8px}.composer-actions{gap:4px;margin-top:9px}.composer-actions #confirm{font-size:11px}
  .dictation{margin:10px 10px 0;padding:10px;font-size:12px}
  .dictation .dc-text{font-size:13px;max-height:110px}
  .dictation .dc-acts .btn{flex:1 1 90px;min-height:40px;height:auto}
  .dc-wave{height:28px}
  .grievance-done{margin:10px 12px 0;padding:12px}
  .answer-check{margin:10px 10px 0;padding:10px;gap:9px;font-size:12px}
  .answer-check .ac-value{font-size:14px}
  .answer-check .ac-acts{margin-left:0;width:100%}
  .answer-check .ac-acts .btn{flex:1 1 0;min-height:40px;height:auto}
  .voicebar{padding:10px;gap:9px}.mic-round{width:36px;height:36px}.voice-field{padding-inline:8px}.voice-field canvas{height:48px}.voice-field .vf-status{left:8px;font-size:8px}.vb-actions .btn{padding:7px;font-size:9px;min-height:32px;height:auto}.voice-error-banner{margin:10px 10px 0;padding:10px;gap:8px;flex-wrap:wrap;font-size:11px}.voice-error-banner .acts{margin-left:20px}.voice-error-banner .btn{font-size:10px;min-height:30px;height:auto}
  .doc-toolbar{gap:6px;padding:12px}.doc-toolbar .btn{flex:1 1 auto;font-size:9px;padding:7px 9px}.paper-wrap{padding:12px}.paper{padding:25px 20px;font-size:12px}.banner{padding:14px;gap:9px}.banner .ic{width:26px;height:26px;font-size:13px}.banner h3{font-size:12px}.banner p{font-size:10px}.banner .ref{margin-left:35px;text-align:left}.banner .ref b{font-size:9px}
  .modal{padding:23px 21px}.modal h3{font-size:17px}.modal p{font-size:12px}.modal-actions .btn{min-height:40px}
}
/* THE ASSISTANT HEADER ON A PHONE.
   A badge, a title, a status line and two controls do not fit one row at
   390px. Measured on a Tamil session, which is the case that matters here:
   the title wrapped, the status ran to three lines, the head grew to 129px,
   and the Details button ended at x=446 on a 390px screen — 56px past the
   edge, clipped. Adding the voice toggle to this row is what tipped it.

   So below 640px the head becomes a small grid: badge and title on the first
   row, the two controls sharing the second. Nothing is hidden and nothing is
   shrunk to illegibility — there is simply a second row for the things that
   did not fit on the first. */
@media(max-width:640px){
  #chatCard .card-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px 10px}
  #chatCard .card-head>.ai-badge{grid-area:1/1/2/2}
  #chatCard .card-head>div:not(.ai-badge){grid-area:1/2/2/4;min-width:0}
  #chatCard .card-head>.voice-toggle{grid-area:2/1/3/3;margin-left:0;justify-content:center;min-width:0}
  #chatCard .card-head>.details-toggle{grid-area:2/3/3/4;margin-left:0}
  /* The status line has room to breathe now rather than being squeezed
     into a column two words wide. */
  #chatCard .card-head .sub{flex-wrap:wrap}
  #chatCard .card-head h2{line-height:1.35}
}
/* Narrower still: the control labels go and the marks carry the meaning,
   which is what the Details button already did at this width. */
@media(max-width:400px){
  #chatCard .card-head>.voice-toggle{padding:8px}
  #chatCard .card-head>.voice-toggle .txt{font-size:10.5px}
}
/* THE HEADER ON A PHONE. The brand was wrapping to three lines inside 91px
   because Officer Login was holding ~150px of a 390px row. That link is the
   staff door — the citizen at the counter never wants it — so on a phone it
   keeps its mark and drops its label, and the service gets its name back.
   The accessible name stays on the element itself. */
@media(max-width:570px){
  .officer-login-link .txt{display:none}
  .officer-login-link{padding:8px 10px;gap:0}
}
/* The stepper scrolled sideways by 18px at 390px: six steps, five gaps and
   the padding came to 374px inside a 358px rail. Measured, then tightened by
   more than the overflow so there is room to spare in Tamil. */
@media(max-width:400px){
  .stepper{gap:8px;padding:10px 10px;margin:0 14px}
  .step .marker{width:22px;height:22px}
}
/* Smallest phones: the rail carries the marks alone. A Tamil step name does
   not fit beside five other markers at 320px, and the active one is still
   obvious — it keeps its ring. Which step it is also reads in plain words
   just below, on the assistant panel. */
@media(max-width:365px){
  .stepper .step.active{font-size:0;gap:0;flex:0 0 auto}
  .stepper{justify-content:space-between}
}
@media(max-width:360px){.brand-text h1{max-width:149px;font-size:11px}.header-actions{gap:4px}.brand{gap:7px}.workspace-intro h2{font-size:23px}.save-status{max-width:105px}.send-btn #sendText{display:none}.send-btn{width:37px;padding:8px}.details-toggle span{display:none}.stepper{gap:9px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* ------------------------------------------------------------------ print
   ONLY THE PETITION. Nothing of the interface it was made in.

   Written as a chain rather than a list of things to hide. The list was the
   original approach and it rots: every panel added since — the voice bar,
   the answer card, the dictation panel, the kiosk screens, the site footer
   with its logo — was a thing somebody had to remember to add to it, and the
   footer was the one nobody did. So everything is hidden at each level and
   only the path down to the paper is put back. A panel added tomorrow is
   excluded by default, which is the right default for a government document.

   `@page{margin:0}` IS WHAT REMOVES THE BROWSER'S OWN HEADER AND FOOTER —
   the date, the page title, the URL and "1/2". Chrome draws those inside the
   page margin, so a page with no margin has nowhere to draw them. The real
   margins move onto the paper as padding, which is also what makes the
   result A4 with the margins a petition should have.

   Not universal: Firefox prints headers unless the reader unticks them in
   its own dialog. Chrome and Edge — which is what a kiosk runs — honour
   this. */
@media print{
  @page{size:A4;margin:0}
  html,body{background:white;margin:0;padding:0}

  /* Hide at every level, then re-open the one path that leads to the letter. */
  body>*,
  #mainContent>*,
  #generatorPage>*,
  main.workspace>*,
  .middle>*,
  #docCard>*{display:none!important}

  body>#mainContent,
  #mainContent>#generatorPage,
  #generatorPage>main.workspace,
  main.workspace>.middle,
  .middle>#docCard,
  #docCard>.paper-wrap{display:block!important}

  /* NOT PRINTED, and deliberately. This block exists so the citizen can see
     on screen that their file is attached; printing it would put a framed
     screenshot of the attachment in the middle of a government letter. The
     downloaded document carries the real pages behind an index, and the
     package PDF carries the originals with their text layer intact. */
  .enclosures{display:none!important}

  /* PRINT IS THE PETITION, and that is unchanged from before this preview
     existed. Printing a screen-rendered image of every attachment page would
     send a second-generation copy of the citizen's originals to the office;
     the Full Package download carries the real pages. The print button's
     meaning is therefore the same whichever mode is on screen. */
  /* The submit control and its confirmation are screen furniture, not part
     of the petition an office receives. */
  .submit-row,.submitted-mark{display:none!important}
  .package-pages,.preview-modes{display:none!important}
  .paper-sheet{display:table!important}

  main.workspace,main.workspace.done,#generatorPage,#mainContent,
  .middle,#docCard,.paper-wrap{
    margin:0;padding:0;max-width:none;width:auto;
    height:auto!important;min-height:0!important;max-height:none!important;
    border:0;box-shadow:none;background:white;overflow:visible;
    position:static;grid-template-columns:none}

  /* THE MARGINS OF THE PRINTED PAGE, now that @page has none.

     `padding` alone was wrong and the second page showed it: padding opens
     at the top of the FIRST page and closes at the bottom of the LAST one,
     so a two-page petition began page two hard against the edge of the
     sheet, first line touching the paper's top.

     The obvious fix — `@page{margin:18mm 16mm}` — is the one that is not
     available here. Chrome draws its own header and footer (the date, the
     page title, the URL, "1/2") INSIDE the page margin, so a real @page
     margin is exactly the room it needs. Zero margin is what removed them,
     and it was removed on request.

     So the vertical margin is a REPEATING TABLE PART: Chrome redraws a
     `thead` at the top of every page the table spans, and a `tfoot` at the
     foot of each. Two empty ones, the height of the margin, give every
     sheet the same gutter with nothing printed in it.

     IT HAS TO BE A REAL `thead`. This was first written as
     `.paper::before{display:table-header-group}`, and separately as divs
     given the table display roles, and Chrome silently ignored both —
     page two printed 0.1mm from the edge of the paper while every test
     in the suite passed, because a test that reads CSS cannot tell whether
     a browser honours it. `scripts/print_margin_check.py` measures the
     real thing.

     The SIDES stay as padding: they apply to every page already, because a
     page break is horizontal. */
  .paper-sheet{width:100%;max-width:none;border-collapse:collapse;background:white}
  .paper-sheet>.page-gutter{display:table-header-group}
  .paper-sheet>tfoot.page-gutter{display:table-footer-group}
  .paper-sheet>.page-gutter td{height:16mm;border:0;padding:0}
  .paper-sheet>tbody>tr>td{padding:0;border:0}

  .paper{
    display:block!important;
    max-width:none;margin:0;padding:0 16mm;width:auto;
    border:0;border-radius:0;box-shadow:none;background:white;
    color:black;font-size:11pt;line-height:1.4}

  /* The emblem sits against the top of the first sheet. The gutter above it
     is the table's, so it needs none of its own. */
  .paper.has-emblem{padding-top:0;background-position:var(--emblem-x) 2mm}
}
/* Asking for the petition to be written differently. Tucked under the toolbar
   rather than in a dialog: the citizen is reading the document while they
   decide what to change, and a modal would cover the thing they are judging. */
.revise-panel{display:flex;flex-direction:column;gap:8px;padding:14px 22px 16px;border-bottom:1px solid var(--line-soft);background:var(--surface-2);animation:rise var(--step)}
.revise-panel label{font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted)}
.revise-panel textarea{width:100%;min-height:58px;max-height:150px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r);background:white;font:inherit;font-size:13.5px;line-height:1.5;resize:vertical}
.revise-panel textarea:focus{border-color:var(--blue);outline:none}
.revise-hint{margin:0;font-size:11.5px;color:var(--muted)}
.revise-actions{display:flex;gap:8px;flex-wrap:wrap}
.revise-actions .btn{height:34px;padding:0 14px;font-size:12.5px}

/* The emblem on the preview, so what is on screen is what the download
   carries — including WHERE it sits, which the citizen can move by asking.
   The position comes from the session as a custom property.

   A background rather than an <img>: the paper's text is set with
   white-space:pre-wrap, and an element in the flow would take a line of its
   own and push the whole letter down by one, which the real document does not
   do. Must come after the `.paper` rule above, whose `padding` shorthand would
   otherwise reset the space made for it.

   Bare `.paper` carries NO emblem, because that is now the default and a
   petition must never flash a state emblem it is not going to have while the
   script that would remove it is still loading. `.has-emblem` is added only
   once the session says one was asked for. */
.paper{--emblem-x:50%;padding-top:48px}
.paper.has-emblem{padding-top:104px;background-image:url("/assets/emblem/tamil-nadu.png");background-repeat:no-repeat;background-position:var(--emblem-x) 32px;background-size:auto 56px}
@media (max-width:720px){.paper{padding-top:30px}.paper.has-emblem{padding-top:84px;background-position:var(--emblem-x) 22px;background-size:auto 44px}}

/* What is attached, shown small.
   This replaced a panel that carried the question, a suggestion list, a drop
   zone, the files and its own buttons — the largest thing on screen at the
   moment the citizen was answering a one-line question. Attaching is now the
   paperclip beside the microphone, and what is left is a strip of chips. */
/* Capped, and scrolls past the cap. Two files awaiting confirmation is a
   tall pair of cards, and without this they pushed the text box and the
   Continue button below the fold — the citizen could see what needed
   answering but not the thing to answer it with. */
.attach-strip{margin:0 0 10px;max-height:min(46vh,340px);overflow-y:auto;
              overscroll-behavior:contain}
.as-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px;padding:0;list-style:none}
.as-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 4px 4px 8px;
         border:1px solid var(--line);border-radius:100px;background:var(--surface);
         font-size:10.5px;color:var(--ink)}
.as-chip svg{width:13px;height:13px;flex:none;color:var(--muted)}
.as-chip span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* A file still waiting for the citizen to check what was read out of it. */
.as-chip.is-pending{border-color:var(--warn);background:var(--warn-soft);color:var(--warn)}
.as-chip.is-pending svg{color:var(--warn)}
.as-chip button{flex:none;width:18px;height:18px;display:grid;place-items:center;border:0;
                border-radius:50%;background:transparent;color:#a8b6bb;font-size:13px;line-height:1}
.as-chip button:hover{color:var(--bad);background:var(--bad-soft)}
.as-note{margin:0 0 8px;padding:7px 9px;border-left:2px solid var(--warn);border-radius:0 var(--r-sm) var(--r-sm) 0;
         background:var(--warn-soft);font-size:10px;line-height:1.55;color:var(--warn)}

/* The one card that survives: a file was read, and nothing it says may be used
   until the citizen has looked at it. */
.ap-confirm{margin:0 0 8px;padding:11px 12px;border:1px solid var(--warn);border-radius:var(--r);
            background:var(--surface)}
.ap-confirm-head{margin:0 0 8px;font-size:10.5px;font-weight:700;color:var(--ink)}
.ap-warn{margin:0 0 8px;padding:7px 9px;border-radius:var(--r-sm);background:var(--warn-soft);
         font-size:10px;line-height:1.5;color:var(--warn)}
.ap-field{margin:0 0 8px}
.ap-field label{display:block;margin-bottom:3px;font-size:9.5px;color:var(--muted)}
.ap-field input{width:100%;min-height:32px;padding:6px 9px;border:1px solid var(--line);
                border-radius:var(--r-sm);background:var(--surface);color:var(--ink);
                font:inherit;font-size:11px}
.ap-field input:focus{outline:2px solid var(--blue);outline-offset:-1px}
/* The words the value was read from. A citizen cannot meaningfully confirm a
   number without seeing where it came from. */
.ap-field q{display:block;margin-top:3px;padding-left:7px;border-left:2px solid var(--line);
            font-size:9px;line-height:1.5;color:var(--muted);quotes:none}
.ap-confirm-actions{display:flex;flex-wrap:wrap;gap:7px}

/* Which page or slide a value was read from, so the citizen checking it
   against the paper in their hand knows where to look. */
.ap-where{display:inline-block;margin-top:3px;padding:1px 6px;border-radius:100px;
          background:var(--surface-2);font-size:8.5px;font-weight:600;
          letter-spacing:.02em;color:var(--muted)}

/* A disagreement between the document and what the citizen said. Deliberately
   NOT styled as an error: neither value is wrong, and one of them is theirs.
   The two are shown side by side at equal weight so the question reads as a
   choice rather than as a correction being urged on them. */
.ap-conflict{margin:0 0 8px;padding:11px 12px;border:1px solid #efdcac;
             border-radius:var(--r);background:var(--warn-soft)}
.ap-conflict-head{margin:0;font-size:10.5px;font-weight:700;color:#7a591b}
.ap-conflict-ask{margin:3px 0 9px;font-size:10px;line-height:1.55;color:#7a591b}
.ap-conflict-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.ap-conflict-pair > div{padding:7px 9px;border:1px solid #eedfbb;border-radius:var(--r-sm);
                        background:var(--surface);min-width:0}
.ap-conflict-pair span{display:block;margin-bottom:3px;font-size:8.5px;font-weight:600;
                       text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}
.ap-conflict-pair strong{display:block;font-size:11px;line-height:1.5;color:var(--ink);
                         font-weight:600;overflow-wrap:anywhere}
.ap-conflict-pair q{display:block;margin-top:4px;font-size:8.5px;color:var(--muted);
                    quotes:none;overflow-wrap:anywhere}
/* Two long addresses will not sit side by side on a phone. */
@media (max-width:560px){.ap-conflict-pair{grid-template-columns:1fr}}

/* One line per file while it uploads, so six photographs read as six lines
   filling in rather than one frozen composer. A refusal keeps its reason. */
.ap-progress{margin:0 0 8px;padding:0;list-style:none}
.ap-progress li{display:flex;align-items:baseline;gap:9px;padding:5px 9px;margin-bottom:4px;
                border-radius:var(--r-sm);background:var(--surface-2);font-size:10.5px}
.ap-progress li span{flex:1;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
.ap-progress li b{flex:none;font-size:9.5px;color:var(--muted)}
.ap-progress li.ok b{color:var(--ok)}
.ap-progress li.bad{background:var(--bad-soft)}
.ap-progress li.bad b{color:var(--bad)}

/* Conflicts the corpus could not settle. Above the findings, in warning
   colour: everything below is qualified by them, so an officer has to meet
   them before the answer rather than after it. */
.an-warnings{margin:0 0 12px;padding:9px 11px;border-left:2px solid var(--warn);border-radius:0 var(--r-sm) var(--r-sm) 0;background:var(--warn-soft)}
.an-warnings p{margin:0 0 6px;font-size:10px;line-height:1.55;color:var(--warn)}
.an-warnings p:last-child{margin:0}



/* Editing the petition in place. The paper stays the paper — same font, same
   measure, same margins — because a citizen checking their own letter should
   be looking at the document, not at a text box that approximates it. */
.paper.is-editing{outline:2px solid var(--blue);outline-offset:4px;
                  background:#fffefa;cursor:text}
.paper.is-editing:focus{outline-color:var(--blue)}
.edit-hint{margin:0 0 10px;padding:9px 12px;border-left:2px solid var(--blue);
           border-radius:0 var(--r-sm) var(--r-sm) 0;background:var(--blue-soft);
           font-size:10.5px;line-height:1.6;color:#0c5f63}

/* Home, generator, and the saved document collection are separate pages. */
.brand{color:inherit;text-decoration:none}
#mainContent:focus{outline:none}
header.app{gap:24px}
.main-nav{display:flex;align-items:center;gap:5px;margin-left:22px;align-self:stretch}
.main-nav a{display:flex;align-items:center;justify-content:center;position:relative;padding:9px 12px;color:var(--muted);text-decoration:none;font-size:11.5px;white-space:nowrap;border-radius:8px;transition:color var(--step),background var(--step)}
.main-nav a:hover{background:var(--surface-2);color:var(--navy)}
.main-nav a[aria-current="page"],.main-nav a.active{color:var(--blue);background:var(--blue-soft);font-weight:700}
/* The kiosk link carries an icon, because it is the one destination that is
   not simply another view of the citizen's own work — it puts the terminal
   into counter mode, and that deserves to look like a different kind of
   thing without shouting. */
.main-nav a.nav-kiosk{gap:7px}
.main-nav a.nav-kiosk svg{width:15px;height:15px;flex:none}
@media(max-width:1180px){.main-nav a.nav-kiosk svg{display:none}}
.app-page{max-width:1360px;margin:0 auto;padding:0 32px 48px}
.home-hero{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);align-items:center;gap:55px;padding:65px 22px 58px}
.home-hero-copy{max-width:700px}
.home-hero .eyebrow{font-size:10px;letter-spacing:1.9px;margin-bottom:17px}
.home-hero h2{margin:0;font-size:46px;line-height:1.23;letter-spacing:-1.9px;color:var(--navy)}
.home-description{max-width:580px;margin:21px 0 0;color:var(--muted);font-size:13.5px;line-height:1.9}
.home-capabilities{display:flex;align-items:center;flex-wrap:wrap;gap:13px 24px;margin-top:24px;color:#526e73;font-size:10.5px}
.home-capabilities>span{display:inline-flex;align-items:center;gap:7px}
.home-capabilities svg{width:15px;height:15px;color:var(--blue)}
/* Clipped: the orbit rings are rotated ellipses, and rotating an ellipse
   makes its bounding box wider than the ellipse. At narrow widths that
   box reached past the page and scrolled the whole home screen sideways
   for a decoration nobody can see the edge of. */
.home-illustration{height:310px;position:relative;display:grid;place-items:center;isolation:isolate;overflow:hidden}
.hero-orbit{position:absolute;inset:25px 0;border:1px solid #deebe8;border-radius:50%;transform:rotate(-28deg);z-index:-2}
.orbit-two{inset:0 30px;transform:rotate(24deg);background:radial-gradient(ellipse,#edf6f2 0%,transparent 68%);border-color:#e9efec}
.hero-sheet{width:198px;height:248px;border:1px solid #d3e0df;border-radius:7px}
.sheet-back{position:absolute;background:#e2efeb;transform:translate(14px,-3px) rotate(9deg);box-shadow:0 10px 24px rgb(26 66 64 / 3%)}
.sheet-front{position:relative;padding:23px;background:#fff;transform:rotate(-6deg);box-shadow:0 13px 30px rgb(26 66 64 / 7%)}
.hero-sheet-heading{display:flex;align-items:center;gap:12px;padding-bottom:15px;border-bottom:1px solid #e4ecea}
.hero-document-mark{display:grid;place-items:center;width:31px;height:35px;border-radius:7px;background:var(--navy);color:white}
.hero-document-mark svg{width:22px;height:22px}
.hero-sheet-heading>div{flex:1}
.hero-sheet-heading i{display:block;height:5px;width:80%;background:#b6ceca;border-radius:3px}
.hero-sheet-heading i+i{margin-top:7px;width:56%;height:3px;background:#dce6e3}
.hero-sheet-lines{display:grid;gap:11px;padding-top:20px}
.hero-sheet-lines i{display:block;height:4px;width:100%;border-radius:3px;background:#dfe8e6}
.hero-sheet-lines i:nth-child(3n){width:75%}
.hero-sheet-lines i:nth-child(4){background:#b7d5ce}
.hero-sheet-sign{width:76px;margin-top:18px;color:#69958b}
.hero-sheet-sign svg{width:76px;height:23px}
.hero-check{position:absolute;right:19%;top:10%;display:grid;place-items:center;width:44px;height:44px;border:5px solid var(--bg);border-radius:50%;color:#f5fbf7;background:var(--ok);box-shadow:0 3px 14px rgb(38 111 79 / 12%)}
.hero-check svg{width:21px;height:21px}
.hero-caption{position:absolute;bottom:-8px;color:#91a59f;font-size:9px;letter-spacing:.35px;text-align:center}
.home-actions{display:grid;grid-template-columns:1.1fr 1fr;gap:20px}
.home-action-card{display:flex;align-items:flex-start;gap:21px;position:relative;min-height:190px;padding:30px 32px;border:1px solid var(--line);border-radius:17px;color:var(--ink);background:#fff;text-decoration:none;box-shadow:var(--shadow);transition:transform var(--step),box-shadow var(--step),border-color var(--step)}
.home-action-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgb(19 58 64 / 8%);border-color:#b2d4ce}
.home-action-icon{flex:none;display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:var(--blue-soft);color:var(--blue)}
.home-action-icon svg{width:24px;height:24px}
.action-eyebrow{display:block;margin-bottom:6px;font-size:8px;font-weight:700;letter-spacing:1.25px;color:#8a9da2}
.home-action-card h3{margin:0;font-size:22px;line-height:1.4;letter-spacing:-.55px}
.home-action-card p{margin:10px 0 0;max-width:360px;font-size:11.5px;line-height:1.8;color:var(--muted)}
.action-arrow{flex:none;margin:auto 0 0 auto;display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;color:var(--blue)}
.action-arrow svg{width:16px;height:16px}
.create-action{background:var(--navy);border-color:var(--navy);color:white}
.create-action .home-action-icon{background:rgb(255 255 255 / 10%);color:#c4e8df;border:1px solid rgb(255 255 255 / 10%)}
.create-action .action-eyebrow{color:#a5c5c2}
.create-action p{color:#b9cecf}
.create-action .action-arrow{color:#d4eae5;border-color:rgb(255 255 255 / 23%)}
.create-action:hover{background:#204751;border-color:#204751}
.track-action{display:grid;grid-template-columns:43px minmax(0,1fr);align-content:start;min-height:190px}
.track-action:hover{transform:none}
.track-action .track-icon{background:#e9f4f0;color:#327761}
.track-card-content{min-width:0}
.track-form{display:flex;align-items:stretch;gap:8px;margin-top:14px}
.track-form input{flex:1;min-width:0;height:40px;padding:9px 11px;border:1px solid #dce6e7;border-radius:8px;background:#fbfdfc;color:var(--ink);font-size:11px;letter-spacing:.25px}
.track-form input:focus{outline:2px solid #e4f2ef;border-color:#87b7b7}
.track-form .btn{min-height:40px;flex:none;padding-inline:14px;font-size:10.5px}
.track-error{grid-column:1/-1;margin:9px 0 0!important;color:#a64239!important;font-size:10.5px!important}
.track-result{grid-column:1/-1;min-width:0;margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}
.track-result-heading{display:flex;align-items:start;justify-content:space-between;gap:12px}
.track-result-heading h4{margin:0;font-size:13px;color:var(--ink)}
.track-status{max-width:50%;padding:5px 8px;border-radius:6px;background:#edf5f2;color:#27654f;font-size:9.5px;font-weight:700;text-align:right}
.track-result-date{margin:7px 0 12px!important;font-size:9.5px!important}
.track-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;list-style:none;padding:0;margin:14px 0 18px;counter-reset:track-step}
.track-steps li{position:relative;min-width:0;padding-top:27px;color:#82929a;font-size:8px;line-height:1.45;text-align:center;counter-increment:track-step}
.track-steps li::before{content:counter(track-step);position:absolute;top:0;left:50%;display:grid;place-items:center;width:20px;height:20px;transform:translateX(-50%);border:1px solid #ccd9d8;border-radius:50%;background:#fff;color:#7d8d91;font-size:9px;font-weight:700}
.track-steps li::after{content:"";position:absolute;top:9px;left:calc(50% + 11px);width:calc(100% - 18px);height:2px;background:#dce6e4}
.track-steps li:last-child::after{display:none}
.track-steps li.complete,.track-steps li.current{color:#286247;font-weight:700}
.track-steps li.complete::before,.track-steps li.current::before{border-color:#318265;background:#318265;color:#fff}
.track-steps li.complete::after{background:#318265}
.track-details{display:grid;grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr);gap:7px 12px;margin:0;font-size:9.5px;line-height:1.55}
.track-details dt{color:var(--muted);font-weight:600}
.track-details dd{min-width:0;margin:0;color:var(--ink);overflow-wrap:anywhere}
.status-detail{color:var(--muted)}
.home-guide{display:grid;grid-template-columns:230px minmax(0,1fr);gap:55px;margin-top:52px;padding:31px 22px 5px;border-top:1px solid var(--line)}
.home-guide .eyebrow{font-size:8px;letter-spacing:1.25px;color:#88a097;margin-bottom:9px}
.home-guide h3{margin:0;color:var(--navy);font-size:20px;line-height:1.55;letter-spacing:-.4px}
.home-steps{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:35px}
.home-step-number{display:block;font-size:10px;font-weight:700;letter-spacing:.6px;color:#73a28f;margin-bottom:10px}
.home-steps h4{margin:0 0 7px;color:var(--ink);font-size:11.5px;line-height:1.6;font-weight:700}
.home-steps p{margin:0;color:var(--muted);font-size:10.5px;line-height:1.8}

/* Collection search and metadata filters. */
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:38px 0 28px}
.page-heading .eyebrow{margin-bottom:8px;font-size:9px;letter-spacing:1.5px}
.page-heading h2{margin:0;color:var(--navy);font-size:31px;line-height:1.4;letter-spacing:-.9px}
.page-heading p:last-child{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.8}
.page-heading>.btn{min-height:41px;padding:10px 16px;font-size:11px;flex:none}
.page-heading>.btn svg{width:17px;height:17px}
.petition-filters{padding:23px 24px 0;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.filter-search-row{display:flex;align-items:center;gap:22px;margin-bottom:21px}
.petition-search{position:relative;flex:1;min-width:0}
.petition-search>svg{position:absolute;left:14px;top:13px;width:18px;height:18px;color:#8aa0a7}
.petition-search input{width:100%;min-height:44px;padding:11px 16px 11px 42px;border:1px solid #dce6e7;border-radius:9px;background:#f8fafb;font-size:12px;color:var(--ink)}
.petition-search input::placeholder{color:#8c9ca4}
.petition-search input:focus{background:white;border-color:#87b7b7;outline:2px solid #e4f2ef}
.filter-sort{display:flex;align-items:center;gap:10px;flex:none}
.filter-sort label{color:#7e9199;font-size:10.5px;white-space:nowrap}
.filter-sort select{min-height:40px;width:155px;padding:9px 29px 9px 11px;font-size:10.5px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink)}
.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.filter-field{min-width:0}
.filter-field label{display:block;font-size:9.5px;color:#6c818c;margin-bottom:7px}
.filter-field input,.filter-field select{width:100%;min-width:0;min-height:39px;padding:9px 10px;font-size:10.5px;line-height:1.5;border:1px solid #dce5e7;border-radius:7px;background:white;color:var(--ink)}
.filter-field select,.filter-sort select{appearance:none;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 5 3 3 3-3' fill='none' stroke='%2381959e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;padding-right:28px;white-space:nowrap;text-overflow:ellipsis}
.filter-field input:hover,.filter-field select:hover,.filter-sort select:hover{border-color:#afc9ca}
.filter-field input:focus,.filter-field select:focus{outline:2px solid #e4f2ef;border-color:#87b7b7}
.filter-field input[type="date"]{font-variant-numeric:tabular-nums;min-width:0}
.filter-field input[type="date"]::-webkit-calendar-picker-indicator{opacity:.48;width:13px;margin:0;padding-left:0}
.filter-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:19px;padding:12px 0;border-top:1px solid var(--line-soft)}
.filter-footer p{margin:0;color:#93a2aa;font-size:9.5px}
.text-btn{min-height:28px;border:0;border-radius:5px;padding:4px 0;background:transparent;color:var(--blue);font-size:10.5px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.text-btn:hover{color:var(--navy)}
.petition-results-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 2px 16px}
.petition-results-heading h3{margin:0;color:#36525e;font-size:12px;font-weight:700}
.petition-results-heading>span{font-size:9.5px;color:#95a5ac}
.collection-state{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:45px 24px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow)}
.collection-state h3{margin:18px 0 7px;color:var(--ink);font-size:17px;line-height:1.5;letter-spacing:-.25px}
.collection-state p{max-width:410px;margin:0;color:var(--muted);font-size:11.5px;line-height:1.8}
.collection-state .btn{margin-top:22px;min-height:38px;padding:9px 16px;font-size:10.5px}
.state-icon{display:grid;place-items:center;width:57px;height:57px;border:1px solid #dfede8;border-radius:17px;background:#f0f7f4;color:#79a090}
.state-icon svg{width:28px;height:28px}
.collection-spinner{display:block;width:30px;height:30px;border:3px solid #e5efeb;border-top-color:var(--blue);border-radius:50%;animation:spin .85s linear infinite}
.collection-error .state-icon{color:#b68564;background:#fbf4eb;border-color:#f0e4d3}
.petitions-list{display:grid;gap:12px}
/* Developed by. Quiet on purpose: this is a government form, and the thing a
   citizen came for is the petition above it. */
:root{--footer-h:77px}
@media(max-width:570px){:root{--footer-h:66px}}
.site-footer{display:flex;justify-content:center;padding:12px 20px 14px;border-top:1px solid var(--line-soft);background:var(--surface)}
.built-by{display:inline-flex;align-items:center;gap:11px;padding:6px 12px;border-radius:9px;color:var(--muted);font-size:11px;letter-spacing:.2px;text-decoration:none;transition:background var(--step),color var(--step)}
.built-by:hover{background:var(--surface-2);color:var(--ink)}
.built-by:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
/* Sized by HEIGHT: the mark is a wordmark with a swoosh above it, so fixing
   the width made the footer as tall as a paragraph. */
.built-by img{height:38px;width:auto;display:block}
@media(max-width:570px){.site-footer{padding:14px 16px 18px}.built-by{font-size:9.5px;gap:8px}.built-by img{height:32px}}
/* Choosing petitions to delete.

   The tick box sits outside `.petition-item-main`, which is the element that
   opens the petition — so choosing one and opening one cannot be the same
   click. Its hit area is the full 34px square rather than the box itself,
   because a 13px target is not something to ask of somebody using this on a
   phone at a government counter. */
.petition-pick{display:grid;place-items:center;width:34px;height:34px;flex:none;margin:-4px 0;border-radius:9px;cursor:pointer}
.petition-pick:hover{background:var(--surface-2)}
.petition-pick input{width:17px;height:17px;accent-color:var(--blue);cursor:pointer}
.petition-item:has(.petition-pick input:checked){border-color:#a9cfc9;box-shadow:0 0 0 1px #a9cfc9,0 4px 13px rgb(27 56 63 / 6%);background:#fbfefd}
.petition-select-all{display:inline-flex;align-items:center;gap:8px;margin-right:auto;padding:5px 9px;border-radius:8px;color:#4c6570;font-size:10px;font-weight:700;cursor:pointer}
.petition-select-all:hover{background:var(--surface-2)}
.petition-select-all input{width:15px;height:15px;accent-color:var(--blue);cursor:pointer}
.petition-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:12px;padding:11px 16px;border:1px solid #cfe2de;border-radius:11px;background:#f1f8f6}
.selection-count{color:var(--navy);font-size:11px;font-weight:700}
.selection-spacer{flex:1}
.petition-selection .btn{min-height:34px;font-size:10px}
.petition-selection .btn svg{width:15px;height:15px}
.petition-item{display:flex;align-items:center;gap:24px;padding:22px 25px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);transition:border-color var(--step),box-shadow var(--step)}
.petition-item:hover{border-color:#bcd4d0;box-shadow:0 4px 13px rgb(27 56 63 / 5%)}
.petition-item-main{flex:1;min-width:0}
.petition-item-top{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-bottom:8px}
.petition-reference{font-size:9px;letter-spacing:.6px;color:#7d929c;font-variant-numeric:tabular-nums}
.petition-status{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border-radius:20px;background:#edf2f4;color:#6e848e;font-size:8.5px;font-weight:700;line-height:1.6}
.petition-status::before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor}
.status-ready{color:#398265;background:#edf7f0}
.status-draft,.status-collecting,.status-attachments,.status-confirming{color:#8c762f;background:#fbf6e8}
.status-generating{color:#458b93;background:#eef7f7}
.status-failed{color:#b36e5e;background:#fcf0e9}
.status-cancelled{color:#7f8589;background:#f0f2f3}
.petition-subject{margin:0;color:var(--navy);font-size:14px;line-height:1.6;letter-spacing:-.2px;font-weight:700;overflow-wrap:anywhere}
.petition-applicant{margin:5px 0 0;color:#687f89;font-size:11px;line-height:1.65;overflow-wrap:anywhere}
.petition-meta{display:flex;flex-wrap:wrap;gap:4px 0;margin-top:11px;color:#8a9ca4;font-size:9px;line-height:1.7}
.petition-meta span{display:inline-flex;align-items:center;gap:5px}
.petition-meta span+span::before{content:"";display:block;width:3px;height:3px;margin:0 10px;border-radius:50%;background:#c5d0d3}
.petition-meta svg{width:12px;height:12px}
.petition-item-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:7px;flex:none;max-width:210px}
.petition-item-actions .btn{min-height:35px;font-size:10px;padding:8px 11px}
.petition-item-actions .btn.primary{background:#ecf6f3;border-color:#d6e8e2;color:#3a7e6e}
.petition-item-actions .btn.primary:hover{background:#dff0e9;border-color:#b8dacc}
.petitions-pagination{display:flex;justify-content:center;align-items:center;gap:20px;margin-top:25px}
.petitions-pagination>span{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.petitions-pagination .btn{min-height:36px;padding:8px 14px;font-size:10px}

/* Each saved revision remains accessible beside the current document. */
.version-panel{flex:none;border-bottom:1px solid var(--line-soft);background:#fbfcfc}
.version-panel>summary{display:flex;align-items:center;gap:8px;list-style:none;padding:11px 18px;cursor:pointer;font-size:10px;color:#67828c}
.version-panel>summary::-webkit-details-marker{display:none}
.version-panel>summary:hover{background:#f0f6f4}
.version-panel>summary>svg{width:16px;height:16px;color:#7f9e99}
#versionCurrent{margin-left:auto;font-size:9px;color:#689184;background:#eaf3ee;padding:2px 7px;border-radius:5px}
#versionCurrent:empty{display:none}
.version-chevron{margin-left:5px;color:#8ba49f;transition:transform var(--step)}
.version-panel[open] .version-chevron{transform:rotate(180deg)}
.version-panel-body{max-height:230px;overflow-y:auto;padding:0 18px 13px}
.version-status{margin:0;padding:0 0 8px;font-size:10px;line-height:1.6;color:var(--muted)}
.version-status:empty{display:none}
.version-item{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid #e7efec}
.version-info{flex:1;min-width:0}
.version-info>b{display:block;font-size:10.5px;font-weight:700;color:#54756b}
.version-info>span{display:block;margin-top:3px;font-size:9px;color:#92a39a}
.version-note{margin:4px 0 0;font-size:9.5px;line-height:1.7;color:#768b82;overflow-wrap:anywhere}
.version-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px;flex:none;max-width:45%}
.version-actions .btn{padding:5px 9px;min-height:29px;font-size:9px}
.version-item.current .version-info>b::after{content:"";display:inline-block;width:5px;height:5px;margin:0 0 2px 7px;background:#70a887;border-radius:50%}

@media(max-width:1350px){
  header.app{gap:18px}.main-nav{margin-left:0;gap:2px}.main-nav a{padding-inline:10px;font-size:10.5px}.header-actions{gap:7px}.header-actions .help-btn .txt{display:none}.header-actions .help-btn{padding:8px}.brand-text h1{font-size:14px}.brand-text p{font-size:10px}
  .home-hero{gap:30px;padding-top:53px;padding-bottom:48px}.home-hero h2{font-size:41px}.home-action-card{padding:27px;gap:17px}.home-guide{grid-template-columns:205px minmax(0,1fr);gap:36px}.home-steps{gap:27px}.filter-grid{gap:10px}
}
@media(max-width:1100px){
  header.app{flex-wrap:wrap;gap:10px 22px;padding-top:13px;padding-bottom:0}.header-actions{margin-left:auto}.main-nav{order:3;width:100%;gap:4px;padding-bottom:9px}.main-nav a{min-height:33px;padding:7px 14px;font-size:11px}.header-actions .help-btn{display:inline-flex}.header-actions .help-btn .txt{display:none}
  .app-page{padding-inline:24px}.home-hero{grid-template-columns:minmax(0,1.4fr) minmax(250px,1fr);gap:22px;padding-inline:12px}.home-hero h2{font-size:35px;letter-spacing:-1.3px}.home-description{font-size:12.5px}.home-illustration{height:280px}.hero-sheet{width:177px;height:228px}.sheet-front{padding:20px}.hero-sheet-lines{gap:10px}.hero-caption{font-size:8px}.home-actions{gap:15px}.home-action-card{padding:24px;gap:15px}.home-action-card h3{font-size:19px}.home-action-card p{font-size:10.5px}.home-action-icon{width:37px;height:37px;border-radius:10px}.action-eyebrow{font-size:7px}.home-guide{grid-template-columns:170px minmax(0,1fr);gap:27px;padding-inline:10px}.home-guide h3{font-size:18px}.home-steps{gap:22px}
  .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.filter-field label{font-size:10px}.filter-field input,.filter-field select{font-size:11px}.petition-search input{font-size:11.5px}.filter-sort select{width:145px}
}
@media(max-width:820px){
  header.app{gap:8px 16px}.main-nav{gap:3px;padding-bottom:8px}.main-nav a{font-size:10.5px;min-height:32px;padding-inline:13px}.header-actions #helpBtn{display:inline-flex}
  .app-page{padding:0 18px 32px}.home-hero{grid-template-columns:minmax(0,1.35fr) minmax(185px,.8fr);padding:38px 5px 36px;gap:15px}.home-hero h2{font-size:31px;letter-spacing:-1px}.home-hero .eyebrow{font-size:8px;letter-spacing:1.4px;margin-bottom:13px}.home-description{margin-top:16px;font-size:11.5px;line-height:1.9}.home-capabilities{font-size:9px;gap:9px 17px;margin-top:19px}.home-capabilities svg{width:13px;height:13px}.home-illustration{height:250px}.hero-sheet{width:151px;height:200px}.sheet-front{padding:17px}.hero-sheet-heading{gap:8px;padding-bottom:12px}.hero-sheet-lines{padding-top:15px;gap:9px}.hero-sheet-lines i{height:3px}.hero-document-mark{width:26px;height:29px}.hero-document-mark svg{width:19px;height:19px}.hero-sheet-sign{margin-top:13px}.hero-check{width:35px;height:35px;border-width:4px;top:9%;right:10%}.hero-check svg{width:18px;height:18px}.hero-caption{font-size:7px;bottom:0}.hero-orbit{inset:30px 0}.orbit-two{inset:15px 15px}
  .home-actions{gap:13px}.home-action-card{padding:22px 20px;min-height:205px;gap:12px;flex-wrap:wrap}.home-action-icon{width:33px;height:33px}.home-action-icon svg{width:19px;height:19px}.home-action-card>div{flex:1;min-width:100px}.home-action-card h3{font-size:18px}.action-eyebrow{font-size:6.5px;letter-spacing:.85px}.home-action-card p{margin-top:8px;font-size:10px}.action-arrow{position:absolute;right:19px;bottom:18px;width:25px;height:25px}.action-arrow svg{width:14px;height:14px}.home-guide{display:block;margin-top:33px;padding:25px 5px 0}.home-guide-heading{margin-bottom:21px}.home-guide h3{font-size:18px}.home-steps{gap:25px}.home-steps h4{font-size:11px}.home-steps p{font-size:10px}
  .page-heading{padding:28px 0 22px}.page-heading h2{font-size:28px}.page-heading p:last-child{font-size:11px}.page-heading>.btn{font-size:10px;padding:9px 12px;min-height:38px}.page-heading>.btn svg{width:16px;height:16px}.petition-filters{padding:18px 18px 0}.filter-search-row{gap:14px}.filter-sort{display:block}.filter-sort label{display:none}.filter-sort select{font-size:10px;width:139px;min-height:44px}.petition-search input{font-size:10.5px;padding-left:36px}.petition-search>svg{left:12px;width:16px;height:16px}.filter-field label{font-size:9px}.filter-field input,.filter-field select{font-size:10px;min-height:38px}.filter-footer p{font-size:8.5px}.text-btn{font-size:10px}.petition-results-heading{padding-top:22px}.petition-results-heading h3{font-size:11px}.petition-results-heading>span{font-size:8.5px}.petition-item{padding:19px;gap:18px}.petition-subject{font-size:13px}.petition-reference{font-size:8px}.petition-meta{font-size:8.5px}.petition-item-actions{max-width:150px}.petition-item-actions .btn{font-size:9px}.petition-applicant{font-size:10px}
}
@media(max-width:570px){
  header.app{padding:11px 14px 0;gap:8px 10px}.brand-text h1{max-width:185px;font-size:12px}.main-nav{gap:4px;padding-bottom:8px}.main-nav a{flex:1;font-size:10px;padding:7px 9px;min-height:32px}.header-actions{gap:4px}.header-actions #helpBtn{padding:6px;min-height:33px;border:0}.header-actions #helpBtn svg{width:17px;height:17px}.header-actions #new{display:none}
  .app-page{padding-inline:16px}.home-hero{display:block;padding:31px 3px 27px}.home-hero-copy{max-width:500px}.home-hero h2{font-size:33px;letter-spacing:-1.3px}.home-hero .eyebrow{font-size:8px;letter-spacing:1.45px}.home-description{max-width:450px;font-size:11.5px;line-height:1.9;margin-top:17px}.home-capabilities{margin-top:18px;gap:10px 16px;font-size:8.5px}.home-illustration{display:none}.home-actions{grid-template-columns:minmax(0,1fr);gap:12px}.home-action-card{min-height:150px;align-items:flex-start;flex-wrap:nowrap;padding:24px 20px;gap:16px}.home-action-card>div{padding-right:8px}.home-action-icon{width:36px;height:36px}.home-action-icon svg{width:21px;height:21px}.home-action-card h3{font-size:21px}.action-eyebrow{font-size:7px;letter-spacing:1px;margin-bottom:5px}.home-action-card p{font-size:10.5px;max-width:340px;margin-top:9px}.action-arrow{right:17px;bottom:17px;width:25px;height:25px}.home-guide{margin-top:29px;padding:23px 2px 0}.home-guide h3{font-size:19px}.home-guide .eyebrow{font-size:7.5px}.home-steps{grid-template-columns:minmax(0,1fr);gap:22px}.home-steps li{position:relative;padding-left:37px}.home-step-number{position:absolute;left:0;top:1px;font-size:10px;color:#7aab96}.home-steps h4{font-size:12px;margin-bottom:5px}.home-steps p{font-size:10.5px;max-width:370px}
  .page-heading{align-items:flex-start;padding:27px 0 22px;gap:14px}.page-heading .eyebrow{font-size:7.5px;letter-spacing:1.2px;margin-bottom:7px}.page-heading h2{font-size:27px}.page-heading p:last-child{font-size:10.5px;max-width:290px;line-height:1.8}.page-heading>.btn{padding:8px 10px;min-height:34px;gap:5px;font-size:9px;max-width:126px;margin-top:14px}.page-heading>.btn svg{width:15px;height:15px}.petition-filters{padding:15px 14px 0;border-radius:12px}.filter-search-row{display:flex;flex-wrap:wrap;gap:11px;margin-bottom:17px}.petition-search{flex:1 1 100%}.petition-search input{min-height:43px;padding:11px 12px 11px 34px;font-size:11px}.petition-search>svg{top:13px;left:11px;width:16px}.filter-sort{display:flex;justify-content:space-between;width:100%;gap:12px}.filter-sort label{display:block;font-size:9.5px}.filter-sort select{min-height:33px;width:160px;font-size:10px;padding-top:7px;padding-bottom:7px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 11px}.filter-field label{font-size:9px;margin-bottom:6px}.filter-field input,.filter-field select{font-size:10px;padding:9px 9px;min-height:39px}.filter-field select{padding-right:25px;background-position:right 8px center}.filter-footer{margin-top:16px;padding:10px 0;gap:12px}.filter-footer p{font-size:8px;max-width:210px;line-height:1.7}.text-btn{font-size:9px;flex:none}.petition-results-heading{padding:22px 1px 13px;gap:10px}.petition-results-heading h3{font-size:11px}.petition-results-heading>span{font-size:8px;text-align:right}.collection-state{min-height:295px;padding:32px 22px;border-radius:12px}.collection-state h3{font-size:16px;margin-top:16px}.collection-state p{font-size:10.5px;max-width:320px}.collection-state .btn{font-size:10px;min-height:36px}.state-icon{width:50px;height:50px;border-radius:14px}.state-icon svg{width:25px;height:25px}.petition-item{display:block;padding:18px 17px;border-radius:11px}.petition-item-top{gap:7px;margin-bottom:8px}.petition-reference{font-size:8px}.petition-status{font-size:8px;padding:2px 6px}.petition-subject{font-size:13px;line-height:1.7}.petition-applicant{font-size:10px;margin-top:5px}.petition-meta{margin-top:10px;font-size:8px;gap:5px 0}.petition-meta span+span::before{margin:0 7px}.petition-item-actions{justify-content:flex-start;max-width:none;margin-top:15px;padding-top:12px;border-top:1px solid var(--line-soft);gap:7px}.petition-item-actions .btn{font-size:9px;min-height:32px;padding:7px 11px}.petitions-pagination{gap:14px;margin-top:20px}.petitions-pagination .btn{font-size:9px;min-height:33px}.petitions-pagination>span{font-size:9px}
  .version-panel>summary{padding:11px 13px;font-size:9px;gap:6px}#versionCurrent{font-size:8px}.version-panel-body{padding:0 13px 11px;max-height:250px}.version-item{align-items:flex-start;gap:8px}.version-info>b{font-size:10px}.version-info>span{font-size:8px}.version-note{font-size:8.5px}.version-actions{max-width:43%;justify-content:flex-end}.version-actions .btn{font-size:8px;padding:5px 7px;min-height:28px}
}
@media(max-width:360px){.brand-text h1{font-size:10.5px;max-width:155px}.header-actions #helpBtn{display:none}.home-hero h2{font-size:29px}.home-hero .eyebrow{font-size:7px}.home-capabilities{font-size:8px;gap:9px}.home-action-card{gap:12px;padding:23px 16px}.home-action-card h3{font-size:20px}.home-action-card p{font-size:10px}.action-eyebrow{font-size:6.5px}.home-action-icon{width:31px;height:31px}.page-heading>.btn{font-size:8px;max-width:109px}.petition-search input{font-size:10px}.filter-footer p{max-width:170px}}


/* The whole row opens the petition. It looked clickable before it was. */
.petition-item-main[role="button"]{cursor:pointer;border-radius:var(--r-sm)}
.petition-item-main[role="button"]:focus-visible{outline:3px solid #5db1b5;outline-offset:3px}

/* The package-or-letter choice, beside the downloads. Only rendered when
   something is attached, so it never appears as a control that does nothing. */
.doc-package{display:inline-flex;align-items:center;gap:7px;margin-left:auto;
             padding:0 4px;font-size:10.5px;color:var(--muted);cursor:pointer;
             user-select:none;white-space:nowrap}
.doc-package input{width:14px;height:14px;accent-color:var(--navy);cursor:pointer}
@media (max-width:820px){.doc-package{margin-left:0;width:100%}}

/* Officer entry remains a visible secondary action on every citizen page. */
.officer-login-link{text-decoration:none;color:var(--ink)}
@media(max-width:700px){header.app .header-actions{flex-wrap:wrap}.officer-login-link{font-size:11px;padding:7px 9px}}

/* Manual voice typing lives entirely beside the existing composer. */
#micInline{color:var(--blue)}
/* THE MICROPHONE HAS TO BE FOUND BEFORE IT CAN BE USED.
   Reported from real feedback: citizens were not noticing it was there. A
   19px outline in the corner of a text box reads as decoration next to a
   filled Send button, so people typed because they did not know they could
   speak.
   It glows now, and keeps glowing gently until it is used. In the service's
   own teal rather than the neon of the reference — this sits on a government
   form, beside an emblem, and a gaming-console mic would undercut the thing
   it is trying to make trustworthy. The brightness is the point, not the
   palette. */
#micInline{position:relative;overflow:visible}
#micInline:not(:disabled):not(.dictating){
  color:var(--blue);
  /* FILLED, not an outline. A halo alone was still a thin teal mark on white
     sitting next to a solid Send button — the eye goes to the filled thing.
     A tinted disc gives it a body to be seen at a glance; the glow then says
     it is offering something rather than merely existing. */
  background:var(--blue-soft);
  /* A defined edge. The tint alone is nearly white, so on a white composer
     the control still had no outline of its own to be seen by. */
  box-shadow:inset 0 0 0 1.5px rgb(8 126 131 / 45%);
  animation:mic-halo 2.8s ease-in-out infinite;
}
@keyframes mic-halo{
  0%,100%{box-shadow:inset 0 0 0 2px rgb(8 126 131 / 60%),0 0 0 2px rgb(8 126 131 / 22%),0 0 14px 3px rgb(8 126 131 / 55%)}
  50%{box-shadow:inset 0 0 0 2px rgb(8 126 131 / 95%),0 0 0 9px rgb(8 126 131 / 16%),0 0 34px 11px rgb(8 126 131 / 95%)}
}
/* A ring that travels outward, so the glow reads as ALIVE rather than as a
   coloured border. One ring idle, two while listening. */
#micInline::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  border:2.5px solid rgb(8 126 131 / 85%);opacity:0;
}
#micInline:not(:disabled):not(.dictating)::after{animation:mic-ring 2.8s ease-out infinite}
@keyframes mic-ring{
  0%{transform:scale(.9);opacity:.95}
  70%{transform:scale(1.85);opacity:0}
  100%{transform:scale(1.85);opacity:0}
}
#micInline:hover:not(:disabled){box-shadow:0 0 0 4px rgb(8 126 131 / 10%),0 0 18px 4px rgb(8 126 131 / 45%)}

/* LISTENING. Louder than the resting glow, and red, because stopping matters
   more than starting once it is running. */
#micInline.dictating{color:var(--bad);background:var(--bad-soft);border-color:#e6bbb6;animation:mic-live 1.15s ease-in-out infinite}
@keyframes mic-live{
  0%,100%{box-shadow:inset 0 0 0 2px rgb(182 64 58 / 70%),0 0 0 3px rgb(182 64 58 / 24%),0 0 16px 4px rgb(182 64 58 / 60%)}
  50%{box-shadow:inset 0 0 0 2px rgb(182 64 58 / 100%),0 0 0 11px rgb(182 64 58 / 14%),0 0 38px 13px rgb(182 64 58 / 100%)}
}
#micInline.dictating::after{border-color:rgb(182 64 58 / 95%);animation:mic-ring 1.15s ease-out infinite}
#micInline.dictating::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  border:2.5px solid rgb(182 64 58 / 75%);
  animation:mic-ring 1.15s ease-out .55s infinite;
}

/* Anyone who has asked for less motion gets the glow, standing still. It is
   still far brighter than the outline it replaced. */
@media(prefers-reduced-motion:reduce){
  #micInline:not(:disabled):not(.dictating){animation:none;box-shadow:0 0 0 4px rgb(8 126 131 / 9%),0 0 14px 2px rgb(8 126 131 / 38%)}
  #micInline.dictating{animation:none;box-shadow:0 0 0 5px rgb(182 64 58 / 10%),0 0 18px 4px rgb(182 64 58 / 55%)}
  #micInline::after,#micInline::before{animation:none;opacity:0}
}
/* The mark grows while it is listening. At 19px the only thing telling a
   citizen that dictation is running was a colour change, which is easy to
   miss on a phone held at arm's length and invisible to anyone who does not
   distinguish red from grey. Size is the one cue that does not depend on
   colour. Nothing else about the button moves: the button keeps its box, so
   the composer does not reflow when dictation starts. */
#micInline svg{transition:width var(--step),height var(--step)}
/* A BOLDER MARK. The mic is drawn at 1.7px, which at 19px renders as a thin
   pale outline however saturated the colour is — the stroke is simply too
   fine to carry it. Thickening it is what actually makes the icon read,
   rather than adding yet more glow around a faint drawing. */
#micInline svg [stroke]{stroke-width:2.2}
#micInline.dictating svg [stroke]{stroke-width:2}
#micInline.dictating svg{width:25px;height:25px}
#micInline:disabled{opacity:.45;cursor:not-allowed}
.dictation-status{margin:7px 2px 0;font-size:11px;color:var(--muted);line-height:1.5}
.dictation-status:empty{display:none}

/* SAY IT AGAIN. A speaker beside what the assistant said, so a citizen who
   missed the question — or cannot read it — can hear it as many times as
   they like without anything else happening. Inline at the end of the text
   rather than floated in a corner: it belongs to that message, and a
   floating control over a wrapped Tamil sentence covers the last word of
   it. */
.bubble .say-again{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;margin:-2px 0 -6px 8px;padding:0;
  vertical-align:middle;border:1px solid var(--line);border-radius:8px;
  background:white;color:var(--accent);cursor:pointer;
  transition:background var(--step),color var(--step),border-color var(--step)}
.bubble .say-again svg{width:15px;height:15px}
.bubble .say-again:hover{background:var(--accent-soft,#e7f2f1);border-color:var(--accent)}
.bubble .say-again:active{transform:translateY(1px)}
.turn.citizen .bubble .say-again{display:none}

/* Reading the document out. The button says Stop while it runs, so the one
   control both starts and ends it — the same shape as the microphone. */
#readBtn.reading{color:var(--bad);border-color:#e6bbb6;background:var(--bad-soft)}

@media (prefers-reduced-motion: reduce){
  .bubble .say-again{transition:none}
}

/* Why a disagreement about the name has nothing to press beside it. The
   petition keeps what the citizen typed; a name read off a scan is not
   reliable enough to replace it. */
.ap-conflict-note{
  margin:8px 0 0;padding:8px 10px;border-radius:8px;
  background:var(--surface-2);border:1px solid var(--line);
  font-size:11.5px;line-height:1.6;color:var(--muted)}

/* Admin feature switches. The admin portal (/admin → Features) can turn
   each of these off; the fetch at the bottom of app.js marks the body
   with a corresponding class, and the rules below hide the UI pieces
   the flag covers. Fail-open on the fetch means a network error leaves
   everything visible. */
body.feature-off-citizen_voice_dictation #mic,
body.feature-off-citizen_voice_dictation #micInline { display: none !important; }
body.feature-off-citizen_multi_language #lang,
body.feature-off-citizen_multi_language .lang-switcher { display: none !important; }
body.feature-off-citizen_attachments #attachBtn,
body.feature-off-citizen_attachments .attach-row { display: none !important; }
