/* ==========================================================================
   Survival. Built to feel native on iPhone: true black, grouped inset lists,
   large collapsing titles, translucent bars. One accent (blue) for interactive
   things only. Red means danger or "call". Amber means caution. Green means
   safe or tip. Base unit is 4px.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #000000;
  --card: #1c1c1e;
  --card2: #2c2c2e;
  --sur2: rgba(118, 118, 128, 0.24);
  --press: rgba(235, 235, 245, 0.09);
  --border: rgba(84, 84, 88, 0.6);
  --border2: rgba(120, 120, 128, 0.5);
  --hairline: rgba(255, 255, 255, 0.07);
  --bar-bg: rgba(22, 22, 24, 0.74);
  --scrim: rgba(0, 0, 0, 0.5);
  --seg-thumb: #636366;
  --sheet-bg: #1c1c1e;
  --shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);

  /* text, three tiers */
  --text: #ffffff;
  --text2: #aeaeb2;
  --text3: #8e8e93;

  /* accent, interactive only */
  --accent: #0a84ff;
  --accent-glow: rgba(10, 132, 255, 0.16);
  --accent-border: rgba(10, 132, 255, 0.4);
  --on-accent: #ffffff;

  /* semantic */
  --green: #30d158;
  --green-l: rgba(48, 209, 88, 0.15);
  --amber: #ff9f0a;
  --amber-l: rgba(255, 159, 10, 0.16);
  --red: #ff6961;
  --red-l: rgba(255, 69, 58, 0.16);
  --red-border: rgba(255, 69, 58, 0.4);
  --call: #e3342f;
  --call-hover: #f0443f;
  --on-call: #ffffff;

  /* resistor and swatch colours */
  --c-black: #111111;
  --c-brown: #7a4a22;
  --c-red: #d6322b;
  --c-orange: #f08a24;
  --c-yellow: #f2d024;
  --c-green: #2e9c4f;
  --c-blue: #2d6fd6;
  --c-violet: #8a45c9;
  --c-grey: #8c8c8c;
  --c-white: #f5f5f5;
  --c-gold: #c9a227;
  --c-silver: #bfc3c8;

  /* radii */
  --rs: 0.5rem;
  --r: 0.75rem;
  --rl: 1rem;

  /* spacing, 4px base */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s8: 2rem;
  --s10: 2.5rem;
  --s12: 3rem;
  --s16: 4rem;

  /* type, after the iOS text styles */
  --fh: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --fb: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --fm: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-label: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sec: clamp(0.875rem, 0.86rem + 0.15vw, 0.9375rem);
  --fs-body: clamp(1rem, 0.98rem + 0.2vw, 1.0625rem);
  --fs-head: clamp(1.125rem, 1.08rem + 0.3vw, 1.25rem);
  --fs-title: clamp(1.5rem, 1.4rem + 0.6vw, 1.75rem);
  --fs-large: clamp(1.875rem, 1.7rem + 0.9vw, 2.125rem);
  --fs-display: clamp(3rem, 2.6rem + 2vw, 4rem);
  --fs-walk-title: clamp(1.875rem, 1.6rem + 1.1vw, 2.375rem);
  --fs-walk: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* layout */
  --hdr-h: 2.75rem;
  --tab-h: 3.25rem;
  --sep-inset: var(--s4);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card2: #ffffff;
  --sur2: rgba(118, 118, 128, 0.12);
  --press: rgba(60, 60, 67, 0.08);
  --border: rgba(60, 60, 67, 0.2);
  --border2: rgba(60, 60, 67, 0.32);
  --hairline: rgba(60, 60, 67, 0.1);
  --bar-bg: rgba(249, 249, 251, 0.8);
  --scrim: rgba(0, 0, 0, 0.3);
  --seg-thumb: #ffffff;
  --sheet-bg: #f2f2f7;
  --shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
  --text: #000000;
  --text2: #48484a;
  --text3: #6c6c70;
  --accent: #007aff;
  --accent-glow: rgba(0, 122, 255, 0.12);
  --accent-border: rgba(0, 122, 255, 0.35);
  --on-accent: #ffffff;
  --green: #1f7a3a;
  --green-l: rgba(52, 199, 89, 0.16);
  --amber: #8f4f00;
  --amber-l: rgba(255, 149, 0, 0.16);
  --red: #c4261e;
  --red-l: rgba(255, 59, 48, 0.1);
  --red-border: rgba(255, 59, 48, 0.35);
  --call: #d70015;
  --call-hover: #bf0012;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f7;
    --card: #ffffff;
    --card2: #ffffff;
    --sur2: rgba(118, 118, 128, 0.12);
    --press: rgba(60, 60, 67, 0.08);
    --border: rgba(60, 60, 67, 0.2);
    --border2: rgba(60, 60, 67, 0.32);
    --hairline: rgba(60, 60, 67, 0.1);
    --bar-bg: rgba(249, 249, 251, 0.8);
    --scrim: rgba(0, 0, 0, 0.3);
    --seg-thumb: #ffffff;
    --sheet-bg: #f2f2f7;
  --sheet-bg: #f2f2f7;
    --shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
    --text: #000000;
    --text2: #48484a;
    --text3: #6c6c70;
    --accent: #007aff;
    --accent-glow: rgba(0, 122, 255, 0.12);
    --accent-border: rgba(0, 122, 255, 0.35);
    --on-accent: #ffffff;
    --green: #1f7a3a;
    --green-l: rgba(52, 199, 89, 0.16);
    --amber: #8f4f00;
    --amber-l: rgba(255, 149, 0, 0.16);
    --red: #c4261e;
    --red-l: rgba(255, 59, 48, 0.1);
    --red-border: rgba(255, 59, 48, 0.35);
    --call: #d70015;
    --call-hover: #bf0012;
    color-scheme: light;
  }
}

