:root {
  color-scheme: dark;
  --ink: #090c11;
  --ink-soft: #0d1219;
  --surface: #111720;
  --surface-raised: #151d28;
  --surface-hover: #192331;
  --line: #263241;
  --line-soft: rgba(111, 139, 168, 0.16);
  --text: #f1f5f9;
  --text-soft: #c0cad7;
  --muted: #8290a3;
  --accent: #72a7ff;
  --accent-bright: #a6c7ff;
  --normal: #74d1bd;
  --low: #f2b84b;
  --low-wash: rgba(242, 184, 75, 0.09);
  --high: #ff746c;
  --high-wash: rgba(255, 116, 108, 0.09);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --page: 1180px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 85% -10%, rgba(75, 122, 190, 0.13), transparent 31rem), linear-gradient(180deg, #0b0f15 0%, var(--ink) 24rem);
  color: var(--text);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
a { color: inherit; }
button, summary, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(166, 199, 255, 0.92); outline-offset: 3px; }
.details-hidden .details-content, .details-hidden .reference-detail { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(116, 143, 174, 0.12);
  background: rgba(9, 12, 17, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.08rem;
  font-weight: 680;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark, .login-brand span {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(166, 199, 255, 0.44);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(114, 167, 255, 0.19), rgba(114, 167, 255, 0.03));
  box-shadow: inset 0 0 16px rgba(114, 167, 255, 0.12), 0 0 20px rgba(114, 167, 255, 0.08);
}

.brand-mark::after, .login-brand span::after {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 14px;
  height: 7px;
  border-bottom: 2px solid var(--accent-bright);
  content: "";
  transform: translateY(-66%) skewY(-38deg);
}

.quiet-button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.quiet-button:hover, .quiet-button:focus-visible { border-color: var(--line); background: var(--surface); color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 2px; }
.topbar-actions form, .feature-form { margin: 0; }
.details-toggle {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 560;
}
.details-toggle:hover, .details-toggle:focus-visible { border-color: var(--line); background: var(--surface); color: var(--text); }

.flash {
  position: relative;
  z-index: 5;
  width: min(calc(100% - 32px), var(--page));
  margin: 14px auto -2px;
  padding: 11px 16px;
  border: 1px solid rgba(114, 167, 255, 0.32);
  border-radius: 13px;
  background: rgba(25, 42, 64, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  color: #dce9ff;
}

.flash p { margin: 0; }

main {
  width: min(100%, calc(var(--page) + 40px));
  margin: 0 auto;
  padding: 34px 20px max(72px, env(safe-area-inset-bottom));
}

h1, h2, p { margin-top: 0; }
h1, h2 { font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -0.04em; }
h1 { margin-bottom: 0; font-size: clamp(2.4rem, 9vw, 4.7rem); font-weight: 620; line-height: 0.98; }
h2 { margin-bottom: 0; font-size: 1.15rem; font-weight: 630; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 6px 0 52px; }
.intro-meta { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; margin: 0; color: var(--muted); font-size: 0.82rem; font-weight: 550; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--normal); box-shadow: 0 0 0 5px rgba(116, 209, 189, 0.08); }

.dashboard-intro { margin-bottom: 34px; }
.featured-section { margin-bottom: 58px; }
.featured-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.featured-heading .eyebrow { margin-bottom: 5px; }
.featured-heading > span { color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.68rem; letter-spacing: 0.04em; }
.featured-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.category { position: relative; margin: 0 0 52px; padding-left: 18px; }
.category::before {
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(114, 167, 255, 0.08) 78%, transparent 100%);
  box-shadow: 0 0 18px rgba(114, 167, 255, 0.2);
  content: "";
}

.section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 17px; }
.section-heading > span { color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.06em; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }

.metric-card {
  position: relative;
  display: flex;
  min-height: 174px;
  flex-direction: column;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 42%), var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  color: var(--text);
  text-decoration: none;
}

.metric-card-link {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.metric-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); content: ""; opacity: 0; }
.metric-card.flag-low { background: linear-gradient(135deg, var(--low-wash), transparent 52%), var(--surface); }
.metric-card.flag-high { background: linear-gradient(135deg, var(--high-wash), transparent 52%), var(--surface); }
.metric-card.flag-low::before, .metric-card.flag-high::before { opacity: 1; }
.metric-card.flag-low::before { background: var(--low); }
.metric-card.flag-high::before { background: var(--high); }

