:root {
  color-scheme: light;
  --canvas: #fff;
  --rail: #f7f6f3;
  --ink: #262521;
  --secondary: #56534e;
  --muted: #6d6962;
  --line: #e2dfd9;
  --accent: #ad4120;
  --accent-hover: #8b3016;
  --wash: #f5e9df;
  --display: "Franklin Gothic Medium", "Avenir Next", system-ui, sans-serif;
  --body: Candara, Calibri, "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 70px);
  --column: 720px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { height: 100vh; height: 100dvh; margin: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); color: var(--ink); font: 16px/1.5 var(--body); }
button, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button { background: none; border: 0; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, fieldset, legend { margin: 0; padding: 0; }
fieldset { min-width: 0; border: 0; }
ul, ol { list-style: none; }
.symbols { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { display: inline-block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sr-only, .site-option input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip { position: fixed; z-index: 3; top: 8px; left: 8px; padding: 8px 16px; background: var(--canvas); transform: translateY(-160%); }
.skip:focus { transform: none; }
.topbar { display: flex; align-items: center; gap: 16px; flex: none; min-height: 64px; padding: 0 clamp(16px, 2.4vw, 36px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font: 700 22px/1 var(--display); letter-spacing: -.055em; }
.tools { margin-left: auto; display: flex; gap: clamp(12px, 2vw, 28px); }
.tools a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; text-decoration: none; color: var(--secondary); }
.tools a:hover { color: var(--ink); text-decoration: underline; }
.tools .icon { width: 15px; height: 15px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 6px; }
.icon-button:hover { background: var(--rail); }
#open-menu { display: none; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(220px, 20vw, 278px) minmax(0, 1fr); }
#rail { min-height: 0; background: var(--rail); border-right: 1px solid var(--line); }
#rail-content { display: flex; flex-direction: column; gap: 29px; height: 100%; overflow-y: auto; padding: 24px 16px 14px; scrollbar-width: thin; }
legend, .rail-label { font: 650 13px/1.4 var(--body); color: var(--secondary); }
legend, #rail-content nav .rail-label { margin: 0 8px 9px; }
#sites { display: grid; gap: 4px; }
.site-option { position: relative; cursor: pointer; }
.site-face { display: flex; align-items: center; gap: 10px; padding: 9px 11px; min-height: 55px; border-radius: 7px; }
.site-option:hover .site-face, .history-item:hover { background: #eae8e4; }
.site-option input:checked + .site-face { background: var(--wash); }
.site-option input:focus-visible + .site-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-icon { width: 20px; height: 20px; color: var(--secondary); }
.site-option input:checked + .site-face .site-icon, .selected-mark { color: var(--accent); }
.site-text { min-width: 0; display: grid; line-height: 1.35; }
.site-name { font-weight: 650; overflow-wrap: anywhere; }
.site-host { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.selected-mark { width: 15px; margin-left: auto; visibility: hidden; }
.site-option input:checked + .site-face .selected-mark { visibility: visible; }
.site-visibility { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-inline: 11px; color: var(--secondary); font-size: 14px; cursor: pointer; }
.site-visibility input { appearance: none; display: grid; align-items: center; flex: none; width: 32px; height: 18px; margin: 0; padding: 2px; border: 1px solid var(--muted); border-radius: 9px; background: var(--canvas); cursor: inherit; }
.site-visibility input::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.site-visibility input:checked { border-color: var(--accent); background: var(--accent); }
.site-visibility input:checked::before { justify-self: end; background: var(--canvas); }
@media (forced-colors: active) {
  .site-visibility input { appearance: auto; }
  .site-visibility input::before { content: none; }
}
#history, #previous-chats { min-height: 70px; overflow-y: auto; scrollbar-width: thin; }
.history-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 39px; padding: 6px 8px; text-align: left; border-radius: 5px; color: var(--secondary); font-size: 14px; }
.history-item .icon { width: 14px; height: 14px; color: var(--muted); }
.history-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#site-meta { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.model-details summary { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 37px; font-weight: 600; color: var(--secondary); }
.model-details .icon { width: 15px; height: 15px; }
.model-details .chevron { width: 12px; }
.model-details[open] .chevron { transform: rotate(90deg); }
#chat-prompts { font-size: 13px; padding-inline: 8px; }
#chat-prompts .example { font-size: 14px; }
.model-details code { display: block; margin: 3px 0 6px; color: var(--ink); font: 12px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; }
#coverage { font-variant-numeric: tabular-nums; }
main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px clamp(16px, 3vw, 42px); min-height: 62px; border-bottom: 1px solid var(--line); }
.chat-header h1 { margin-inline-end: auto; font: 650 18px/1.2 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
#new-chat { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-weight: 600; }
#new-chat:hover { background: var(--rail); }
#new-chat .icon { width: 16px; height: 16px; }
.versions { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 60%; border-radius: 7px; background: var(--rail); }
.version-tab { min-height: 30px; padding: 3px 10px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; color: var(--muted); }
.version-tab[aria-pressed="true"] { color: var(--ink); font-weight: 650; border-color: var(--line); background: var(--canvas); box-shadow: 0 1px 3px #261c130d; }
.version-tab:hover { color: var(--ink); }
.version-tab small { margin-left: 5px; font-size: 11px; font-weight: 400; }
.chat-column { width: min(var(--column), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
#transcript { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 20px; }
#transcript:focus-visible { outline-offset: -3px; }
.welcome { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 100%; padding-block: clamp(26px, 6vh, 66px); }
.welcome-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px 12px 12px 3px; background: var(--wash); color: var(--accent); }
.welcome-mark .icon { width: 24px; height: 24px; }
.welcome h2 { margin-top: 19px; font: 650 clamp(28px, 3.6vw, 43px)/1.13 var(--display); letter-spacing: -.045em; text-wrap: balance; }
#intro { margin-top: 9px; color: var(--secondary); text-wrap: pretty; }
#examples { width: min(100%, 555px); margin-top: 27px; }
#examples .rail-label { margin-bottom: 7px; }
#example-list { border-top: 1px solid var(--line); }
.example { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; text-align: left; padding: 9px 2px; font-size: 15px; line-height: 1.45; border-bottom: 1px solid var(--line); }
.example .icon { width: 15px; height: 15px; color: var(--muted); }
.example:hover, .example:hover .icon { color: var(--accent); }
#thread { display: grid; gap: 34px; padding-block: 28px 30px; }
.turn, .reply, .source-card { min-width: 0; overflow-wrap: anywhere; }
.turn { display: grid; gap: 18px; }
.user-turn { display: grid; justify-items: end; gap: 5px; }
.speaker { color: var(--secondary); font-size: 12px; font-weight: 650; }
.user-message { max-width: 86%; padding: 10px 15px; border-radius: 13px 13px 3px 13px; background: #f0eeea; line-height: 1.5; white-space: pre-wrap; }
.assistant-label { display: flex; gap: 7px; align-items: center; margin-bottom: 8px; color: var(--ink); }
.turn-version { color: var(--muted); font-weight: 400; padding-left: 7px; border-left: 1px solid var(--line); }
.reply-note { margin: 0 0 10px; color: var(--secondary); }
.source-card { --source-ink: var(--ink); --source-accent: var(--accent); --source-line: var(--line); --masthead: var(--rail); --mast-ink: var(--secondary); --source-face: var(--body); border: 1px solid var(--source-line); border-radius: 10px; overflow: hidden; background: #fff; color: var(--source-ink); font-family: var(--source-face); box-shadow: 0 1px 3px #29251e0a, 0 6px 18px -14px #29251e40; }
.source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 21px; color: var(--mast-ink); background: var(--masthead); border-bottom: 1px solid var(--source-line); }
.source-identity { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.source-identity .icon { width: 17px; height: 17px; }
.source-logo { width: 18px; height: 18px; object-fit: contain; }
.source-kind { font-size: 12px; }
.source-body { padding: clamp(16px, 2vw, 23px); }
.source-title { font: 700 clamp(21px, 2vw, 27px)/1.24 var(--source-face); letter-spacing: -.026em; text-wrap: pretty; }
.parent-page, .source-translation, .state-copy { font-size: 14px; color: var(--secondary); }
.parent-page { margin-bottom: 6px; }
.parent-page a { color: var(--source-accent); }
.parent-page .icon, .alternative .icon { width: 12px; height: 12px; margin-left: 3px; vertical-align: -.05em; }
.source-translation, .state-copy { margin-top: 6px; }
.extract-label { margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
.extract-text { margin: 10px 0 0; line-height: 1.6; white-space: pre-line; }
.extract-label + .extract-text { margin-top: 3px; }
.source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; }
.source-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 13px; border-radius: 5px; color: #fff; background: var(--source-accent); border: 1px solid var(--source-accent); text-decoration: none; font: 600 14px/1.35 var(--source-face); }
.source-link .icon { width: 14px; height: 14px; }
.source-link:hover { background: white; color: var(--source-accent); }
.host-note { color: var(--muted); font: 13px/1.5 var(--body); }
p.host-note { margin-top: 6px; }
.read-more, .retry { color: var(--source-accent, var(--accent)); padding: 0; min-height: 36px; text-decoration: underline; text-underline-offset: .2em; font-size: 14px; }
.read-more:hover, .retry:hover { text-decoration-thickness: 2px; }
/* Scoped adaptations of MeitY's default Innerbaner and Saama's custom.css.
   The source cards work offline and do not import a site's global styles. */
.source-card[data-site="meity"] { --source-ink: #150202; --source-accent: #454754; --source-line: #d5d6dc; --masthead: #22242a; --mast-ink: #fff; --source-face: "Noto Sans", Arial, sans-serif; }
.source-card[data-site="saama"] { --source-ink: #111; --source-accent: #0a3be7; --source-line: #e8e8e8; --masthead: #fff; --mast-ink: #111; --source-face: "General Sans", "Helvetica Neue", Arial, sans-serif; }
.source-card[data-site="saama"] .source-logo { width: 77px; height: 26px; }
.source-card[data-site="saama"] .source-link { border-radius: 100px; padding-inline: 20px; font-weight: 500; }
.alternative { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; margin-top: 9px; color: var(--secondary); font-size: 14px; }
.alternative > span:first-child { color: var(--muted); font-size: 13px; }
.loading { display: flex; align-items: center; gap: 9px; min-height: 38px; color: var(--secondary); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.message-error { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }
.composer-dock { padding: 12px 0 max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--canvas); }
.composer { display: flex; align-items: end; gap: 8px; padding: 7px; border: 1px solid #c6c1b8; border-radius: 12px; box-shadow: 0 2px 6px #29251e08; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #ad412014; }
textarea { flex: 1; min-width: 0; min-height: 44px; max-height: min(160px, 25dvh); padding: 10px 8px; border: 0; background: transparent; resize: none; line-height: 24px; }
textarea:focus { outline: none; }
textarea::placeholder { color: var(--muted); opacity: 1; }
.send { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 13px; border-radius: 7px; color: #fff; background: var(--accent); font-size: 15px; font-weight: 650; }
.send:hover { background: var(--accent-hover); }
.send:disabled { color: #766f68; background: #eeebe6; cursor: default; }
.send .icon { width: 16px; height: 16px; }
#voice { flex: none; color: var(--secondary); }
#voice:disabled, #voice[aria-disabled="true"] { opacity: .5; cursor: default; }
#voice.recording { color: var(--accent); background: var(--wash); }
.voice-feedback { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; color: var(--secondary); font-size: 13px; }
#voice-status:not(:empty) { padding-top: 5px; }
.voice-feedback button, .voice-feedback a { min-height: 24px; padding: 2px 0; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.voice-feedback:has(#voice-status:not(:empty)) + .key-hint { display: none; }
.key-hint { margin: 5px 2px 0; font-size: 12px; color: var(--muted); }
.key-hint span { padding-inline: 3px; }
.muted { color: var(--muted); font-size: 14px; }
#drawer { position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; width: min(305px, 88vw); max-width: none; height: 100%; height: 100dvh; max-height: none; border: 0; background: var(--rail); color: var(--ink); }
#drawer[open] { display: flex; flex-direction: column; }
#drawer::backdrop { background: #1a17133d; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px 5px 22px; border-bottom: 1px solid var(--line); }
.drawer-top h2 { font: 650 17px var(--display); }
#drawer #rail-content { flex: 1; min-height: 0; }
@media (max-width: 760px) {
  :root { --gutter: clamp(15px, 4vw, 26px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  #rail { display: none; }
  #open-menu { display: inline-grid; margin-left: -8px; }
  .topbar { gap: 9px; min-height: 52px; }
  .chat-header { min-height: 54px; padding-block: 5px; }
  .brand { font-size: 21px; gap: 7px; }
  .brand img { width: 26px; height: 26px; }
  .welcome { padding-block: 24px; }
  #thread { gap: 26px; padding-block: 18px; }
  .turn { gap: 13px; }
  .source-head { padding: 8px 16px; }
  .composer-dock { padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (max-width: 540px) {
  .tools .icon, .key-hint, .send span { display: none; }
  .tools { gap: 12px; }
  .tools a { font-size: 13px; }
  .send { min-width: 44px; padding: 8px; }
  .user-message { max-width: 94%; }
}
@media (pointer: coarse) {
  .key-hint { display: none; }
  .voice-feedback button, .voice-feedback a { min-height: 44px; }
  .version-tab, .history-item, .source-link, .read-more, .retry, .model-details summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
