/* ---------- from v2: tokens, fonts, shared widget styles (sky, search, door, calc, pad, md) --- */

@font-face {
  font-family: "HDS Sans";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "HDS Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --hds-sans: "HDS Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hds-mono: "HDS Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  
  --hds-bg: #111110;
  --hds-panel: #1a1a18;
  --hds-panel-edge: rgba(255, 255, 255, 0.06);
  --hds-well: #232321;
  --hds-key: #242422;
  --hds-key-hover: #2b2b29;
  --hds-key-top: rgba(255, 255, 255, 0.07);
  --hds-key-dark: #0d0d0c;
  --hds-key-dark-ink: #d9d6cf;
  --hds-ink: #e4e1d9;
  --hds-ink-2: #a6a298;
  --hds-ink-3: #767269;
  --hds-line: rgba(255, 255, 255, 0.075);
  --hds-line-2: rgba(255, 255, 255, 0.15);
  --hds-accent: #f06d38;
  --hds-accent-ink: #f08c63;
  --hds-accent-soft: rgba(240, 109, 56, 0.14);
  --hds-lcd: #0a0e0c;
  --hds-lcd-ink: #97e8c8;
  --hds-lcd-ink-2: rgba(151, 232, 200, 0.5);
  --hds-lcd-glow: 0 0 8px rgba(151, 232, 200, 0.22);
  --hds-paper: #1f1f1c;
  --hds-rule: rgba(255, 255, 255, 0.05);
  --hds-good: #4fa65a;
  --hds-bad: #d4574a;
  --hds-warn: #e2aa3f;
  --hds-idle: #5f5c55;
  --hds-spark: #6f6c64;
  --hds-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -18px rgba(0, 0, 0, 0.8);
  --hds-key-shadow: 0 1px 0 var(--hds-key-top) inset, 0 1px 1px rgba(0, 0, 0, 0.5), 0 3px 6px -2px rgba(0, 0, 0, 0.45);
  --hds-radius: 20px;
}
:root[data-theme="hds-ivory"] {
  color-scheme: light;
  --hds-bg: #e7e4dc;
  --hds-panel: #f4f2ec;
  --hds-panel-edge: rgba(255, 255, 255, 0.9);
  --hds-well: #e9e6de;
  --hds-key: #fbfaf7;
  --hds-key-hover: #ffffff;
  --hds-key-top: rgba(255, 255, 255, 1);
  --hds-key-dark: #2a2926;
  --hds-key-dark-ink: #f1efe9;
  --hds-ink: #262420;
  --hds-ink-2: #58554e;
  --hds-ink-3: #8a867c;
  --hds-line: rgba(28, 27, 25, 0.1);
  --hds-line-2: rgba(28, 27, 25, 0.2);
  --hds-accent: #e0531f;
  --hds-accent-ink: #b8400f;
  --hds-accent-soft: rgba(224, 83, 31, 0.12);
  --hds-lcd: #c9cdb8;
  --hds-lcd-ink: #1e2419;
  --hds-lcd-ink-2: rgba(30, 36, 25, 0.5);
  --hds-lcd-glow: none;
  --hds-paper: #fbfaf6;
  --hds-rule: rgba(62, 104, 160, 0.13);
  --hds-idle: #b3aea3;
  --hds-spark: #aaa598;
  --hds-good: #2f8a3c;
  --hds-bad: #c0463b;
  --hds-warn: #c38a1d;
  --hds-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 1px 2px rgba(40, 36, 28, 0.06), 0 14px 30px -20px rgba(40, 36, 28, 0.45);
  --hds-key-shadow: 0 1px 0 var(--hds-key-top) inset, 0 1px 1px rgba(40, 36, 28, 0.12), 0 3px 7px -3px rgba(40, 36, 28, 0.28);
}
:root[data-theme="hds-graphite"] {
  color-scheme: dark;
}
.hds {
  font-family: var(--hds-sans);
  color: var(--hds-ink);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.hds *, .hds *::before, .hds *::after { box-sizing: border-box; }
:where(.hds) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hds button:focus-visible,
.hds [tabindex]:focus-visible { outline: 2px solid var(--hds-accent); outline-offset: 2px; }
.hds .num { font-variant-numeric: tabular-nums; }
.hds-led {
  flex: none;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hds-idle);
  box-shadow: 0 0 0 2px var(--hds-panel);
}
.hds-led[data-s="up"] { background: var(--hds-good); box-shadow: 0 0 0 2px var(--hds-panel), 0 0 8px rgba(12, 163, 12, 0.55); }
.hds-led[data-s="down"] { background: var(--hds-bad); box-shadow: 0 0 0 2px var(--hds-panel), 0 0 8px rgba(208, 59, 59, 0.6); }
.hds-led[data-s="wait"] { animation: hds-pulse 1.1s ease-in-out infinite; }
@keyframes hds-pulse { 50% { opacity: 0.35; } }
.hds-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--hds-line);
  background: var(--hds-well);
  color: var(--hds-ink-2);
  font-family: var(--hds-mono);
  font-size: 11.5px;
  white-space: nowrap;
}
.hds-chip b { color: var(--hds-ink); font-weight: 560; }
.hds-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--hds-ink-3);
  transition: background 0.15s, color 0.15s;
}
.hds-iconbtn:hover { background: var(--hds-well); color: var(--hds-ink); }
.hds-iconbtn svg { width: 15px; height: 15px; }
.hds-label {
  font-family: var(--hds-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--hds-ink-3);
}
.hds-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1000;
  transform: translate(-50%, 16px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--hds-ink);
  color: var(--hds-panel);
  font-family: var(--hds-sans);
  font-size: 13px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.hds-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.hds-toast button { font: inherit; color: var(--hds-accent); background: none; border: 0; font-weight: 600; cursor: pointer; }
