/* Tokens from plcmanjp.github.io/assets/home-base.css @ 7f20b2e52c037ccf9ec0705f1c28e6974e00c7aa.
   Load after each calculator's layout CSS. The homepage remains the design source. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --paper: #faf9f6; --bg: #faf9f6; --surface: #ffffff;
  --ink: #202321; --text: #202321; --muted: #626861; --line: #dedfd9;
  --accent: #b94a24; --primary: #b94a24; --acc2: #b94a24;
  --soft: #f0f1ec; --surface-2: #f0f1ec; --surface2: #f0f1ec;
  --primary-soft: #faf3ed; --chip: #faf3ed; --focus: #a23c18;
  --header: #faf9f6; --readout: #f0f1ec; --on-primary: #ffffff;
  --danger: #b42318; --error: #b42318; --dangerSoft: #fce9e7;
  --good: #267347; --good-soft: #e9f3ec; --warn: #8a5b11; --warn-soft: #fbf1d9;
  --signal: #416c68; --signal-soft: #eaf1ee;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #181a19; --bg: #181a19; --surface: #202321;
  --ink: #f3f3ed; --text: #f3f3ed; --muted: #b6bdb4; --line: #3c423c;
  --accent: #f3a17e; --primary: #f3a17e; --acc2: #f3a17e;
  --soft: #222623; --surface-2: #222623; --surface2: #222623;
  --primary-soft: #3b2b24; --chip: #3b2b24; --focus: #f3a17e;
  --header: #181a19; --readout: #222623; --on-primary: #181a19;
  --danger: #ffaaa0; --error: #ffaaa0; --dangerSoft: #402724;
  --good: #91d3a9; --good-soft: #233b2c; --warn: #e6c170; --warn-soft: #3b3220;
  --signal: #9bc8be; --signal-soft: #233834;
}
body { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
/* Keep unit suffixes outside the editable/placeholder text area. */
label.f .iwrap input { padding-inline-end: 3.5em; }
h1, h2, h3 { letter-spacing: -.035em; }
.topbar { background: var(--header); }
.themebtn { min-height: 44px; min-width: 82px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; }
.themebtn:hover { color: var(--ink); background: var(--soft); }
.themebtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.widthseg button[aria-pressed="true"], .seg-toggle button[aria-pressed="true"],
.zone.output .seg-toggle button[aria-pressed="true"], .ref-toggle button[aria-pressed="true"],
.seg3 button[aria-pressed="true"], .seg button[aria-pressed="true"], .bit[aria-pressed="true"],
.keybtn.eq, .modal-card button, .runbtn { color: var(--on-primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
.device, .app, .card, .panel, .result, .result-card { box-shadow: none; }
.device, .app { border-color: var(--line); }
dialog { color: var(--ink); background: var(--surface); border-color: var(--line); }
::selection { background: #efd1b8; color: #202321; }