:root[data-text="large"] {
  font-size: 118%;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: var(--fs-body);
  line-height: 1.47;
  letter-spacing: -0.022em;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic-sm {
  width: 1.25rem;
  height: 1.25rem;
}

.ic-lg {
  width: 1.75rem;
  height: 1.75rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--rs);
}

::selection {
  background: var(--accent-glow);
}

.noscript {
  padding: var(--s6);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: var(--rs);
}

/* ---------- shell ---------- */

#app {
  max-width: 40rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.hdr {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s1);
  min-height: calc(var(--hdr-h) + var(--safe-t));
  padding: var(--safe-t) calc(var(--s2) + var(--safe-r)) 0 calc(var(--s1) + var(--safe-l));
}

/* the translucent bar fades in once content scrolls under it */
.hdr::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity 180ms var(--ease);
}

.hdr.solid::before {
  opacity: 1;
}

.hdr-title {
  flex: 1;
  min-width: 0;
  padding: 0 var(--s2);
  font-family: var(--fh);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 180ms var(--ease);
}

.hdr.large .hdr-title {
  opacity: 0;
}

.hdr.large.solid .hdr-title {
  opacity: 1;
}

.hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 var(--s2);
  background: transparent;
  border: 0;
  border-radius: var(--r);
  color: var(--accent);
  font-family: var(--fb);
  font-size: var(--fs-body);
  font-weight: 400;
  letter-spacing: -0.022em;
  transition: opacity 120ms var(--ease);
}

.hdr-btn .ic {
  stroke-width: 2.4;
  margin-left: calc(var(--s1) * -1);
}

.hdr-btn:active {
  opacity: 0.4;
}

.hdr-btn.on {
  color: var(--amber);
}

.hdr-timer {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 2rem;
  padding: 0 var(--s3);
  background: var(--amber-l);
  border-radius: 62rem;
  color: var(--amber);
  font-family: var(--fm);
  font-size: var(--fs-sec);
  font-variant-numeric: tabular-nums;
}

.hdr-spacer {
  min-width: 2.75rem;
}

.view {
  flex: 1;
  padding: var(--s1) calc(var(--s4) + var(--safe-r)) calc(var(--tab-h) + var(--safe-b) + var(--s8)) calc(var(--s4) + var(--safe-l));
  outline: none;
}

.view.nobar {
  padding-bottom: calc(var(--s8) + var(--safe-b));
}

.view.bare {
  padding-top: var(--s1);
}

@media (prefers-reduced-motion: no-preference) {
  .view.fade > *:not(.reveal) {
    animation: fade-in 160ms var(--ease) backwards;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 40rem;
  padding: var(--s1) var(--safe-r) var(--safe-b) var(--safe-l);
  transform: translateX(-50%);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--border);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: calc(var(--tab-h) - var(--s1));
  color: var(--text3);
  font-family: var(--fb);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 150ms var(--ease), opacity 100ms var(--ease);
}