.hds-pad { display: grid; gap: 8px; }
.hds-pad__bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.hds-pad__meta {
  min-width: 0;
  padding: 0 4px;
  font-family: var(--hds-mono);
  font-size: 10.5px;
  color: var(--hds-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hds-tabs .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0; margin-left: 5px; }
.hds-tabs button { display: inline-flex; align-items: center; }
.hds-tabs button.has-text .dot { opacity: 0.6; }
.hds-pad__area {
  display: block;
  width: 100%;
  min-height: 236px;
  resize: vertical;
  margin: 0;
  padding: 3px 14px 12px 40px;
  border-radius: 14px;
  border: 1px solid var(--hds-line);
  outline: none;
  color: var(--hds-ink);
  font-family: var(--hds-sans);
  font-size: 14.5px;
  line-height: 26px;
  background-color: var(--hds-paper);
  background-image:
    linear-gradient(90deg, transparent 29px, var(--hds-accent-soft) 29px, var(--hds-accent-soft) 30.5px, transparent 30.5px),
    linear-gradient(transparent 25px, var(--hds-rule) 25px);
  background-size: 100% 100%, 100% 26px;
  background-attachment: local;
  background-position: 0 0, 0 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  caret-color: var(--hds-accent);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hds-pad__area::placeholder { color: var(--hds-ink-3); }
.hds-pad__area:focus { border-color: var(--hds-line-2); box-shadow: 0 0 0 3px var(--hds-accent-soft); }
@media (prefers-reduced-motion: reduce) {
  .hds-led[data-s="wait"] { animation: none; }
}
.hds-sky {
  --sky-a: #93c7ee;
  --sky-b: #e1eff7;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  padding: 18px 16px 14px;
  overflow: hidden;
}
.hds-sky__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 34%, transparent 62%);
  opacity: 0.34;
}
:root[data-theme="hds-graphite"] .hds-sky__bg { opacity: 0.2; }
.hds-sky::after { 
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: 124px;
  height: 88px;
  background: radial-gradient(circle, var(--hds-line-2) 1.3px, transparent 1.6px) 0 0 / 9px 9px;
  -webkit-mask: linear-gradient(225deg, #000 22%, transparent 76%);
  mask: linear-gradient(225deg, #000 22%, transparent 76%);
  pointer-events: none;
}
.hds-sky__stars { position: absolute; inset: 0 0 45% 0; z-index: -1; opacity: 0; transition: opacity 3s; }
.hds-sky.is-night .hds-sky__stars { opacity: 0.85; }
.hds-sky__stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
  animation: hds-twinkle 4.8s ease-in-out infinite;
}
@keyframes hds-twinkle { 50% { opacity: 0.2; } }
.hds-sky__clouds { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 3s; pointer-events: none; }
.hds-sky.is-cloudy .hds-sky__clouds { opacity: 1; }
.hds-sky__clouds i {
  position: absolute;
  top: 8%;
  left: 38%;
  width: 220px;
  height: 64px;
  border-radius: 64px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.5), transparent);
  filter: blur(4px);
  animation: hds-cloud 80s linear infinite alternate;
}
.hds-sky__clouds i + i { top: 22%; left: 8%; width: 160px; animation-duration: 110s; animation-delay: -30s; }
@keyframes hds-cloud { to { transform: translateX(120px); } }
.hds-sky__grid {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 16px;
  align-items: center;
}
.hds-sky .hds-clock { grid-area: clock; width: 96px; height: 96px; }
.hds-sky__hello { grid-area: hello; min-width: 0; padding-right: 34px; }
.hds-sky__greet {
  display: block;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 22px;
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: start;
  color: var(--hds-ink);
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: opacity 0.26s ease, transform 0.26s ease;
}
.hds-sky__greet.is-out { opacity: 0; transform: translateY(-5px); }
.hds-sky__lang { margin-top: 3px; font-size: 11.5px; color: var(--hds-ink-3); }
.hds-sky__date { margin-top: 9px; font-size: 13.5px; color: var(--hds-ink-2); }
.hds-sky__time { margin-top: 1px; font-size: 12px; color: var(--hds-ink-3); }
.hds-sky__now {
  grid-area: now;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hds-panel) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--hds-line);
}
.hds-sky__nowtext { min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--hds-ink-2); }
.hds-sky__nowtext span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hds-sky__nowtext span + span { color: var(--hds-ink-3); font-size: 12px; }
.hds-sky__loc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 38vw;
  height: 30px;
  padding: 0 7px 0 10px;
  border-radius: 9px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  font: inherit;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--hds-ink);
  cursor: pointer;
}
.hds-sky__loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hds-sky__loc svg { flex: none; width: 14px; height: 14px; color: var(--hds-ink-3); transition: transform 0.2s; }
.hds-sky__loc[aria-expanded="true"] svg { transform: rotate(180deg); }
.hds-sky__pickrow { display: flex; gap: 6px; }
.hds-sky__pickrow .hds-chip svg { width: 14px; height: 14px; }
.hds-sky__results { display: grid; gap: 4px; }
.hds-sky__results button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--hds-ink);
  cursor: pointer;
}
.hds-sky__results button b { font-weight: 580; }
.hds-sky__results button span { font-size: 12px; color: var(--hds-ink-3); text-align: right; }
.hds-sky__none { margin: 2px 2px 0; font-size: 12.5px; color: var(--hds-ink-3); }
.hds-sky__hours {
  grid-area: hours;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46px;
  gap: 4px;
  margin: 0 -16px;
  padding: 2px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.hds-sky__hours::-webkit-scrollbar { display: none; }
.hds-hour { display: grid; justify-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 11px; scroll-snap-align: start; }
.hds-hour:first-child { background: color-mix(in srgb, var(--hds-key) 85%, transparent); box-shadow: inset 0 0 0 1px var(--hds-line); }
.hds-hour__t { font-size: 11px; color: var(--hds-ink-3); }
.hds-hour__i svg, .hds-day__i svg { display: block; width: 20px; height: 20px; }
.hds-hour__i .sun, .hds-day__i .sun, .hds-wx__icon .sun { color: var(--hds-accent); }
.hds-hour__temp { font-size: 13px; font-weight: 600; }
.hds-hour__rain, .hds-day__rain { min-height: 12px; font-size: 10px; color: var(--hds-ink-3); }
.hds-sky__days { grid-area: days; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding-top: 2px; border-top: 1px dashed var(--hds-line-2); }
.hds-day { display: grid; justify-items: center; gap: 3px; padding: 8px 0 2px; }
.hds-day__d { font-size: 11px; color: var(--hds-ink-3); }
.hds-day:first-child .hds-day__d { color: var(--hds-ink); font-weight: 600; }
.hds-day__hi { font-size: 12.5px; font-weight: 600; }
.hds-day__lo { font-size: 12px; color: var(--hds-ink-3); }
.hds-day__bar { position: relative; width: 4px; height: 26px; border-radius: 2px; background: var(--hds-well); box-shadow: inset 0 0 0 1px var(--hds-line); }
.hds-day__bar i { position: absolute; left: 0; right: 0; border-radius: 2px; background: var(--hds-ink-2); }
.hds-sky__sun { grid-area: sun; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.hds-sky__sunlabel { font-size: 11px; color: var(--hds-ink-3); white-space: nowrap; }
.hds-sky__sunlabel b { font-weight: 600; color: var(--hds-ink-2); }
.hds-sky__arcwrap { position: relative; height: 32px; }
.hds-sky__arc { display: block; width: 100%; height: 100%; overflow: visible; }
.hds-sky__arc .track { fill: none; stroke: var(--hds-line-2); stroke-width: 1.5; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.hds-sky__arc .horizon { stroke: var(--hds-line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hds-sky__orb {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--hds-accent);
  box-shadow: 0 0 0 3px var(--hds-accent-soft), 0 0 16px var(--hds-accent);
}
.hds-sky__orb.is-moon { background: var(--hds-ink-3); box-shadow: 0 0 0 3px var(--hds-line); }
.hds-sky__sunnote { grid-column: 1 / -1; margin-top: -2px; text-align: center; font-size: 11.5px; color: var(--hds-ink-3); }
@container (min-width: 560px) {
  .hds-sky__grid { gap: 12px 26px; }
  .hds-sky .hds-clock { width: 136px; height: 136px; }
  .hds-sky__greet { font-size: 29px; }
  .hds-sky__hours { margin: 0; padding: 2px 0; grid-auto-columns: minmax(46px, 1fr); }
  .hds-sky__loc { max-width: 220px; }
}
@media (min-width: 600px) {
  .hds-sky { padding: 22px 22px 16px; }
}
.hds-search { display: grid; gap: 10px; }
.hds-search__box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--hds-line);
  background: var(--hds-paper);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hds-search__box:focus-within { border-color: var(--hds-line-2); box-shadow: 0 0 0 3px var(--hds-accent-soft); }
.hds-search__box > svg { flex: none; width: 17px; height: 17px; color: var(--hds-ink-3); }
.hds-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  color: var(--hds-ink);
}
.hds-search__input::placeholder { color: var(--hds-ink-3); }
.hds-search__engines { display: flex; flex-wrap: wrap; gap: 6px; }
.hds-search__engines button {
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  font: inherit;
  font-size: 12.5px;
  color: var(--hds-ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hds-search__engines button:hover { color: var(--hds-ink); border-color: var(--hds-line-2); }
.hds-search__engines button[aria-pressed="true"] { background: var(--hds-key-dark); color: var(--hds-key-dark-ink); border-color: transparent; }
.hds-search__suggest { display: grid; gap: 4px; }
.hds-search__suggest[hidden] { display: none; }
.hds-search__suggest button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--hds-ink);
  cursor: pointer;
}
.hds-search__suggest button[aria-selected="true"] { border-color: var(--hds-line-2); box-shadow: 0 0 0 2px var(--hds-accent-soft); }
.hds-search__suggest img { width: 18px; height: 18px; object-fit: contain; }
.hds-search__suggest small { margin-left: auto; font-size: 11px; color: var(--hds-ink-3); }
.hds-search__hint { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--hds-ink-3); }
.hds-door {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 9, 0);
  transition: background 0.2s ease, -webkit-backdrop-filter 0.2s ease, backdrop-filter 0.2s ease;
  font-family: var(--hds-sans);
}
.hds-door[hidden] { display: none; }
.hds-door.is-open { background: rgba(10, 10, 9, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hds-door__box {
  width: min(340px, 100%);
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--hds-line);
  background: var(--hds-panel);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.hds-door.is-open .hds-door__box { opacity: 1; transform: none; }
.hds-door__form { display: flex; align-items: center; gap: 12px; margin: 0; }
.hds-door__word {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--hds-lcd);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  color: var(--hds-lcd-ink);
  font-family: var(--hds-mono);
  font-size: 20px;
  letter-spacing: 0.28em;
  caret-color: var(--hds-accent);
  outline: none;
}
.hds-door__word:focus { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), 0 0 0 3px var(--hds-accent-soft); }
.hds-door__turn {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--hds-accent);
  color: #fff;
  box-shadow: var(--hds-key-shadow);
  cursor: pointer;
  transition: transform 0.52s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.hds-door__turn svg { width: 20px; height: 20px; }
