:root {
  --ground: #f2f4f7;
  --surface: #ffffff;
  --raised: #e8ecf1;
  --active: #e2e7ee;
  --scrim: rgba(10, 12, 16, 0.52);
  --border: #e4e7ec;
  --rule: #edf0f3;
  --control: #737a85;
  --text: #0a0a0a;
  --muted: #525860;
  --faint: #5e646e;
  --accent: #1d5fbf;
  --accent-tint: #e8f0fc;
  --primary: #141414;
  --primary-hover: #292c30;
  --primary-ink: #ffffff;
  --positive: #1e6f3d;
  --negative: #b91c22;
  --warning: #8a3b0c;
  --pill-positive-bg: #dcfae5;
  --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea;
  --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb;
  --pill-warning-ink: #78350f;
  --pill-neutral-bg: #e8ecf1;
  --pill-neutral-ink: #33373d;
  --chart-1: #1d5fbf;
  --chart-2: #737a85;
  --chart-3: #141414;
  --chart-muted: #cbd1da;
  --chart-mark: var(--text);
  --chart-span: 0.07;
  --grid: var(--rule);
  --axis-ink: var(--muted);
  --ink: var(--text);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: ui-monospace, "Cascadia Mono", Consolas, monospace; /* taste-skill-ignore: token reserved exclusively for kbd/code elements */
  --fs-lead: 32px;
  --fs-title: 24px;
  --fs-kpi: 24px;
  --fs-section: 16px;
  --fs-body: 14px;
  --fs-meta: 13px;
  --fs-small: 12px;
  --sidebar-width: 244px;
  --pad: 24px;
  --gap: 16px;
  --card-pad: 20px;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-pill: 999px;
  --control-height: 36px;
  --row-height: 46px;
  --nav-row: 36px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms;
  --t-hover: 150ms;
  --t-ui: 180ms;
}

:root[data-theme="dark"] {
  --ground: #0a0b0d;
  --surface: #121316;
  --raised: #1c1e24;
  --active: #22252d;
  --scrim: rgba(0, 0, 0, 0.72);
  --border: #22252a;
  --rule: #1b1e23;
  --control: #666e7a;
  --text: #f5f6f8;
  --muted: #b0b6bf;
  --faint: #949ba6;
  --accent: #5b9bf8;
  --accent-tint: #17243b;
  --primary: #f5f6f8;
  --primary-hover: #dfe3e8;
  --primary-ink: #0a0b0d;
  --positive: #4ade80;
  --negative: #fca5a5;
  --warning: #fcd34d;
  --pill-positive-bg: #172a1d;
  --pill-positive-ink: #4ade80;
  --pill-negative-bg: #2c1a20;
  --pill-negative-ink: #fca5a5;
  --pill-warning-bg: #2b2414;
  --pill-warning-ink: #fcd34d;
  --pill-neutral-bg: #1f2229;
  --pill-neutral-ink: #dfe3e8;
  --chart-1: #5b9bf8;
  --chart-2: #949ba6;
  --chart-3: #f5f6f8;
  --chart-muted: #343944;
  --grid: #22252a;
  --chart-span: 0.14;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}

p {
  text-wrap: pretty;
}

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

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code,
pre,
kbd {
  font-family: var(--font-code);
  font-size: var(--fs-small);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--muted);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 500;
}

.skip-link:focus {
  left: 12px;
}

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

.num,
table,
.kpi-value,
.kpi-lead,
.metric-inline {
  font-variant-numeric: tabular-nums;
}

/* Mobile top bar stays hidden on wide viewports where the persistent sidebar is visible. */
.mobile-bar {
  display: none;
}

.sidebar-scrim {
  display: none;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  background: var(--ground);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 8px 12px;
}

.brand-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--accent);
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: var(--fs-section);
  font-weight: 600;
  line-height: 1.2;
}

.brand-scope {
  display: block;
  font-size: var(--fs-small);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn.sidebar-close {
  display: none;
}

.group-label {
  margin: 14px 8px 4px;
  font-size: var(--fs-small);
  color: var(--faint);
}

.nav-list {
  display: grid;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--nav-row);
  padding: 0 10px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.nav-item-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke-width: 1.5;
}

.nav-item:hover {
  background: var(--raised);
  color: var(--text);
}

.nav-item[aria-current="page"] {
  background: var(--active);
  color: var(--text);
  font-weight: 500;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--control);
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.sync-card {
  padding: 12px 8px 4px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sync-title {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text);
}

.sync-meta {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
}

.theme-label {
  font-size: var(--fs-body);
  color: var(--muted);
}

.canvas {
  min-width: 0;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: var(--pad);
}