.tab .ic {
  width: 1.625rem;
  height: 1.625rem;
}

.tab:active {
  opacity: 0.5;
}

.tab.active {
  color: var(--accent);
}

.tab.active .ic {
  stroke-width: 2.3;
}

/* ---------- type ---------- */

.large-title {
  margin: var(--s1) 0 var(--s4);
  font-family: var(--fh);
  font-size: var(--fs-large);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.14;
  text-wrap: balance;
}

.t-title {
  font-family: var(--fh);
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.15;
}

.t-head {
  font-family: var(--fh);
  font-size: var(--fs-head);
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.25;
}

.t-label,
.section-title {
  font-family: var(--fb);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text3);
}

.section-title {
  margin: var(--s8) var(--s4) var(--s2);
}

.section-title:first-child {
  margin-top: 0;
}

.muted {
  color: var(--text2);
}

.small {
  font-size: var(--fs-sec);
  color: var(--text2);
}

.mono,
.num {
  font-family: var(--fm);
  font-variant-numeric: tabular-nums;
}

.stack > * + * {
  margin-top: var(--s4);
}

.stack-sm > * + * {
  margin-top: var(--s2);
}

.page-head {
  margin-bottom: var(--s5);
}

.lede {
  margin: calc(var(--s2) * -1) 0 var(--s5);
  color: var(--text2);
  font-size: var(--fs-body);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 3rem;
  padding: 0 var(--s5);
  border: 0;
  border-radius: var(--r);
  background: var(--sur2);
  color: var(--accent);
  font-family: var(--fb);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.022em;
  text-align: center;
  transition: background 150ms var(--ease), transform 100ms var(--ease), opacity 120ms var(--ease);
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.8;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  min-height: 3.25rem;
  font-size: var(--fs-body);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary {
  background: var(--sur2);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}

.btn-call {
  background: var(--call);
  color: var(--on-call);
}

.btn-call:hover {
  background: var(--call-hover);
}

.btn-danger {
  background: var(--red-l);
  color: var(--red);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .btn.loading::before {
    animation: spin 700ms linear infinite;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- cards, grouped lists, pills ---------- */

.card {
  background: var(--card);
  border-radius: var(--rl);
  padding: var(--s4) var(--s4);
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.rows > * {
  position: relative;
}

.rows > * + *::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: var(--sep-inset);
  height: 1px;
  background: var(--border);
}

.rows > *:has(> .row-icon)::after,
.rows > .row:has(> .row-icon)::after {
  left: 4.25rem;
}

.row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--s3) var(--s4);
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  transition: background 120ms var(--ease);
}

a.row:active,
button.row:active {
  background: var(--press);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  display: block;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.3;
}

.row-sub {
  display: -webkit-box;
  margin-top: 1px;
  color: var(--text3);
  font-size: var(--fs-sec);
  line-height: 1.35;
  letter-spacing: -0.016em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  background: var(--accent);
  border-radius: 0.5rem;
  color: #ffffff;
}

.row-icon .ic {
  stroke-width: 2;
}

.row-icon.red {
  background: var(--call);
}

.row-icon.amber {
  background: #d98500;
}

.row-icon.green {
  background: #2fa84f;
}

.row-icon.grey {
  background: #6c6c70;
}

.row-chev {
  width: 1rem;
  height: 1rem;
  color: var(--text3);
  opacity: 0.7;
  stroke-width: 2.6;
}

.row-end {
  font-family: var(--fm);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-align: right;
}

.row-count {
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 var(--s2);
  border-radius: 62rem;
  background: var(--sur2);
  color: var(--text2);
  font-family: var(--fb);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: none;
}

.pill-critical {
  background: var(--red-l);
  color: var(--red);
}

.pill-urgent {
  background: var(--amber-l);
  color: var(--amber);
}

.pill-prepare {
  background: var(--green-l);
  color: var(--green);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--s3);
  background: var(--card);
  border-radius: 62rem;
  color: var(--accent);
  font-size: var(--fs-sec);
  font-weight: 500;
  transition: background 120ms var(--ease), opacity 100ms var(--ease);
}

.chip:active {
  opacity: 0.5;
}

/* ---------- home ---------- */

.search-fake,
.search-field {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--s3);
  background: var(--sur2);
  border: 0;
  border-radius: var(--r);
  color: var(--text3);
  text-align: left;
}

.search-fake:active {
  opacity: 0.7;
}