.hds-door__turn:focus-visible { outline: 2px solid var(--hds-accent); outline-offset: 3px; }
.hds-door__box.is-turning .hds-door__turn { transform: rotate(90deg); }
.hds-calc { display: grid; gap: 8px; }
.hds-calc__screen {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  background: var(--hds-lcd);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.14), 0 1px 0 var(--hds-panel-edge);
  cursor: text;
}
.hds-calc__lines { flex: 1; min-width: 0; display: grid; gap: 0; }
.hds-calc__in {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--hds-mono);
  font-size: 16px;
  color: var(--hds-lcd-ink);
  caret-color: var(--hds-accent);
}
.hds-calc__in::placeholder { color: var(--hds-lcd-ink-2); }
.hds-calc__out {
  justify-self: end;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--hds-mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--hds-lcd-ink);
  text-shadow: var(--hds-lcd-glow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: copy;
}
.hds-calc__out.is-empty { font-size: 13px; line-height: 1.9; letter-spacing: 0.04em; color: var(--hds-lcd-ink-2); text-shadow: none; cursor: default; }
.hds-calc__out.is-stale { opacity: 0.5; }
.hds-calc__back {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--hds-lcd-ink);
  cursor: pointer;
  touch-action: manipulation;
}
.hds-calc__back svg { width: 19px; height: 19px; }
.hds-calc__bar { display: grid; grid-template-columns: repeat(5, 40px) minmax(0, 1fr); gap: 6px; align-items: center; }
.hds-calc__op {
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--hds-key-dark);
  color: var(--hds-key-dark-ink);
  box-shadow: var(--hds-key-shadow);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.06s ease;
}
.hds-calc__op.is-clear { background: var(--hds-well); color: var(--hds-ink-2); font-family: var(--hds-mono); font-size: 12.5px; font-weight: 600; }
.hds-calc__op:active { transform: translateY(1px) scale(0.96); }
.hds-calc__conv {
  min-width: 0;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  font: inherit;
  color: var(--hds-ink);
  text-align: right;
  overflow: hidden;
  cursor: pointer;
}
.hds-calc__pair { font-size: 10.5px; line-height: 1.2; color: var(--hds-ink-3); white-space: nowrap; }
.hds-calc__conv b { max-width: 100%; font-size: 13.5px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hds-calc__conv[aria-expanded="true"] { border-color: var(--hds-line-2); box-shadow: 0 0 0 2px var(--hds-accent-soft); }
.hds-calc__panel { display: grid; gap: 9px; padding: 10px; border-radius: 14px; background: var(--hds-well); box-shadow: inset 0 0 0 1px var(--hds-line); }
.hds-calc__panel[hidden] { display: none; }
.hds-seg.hds-calc__modes { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hds-calc__modes::-webkit-scrollbar { display: none; }
.hds-calc__modes button { flex: none; }
.hds-calc__units { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.hds-calc__sel {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--hds-line);
  background: var(--hds-key);
  color: var(--hds-ink);
  font: inherit;
  font-size: 14px;
}
.hds-calc__rate { margin: 0; font-size: 12px; color: var(--hds-ink-3); }
.hds-calc__hist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hds-calc__hist .hds-chip { cursor: pointer; }
.hds-calc__none { font-size: 12px; color: var(--hds-ink-3); }
.hds-pad__paper {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--hds-line);
  background: var(--hds-paper);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hds-pad__paper:focus-within { border-color: var(--hds-line-2); box-shadow: 0 0 0 3px var(--hds-accent-soft); }
.hds-pad__paper .hds-pad__area,
.hds-pad__paper .hds-pad__area:focus { border: 0; border-radius: 0; box-shadow: none; }
.hds-pad__area[hidden], .hds-pad__view[hidden] { display: none; }
.hds-pad__view { min-height: 220px; padding: 12px 16px 16px; cursor: text; outline: none; }
.hds-pad__empty { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--hds-ink-3); }
.hds-pad__meta { padding: 0 4px; }
.hds-md { font-size: 14.5px; line-height: 1.6; color: var(--hds-ink); overflow-wrap: anywhere; }
.hds-md > :first-child { margin-top: 0; }
.hds-md > :last-child { margin-bottom: 0; }
.hds-md h1, .hds-md h2, .hds-md h3, .hds-md h4, .hds-md h5, .hds-md h6 { margin: 1em 0 0.35em; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.hds-md h1 { font-size: 20px; }
.hds-md h2 { font-size: 17px; }
.hds-md h3 { font-size: 15px; }
.hds-md h4, .hds-md h5, .hds-md h6 { font-size: 14px; color: var(--hds-ink-2); }
.hds-md p { margin: 0.5em 0; }
.hds-md a { color: var(--hds-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.hds-md ul, .hds-md ol { margin: 0.4em 0; padding-left: 1.35em; }
.hds-md li { margin: 0.15em 0; }
.hds-md li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.35em; }
.hds-md input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 17px;
  height: 17px;
  margin: 0 9px 0 0;
  vertical-align: -3px;
  border-radius: 5px;
  border: 1.5px solid var(--hds-line-2);
  background: var(--hds-key);
  cursor: pointer;
}
.hds-md input[type="checkbox"]:checked { background: var(--hds-accent); border-color: var(--hds-accent); }
.hds-md input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.hds-md li:has(> input[type="checkbox"]:checked) { color: var(--hds-ink-3); text-decoration: line-through; text-decoration-color: var(--hds-line-2); }
.hds-md code { font-family: var(--hds-mono); font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--hds-well); }
.hds-md pre { margin: 0.6em 0; padding: 10px 12px; border-radius: 10px; background: var(--hds-well); overflow-x: auto; }
.hds-md pre code { padding: 0; background: none; font-size: 12.5px; line-height: 1.5; }
.hds-md blockquote { margin: 0.6em 0; padding: 2px 12px; border-left: 3px solid var(--hds-line-2); color: var(--hds-ink-2); }
.hds-md hr { margin: 1em 0; border: 0; border-top: 1px dashed var(--hds-line-2); }
.hds-md table { display: block; max-width: 100%; margin: 0.6em 0; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.hds-md th, .hds-md td { padding: 5px 9px; border: 1px solid var(--hds-line); text-align: left; }
.hds-md th { background: var(--hds-well); font-weight: 600; }
.hds-md img { max-width: 100%; border-radius: 8px; }
.hds-md.is-plain { white-space: pre-wrap; }
.hds-moon { display: block; width: 40px; height: 40px; }
.hds-moon .dark { fill: #2a2926; stroke: var(--hds-line-2); stroke-width: 0.6; }
.hds-moon .lit { fill: #efe9d6; }
@media (prefers-reduced-motion: reduce) {
  .hds-sky__stars i, .hds-sky__clouds i { animation: none; }
}
.hds-clock .face { fill: var(--hds-key-dark); }
.hds-clock .rim { fill: none; stroke: var(--hds-line-2); stroke-width: 1; }
.hds-clock .tick { stroke: rgba(241, 239, 233, 0.45); stroke-width: 1.2; stroke-linecap: round; }
.hds-clock .tick.major { stroke: #f1efe9; stroke-width: 2.4; }
.hds-clock .hand { stroke: #f1efe9; stroke-linecap: round; }
.hds-clock .hand.h { stroke-width: 4.2; }
.hds-clock .hand.m { stroke-width: 3; }
.hds-clock .hand.s { stroke: var(--hds-accent); stroke-width: 1.4; }
.hds-clock .hub { fill: var(--hds-accent); }
.hds-clock .hub2 { fill: var(--hds-key-dark); }
.hds-clock { width: 144px; height: 144px; }
.hds-seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--hds-well);
  box-shadow: 0 0 0 1px var(--hds-line) inset;
}
.hds-seg button {
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-family: var(--hds-mono);
  font-size: 11px;
  color: var(--hds-ink-3);
}
.hds-seg button[aria-pressed="true"] { background: var(--hds-key); color: var(--hds-ink); box-shadow: var(--hds-key-shadow); }
button.hds-chip { cursor: pointer; }
button.hds-chip:hover { border-color: var(--hds-line-2); color: var(--hds-ink); }
.hds-wx__icon { flex: none; width: 32px; height: 32px; color: var(--hds-ink); }
.hds-wx__icon svg { display: block; width: 100%; height: 100%; }
.hds-wx__temp { font-size: 26px; font-weight: 560; letter-spacing: -0.03em; line-height: 1; }
.hds-door, .hds-door * { box-sizing: border-box; }
.hds-door__word { width: 100%; }

/* ---------- app shell: header, pages you tap between, the dock ------------ */

[hidden] { display: none !important; }
html { height: 100%; background: var(--hds-bg); }
body.app {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--hds-bg);
  color: var(--hds-ink);
}

/* everything but the overlays lives in one frame, so the drawer can push it
   aside. Only transform and opacity ever animate (the compositor's job): the
   rounded corners and the shadow switch on at once, while the frame still
   fills the screen, and stay until it's back */
.frame {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--hds-bg);
  transform-origin: 100% 50%;
  transition: transform 0.44s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.is-drawer .frame,
body.is-drawer-out .frame,
body.is-drawer-pull .frame { border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.5); will-change: transform; }
/* nothing inside breathes while it's pushed aside: the slide gets every frame */
body.is-drawer .frame *, body.is-drawer .frame *::before, body.is-drawer .frame *::after,
body.is-drawer-out .frame *, body.is-drawer-out .frame *::before, body.is-drawer-out .frame *::after,
body.is-drawer-pull .frame *, body.is-drawer-pull .frame *::before, body.is-drawer-pull .frame *::after { animation-play-state: paused !important; }
.frame__scrim {
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: inherit;
  background: rgba(10, 10, 9, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.44s;
}

.top {
  position: relative;
  z-index: 5;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
}
.top__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top__brand b { display: block; font-size: 15px; font-weight: 620; letter-spacing: -0.012em; line-height: 1.2; }
.top__sub { display: block; font-family: var(--hds-mono); font-size: 10.5px; color: var(--hds-ink-3); transition: color 0.3s; }
body.is-vault .top__sub { color: var(--hds-accent-ink); }
.top__mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--hds-key-dark);
  box-shadow: var(--hds-key-shadow);
}
.top__mark::after { /* a small ember that breathes */
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--hds-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hds-accent) 18%, transparent);
  animation: hds-breathe 6s ease-in-out infinite;
}
@keyframes hds-breathe { 50% { transform: scale(0.84); opacity: 0.8; } }
.top__tools { display: flex; align-items: center; gap: 6px; }
.top__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--hds-ink-2);
  transition: background 0.15s, color 0.15s;
}
.top__btn:hover { background: var(--hds-well); color: var(--hds-ink); }
.top__btn svg { width: 18px; height: 18px; }
.top__marks { color: var(--hds-ink); }
body.is-drawer .top__marks { background: var(--hds-well); }
.top__key { background: var(--hds-key); box-shadow: var(--hds-key-shadow); }
.top__key.is-open { background: var(--hds-accent); color: #fff; }
.top__key.is-open:hover { background: var(--hds-accent); color: #fff; filter: brightness(1.06); }
body.is-vault-loading .top__key { animation: hds-pulse 0.9s ease-in-out infinite; }
.top__timer {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--hds-well);
  font-family: var(--hds-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--hds-ink-2);
}
.top__timer.is-soon { color: var(--hds-bad); }
/* the vault's pages are on their way: a thin light runs under the header */
.top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hds-accent), transparent) no-repeat;
  background-size: 40% 100%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