.card-topline, .card-reading, .card-lower, .card-meta { display: flex; align-items: center; }
.card-topline { justify-content: space-between; gap: 10px; padding-right: 40px; }
.card-name { overflow: hidden; color: var(--text-soft); font-size: 0.82rem; font-weight: 580; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  line-height: 1;
}

.status-low { background: rgba(242, 184, 75, 0.08); color: var(--low); }
.status-high { background: rgba(255, 116, 108, 0.08); color: var(--high); }
.card-reading { min-width: 0; align-items: baseline; gap: 8px; margin-top: 15px; }
.card-value, .hero-value, .history-value { font-variant-numeric: tabular-nums; }
.card-value { min-width: 0; font-size: clamp(2rem, 11vw, 2.7rem); font-weight: 560; letter-spacing: -0.065em; line-height: 1; }
.card-unit { overflow: hidden; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.card-lower { min-height: 47px; justify-content: space-between; gap: 10px; margin-top: auto; }
.card-meta { min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.64rem; letter-spacing: -0.01em; white-space: nowrap; }
.delta, .hero-delta { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.spark { display: block; width: 136px; max-width: 48%; height: 44px; }
.card-arrow { position: absolute; top: 50%; right: 18px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-raised); color: var(--muted); font-size: 0.82rem; opacity: 0; transform: translateY(-30%); }
.empty-reading { margin: auto 0; color: var(--muted); }
.card-description {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 14px 0 13px;
  overflow: hidden;
  color: #9eabba;
  font-size: 0.72rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.metric-card > .feature-form { position: absolute; z-index: 3; top: 7px; right: 7px; }
.star-button {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #8492a5;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}
.star-button:hover, .star-button:focus-visible { border-color: rgba(242, 184, 75, 0.25); background: rgba(242, 184, 75, 0.06); color: #d9b86f; }
.star-button.is-featured { color: #e5bd63; text-shadow: 0 0 18px rgba(229, 189, 99, 0.2); }
.featured-card { min-height: 274px; border-color: rgba(114, 167, 255, 0.22); background: linear-gradient(145deg, rgba(114, 167, 255, 0.09), transparent 46%), var(--surface-raised); box-shadow: 0 18px 52px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.035); }
.featured-card .card-name { color: var(--text); font-size: 0.93rem; }
.featured-card .card-value { font-size: clamp(2.8rem, 15vw, 4.1rem); }
.featured-card .card-description { min-height: 3.9em; color: var(--text-soft); font-size: 0.78rem; -webkit-line-clamp: 3; }
.details-hidden .metric-card { min-height: 174px; }
.details-hidden .featured-card { min-height: 214px; }

.new-marker { margin-top: 8px; padding-left: 18px; }
.new-marker details { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: rgba(17, 23, 32, 0.62); }
.new-marker summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; padding: 0 18px; color: var(--text-soft); cursor: pointer; font-weight: 580; list-style: none; }
.new-marker summary::-webkit-details-marker { display: none; }
.new-marker summary span { color: var(--accent-bright); font-size: 1.35rem; font-weight: 300; transform-origin: center; }
.new-marker details[open] summary span { transform: rotate(45deg); }
.new-marker form { padding: 18px; border-top: 1px solid var(--line-soft); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 13px; margin-bottom: 16px; }

label { display: flex; flex-direction: column; gap: 7px; color: var(--text-soft); font-size: 0.76rem; font-weight: 580; }
input, select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #0c1118; color: var(--text); font-size: 1rem; outline: 0; }
input::placeholder { color: #637185; }
input:hover, select:hover { border-color: #3b4b5f; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(114, 167, 255, 0.13); }

button[type="submit"]:not(.quiet-button):not(.danger):not(.star-button) {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(166, 199, 255, 0.3);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #79abff, #5e91e7);
  box-shadow: 0 8px 24px rgba(49, 105, 190, 0.19), inset 0 1px rgba(255, 255, 255, 0.24);
  color: #07101d;
  cursor: pointer;
  font-weight: 720;
}

button[type="submit"]:not(.quiet-button):not(.danger):not(.star-button):hover { background: linear-gradient(180deg, #8bb7ff, #69a0f8); }

.login-page { display: grid; min-height: 100svh; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(73, 120, 190, 0.15), transparent 24rem), var(--ink); }
.login-page main { width: 100%; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.login-page .flash { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 32px), 400px); margin: 0; transform: translateX(-50%); }
.login-card { position: relative; width: min(100%, 380px); margin: 0 auto; overflow: hidden; padding: 34px; border: 1px solid rgba(116, 143, 174, 0.2); border-radius: 26px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 50%), rgba(16, 23, 33, 0.94); box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.025); }
.login-card::before { position: absolute; top: -60px; left: 15%; width: 70%; height: 90px; border-radius: 50%; background: rgba(114, 167, 255, 0.16); content: ""; filter: blur(42px); }
.login-brand { margin-bottom: 23px; }
.login-brand span { width: 38px; height: 38px; border-radius: 12px; }
.login-brand span::after { left: 7px; width: 22px; height: 11px; border-bottom-width: 2px; }
.login-card h1 { margin-bottom: 36px; font-size: 3.35rem; }
.login-card form { display: grid; gap: 17px; }

.crumbs { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 30px; color: var(--muted); font-size: 0.74rem; }
.crumbs a { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumb-category { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marker-hero { display: grid; gap: 34px; margin-bottom: 34px; }
.marker-title h1 { max-width: 13ch; overflow-wrap: anywhere; }
.marker-title-row { display: flex; align-items: flex-start; gap: 10px; }
.marker-title-row h1 { min-width: 0; }
.marker-feature-form { flex: 0 0 auto; margin-top: -3px; }
.marker-feature-form .star-button { font-size: 1.55rem; }
.hero-reading { min-width: 0; }
.hero-value-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px 12px; }
.hero-value { font-size: clamp(3.4rem, 17vw, 6.7rem); font-weight: 530; letter-spacing: -0.08em; line-height: 0.84; }
.hero-unit { max-width: 13ch; padding-bottom: 4px; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.77rem; line-height: 1.25; }
.hero-value-row .status-pill { margin-bottom: 1px; }
.marker-hero.flag-low .hero-value { color: var(--low); }
.marker-hero.flag-high .hero-value { color: var(--high); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.69rem; }
.marker-summary { grid-column: 1 / -1; max-width: 76ch; margin-top: -9px; padding-left: 16px; border-left: 2px solid rgba(114, 167, 255, 0.34); }
.marker-description { margin-bottom: 10px; color: var(--text-soft); font-size: 0.94rem; line-height: 1.6; }
.reference-range { margin: 0; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.72rem; }
.reference-range span { color: var(--text-soft); font-weight: 650; }

.chart-panel, .entry-panel, .history-panel { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 45%), rgba(17, 23, 32, 0.88); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset; }
.chart-panel { margin-bottom: 18px; padding: 20px 14px 14px; }
.panel-heading { padding: 0 6px 18px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.chart-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; color: var(--muted); font-size: 0.68rem; }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { display: inline-block; width: 17px; height: 6px; }
.key-range { border: 1px solid rgba(114, 167, 255, 0.3); background: rgba(114, 167, 255, 0.1); }
.key-line, .key-goal { height: 0 !important; border-top: 1px dashed rgba(166, 199, 255, 0.72); }
.key-goal { border-color: var(--normal); }
.chart-wrap { position: relative; width: 100%; height: clamp(280px, 54vw, 430px); }
.chart-empty { display: grid; height: 100%; place-items: center; margin: 0; color: var(--muted); font-size: 0.82rem; }

.marker-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.entry-panel, .history-panel { overflow: hidden; }
.compact-heading { padding: 20px 20px 17px; border-bottom: 1px solid var(--line-soft); }
.add-form { display: grid; gap: 15px; padding: 20px; }
.input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-right: 82px; }
.input-with-unit > span { position: absolute; top: 50%; right: 13px; max-width: 70px; overflow: hidden; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.67rem; text-overflow: ellipsis; transform: translateY(-50%); white-space: nowrap; }

.table-wrap { width: 100%; overflow: hidden; }
.history { width: 100%; border-collapse: collapse; }
.history thead { display: none; }
.history tbody, .history tr, .history td { display: block; width: 100%; }
.history tr { position: relative; display: grid; grid-template-columns: 1fr auto; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.history tr:last-child { border-bottom: 0; }
.history tr.flag-low { background: linear-gradient(90deg, var(--low-wash), transparent 50%); }
.history tr.flag-high { background: linear-gradient(90deg, var(--high-wash), transparent 50%); }
.history td { padding: 4px 0; color: var(--text-soft); font-size: 0.78rem; }
.history td::before { display: block; margin-bottom: 2px; color: var(--muted); content: attr(data-label); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.59rem; letter-spacing: 0.08em; text-transform: uppercase; }
.history td:nth-child(1), .history td:nth-child(2), .history td:nth-child(4) { grid-column: 1; }
.history td:nth-child(3), .history td:nth-child(5) { grid-column: 2; justify-self: end; text-align: right; }
.history td:nth-child(3) { grid-row: 1 / span 2; }
.history td:nth-child(5) { grid-row: 3; align-self: end; }
.history-value { color: var(--text) !important; font-size: 1.05rem !important; font-weight: 620; }
.history-value small { color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.62rem; font-weight: 400; }
.history-note { padding-right: 22px !important; color: var(--text-soft) !important; font-size: 0.82rem !important; font-weight: 520; line-height: 1.5; }
.note-empty { color: #5f6d7e; font-weight: 400; }
.status-ok { color: var(--muted); font-size: 0.68rem; }
.danger { min-width: 58px; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #9aa6b6; cursor: pointer; font-size: 0.7rem; }
.danger:hover, .danger:focus-visible { border-color: rgba(255, 116, 108, 0.36); background: var(--high-wash); color: var(--high); }
.empty-state { margin: 0; padding: 28px 20px; color: var(--muted); }

@media (min-width: 560px) {
  main { padding-right: 28px; padding-left: 28px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid label:first-child { grid-column: 1 / -1; }
  .marker-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .hero-reading { text-align: right; }
  .hero-value-row, .hero-meta { justify-content: flex-end; }
  .chart-panel { padding: 24px 20px 18px; }
}

@media (min-width: 820px) {
  main { padding-top: 48px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-card { min-height: 188px; padding: 21px; }
  .featured-card { min-height: 300px; padding: 24px; }
  .details-hidden .featured-card { min-height: 224px; }
  .metric-card:hover { border-color: rgba(114, 167, 255, 0.32); background: linear-gradient(145deg, rgba(114, 167, 255, 0.075), transparent 47%), var(--surface-hover); box-shadow: var(--shadow); transform: translateY(-3px); }
  .metric-card:hover .card-arrow, .metric-card:focus-within .card-arrow { opacity: 1; transform: translateY(-50%); }
  .marker-columns { grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr); align-items: start; }
  .marker-columns-readonly { grid-template-columns: minmax(0, 1fr); }
  .entry-panel { position: sticky; top: 90px; }
  .history thead { display: table-header-group; }
  .history tbody { display: table-row-group; }
  .history tr { display: table-row; padding: 0; }
  .history td { display: table-cell; width: auto; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 0.76rem; vertical-align: middle; }
  .history th { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.59rem; font-weight: 600; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
  .history td::before { display: none; }
  .history td:nth-child(n) { grid-column: auto; grid-row: auto; justify-self: auto; text-align: left; }
  .history td:nth-child(2), .history th:nth-child(2) { text-align: right; }
  .history td:nth-child(3), .history th:nth-child(3) { text-align: center; }
  .history td.history-action, .history th:last-child:not(:nth-child(4)) { text-align: right; }
  .history-note { max-width: 24rem; padding-right: 16px !important; }
  .danger { opacity: 0.46; }
  .history tr:hover .danger, .danger:focus-visible { opacity: 1; }
}

@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category { padding-left: 23px; }
}

@media (prefers-reduced-motion: no-preference) {
  .metric-card, .card-arrow, .quiet-button, .details-toggle, .star-button, .danger, button[type="submit"], .new-marker summary span { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Injection logs (Claude, round 3) */
a.quiet-button.nav-link { text-decoration: none; display: inline-flex; align-items: center; }
a.nav-current { color: var(--text, #e6e8eb); }
.log-panel { margin-bottom: 2rem; }
.log-add-form { margin: 0 0 1.25rem; }