.search-field .ic,
.search-fake .ic {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2.2;
}

.search-field input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 1.0625rem;
}

.search-field input::placeholder {
  color: var(--text3);
}

.search-field input:focus {
  outline: none;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-field:focus-within {
  box-shadow: 0 0 0 2px var(--accent-border);
}

.sf-clear {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  background: var(--text3);
  border: 0;
  border-radius: 50%;
  color: var(--bg);
}

.sf-clear .ic {
  width: 0.75rem;
  height: 0.75rem;
  stroke-width: 3;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 6.75rem;
  padding: var(--s3) var(--s3) var(--s4);
  background: var(--card);
  border-radius: var(--rl);
  color: var(--text);
  transition: background 120ms var(--ease), transform 100ms var(--ease);
}

.tile:active {
  transform: scale(0.97);
  background: var(--card2);
}

.tile-ic {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--red-l);
  border-radius: 0.5rem;
  color: var(--red);
}

.tile-ic .ic {
  width: 1.375rem;
  height: 1.375rem;
  stroke-width: 2;
}

.tile-title {
  padding: 0 var(--s1);
  font-family: var(--fh);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
}

.banner-wrap {
  margin-top: var(--s3);
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s8);
  color: var(--text3);
  font-size: var(--fs-label);
  font-family: var(--fm);
  letter-spacing: 0;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--text3);
  flex: none;
}

.dot.ok {
  background: var(--green);
}

.dot.bad {
  background: var(--amber);
}

/* ---------- search ---------- */

.search-bar {
  position: sticky;
  top: calc(var(--hdr-h) + var(--safe-t));
  z-index: 10;
  margin: 0 calc(var(--s4) * -1) var(--s3);
  padding: var(--s2) var(--s4) var(--s2);
  background: var(--bg);
}

.input {
  width: 100%;
  min-height: 3rem;
  padding: 0 var(--s4);
  background: var(--sur2);
  border: 0;
  border-radius: var(--r);
  color: var(--text);
  font-size: 1.0625rem;
  transition: box-shadow 150ms var(--ease);
}

.input::placeholder {
  color: var(--text3);
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-border);
}

.input:focus-visible {
  outline: none;
}

.input.mono {
  font-family: var(--fm);
}

textarea.input {
  padding: var(--s3) var(--s4);
  min-height: 6rem;
  resize: vertical;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s8) var(--s4);
  text-align: center;
  color: var(--text2);
}

.empty .ic {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text3);
}

/* ---------- guide ---------- */

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin: var(--s1) 0 var(--s3);
  color: var(--text3);
  font-size: var(--fs-label);
}

.guide-meta + .large-title {
  margin-top: 0;
}

.call-banner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  background: var(--red-l);
  border-radius: var(--rl);
}

.call-banner .call-text {
  flex: 1;
  min-width: 0;
  font-family: var(--fh);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
}

.call-banner .call-text small {
  display: block;
  color: var(--text2);
  font-family: var(--fb);
  font-weight: 400;
  font-size: var(--fs-sec);
}

.call-banner .btn {
  min-width: 7rem;
}

.say-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  margin-top: var(--s1);
  min-height: 2.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: var(--fb);
  font-size: var(--fs-sec);
  font-weight: 400;
}

.first-box {
  padding: var(--s5);
  background: var(--card);
  border-radius: var(--rl);
}

.first-box .t-label {
  margin-bottom: var(--s2);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.first-box p {
  font-family: var(--fh);
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.2;
  text-wrap: pretty;
}

.list-dot li,
.list-x li,
.list-check li {
  position: relative;
  padding-left: var(--s6);
}

.list-dot li + li,
.list-x li + li,
.list-check li + li {
  margin-top: var(--s3);
}

.list-dot li::before {
  content: "";
  position: absolute;
  left: var(--s2);
  top: 0.65em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--text3);
}

.list-x li .ic,
.list-check li .ic {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2.6;
}

.list-x li .ic {
  color: var(--red);
}

.list-check li .ic {
  color: var(--green);
}

.recognise {
  padding: var(--s4);
  background: var(--card);
  border-radius: var(--rl);
}

.steps-list {
  background: var(--card);
  border-radius: var(--rl);
  overflow: hidden;
}

.step {
  position: relative;
  display: flex;
  gap: var(--s3);
  padding: var(--s4);
}