body.is-vault-loading .top::after { opacity: 1; animation: hds-load 0.9s linear infinite; }
@keyframes hds-load { from { background-position: -70% 0; } to { background-position: 170% 0; } }

.pager { position: relative; flex: 1; min-height: 0; overflow: hidden; transition: opacity 0.5s ease; }
.pager__track {
  display: flex;
  height: 100%;
  transition: transform 0.46s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.17s ease;
  will-change: transform;
}
.pager__track.is-instant { transition: opacity 0.17s ease; }
.pager.is-jumping .pager__track { opacity: 0; }
.pager.is-scrub .pager__track { transition-duration: 0.22s, 0.17s; }
.page {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--hds-line-2) transparent;
  touch-action: pan-y pinch-zoom; /* sideways is the page's own: a swipe turns it */
}
/* Chrome hands sideways pans back to anything that scrolls (a list, a text
   box), so everything on a page and in the drawer says pan-y as well; only
   the strips that really scroll sideways keep both directions */
.page *:not(input):not(textarea):not(select),
.drawer__panel *:not(input) { touch-action: pan-y pinch-zoom; }
.page .hds-sky__hours, .page .hds-sky__hours *,
.page .hds-calc__modes, .page .hds-calc__modes *,
.page .hds-md pre, .page .hds-md pre *, .page .hds-md table, .page .hds-md table * { touch-action: pan-x pan-y pinch-zoom; }
/* a finger is on the pages: they follow it exactly, no easing in between */
.pager.is-dragging .pager__track,
.pager.is-dragging .page { transition: none; }
.page__inner {
  display: grid;
  gap: 14px;
  align-content: start;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left));
}
.page__inner--desk { max-width: 1080px; }
body.app:not(.is-ready) .pager,
body.app:not(.is-ready) .dock { opacity: 0; }

/* a page's own title row, when its cards share one subject */
.phead { padding: 8px 4px 0; }
.phead h1 { margin: 0; font-size: 21px; font-weight: 640; letter-spacing: -0.02em; line-height: 1.15; }
.phead p { margin: 5px 0 0; font-size: 12.5px; color: var(--hds-ink-3); }

.dock {
  position: relative;
  z-index: 5;
  flex: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 6px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  transition: opacity 0.5s ease;
}
.dock__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  color: var(--hds-ink);
  touch-action: manipulation;
  transition: opacity 0.2s, transform 0.08s, background 0.2s;
}
.dock__arrow:active { transform: scale(0.94); }
.dock__arrow:disabled { opacity: 0.3; background: transparent; box-shadow: none; cursor: default; }
.dock__arrow svg { width: 20px; height: 20px; }
/* the middle is a scrubber: hold and slide */
.dock__mid {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 0;
  border-radius: 16px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: background 0.2s;
}
.dock.is-scrubbing .dock__mid { background: var(--hds-well); box-shadow: inset 0 0 0 1px var(--hds-line); }
.dock__title { font-size: 12.5px; font-weight: 600; color: var(--hds-ink-2); transition: color 0.3s; }
.dock__title.is-vault { color: var(--hds-accent-ink); }
.dock__dots { display: flex; align-items: center; }
.dock__dot { position: relative; display: grid; place-items: center; min-width: 22px; height: 24px; padding: 0 2px; touch-action: none; }
.dock__dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--hds-line-2);
  transition: width 0.28s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.25s, transform 0.2s;
}
.dock__dot:hover::after { background: var(--hds-ink-3); }
.dock__dot[aria-selected="true"]::after { width: 20px; background: var(--hds-ink); }
.dock__dot.is-vault::after { background: color-mix(in srgb, var(--hds-accent) 40%, transparent); }
.dock__dot.is-vault[aria-selected="true"]::after { background: var(--hds-accent); }
.dock__dot.is-first-vault { margin-left: 9px; }
.dock__dot.is-first-vault::before { content: ""; position: absolute; left: -5px; top: 7px; bottom: 7px; width: 1.5px; border-radius: 1px; background: var(--hds-line-2); }
.dock__dot.is-vault { animation: hds-pop 0.42s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.dock__dot.is-vault:nth-last-child(2) { animation-delay: 0.06s; }
.dock__dot.is-vault:nth-last-child(1) { animation-delay: 0.12s; }
.dock.is-scrubbing .dock__dot::after { transform: scale(1.3); }
@keyframes hds-pop { from { transform: scale(0); opacity: 0; } }
.dock__bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  padding: 7px 13px;
  border-radius: 12px;
  background: var(--hds-ink);
  color: var(--hds-panel);
  font-size: 13.5px;
  font-weight: 620;
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.92);
  transition: opacity 0.15s, transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
  pointer-events: none;
}
.dock__bubble.is-vault { background: var(--hds-accent); color: #fff; }
.dock.is-scrubbing .dock__bubble { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- cards --------------------------------------------------------- */

.card {
  position: relative;
  min-width: 0;
  border-radius: var(--hds-radius);
  background: var(--hds-panel);
  box-shadow: var(--hds-shadow), 0 0 0 1px var(--hds-line);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 14px 0 20px; }
.card__head h2 { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.card__tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card__body { padding: 14px 18px 18px; }
.card--sky > .card__body { padding: 18px 16px 14px; border-radius: inherit; }
.card--search > .card__body { padding: 14px; }
@media (min-width: 600px) { .card--sky > .card__body { padding: 22px 22px 16px; } }

/* ---------- quote: floats at the foot of Home, no card of its own ---------- */

.hds-quote {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 4px;
  padding: 2px 8px 16px;
  text-align: center;
  animation: hds-float 8s ease-in-out infinite;
}
.hds-quote::after { /* its shadow on the page, shrinking as it rises */
  content: "";
  position: absolute;
  left: 32%;
  right: 32%;
  bottom: 0;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.16), transparent);
  animation: hds-float-shadow 8s ease-in-out infinite;
}
:root[data-theme="hds-graphite"] .hds-quote::after { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); }
@keyframes hds-float { 50% { transform: translateY(-4px); } }
@keyframes hds-float-shadow { 50% { transform: translateY(4px) scaleX(0.82); opacity: 0.55; } }
.hds-quote__mark {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 20px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: var(--hds-accent);
}
.hds-quote__mark::before,
.hds-quote__mark::after { content: ""; flex: 1; height: 1px; margin-top: -8px; background: linear-gradient(90deg, transparent, var(--hds-line-2)); }
.hds-quote__mark::after { background: linear-gradient(270deg, transparent, var(--hds-line-2)); }
.hds-quote__fig {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 104px;
  max-width: 32em;
  margin: 0;
  padding: 4px 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.hds-quote.is-out .hds-quote__fig { opacity: 0; filter: blur(3px); }
.hds-quote__fig:focus-visible { outline: 2px solid var(--hds-accent); outline-offset: 2px; }
.hds-quote__text { margin: 0; font-size: 15.5px; font-weight: 460; line-height: 1.45; letter-spacing: -0.008em; color: var(--hds-ink-2); text-wrap: balance; }
.hds-quote__who { margin: 0; font-size: 12px; color: var(--hds-ink-3); }
.hds-quote__who::before { content: "— "; }
@media (min-width: 600px) { .hds-quote__text { font-size: 17px; } .hds-quote__fig { min-height: 92px; } }

/* ---------- sky: one height, whatever the greeting says; a clock you notice */

.hds-sky__grid { grid-template-areas: "clock hello" "now now" "hours hours" "days days" "sun sun" "alm alm"; }
.hds-sky .hds-clock { width: 132px; height: 132px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28)); }
.hds-sky__hello { padding-right: 0; }
.hds-sky__greetbox { --greet-max: 19px; display: flex; align-items: flex-end; height: calc(var(--greet-max) * 2.3); overflow: hidden; }
.hds-sky__greet { font-size: var(--greet-max); font-weight: 600; }
.hds-sky__lang, .hds-sky__date, .hds-sky__time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hds-hour__i, .hds-day__i { display: block; width: 20px; height: 20px; }
.hds-hour.is-ph, .hds-day.is-ph { opacity: 0.4; }
.hds-sky__sunnote { min-height: 1.4em; }
.hds-sky__alm {
  grid-area: alm;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--hds-line-2);
  font-size: 11.5px;
  color: var(--hds-ink-3);
  white-space: nowrap;
  overflow: hidden;
}
.hds-sky__alm .hds-moon { flex: none; width: 16px; height: 16px; }
.hds-sky__alm > span { overflow: hidden; text-overflow: ellipsis; }
.hds-sky__year { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.hds-sky__year i {
  flex: none;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hds-ink-2) calc(var(--p) * 1%), var(--hds-well) 0);
  box-shadow: inset 0 0 0 1px var(--hds-line);
}
@container (min-width: 560px) {
  .hds-sky__grid { grid-template-areas: "clock hello" "clock now" "hours hours" "days days" "sun sun" "alm alm"; }
  .hds-sky .hds-clock { width: 184px; height: 184px; }
  .hds-sky__greetbox { --greet-max: 25px; }
}

