:root {
  color-scheme: dark;
  --ink: #e3ede5; --muted: #aabbb1; --paper: #111a17; --line: #35483e;
  --surface: #19251f; --soft: #223229; --status: #22392d; --status-line: #3a5442;
  --accent: #bad8b7; --on-accent: #152d22; --date-line: #57745e;
  --hover: #293c31; --focus: #c4e4ae; --shadow: #0006;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #173c34; --muted: #536760; --paper: #f6f5ef; --line: #d9dfd5;
  --surface: #fffef9; --soft: #eef0e8; --status: #e7ecdf; --status-line: #d4dec9;
  --accent: #173c34; --on-accent: #fff; --date-line: #b9cbb6;
  --hover: #e7ecdf; --focus: #35604c; --shadow: #173c3420;
}
* { box-sizing: border-box; }
.login-card { max-width: 470px; margin: 60px auto; padding: 32px; }
.login-card h1 { font-size: 38px; }
.login-card label { display: block; margin-bottom: 6px; }
.login-card input:not([type="hidden"]) { width: 100%; padding: 12px; border-radius: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.login-card button { width: 100%; }
.login-card .errorlist { padding-left: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 "Segoe UI", sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.topbar, main, footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 0 19.5px; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; text-decoration: none; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: 28px; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.environment { font-size: 12px; color: var(--muted); padding: 5px 12px; border: 1px solid var(--line); border-radius: 20px; }
.environment span { color: var(--accent); padding-right: 5px; }
.options { position: relative; }
.options summary { display: flex; align-items: center; gap: 16px; list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font-size: 13px; min-height: 44px; }
.options summary::-webkit-details-marker { display: none; }
.options summary:hover, .options[open] summary { background: var(--hover); }
.options-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px var(--shadow); z-index: 5; }
.options-panel button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; border: 0; border-radius: 7px; padding: 10px 12px; background: transparent; text-align: left; font-size: 14px; }
.options-panel button:hover { background: var(--hover); }
.options-panel p { padding: 0 10px; font-size: 12px; }
.settings-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 80px var(--shadow); }
.settings-dialog::backdrop { background: #0009; }
.settings-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.settings-header h2 { font: 400 30px/1.2 Georgia, serif; margin: 0; }
.close-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 25px; }
.close-button:hover { background: var(--hover); }
.display-setting { border: 0; padding: 0; margin: 0; min-width: 0; }
.display-setting legend { font-size: 16px; font-weight: 600; padding: 0; }
.display-setting p { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.theme-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.theme-choice { padding: 10px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.theme-choice:hover { background: var(--hover); }
.theme-choice:has(input:checked) { border-color: var(--accent); }
.theme-preview { display: grid; gap: 6px; height: 84px; padding: 12px; border-radius: 6px; border: 1px solid #708071; }
.preview-dark { background: #111a17; }
.preview-light { background: #f6f5ef; }
.theme-preview span { border-radius: 3px; }
.preview-dark span { background: #35483e; }
.preview-light span { background: #d9dfd5; }
.theme-preview span:first-child { width: 45%; background: #789777; }
.choice-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.choice-caption input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0 2px 0 0; }
.choice-caption small { color: var(--muted); font-size: 10px; margin-left: auto; }
.display-feedback { min-height: 1.6em; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
main { padding-top: 50px; }
.eyebrow, .number { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin: 12px 0 38px; }
h1 { font: 400 clamp(38px, 5vw, 64px)/1.08 Georgia, serif; letter-spacing: -1.8px; margin: 0 0 20px; }
.lede { font-size: 18px; color: var(--muted); margin: 0; }
.date-card { border-left: 2px solid var(--date-line); padding: 10px 0 10px 24px; min-width: 205px; }
.date-card span, .date-card strong, .date-card small { display: block; }
.date-card span, .date-card small { color: var(--muted); font-size: 12px; }
.date-card strong { font-size: 22px; margin: 5px 0; font-weight: 500; }
.status { background: var(--status); border: 1px solid var(--status-line); border-radius: 18px; padding: 25px 28px; display: flex; align-items: center; gap: 22px; }
.status-icon { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border-radius: 50%; font-size: 23px; }
h2 { line-height: 1.3; }
.status h2 { margin: 4px 0; font-size: 24px; font-weight: 500; }
.status p { margin: 0; color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 27px; }
.number { color: var(--muted); font-size: 10px; }
.card h2 { font: 400 24px/1.2 Georgia, serif; margin: 20px 0 10px; }
.card p { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.tag { margin-top: auto; align-self: flex-start; font-size: 10px; font-weight: 600; padding: 4px 9px; border-radius: 5px; background: var(--soft); }
.workbook { padding: 27px 0; font-size: 13px; }
.workbook p { margin: 3px 0 0; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 20px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; gap: 12px; }
@media (max-width: 680px) {
  .topbar, main, footer { width: calc(100% - 36px); }
  .topbar { padding: 18px 0 13.5px; flex-wrap: wrap; }
  .brand { font-size: 20px; }
  .environment { font-size: 10px; }
  .header-actions { gap: 10px; }
  .settings-dialog { padding: 22px; }
  main { padding-top: 32px; }
  .intro { flex-direction: column; align-items: stretch; gap: 24px; margin-bottom: 26px; }
  .date-card { padding: 0 0 0 16px; }
  .date-card strong { font-size: 18px; margin: 0; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 24px; }
  .status { padding: 22px 18px; gap: 14px; align-items: flex-start; }
  .status h2 { font-size: 20px; }
  .status-icon { width: 30px; height: 30px; font-size: 18px; }
  .desktop-break { display: none; }
}
@media (max-width: 480px) {
  .header-actions { width: 100%; justify-content: space-between; }
}
.chat-setting-link { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.chat-setting-link h3 { font-size: 16px; }
.chat-setting-link p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.navigation-row { width: min(1120px, calc(100% - 64px)); margin-inline: auto; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.navigation-row .main-nav { width: auto; margin: 0; flex: 1; min-width: 0; }
.navigation-row .options { flex: 0 0 auto; }
.navigation-row .options summary { border: 0; border-radius: 0; background: transparent; padding: 9px 0 9px 14px; }
.navigation-row .options summary:hover, .navigation-row .options[open] summary { background: transparent; color: var(--accent); }
@media (max-width: 680px) { .navigation-row { width: calc(100% - 36px); gap: 8px; align-items: flex-start; } }