.step + .step::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 3.75rem;
  height: 1px;
  background: var(--border);
}

.phase-title {
  margin: var(--s6) var(--s4) var(--s2);
  font-family: var(--fb);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.phase-title:first-child {
  margin-top: 0;
}

.step-num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  margin-top: 1px;
  background: var(--accent);
  border-radius: 50%;
  font-family: var(--fm);
  font-size: var(--fs-sec);
  font-weight: 600;
  color: var(--on-accent);
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-family: var(--fh);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
}

.step-detail {
  margin-top: var(--s1);
  color: var(--text2);
  letter-spacing: -0.018em;
}

.caution {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--amber-l);
  border-radius: var(--r);
  color: var(--text);
  font-size: var(--fs-sec);
}

.caution .ic {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15em;
  color: var(--amber);
}

.step .btn {
  margin-top: var(--s3);
  min-height: 2.75rem;
}

.step-img {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin-top: var(--s3);
  border-radius: var(--r);
  background: var(--sur2);
}

.box {
  margin-top: var(--s6);
  padding: var(--s4);
  border-radius: var(--rl);
}

.box-donot {
  background: var(--red-l);
}

.box-tips {
  background: var(--green-l);
}

.box-need {
  background: var(--card);
}

.box .t-label {
  margin-bottom: var(--s3);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.box-donot .t-label {
  color: var(--red);
}

.box-tips .t-label {
  color: var(--green);
}

.src-details {
  margin-top: var(--s8);
  padding: 0 var(--s4);
  color: var(--text3);
  font-size: var(--fs-label);
}

.src-details summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.src-details ul {
  margin-top: var(--s2);
}

.src-details li + li {
  margin-top: var(--s2);
}

.draft-note {
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--amber-l);
  border-radius: var(--r);
  color: var(--text2);
  font-size: var(--fs-label);
}

/* ---------- reference tables ---------- */

.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--rl);
  background: var(--card);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sec);
}

.tbl th {
  padding: var(--s3);
  text-align: left;
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.tbl td {
  padding: var(--s3);
  vertical-align: top;
  border-top: 1px solid var(--border);
}

.tbl tr:first-child td {
  border-top: 0;
}

.tbl td:first-child {
  font-weight: 600;
}

.tbl .nr {
  font-family: var(--fm);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sw {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: var(--s2);
  vertical-align: -0.15em;
  border: 1px solid var(--border2);
  border-radius: 50%;
}

.sw-black { background: var(--c-black); }
.sw-brown { background: var(--c-brown); }
.sw-red { background: var(--c-red); }
.sw-orange { background: var(--c-orange); }
.sw-yellow { background: var(--c-yellow); }
.sw-green { background: var(--c-green); }
.sw-blue { background: var(--c-blue); }
.sw-violet { background: var(--c-violet); }
.sw-grey { background: var(--c-grey); }
.sw-white { background: var(--c-white); }
.sw-gold { background: var(--c-gold); }
.sw-silver { background: var(--c-silver); }

/* ---------- walkthrough: step text, a permanent Do not panel, then the buttons ---------- */

.view.walkview {
  padding: 0;
}

.walk {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--hdr-h) - var(--safe-t));
  overflow: hidden;
}

.progress {
  flex: none;
  height: 4px;
  margin: var(--s1) calc(var(--s4) + var(--safe-r)) 0 calc(var(--s4) + var(--safe-l));
  background: var(--sur2);
  border-radius: 62rem;
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 62rem;
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform 220ms var(--ease);
}

.walk-stage {
  flex: 1 1 auto;
  min-height: 7rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s5) calc(var(--s4) + var(--safe-r)) var(--s4) calc(var(--s4) + var(--safe-l));
}

.walk-count {
  font-family: var(--fm);
  font-size: var(--fs-sec);
  color: var(--text3);
  margin-bottom: var(--s3);
  letter-spacing: 0;
}