/* ---------- Desk: calculator and pad, chained ------------------------------- */

.deskpair { display: grid; grid-template-rows: auto 64px auto; }
.chain { position: relative; z-index: 1; display: grid; place-items: center; }
.chain__port { position: absolute; left: 50%; width: 30px; height: 9px; margin-left: -15px; background: var(--hds-key-dark); box-shadow: var(--hds-key-shadow); }
.chain__port:first-child { top: -1px; border-radius: 0 0 10px 10px; }
.chain__port:last-child { bottom: -1px; border-radius: 10px 10px 0 0; }
.chain__rails { position: absolute; top: 8px; bottom: 8px; left: 50%; width: 12px; margin-left: -6px; }
.chain__rails b { position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: repeating-linear-gradient(to bottom, var(--hds-line-2) 0 5px, transparent 5px 9px); }
.chain__rails b:first-child { left: 0; }
.chain__rails b:last-child { right: 0; }
.chain__rails::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--hds-accent);
  box-shadow: 0 0 8px var(--hds-accent);
  opacity: 0;
}
.chain__link {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow), 0 0 0 5px var(--hds-bg);
  color: var(--hds-ink-2);
  touch-action: manipulation;
  transition: color 0.2s, transform 0.1s;
}
.chain__link svg { width: 20px; height: 20px; transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.chain__link:hover { color: var(--hds-accent); }
.chain__link:active { transform: scale(0.94); }
.chain.is-sending .chain__link { color: var(--hds-accent); }
.chain.is-sending .chain__link svg { transform: rotate(-45deg); }
.chain.is-sending .chain__rails::after { animation: chain-flow 0.65s cubic-bezier(0.4, 0, 0.2, 1); }
.chain.is-sending .chain__port { background: var(--hds-accent); transition: background 0.2s 0.1s; }
@keyframes chain-flow { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(44px); opacity: 0; } }
/* the tag rides beside the link: name the result, then send it */
.chain__tag {
  position: absolute;
  top: 50%;
  left: calc(50% + 34px);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border-radius: 50%;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow), 0 0 0 4px var(--hds-bg);
  color: var(--hds-ink-3);
  touch-action: manipulation;
  transition: color 0.2s, transform 0.1s;
}
.chain__tag svg { width: 15px; height: 15px; }
.chain__tag:hover { color: var(--hds-accent); }
.chain__tag:active { transform: scale(0.92); }
.chain__recent { display: flex; flex-wrap: wrap; gap: 6px; }
.chain__recent .hds-chip { font-family: var(--hds-sans); font-size: 12.5px; }
.chain__lands { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--hds-well); }
.chain__lands > span { font-size: 11.5px; color: var(--hds-ink-3); }
.chain__preview { margin: 0; font-family: var(--hds-mono); font-size: 13px; line-height: 1.45; color: var(--hds-ink); overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .deskpair { grid-template-columns: minmax(0, 5fr) 64px minmax(0, 6fr); grid-template-rows: none; align-items: start; }
  .chain { height: 64px; margin-top: 64px; }
  .chain__port { top: 50%; bottom: auto; width: 9px; height: 30px; margin: -15px 0 0; }
  .chain__port:first-child { top: 50%; left: -1px; border-radius: 0 10px 10px 0; }
  .chain__port:last-child { left: auto; right: -1px; bottom: auto; border-radius: 10px 0 0 10px; }
  .chain__rails { top: 50%; bottom: auto; left: 8px; right: 8px; width: auto; height: 12px; margin: -6px 0 0; }
  .chain__rails b { left: 0; right: 0; width: auto; height: 2px; background: repeating-linear-gradient(to right, var(--hds-line-2) 0 5px, transparent 5px 9px); }
  .chain__rails b:first-child { top: 0; bottom: auto; }
  .chain__rails b:last-child { top: auto; bottom: 0; }
  .chain__rails::after { top: 50%; left: 0; margin: -3px 0 0; }
  .chain.is-sending .chain__rails::after { animation-name: chain-flow-x; }
  .chain__tag { top: calc(50% + 46px); left: 50%; margin-left: -16px; }
}
@keyframes chain-flow-x { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(42px); opacity: 0; } }

/* ---------- calculator: the small keys beside the display ------------------- */

/* two rows of two: the cursor keys over the keyboard switch and delete */
.hds-calc__side { flex: none; display: grid; grid-template-columns: repeat(2, 36px); grid-auto-rows: 31px; gap: 5px; align-content: center; }
.hds-calc__key {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 31px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--hds-lcd-ink) 9%, transparent);
  color: var(--hds-lcd-ink);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.hds-calc__key svg { width: 16px; height: 16px; }
.hds-calc__key[aria-pressed="true"] { background: var(--hds-accent); color: #fff; }
.hds-calc__out { font-size: 22px; }
/* at rest the display is a dim 0, not a word */
.hds-calc__out.is-empty { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; color: var(--hds-lcd-ink-2); text-shadow: none; }
.hds-calc__conv b.is-dim { font-weight: 500; color: var(--hds-ink-3); }
/* every key answers: a bump and a quick flash, even for the shortest tap;
   AC wipes the display like a hand across it */
.hds-calc__op { position: relative; overflow: hidden; }
.hds-calc__key::after,
.hds-calc__op::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; }
.hds-calc__key.is-hit,
.hds-calc__op.is-hit { animation: calc-hit 0.26s cubic-bezier(0.3, 1.4, 0.5, 1); }
.hds-calc__key.is-hit::after,
.hds-calc__op.is-hit::after { animation: calc-flash 0.32s ease-out; }
.hds-calc__left.is-hit svg,
.hds-calc__back.is-hit svg { animation: calc-nudge-l 0.26s ease; }
.hds-calc__right.is-hit svg { animation: calc-nudge-r 0.26s ease; }
.hds-calc__screen.is-wipe .hds-calc__lines { animation: calc-wipe 0.34s ease; }
@keyframes calc-hit { 35% { transform: scale(0.88); } }
@keyframes calc-flash { from { opacity: 0.2; } }
@keyframes calc-nudge-l { 40% { transform: translateX(-3px); } }
@keyframes calc-nudge-r { 40% { transform: translateX(3px); } }
@keyframes calc-wipe { 38% { opacity: 0; transform: translateX(12px); } 39% { transform: translateX(-8px); } }

/* ---------- scratchpad: lock, render, copy, clear --------------------------- */

.card--pad > .card__body { container-type: inline-size; }
/* stretch, not v2's space-between: that shrank the lone column to its content
   and left a gap on the right of the tabs and the tools */
.hds-pad__bar { display: grid; gap: 8px; justify-content: stretch; }
/* four equal keys, whatever their labels say, so nothing shifts when one changes */
.hds-pad__tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.pad-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 38px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  font-size: 12px;
  font-weight: 580;
  color: var(--hds-ink-2);
  touch-action: manipulation;
  transition: background 0.15s, color 0.15s;
}
.pad-tool svg { flex: none; width: 16px; height: 16px; }
.pad-tool span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad-tool:hover { color: var(--hds-ink); }
.pad-tool:disabled { opacity: 0.4; cursor: default; }
.hds-pad.is-locked .pad-tool--lock { background: var(--hds-accent); color: #fff; }
@container (min-width: 680px) {
  .hds-pad__bar { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .hds-pad__tools { justify-self: end; grid-template-columns: repeat(5, 76px); }
}
.hds-pad__paper { position: relative; }
.hds-pad__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--hds-accent-soft);
  color: var(--hds-accent-ink);
  font-size: 11.5px;
  font-weight: 620;
  pointer-events: none;
}
.hds-pad__badge svg { width: 12px; height: 12px; }
.hds-pad.is-locked .hds-pad__paper { border-color: color-mix(in srgb, var(--hds-accent) 45%, var(--hds-line)); }
.hds-pad.is-locked .hds-pad__view { cursor: default; }
.hds-pad.is-locked .hds-pad__area { cursor: default; }
.hds-tabs button.is-locked .dot { opacity: 1; background: var(--hds-accent); }
.hds-pad.is-receiving .hds-pad__paper { animation: pad-receive 0.9s ease; }
@keyframes pad-receive { 25% { border-color: var(--hds-accent); box-shadow: 0 0 0 5px var(--hds-accent-soft); } }

/* ---------- bookmarks: the drawer ------------------------------------------ */

