/* One palette; components select a surface and semantic foreground roles. */
:root {
  --paper: #f6f5ef;
  --panel: #fffefa;
  --panel-soft: #f0f2e9;
  --field: #fafbf6;
  --ink: #193b32;
  --ink-muted: #52664c;
  --forest: #183c32;
  --forest-hover: #28523e;
  --on-forest: #f0f5e7;
  --on-forest-muted: #b5c6a6;
  --border-light: #7b8c70;
  --divider-light: #d8ded0;
  --divider-dark: #52674a;
  --focus-light: #193b32;
  --focus-dark: #e7efda;
  --error-light: #9f3831;
  --error-dark: #ffc0b8;
  --warning-light: #77511c;
  --warning-dark: #e1d3a5;
  --selection: #d4e2c1;
  --selection-ink: #294b30;
  --selection-marker: #637f4d;
  --surface: var(--paper);
  --fg: var(--ink);
  --fg-muted: var(--ink-muted);
  --control-border: var(--border-light);
  --line: var(--divider-light);
  --focus: var(--focus-light);
  --fg-error: var(--error-light);
  --fg-warning: var(--warning-light);
}

/* A small text link, with an invisible touch target and a local language menu. */
.language-switch{display:inline-flex;flex-shrink:0;align-items:center;position:relative;color:var(--ink-muted)}
.language-switch .language-trigger{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 8px;border:0;border-radius:0;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;font-weight:500;line-height:18px;letter-spacing:.03em;cursor:pointer}
.language-switch .language-trigger:hover,.language-switch .language-trigger[aria-expanded=true]{color:var(--ink);background:transparent}
.language-trigger:hover .language-current,.language-trigger[aria-expanded=true] .language-current{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.language-switch .language-menu{position:fixed;z-index:100;width:148px;margin:0;padding:4px;border:1px solid var(--divider-light);border-radius:10px;background:var(--panel);color:var(--ink);box-shadow:0 6px 20px rgba(25,59,50,.12);overflow:auto;box-sizing:border-box}
.language-switch .language-menu[hidden]{display:none!important}
.language-switch .language-option{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;margin:0;padding:0 10px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:500;line-height:18px;text-align:left;cursor:pointer}
.language-option .language-check{width:16px;flex:none;text-align:right;visibility:hidden}
.language-option[aria-checked=true] .language-check{visibility:visible}
.language-switch .language-option:hover,.language-switch .language-option:focus-visible{background:var(--panel-soft)}
.language-switch button:focus-visible{outline:2px solid var(--focus-light);outline-offset:3px}
.language-switch .language-option:focus-visible{outline-offset:-2px}
dialog>.language-switch{margin-top:20px}.modal-header .language-switch{margin-left:auto}.modal-header{flex-wrap:wrap;gap:12px}.header nav{flex-wrap:wrap}.next-top{flex-wrap:wrap;gap:12px}.locale-choice{max-width:620px;margin:15vh auto;padding:24px;text-align:center}.locale-choice a{display:inline-block;padding:14px 24px;margin:8px;color:#173c32;border:1px solid #173c32;border-radius:8px;font-size:18px}.locale-choice h1{font-size:28px}
@media(max-width:540px){.next-top #profile-context{order:3;flex:1 1 180px}.next-top .language-switch{order:4}.header{align-items:flex-start}.header nav{justify-content:flex-end;gap:8px}.header nav .language-switch{margin-left:auto}.modal-header .language-switch{order:3;margin:0}.draw-parts label{overflow-wrap:normal}}