.walk-phase {
  display: inline-block;
  margin-left: var(--s2);
  color: var(--accent);
  font-family: var(--fb);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.walk-title {
  font-family: var(--fh);
  font-size: var(--fs-walk-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.walk-detail {
  margin-top: var(--s4);
  font-size: var(--fs-walk);
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--text2);
}

.walk-stage .caution {
  font-size: var(--fs-body);
  padding: var(--s3);
  margin-top: var(--s4);
}

.walk-stage .btn {
  margin-top: var(--s4);
}

.walk-donot {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  max-height: min(14rem, 32dvh);
  margin: 0 calc(var(--s3) + var(--safe-r)) var(--s3) calc(var(--s3) + var(--safe-l));
  padding: var(--s3) var(--s3) var(--s2) var(--s4);
  background: var(--red-l);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--red-border);
  font-size: var(--fs-sec);
  line-height: 1.4;
}

.walk-donot-label {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--s1);
  margin-bottom: var(--s2);
  color: var(--red);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.walk-donot-label .ic {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 3;
}

.walk-donot ul {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--s3) var(--s2) 0;
}

.walk-donot li + li {
  margin-top: var(--s2);
}

.walk-bar {
  flex: none;
  padding: var(--s3) calc(var(--s4) + var(--safe-r)) calc(var(--s2) + var(--safe-b)) calc(var(--s4) + var(--safe-l));
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--border);
}

.walk-nav {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s3);
}

.walk-nav .btn {
  min-height: 3.5rem;
  font-size: var(--fs-head);
}

.walk-note {
  margin-top: var(--s2);
  text-align: center;
  color: var(--text3);
  font-size: var(--fs-label);
}

/* ---------- overlay, sheet, toast ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--scrim);
}

@media (prefers-reduced-motion: no-preference) {
  .overlay:not([hidden]) {
    animation: fade-in 200ms var(--ease) both;
  }
  .overlay:not([hidden]) .sheet {
    animation: sheet-in 260ms var(--ease) both;
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sheet {
  width: 100%;
  max-width: 40rem;
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--s2) calc(var(--s4) + var(--safe-r)) calc(var(--s5) + var(--safe-b)) calc(var(--s4) + var(--safe-l));
  background: var(--sheet-bg);
  border-radius: var(--rl) var(--rl) 0 0;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}

.sheet-grab {
  display: block;
  width: 2.25rem;
  height: 5px;
  margin: var(--s1) auto var(--s2);
  background: var(--border2);
  border-radius: 62rem;
  touch-action: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
  touch-action: none;
}

.sheet-head .t-head {
  flex: 1;
  font-size: var(--fs-head);
}

.sheet-head .hdr-btn {
  min-width: 2rem;
  min-height: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: var(--sur2);
  border-radius: 50%;
  color: var(--text2);
}

.sheet-head .hdr-btn .ic {
  width: 1rem;
  height: 1rem;
  margin: 0;
  stroke-width: 2.8;
}

.sheet .box {
  padding: 0;
  margin-top: 0;
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + var(--s4));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: min(32rem, calc(100vw - var(--s8)));
  padding: var(--s3) var(--s4);
  transform: translateX(-50%);
  background: var(--card2);
  border-radius: 62rem;
  box-shadow: var(--shadow);
  font-family: var(--fb);
  font-size: var(--fs-sec);
  font-weight: 500;
}

.toast::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.toast.ok::before {
  background: var(--green);
}

.toast.err::before {
  background: var(--red);
}

.toast button {
  min-height: 2rem;
  padding: 0 var(--s3);
  background: var(--accent-glow);
  border: 0;
  border-radius: 62rem;
  color: var(--accent);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .toast:not([hidden]) {
    animation: toast-in 220ms var(--ease) both;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- skeleton ---------- */

.skel {
  height: 3.5rem;
  background: var(--card);
  border-radius: var(--rl);
}

.skel + .skel {
  margin-top: var(--s3);
}

@media (prefers-reduced-motion: no-preference) {
  .skel {
    animation: pulse-op 1.4s var(--ease) infinite;
  }
}

@keyframes pulse-op {
  50% {
    opacity: 0.5;
  }
}

/* ---------- segmented control, fields ---------- */

.seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 2px;
  background: var(--sur2);
  border-radius: var(--r);
  --n: 2;
  --i: 0;
}

.seg::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--n));
  background: var(--seg-thumb);
  border-radius: calc(var(--r) - 2px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 220ms var(--ease);
}

.seg button {
  position: relative;
  min-height: 2.5rem;
  background: transparent;
  border: 0;
  border-radius: calc(var(--r) - 2px);
  color: var(--text);
  font-family: var(--fb);
  font-size: var(--fs-sec);
  font-weight: 500;
  letter-spacing: -0.016em;
  transition: opacity 120ms var(--ease);
}

.seg button:active {
  opacity: 0.6;
}

.seg button[aria-pressed="true"] {
  font-weight: 600;
}