/* always laid out, waiting off to the left: opening is a slide, never a first
   paint. Solid, not frosted: a blur behind a moving panel is what stuttered */
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 700; width: min(74vw, 360px); pointer-events: none; visibility: hidden; }
body.is-drawer .drawer,
body.is-drawer-out .drawer,
body.is-drawer-pull .drawer { visibility: visible; }
.drawer__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-radius: 0 28px 28px 0;
  background: var(--hds-panel);
  box-shadow: 24px 0 60px -30px rgba(0, 0, 0, 0.55), 1px 0 0 var(--hds-line);
  pointer-events: auto;
  touch-action: pan-y;
  transform: translate3d(-104%, 0, 0);
  transition: transform 0.44s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
body.is-drawer .drawer__panel { transform: translate3d(0, 0, 0); }
body.is-drawer .frame { transform: translate3d(10%, 0, 0) scale(0.92); }
body.is-drawer .frame__scrim { opacity: 1; pointer-events: auto; }
/* a finger is driving: no easing between its moves */
body.is-drawer-pull .drawer__panel,
body.is-drawer-pull .frame,
body.is-drawer-pull .frame__scrim { transition: none; }
body.is-drawer-pull .bm-row { opacity: 1; transform: none; transition: none; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 6px 2px 0 6px; }
.drawer__head h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.drawer__count { display: block; margin-top: 3px; font-size: 12px; color: var(--hds-ink-3); }
.drawer__tools { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.drawer__filter { height: 42px; }
.drawer__list { flex: 1; min-height: 0; display: grid; align-content: start; gap: 6px; margin: 0 -4px; padding: 2px 4px 10px; overflow-y: auto; overscroll-behavior: contain; }
.bm-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 12px 8px 10px;
  border-radius: 16px;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  color: var(--hds-ink);
  text-align: left;
  text-decoration: none;
  touch-action: manipulation;
  opacity: 0;
  transform: translate3d(-16px, 0, 0);
  transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--n, 0) * 26ms + 90ms);
}
body.is-drawer .bm-row { opacity: 1; transform: none; }
.bm-row:active { transform: scale(0.985); transition-delay: 0s; }
.bm-row:focus-visible { outline: 2px solid var(--hds-accent); outline-offset: 2px; }
.bm-row__go { flex: none; margin-left: auto; color: var(--hds-ink-3); }
.bm-row__go svg { display: block; width: 15px; height: 15px; }
.bm-row.is-editing .bm-row__go { color: var(--hds-accent); }
.bm-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--hds-well);
  box-shadow: inset 0 0 0 1px var(--hds-line);
  overflow: hidden;
}
.bm-icon img { width: 20px; height: 20px; object-fit: contain; }
.bm-icon svg { width: 18px; height: 18px; color: var(--hds-ink-2); }
.bm-icon.is-letter { font-size: 15px; font-weight: 650; color: var(--hds-ink-2); }
.bm-text { display: grid; min-width: 0; }
.bm-text b { font-size: 13.5px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-text small { font-size: 11.5px; color: var(--hds-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-add { background: transparent; box-shadow: none; border: 1.5px dashed var(--hds-line-2); color: var(--hds-ink-2); }
.bm-add .bm-icon { background: transparent; box-shadow: none; }
.bm-empty { margin: 2px 6px; font-size: 13px; color: var(--hds-ink-3); }
.bm-toggle[aria-pressed="true"] { background: var(--hds-key-dark); color: var(--hds-key-dark-ink); border-color: transparent; }
.bm-toggle svg, .bm-moves svg { width: 14px; height: 14px; }
.bm-moves { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.bm-moves .hds-chip:disabled { opacity: 0.4; cursor: default; }
.bm-del { color: var(--hds-bad); }

/* ---------- sheet: bottom sheet on a phone, dialog on a desk ---------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 10, 9, 0);
  transition: background 0.22s ease;
}
.sheet.is-open { background: rgba(10, 10, 9, 0.45); }
.sheet__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: min(86dvh, 720px);
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 24px 24px 0 0;
  background: var(--hds-panel);
  box-shadow: 0 -20px 60px -24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--hds-line);
  opacity: 0;
  transform: translateY(28px);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}
.sheet__panel::before { content: ""; align-self: center; flex: none; width: 36px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--hds-line-2); }
.sheet.is-open .sheet__panel { opacity: 1; transform: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 4px 20px; }
.sheet__head h2 { margin: 0; font-size: 15.5px; font-weight: 620; letter-spacing: -0.01em; }
.sheet__body { display: grid; gap: 12px; padding: 8px 20px 18px; overflow-y: auto; }
.sheet__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--hds-line); }
@media (min-width: 640px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet__panel { border-radius: 24px; transform: translateY(10px) scale(0.98); }
  .sheet__panel::before { display: none; }
  .sheet__head { padding-top: 16px; }
}

/* ---------- form bits ------------------------------------------------------ */

.hds-field {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--hds-line);
  background: var(--hds-paper);
  color: var(--hds-ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hds-field::placeholder { color: var(--hds-ink-3); }
.hds-field:focus { border-color: var(--hds-line-2); box-shadow: 0 0 0 3px var(--hds-accent-soft); }
.hds-field:disabled { opacity: 0.6; }
.hds-fieldlabel { display: grid; gap: 6px; }
.hds-fieldlabel > span { font-size: 12px; font-weight: 560; color: var(--hds-ink-2); }
.hds-formerr { margin: -4px 2px 0; font-size: 12.5px; color: var(--hds-bad); }
.hds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--hds-key);
  box-shadow: var(--hds-key-shadow);
  font-size: 14px;
  font-weight: 600;
  color: var(--hds-ink);
  touch-action: manipulation;
}
.hds-btn--primary { background: var(--hds-accent); color: #fff; }
.hds-btn:disabled { opacity: 0.5; cursor: default; }
.hds-btn svg { width: 18px; height: 18px; }
.hds-sky__results { max-height: 46dvh; overflow-y: auto; }

/* ---------- door: the vault prompt ----------------------------------------- */

.hds-door__hint { margin: 0 2px 12px; font-size: 13px; color: var(--hds-ink-2); }
/* a plain shade, no blur: a blur behind a box that fades in costs every frame */
.hds-door { transition: background 0.2s ease; }
.hds-door.is-open { background: rgba(10, 10, 9, 0.62); -webkit-backdrop-filter: none; backdrop-filter: none; }
.hds-door__box.is-granted .hds-door__turn { background: var(--hds-good); }
body > * { transition: opacity 0.4s ease; }
body.is-leaving > * { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .frame, .frame__scrim, .pager__track, .sheet__panel, .sheet, .drawer__panel, .bm-row, .hds-quote__fig, .dock__dot::after, .dock__bubble { transition: none !important; }
  body.is-drawer .frame { transform: none; border-radius: 0; box-shadow: none; }
  .top__mark::after, .hds-quote, .hds-quote::after, .dock__dot.is-vault, .chain__rails::after, .hds-pad.is-receiving .hds-pad__paper,
  body.is-vault-loading .top__key, body.is-vault-loading .top::after { animation: none !important; }
}

/* ---------- colour in the small things: embers, not neon -------------------- */

/* every hue is pulled toward the warm greys, so the page glows instead of
   shouting; the accent stays the one warm light */
:root {
  --hds-neg: #e88b79;
  --hds-lcd-neg: #f0a090;
  --wx-sun: #dca450;
  --wx-moon: #cdc3a2;
  --wx-cloud: #9ba1a7;
  --wx-rain: #82a3c2;
  --wx-bolt: #d9b862;
  --wx-fog: #9a9892;
  --hue-render: #93a7bd;
}
:root[data-theme="hds-ivory"] {
  --hds-neg: #b2432f;
  --hds-lcd-neg: #8f2a1c;
  --wx-sun: #c88a2e;
  --wx-moon: #978a60;
  --wx-cloud: #7a8591;
  --wx-rain: #4f7aa2;
  --wx-bolt: #b18a2a;
  --wx-fog: #85827a;
  --hue-render: #5d7693;
}
/* a negative number reads red wherever it appears */
.is-neg { color: var(--hds-neg); }
.hds-calc__out.is-neg { color: var(--hds-lcd-neg); text-shadow: none; }

/* weather: a warm sun, a pale moon, quiet blue rain; the big icon moves a little */
.hds-hour__i .sun, .hds-day__i .sun, .hds-wx__icon .sun { color: var(--wx-sun); }
.hds svg .moon { color: var(--wx-moon); }
.hds svg .cloud { color: var(--wx-cloud); }
.hds svg .drops { color: var(--wx-rain); }
.hds svg .bolt { color: var(--wx-bolt); }
.hds svg .fog { color: var(--wx-fog); }
.hds-wx__icon .sun:only-child .rays { transform-box: fill-box; transform-origin: center; animation: wx-spin 40s linear infinite; }
.hds-wx__icon .cloud { animation: wx-drift 6s ease-in-out infinite alternate; }
.hds-wx__icon .drops { animation: wx-rain 1.2s linear infinite; }
.hds-wx__icon .bolt { animation: wx-flash 3.6s ease-in-out infinite; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-drift { from { transform: translateX(-0.8px); } to { transform: translateX(0.8px); } }
@keyframes wx-rain { 0% { transform: translateY(-1.2px); opacity: 0.45; } 50% { opacity: 0.9; } 100% { transform: translateY(1.2px); opacity: 0.45; } }
@keyframes wx-flash { 0%, 86%, 100% { opacity: 1; } 90% { opacity: 0.35; } 94% { opacity: 1; } 96% { opacity: 0.5; } }

/* the chrome */
.top__marks:hover, body.is-drawer .top__marks { color: var(--hds-accent); }
.top__key.is-offmesh:not(.is-open) { background: transparent; box-shadow: none; outline: 1.5px dashed var(--hds-line-2); outline-offset: -3px; color: var(--hds-ink-3); }
/* lights: a steady colour and a slow glow that comes and goes (opacity only) */
.hds-led { position: relative; }
.hds-led[data-s="up"] { box-shadow: 0 0 0 2px var(--hds-panel), 0 0 5px color-mix(in srgb, var(--hds-good) 40%, transparent); }
.hds-led[data-s="down"] { box-shadow: 0 0 0 2px var(--hds-panel), 0 0 5px color-mix(in srgb, var(--hds-bad) 45%, transparent); }
.hds-led[data-s="warn"] { background: var(--hds-warn); box-shadow: 0 0 0 2px var(--hds-panel), 0 0 5px color-mix(in srgb, var(--hds-warn) 40%, transparent); }
.hds-led[data-s="up"]::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hds-good) 45%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
  animation: led-breathe 3.6s ease-in-out infinite;
}
@keyframes led-breathe { 50% { opacity: 1; } }
.dock__arrow:not(:disabled):hover { color: var(--hds-accent); }
.dock__dot.is-vault[aria-selected="true"]::after { box-shadow: 0 0 6px color-mix(in srgb, var(--hds-accent) 40%, transparent); }
.dock__title.is-swap { animation: title-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes title-in { from { opacity: 0; transform: translateY(4px); } }
/* toasts float above the dock, never over it, and only their action takes taps */
.hds-toast { gap: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); }
.hds-toast.is-on { pointer-events: none; }
.hds-toast.is-on button { pointer-events: auto; }
.hds-toast::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--hds-accent); }
.hds-quote__mark { opacity: 0.72; }
.hds-sky__orb:not(.is-moon) { box-shadow: 0 0 0 3px var(--hds-accent-soft), 0 0 10px color-mix(in srgb, var(--hds-accent) 55%, transparent); }
.drawer__panel:focus { outline: none; }
.bm-row:hover .bm-row__go { color: var(--hds-accent); }

/* engines wear their own colour, muted, and the private ones a shield;
   operators glow faintly warm; the pad's tools are told apart */
.hds-search__engines button { display: inline-flex; align-items: center; }
.eng-mark { display: inline-block; flex: none; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: color-mix(in oklab, var(--c) 55%, var(--hds-ink-3)); }
.eng-mark.is-private { display: grid; width: 11px; height: 12px; margin-right: 6px; border-radius: 0; background: none; color: color-mix(in oklab, var(--c) 55%, var(--hds-ink-3)); }
.eng-mark.is-private svg { display: block; width: 100%; height: 100%; }
.hds-search__sep { flex-basis: 100%; height: 0; } /* the private engines start a row of their own */
.hds-calc__op:not(.is-clear) { color: color-mix(in srgb, var(--hds-accent) 42%, var(--hds-key-dark-ink)); }
.hds-calc__op.is-clear { color: color-mix(in srgb, var(--hds-neg) 72%, var(--hds-ink-2)); }
.hds-pad__tools .pad-tool--lock svg { color: color-mix(in srgb, var(--hds-accent) 82%, var(--hds-ink-2)); }
.hds-pad__tools .pad-tool--render svg { color: var(--hue-render); }
.hds-pad__tools .pad-tool--copy svg { color: color-mix(in srgb, var(--hds-good) 70%, var(--hds-ink-2)); }
.hds-pad__tools .pad-tool--share svg { color: color-mix(in srgb, var(--wx-rain) 80%, var(--hds-ink-2)); }
.hds-pad__tools .pad-tool--clear svg { color: color-mix(in srgb, var(--hds-neg) 75%, var(--hds-ink-2)); }
.hds-pad__tools .pad-tool:disabled svg { color: var(--hds-ink-3); }
.hds-pad.is-locked .hds-pad__tools .pad-tool--lock svg { color: #fff; }

/* pages breathe as they pass: the one leaving sinks a little, the one arriving rises */
.page { transition: transform 0.46s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.46s ease; }
.page[aria-hidden="true"] { transform: scale(0.94); opacity: 0.35; }
.pager.is-scrub .page { transition-duration: 0.22s; }
.pager__track.is-instant .page { transition: none; }
/* pages out of sight hold still: their motion resumes (or first plays) when they come round */
.page[aria-hidden="true"] *, .page[aria-hidden="true"] *::before, .page[aria-hidden="true"] *::after { animation-play-state: paused !important; }

/* ---------- the passage between the open pages and the vault ------------------ */

/* a disc grows out of the key until it covers the screen: only its scale and
   the whole layer's opacity animate, so the passage never waits on painting */
.portal {
  --x: 50%;
  --y: 50%;
  --d: 200vmax;
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f1efe9;
  transition: opacity 0.62s ease;
}
.portal__disc {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--d);
  height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--hds-accent) 28%, #0c0c0b) 0%, #0c0c0b 45%, #070706 100%);
  transform: scale(0.001);
  transition: transform 0.68s cubic-bezier(0.7, 0, 0.2, 1);
  will-change: transform;
}
.portal[data-tone="lock"] .portal__disc { background: radial-gradient(closest-side, color-mix(in srgb, #5d6f93 30%, #0c0c0b) 0%, #0c0c0b 45%, #070706 100%); }
.portal.is-in .portal__disc { transform: scale(1); }
.portal.is-out { opacity: 0; }
.portal__core { position: relative; display: grid; justify-items: center; gap: 14px; opacity: 0; transform: scale(0.9); transition: opacity 0.3s ease 0.26s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.22s; }
.portal.is-in .portal__core { opacity: 1; transform: none; }
.portal.is-out .portal__core { opacity: 0; transform: scale(1.08); transition-delay: 0s; }
.portal__ring { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12); }
.portal__ring::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--hds-accent); border-right-color: color-mix(in srgb, var(--hds-accent) 40%, transparent); animation: portal-spin 1.1s linear infinite; }
.portal[data-tone="lock"] .portal__ring::before { border-top-color: #b8c3da; border-right-color: rgba(184, 195, 218, 0.35); }
.portal__icon svg { display: block; width: 34px; height: 34px; color: var(--hds-accent); }
.portal[data-tone="lock"] .portal__icon svg { color: #cfd6e4; }
.portal__label { font-size: 15px; font-weight: 580; letter-spacing: 0.01em; color: rgba(241, 239, 233, 0.86); }
.portal__bar { width: 120px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.portal__bar i { display: block; width: 40%; height: 100%; background: var(--hds-accent); animation: portal-bar 1s ease-in-out infinite; }
.portal[data-tone="lock"] .portal__bar i { background: #b8c3da; }
@keyframes portal-spin { to { transform: rotate(360deg); } }
@keyframes portal-bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

@media (prefers-reduced-motion: reduce) {
  .hds-wx__icon .rays, .hds-wx__icon .cloud, .hds-wx__icon .drops, .hds-wx__icon .bolt,
  .hds-led[data-s="up"]::after, .dock__title.is-swap, .portal__ring::before, .portal__bar i,
  .hds-calc__key.is-hit, .hds-calc__op.is-hit, .hds-calc__key.is-hit::after, .hds-calc__op.is-hit::after,
  .hds-calc__key.is-hit svg, .hds-calc__screen.is-wipe .hds-calc__lines { animation: none !important; }
  .page, .portal, .portal__disc, .portal__core { transition: none !important; }
  .page[aria-hidden="true"] { transform: none; }
}

/* ---------- Home: the search and the quote, and nothing else -------------- */

/* the two sit a little above the middle of the screen, where a thumb and an
   eye land first; on a short screen they simply start at the top */
/* start from a fixed height rather than centring, so suggestions opening
   under the field never push the field itself up */
.page__inner--home {
  max-width: 640px;
  gap: 22px;
  padding-top: max(14vh, 24px);
}
.page__inner--home .card--search > .card__body { padding: 16px; }
.page__inner--home .hds-search__box { height: 52px; border-radius: 16px; }
.page__inner--home .hds-search__input { font-size: 16.5px; }
.hds-search__suggest small.is-vault { color: var(--hds-accent-ink); }

/* the next quote arrives when its hairline fills; the hairline stands still
   whenever Home is out of sight, the drawer is out, or a search is being typed */
.hds-quote__timer {
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 4px;
  border-radius: 1px;
  background: var(--hds-line);
  overflow: hidden;
  position: relative;
}
.hds-quote__timer::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--hds-accent) 70%, transparent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.hds-quote__timer.is-running::after { animation: quote-timer var(--quote-s, 22s) linear forwards; }
@keyframes quote-timer { to { transform: scaleX(1); } }
.page--home:has(.hds-search__input:focus) .hds-quote__timer::after { animation-play-state: paused; }
@media (hover: hover) { .hds-quote__fig:hover ~ .hds-quote__timer::after { animation-play-state: paused; } }

/* ---------- Weather: the next day, the details, the air ------------------- */

.wx-empty { margin: 2px; font-size: 13px; color: var(--hds-ink-3); }
.wx-note { margin: 10px 2px 0; font-size: 12px; line-height: 1.45; color: var(--hds-ink-3); }

.wx-hours { position: relative; height: 150px; margin: 4px 2px 0; }
.wx-hours__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wx-hours__line { fill: none; stroke: var(--hds-ink-2); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wx-hours__area { fill: color-mix(in srgb, var(--wx-sun) 16%, transparent); }
.wx-hours__rain { fill: color-mix(in srgb, var(--wx-rain) 34%, transparent); }
.wx-hours__rain.is-wet { fill: color-mix(in srgb, var(--wx-rain) 70%, transparent); }
.wx-hours__labels { position: absolute; inset: 0; pointer-events: none; }
.wx-hours__labels span {
  position: absolute;
  transform: translate(-50%, -140%);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--hds-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wx-hours__labels span.is-rain { transform: translate(-50%, -120%); font-size: 10px; font-weight: 500; color: var(--wx-rain); }
.wx-hours__labels span.is-start { transform: translate(0, -140%); }
.wx-hours__labels span.is-end { transform: translate(-100%, -140%); }
.wx-hours__labels span.is-rain.is-start { transform: translate(0, -120%); }
.wx-hours__labels span.is-rain.is-end { transform: translate(-100%, -120%); }
.wx-hours__axis { position: relative; height: 16px; margin: 6px 2px 0; border-top: 1px dashed var(--hds-line-2); }
.wx-hours__axis span { position: absolute; top: 3px; transform: translateX(-50%); font-size: 10.5px; color: var(--hds-ink-3); font-variant-numeric: tabular-nums; }
.wx-hours__axis span.is-start { transform: none; color: var(--hds-ink-2); font-weight: 600; }
.wx-hours__axis span.is-end { transform: translateX(-100%); }

.wx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .wx-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wx-tile { display: grid; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--hds-well); box-shadow: inset 0 0 0 1px var(--hds-line); }
.wx-tile > span { font-size: 11.5px; color: var(--hds-ink-3); }
.wx-tile > b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.wx-tile > small { font-size: 11.5px; line-height: 1.35; color: var(--hds-ink-2); }
.wx-arrow { display: grid; place-items: center; width: 16px; height: 16px; color: var(--wx-rain); }
.wx-arrow svg { width: 14px; height: 14px; }

.wx-air { --air: var(--hds-good); display: grid; gap: 12px; }
.wx-air.is-fair { --air: var(--hds-warn); }
.wx-air.is-poor { --air: color-mix(in srgb, var(--hds-warn) 55%, var(--hds-bad)); }
.wx-air.is-bad { --air: var(--hds-bad); }
.wx-air__head { display: flex; align-items: center; gap: 12px; }
.wx-air__head > b {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 48px;
  height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--air) 18%, var(--hds-well));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--air) 35%, transparent);
  color: color-mix(in srgb, var(--air) 60%, var(--hds-ink));
  font-size: 15px;
  font-weight: 650;
}
.wx-air__head > span { display: grid; gap: 2px; min-width: 0; }
.wx-air__head strong { font-size: 13.5px; font-weight: 620; }
.wx-air__head small { font-size: 12px; color: var(--hds-ink-3); }
.wx-air__scale {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--hds-good) 55%, var(--hds-well)) 0 16.6%,
    color-mix(in srgb, var(--hds-warn) 55%, var(--hds-well)) 16.6% 33.3%,
    color-mix(in srgb, var(--hds-warn) 45%, var(--hds-bad)) 33.3% 50%,
    color-mix(in srgb, var(--hds-bad) 60%, var(--hds-well)) 50% 100%);
  opacity: 0.85;
}
.wx-air__scale i {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--hds-panel);
  box-shadow: 0 0 0 2.5px var(--air), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.wx-air__gases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wx-air__gases > div { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--hds-well); }