.view-section[hidden] {
  display: none !important;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.title-copy {
  min-width: 0;
  max-width: 72ch;
}

.title-row h1,
.title-row .view-heading {
  font-size: var(--fs-title);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.title-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-body);
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.grid + .grid {
  margin-top: var(--gap);
}

.grid.align-start {
  align-items: start;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
}

.kpi {
  padding: 16px var(--card-pad);
  min-width: 0;
}

.kpi + .kpi {
  border-left: 1px solid var(--border);
}

.kpi-label {
  font-size: var(--fs-body);
  color: var(--muted);
}

.kpi-value {
  margin-top: 6px;
  font-size: var(--fs-kpi);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.kpi-value.lead {
  font-size: var(--fs-lead);
  font-weight: 600;
}

.kpi-unit {
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.kpi-note {
  margin-top: 4px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.sig-pos { color: var(--positive); }
.sig-neg { color: var(--negative); }
.sig-warn { color: var(--warning); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--card-pad);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: var(--fs-section);
  line-height: 1.3;
  font-weight: 600;
}

.panel-sub {
  margin-top: 2px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.panel-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-box {
  position: relative;
  min-width: 0;
  width: 100%;
}

.chart-caption {
  margin-top: 10px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.rows {
  display: grid;
}

.row-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  min-width: 0;
}

.row-item + .row-item {
  border-top: 1px solid var(--rule);
}

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

.row-title-btn,
.row-title-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.38;
  text-align: left;
  cursor: pointer;
}

.row-title-btn:hover,
.row-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.row-meta {
  margin-top: 3px;
  font-size: var(--fs-meta);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.row-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}

.search-wrap .input {
  width: 100%;
  padding-right: 36px;
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 0 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--control);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke-width: 1.6;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}

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

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: var(--fs-meta);
}

.btn[aria-pressed="true"] {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--text);
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
}

.text-action:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.input,
select.input,
textarea.input {
  min-height: var(--control-height);
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-body);
}

textarea.input {
  padding: 10px 12px;
  min-height: 92px;
  resize: vertical;
  width: 100%;
  line-height: 1.45;
}

.input::placeholder,
textarea.input::placeholder {
  color: var(--faint);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-control);
  background: var(--raised);
  border: 1px solid var(--border);
}

.segmented button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-meta);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"],
.segmented button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  border-color: var(--control);
}

.switch {
  appearance: none;
  width: 40px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--control);
  background: var(--raised);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background-color var(--t-ui) ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui) ease;
}

.switch:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.switch:checked::after {
  transform: translateX(16px);
  background: var(--primary-ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  background: var(--pill-neutral-bg);
  color: var(--pill-neutral-ink);
  white-space: nowrap;
}

.pill.pos {
  background: var(--pill-positive-bg);
  color: var(--pill-positive-ink);
}

.pill.neg {
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
}

.pill.warn {
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  height: 36px;
  padding: 0 10px;
  text-align: left;
  font-weight: 500;
  font-size: var(--fs-small);
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
  font-size: var(--fs-body);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr[data-pinned="true"] td {
  background: var(--accent-tint);
}

th.n,
td.n {
  text-align: right;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort-btn:hover,
.sort-btn[aria-pressed="true"] {
  color: var(--text);
}

.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--gap);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}

.field-hint {
  font-size: var(--fs-small);
  color: var(--muted);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.compare-card {
  padding: 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--ground);
  display: grid;
  gap: 6px;
}

.compare-cost {
  font-size: var(--fs-kpi);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.state-box {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 18px;
  border: 1px dashed var(--control);
  border-radius: var(--radius-control);
  background: var(--ground);
  color: var(--text);
}

.state-box p {
  color: var(--muted);
  max-width: 62ch;
}

.status-banner {
  margin-top: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.status-banner.error {
  color: var(--negative);
}

.status-banner.ok {
  color: var(--positive);
}

/* Native dialog for in-app Hacker News comments and arXiv abstract reading */
dialog.drawer {
  margin: 0 0 0 auto;
  width: min(680px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--control);
  background: var(--surface);
  color: var(--text);
}

dialog.drawer::backdrop {
  background: var(--scrim);
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--card-pad);
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  font-size: var(--fs-section);
  line-height: 1.35;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--card-pad);
  display: grid;
  align-content: start;
  gap: 14px;
}

.comment-item {
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--ground);
  border: 1px solid var(--border);
}

.comment-item.reply {
  margin-left: 18px;
}

.comment-head {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-text {
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.comment-text p + p {
  margin-top: 8px;
}

.comment-text a {
  color: var(--accent);
  text-decoration: underline;
}

.page-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--fs-small);
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Tablet and small laptop state: collapse sidebar into top bar, reflow 12-col panels cleanly */
@media (max-width: 1040px) {
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 6px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88%);
    height: 100dvh;
    z-index: 40;
    background: var(--surface);
    border-right: 1px solid var(--control);
    transform: translateX(-102%);
    transition: transform var(--t-ui) var(--ease-out);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: var(--scrim);
  }

  .btn.sidebar-close {
    display: inline-flex;
  }

  .canvas {
    padding: 20px;
  }

  .col-8,
  .col-7,
  .col-5,
  .col-4 {
    grid-column: span 12;
  }

  .col-6 {
    grid-column: span 6;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi:nth-child(3) {
    border-left: 0;
  }

  .kpi:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phone state: single column, 44px touch targets, compact padding, zero horizontal overflow */
@media (max-width: 680px) {
  :root {
    --control-height: 44px;
    --nav-row: 44px;
    --pad: 16px;
    --card-pad: 16px;
    --gap: 14px;
  }

  .canvas {
    padding: 16px;
  }

  .col-6 {
    grid-column: span 12;
  }

  .title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .title-actions {
    width: 100%;
  }

  .title-actions .btn {
    flex: 1 1 auto;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn.small,
  .text-action,
  .segmented button {
    min-height: 44px;
  }

  .search-kbd {
    display: none;
  }

  .row-item {
    flex-direction: column;
  }

  .row-side {
    width: 100%;
    justify-content: flex-start;
    padding-top: 4px;
  }

  dialog.drawer {
    width: 100%;
    border-left: 0;
  }
}

@media (pointer: coarse) {
  .btn,
  .nav-item,
  .input,
  select.input,
  .segmented button {
    min-height: 44px;
  }
}

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