:root[data-theme="light"] .seg::before {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.field {
  display: block;
}

.field > span {
  display: block;
  margin: 0 var(--s4) var(--s2);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text3);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.big-time {
  font-family: var(--fm);
  font-size: var(--fs-display);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
}

.metro {
  display: grid;
  place-items: center;
  padding: var(--s8) 0;
}

.metro-ring {
  display: grid;
  place-items: center;
  width: 13rem;
  height: 13rem;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-glow);
  text-align: center;
}

.metro-ring.breath {
  border-color: var(--amber);
  background: var(--amber-l);
}

.metro-count {
  font-family: var(--fm);
  font-size: var(--fs-display);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metro-cap {
  margin-top: var(--s2);
  color: var(--text2);
  font-weight: 600;
}

.timer-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--card);
  border-radius: var(--rl);
}

.timer-card + .timer-card {
  margin-top: var(--s3);
}

.timer-card.done {
  background: var(--red-l);
}

.timer-card .tc-main {
  flex: 1;
  min-width: 0;
}

.timer-card .tc-time {
  font-family: var(--fm);
  font-size: var(--fs-title);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s6);
  padding: var(--safe-t) var(--s4) var(--safe-b);
  background: #000000;
  color: #ffffff;
}

.fullscreen.on {
  background: #ffffff;
  color: #000000;
}

.fullscreen .btn {
  position: absolute;
  top: calc(var(--safe-t) + var(--s4));
  right: var(--s4);
  background: rgba(127, 127, 127, 0.4);
  color: inherit;
}

.fullscreen.light {
  background: #ffffff;
  color: #000000;
}

.compass {
  position: relative;
  display: grid;
  place-items: center;
  margin: var(--s6) 0;
}

.compass-dial {
  position: relative;
  width: min(16rem, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--card);
  transition: transform 80ms linear;
}

.compass-dial::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border-radius: 50%;
  background: repeating-conic-gradient(from -0.75deg, var(--border2) 0deg 1.5deg, transparent 1.5deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 0 calc(100% - 0.75rem - 1px), #000 calc(100% - 0.75rem)) ;
  mask: radial-gradient(circle, transparent 0 calc(100% - 0.75rem - 1px), #000 calc(100% - 0.75rem));
}

.compass-lubber {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 0.75rem solid var(--accent);
}

.compass-needle {
  position: absolute;
  inset: 0;
}

.compass-needle::before,
.compass-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 0.625rem solid transparent;
  border-right: 0.625rem solid transparent;
}

.compass-needle::before {
  top: 18%;
  border-bottom: 3.25rem solid var(--call);
}

.compass-needle::after {
  bottom: 18%;
  border-top: 3.25rem solid var(--text);
}

.compass-mark {
  position: absolute;
  font-family: var(--fh);
  font-weight: 600;
  color: var(--text3);
}

.compass-mark.n { top: 1.5rem; left: 50%; transform: translateX(-50%); color: var(--red); }
.compass-mark.s { bottom: 1.5rem; left: 50%; transform: translateX(-50%); }
.compass-mark.e { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.compass-mark.w { left: 1.5rem; top: 50%; transform: translateY(-50%); }

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s2) var(--s4);
}

.kv dt {
  color: var(--text3);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0;
  align-self: center;
}

.kv dd {
  margin: 0;
  font-family: var(--fm);
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 3.25rem;
  padding: var(--s2) var(--s4);
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  transition: background 120ms var(--ease);
}

.check-row:active {
  background: var(--press);
}

.check-box {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  color: transparent;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}

.check-box .ic {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 3.2;
}

.check-row[aria-checked="true"] .check-box {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.check-row[aria-checked="true"] .check-label {
  color: var(--text3);
}

.progress-text {
  font-family: var(--fm);
  font-size: var(--fs-label);
  color: var(--text3);
  letter-spacing: 0;
}

.result {
  padding: var(--s4);
  background: var(--accent-glow);
  border-radius: var(--r);
  font-family: var(--fm);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.disclaimer {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s5);
  padding: calc(var(--s8) + var(--safe-t)) var(--s6) calc(var(--s8) + var(--safe-b));
  max-width: 28rem;
  margin: 0 auto;
}

.disclaimer .logo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 22.37%;
  box-shadow: var(--shadow);
}

.disclaimer .large-title {
  margin: var(--s2) 0 0;
}