.wx-air__gases span { font-size: 11px; color: var(--hds-ink-3); }
.wx-air__gases b { font-size: 13.5px; font-weight: 620; }
.wx-air__gases small { font-size: 10px; color: var(--hds-ink-3); }

/* ---------- the pad's five tools --------------------------------------- */

/* the grid and each tool's colour live in 10-app.css, by class */
.pad-tool { gap: 4px; padding: 0 4px; font-size: 11.5px; }

/* ---------- Share: MicroBin from the desk ------------------------------ */

.card--drop { margin-top: 4px; }
.hds-drop.is-over { outline: 2px dashed color-mix(in srgb, var(--hds-accent) 70%, transparent); outline-offset: -6px; border-radius: var(--hds-radius); }
.share-count { font-family: var(--hds-mono); font-size: 11px; color: var(--hds-ink-3); white-space: nowrap; }
.share-top { display: grid; gap: 10px; }
.share-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1.5px dashed var(--hds-line-2);
  background: transparent;
  color: var(--hds-ink);
  text-align: left;
  touch-action: manipulation;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.share-drop:hover { border-color: color-mix(in srgb, var(--hds-accent) 55%, var(--hds-line-2)); }
.share-drop:active { transform: scale(0.99); }
.share-drop:disabled { opacity: 0.5; cursor: default; }
.share-drop__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--hds-accent-soft); color: var(--hds-accent-ink); }
.share-drop__icon svg { width: 18px; height: 18px; }
.share-drop > span { display: grid; gap: 2px; min-width: 0; }
.share-drop b { font-size: 13.5px; font-weight: 600; }
.share-drop small { font-size: 12px; color: var(--hds-ink-3); }
.share-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.share-keep > span { font-size: 12px; font-weight: 560; color: var(--hds-ink-2); }
.share-exp { display: flex; flex-wrap: wrap; gap: 5px; }
.share-exp .hds-chip { font-family: var(--hds-sans); font-size: 12px; }
.share-exp .hds-chip[aria-checked="true"] { background: var(--hds-key-dark); color: var(--hds-key-dark-ink); border-color: transparent; }
.share-queue, .share-list { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.share-queue:empty { display: none; }
.share-up { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 12px; border-radius: 12px; background: var(--hds-well); font-size: 12.5px; }
.share-up > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-up small { color: var(--hds-ink-3); }
.share-up__bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--hds-line); overflow: hidden; }
.share-up__bar i { display: block; height: 100%; background: var(--hds-accent); transform: scaleX(0.02); transform-origin: 0 50%; transition: transform 0.2s; }
.share-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 6px 6px 8px; border-radius: 14px; background: var(--hds-well); }
.share-row__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--hds-key); box-shadow: var(--hds-key-shadow); color: var(--hds-ink-2); }
.share-row__icon svg { width: 16px; height: 16px; }
.share-row__icon.is-file { color: color-mix(in srgb, var(--wx-rain) 80%, var(--hds-ink-2)); }
.share-row__text { display: grid; flex: 1; min-width: 0; color: var(--hds-ink); text-decoration: none; }
.share-row__text b { overflow: hidden; font-size: 13px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.share-row__text small { overflow: hidden; font-size: 11.5px; color: var(--hds-ink-3); text-overflow: ellipsis; white-space: nowrap; }
.share-row__tools { display: flex; flex: none; }
.share-row__tools .hds-iconbtn { width: 34px; height: 34px; }
.share-del.is-armed { background: color-mix(in srgb, var(--hds-bad) 18%, transparent); color: var(--hds-bad); }
.share-empty, .share-off { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--hds-ink-3); list-style: none; }
.share-more { margin-top: 8px; padding: 6px 4px; font-size: 12.5px; font-weight: 560; color: var(--hds-ink-2); }

.share-sheet { display: grid; gap: 12px; }
.share-preview {
  max-height: 132px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hds-paper);
  box-shadow: inset 0 0 0 1px var(--hds-line);
  overflow: hidden;
  font-family: var(--hds-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--hds-ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.share-fine { margin: 0; font-size: 12px; line-height: 1.45; color: var(--hds-ink-3); }
.share-result { display: grid; gap: 12px; }
.share-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hds-well);
  box-shadow: inset 0 0 0 1px var(--hds-line);
  font-family: var(--hds-mono);
  font-size: 13px;
  color: var(--hds-accent-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions .hds-btn { flex: 1 1 auto; height: 40px; padding: 0 12px; font-size: 13.5px; text-decoration: none; }
.share-qr { display: grid; justify-items: center; gap: 8px; padding: 6px 0 2px; }
.share-qr__svg { width: min(230px, 66vw); height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--hds-line), 0 10px 28px -14px rgba(0, 0, 0, 0.5); }
.share-qr small { font-size: 12px; color: var(--hds-ink-3); }

@media (prefers-reduced-motion: reduce) {
  .hds-quote__timer::after { animation: none !important; transform: scaleX(0); }
  .share-up__bar i { transition: none; }
}

/* five tools on a phone: the icon sits over its word, so no label is cut short */
@container (max-width: 430px) {
  .pad-tool { flex-direction: column; gap: 2px; height: 46px; font-size: 10.5px; }
  .pad-tool svg { width: 15px; height: 15px; }
}