.sub-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.version {
  margin-top: var(--s8);
  text-align: center;
  color: var(--text3);
  font-family: var(--fm);
  font-size: var(--fs-label);
  letter-spacing: 0;
}

.tool-note {
  margin-top: var(--s4);
}

.ref-block {
  margin-top: var(--s6);
}

.ref-title {
  margin: 0 var(--s4) var(--s2);
}

.inline-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 0.2em;
}

.walk-end {
  margin-top: var(--s6);
}

@media (min-width: 40rem) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- finishing touches ---------- */

.gap {
  height: var(--s3);
}

.foot {
  margin: var(--s2) var(--s4) 0;
  color: var(--text3);
  font-size: var(--fs-label);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.row-title.accent {
  color: var(--accent);
}

.row-title.red {
  color: var(--red);
}

.row .status-line {
  margin: 0;
  justify-content: flex-start;
}

.hdr > :first-child {
  min-width: 4.5rem;
  justify-content: flex-start;
}

.hdr-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s1);
  min-width: 4.5rem;
}

.hdr-spacer {
  display: inline-block;
}

.card.stack {
  padding: var(--s4);
}

.card .field > span {
  margin-left: 0;
}

/* the emergency call lives in the bar, top right, on every screen */
.call-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  padding: 0 var(--s4) 0 var(--s3);
  background: var(--call);
  border-radius: 62rem;
  color: var(--on-call);
  font-family: var(--fh);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transition: background 150ms var(--ease), transform 100ms var(--ease);
}

.call-pill .ic {
  stroke-width: 2.2;
}

.call-pill:hover {
  background: var(--call-hover);
}

.call-pill:active {
  transform: scale(0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.brand-logo {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 22.37%;
}

.search-fake {
  margin-bottom: var(--s1);
}

/* ---------- craft layer: hairlines, reveal, shimmer, states ---------- */

.card,
.tile,
.first-box,
.recognise,
.steps-list,
.box,
.call-banner,
.tbl-wrap,
.timer-card,
.chip,
.compass-dial {
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.box-donot {
  box-shadow: inset 0 0 0 1px var(--red-border);
}

.box-tips {
  box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.22);
}

.call-banner {
  box-shadow: inset 0 0 0 1px var(--red-border);
}

/* the 112 button gets a larger invisible hit area than it looks */
.call-pill {
  position: relative;
  min-height: 2.25rem;
}

.call-pill::after {
  content: "";
  position: absolute;
  inset: -0.25rem -0.125rem;
}

/* skeletons shimmer instead of pulsing */
.skel {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
}

@media (prefers-reduced-motion: no-preference) {
  .skel {
    animation: none;
  }
  .skel::after {
    animation: shimmer 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  }
  @keyframes shimmer {
    to {
      transform: translateX(100%);
    }
  }

  /* Content below the first screen rises into place as it scrolls in.
     Anything already visible on arrival is never animated. */
  .reveal {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  .reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
}

/* designed empty and error states */
.empty .ic {
  box-sizing: content-box;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.875rem;
  background: var(--card);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text2);
}

.empty strong {
  font-family: var(--fh);
  font-size: var(--fs-head);
  letter-spacing: -0.024em;
  color: var(--text);
}

/* install nudge */
.nudge {
  position: relative;
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  margin-top: var(--s3);
  padding: var(--s4);
  background: var(--accent-glow);
  border-radius: var(--rl);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.nudge .row-icon {
  flex: none;
}

.nudge-body {
  flex: 1;
  min-width: 0;
}

.nudge-title {
  font-family: var(--fh);
  font-weight: 600;
  letter-spacing: -0.022em;
}

.nudge-text {
  margin-top: 2px;
  color: var(--text2);
  font-size: var(--fs-sec);
  line-height: 1.4;
}

.nudge-x {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: calc(var(--s2) * -1) calc(var(--s2) * -1) 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text3);
}

.nudge-x .ic {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.6;
}

.nudge-x:active {
  opacity: 0.5;
}

.row-count,
.status-line,
.progress-text,
.version {
  font-variant-numeric: tabular-nums;
}

/* On the main tabs the large title sits in the bar row, level with the 112 button. */
.hdr.root + .view > .large-title:first-child {
  margin-top: -2.875rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  padding-right: 6rem;
}

.hdr.root {
  pointer-events: none;
}

.hdr.root > * {
  pointer-events: auto;
}
