/* Rise Therapy Partners Workspace — application stylesheet.

   The signed-in app is full-bleed: a permanent dark rail on the left, a sticky
   white topbar, and a fluid content column. There is exactly one dark surface
   (the rail, and the mobile drawer that is the same ink); everything else is
   light, so no component dropped into the page later has to guess.

   Custom-property NAMES are a hard dependency, not a style preference:
   templates/tools/zaya835.html has its own inline <style> that reads --surface,
   --border, --surface-sunken, --radius-lg, --shadow-shell, --primary and
   --muted. Renaming one of them breaks the generator's loading overlay
   silently, mid-batch, in the only tool that exists. Retune values here; never
   rename. */

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

:root {
  color-scheme: light;

  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-subtle: #f7f6fc;
  --surface-sunken: #f1eefb;
  --border: #e7e3f5;
  --border-strong: #d8d2ee;

  --text: #17152a;
  --text-soft: #423f5c;
  --muted: #6f6b8a;
  --faint: #9d99b4;

  --primary: #6c4cf1;
  --primary-hover: #5a3ae0;
  --primary-soft: #efebff;

  --success-bg: #e8f8ef;
  --success-border: #b7e6cb;
  --success-text: #187a48;

  --warn-bg: #fdf3e2;
  --warn-border: #f3dcae;
  --warn-text: #9a6510;

  --danger-bg: #fdecef;
  --danger-border: #f6c9d2;
  --danger-text: #b32741;

  --radius-lg: 12px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-shell: 0 12px 32px rgba(20, 18, 39, 0.14);
  --shadow-card: 0 1px 2px rgba(20, 18, 39, 0.04);
  --shadow-pop: 0 2px 8px rgba(70, 52, 150, 0.07);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--primary); }

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

.skip {
  position: absolute;
  left: -9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 600;
}

.skip:focus { left: 8px; top: 8px; z-index: 60; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* =========================================================== app frame === */

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.col { min-width: 0; display: flex; flex-direction: column; }

/* ================================================================ rail === */

.rail,
.drawer {
  /* Ink tokens live here and never on :root, so nothing placed inside the rail
     later can inherit a light-surface assumption from the page. */
  --ink: #141227;
  --ink-2: #1e1b36;
  --ink-line: rgba(255, 255, 255, 0.08);
  --ink-text: rgba(255, 255, 255, 0.74);
  --ink-text-strong: #ffffff;
  --ink-faint: rgba(255, 255, 255, 0.38);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--ink);
  border-right: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  z-index: 40;
}

.rail :focus-visible { outline-color: #a48cff; }

.rail-brand { padding: 0 16px; margin-bottom: 24px; display: block; text-decoration: none; }
.rail-brand img { height: 16px; width: auto; display: block; }

.rail-brand .sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.rail-group {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 16px 10px 6px;
}

.rail nav ul { list-style: none; }
.rail nav li { margin-bottom: 2px; }

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-text);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.rail-item svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }
.rail-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink-text-strong); }

.rail-item[aria-current="page"] {
  background: var(--primary);
  color: #fff;
  font-weight: 650;
}

.rail-item[aria-current="page"] svg { opacity: 1; }

.rail-child {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 36px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.rail-child:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink-text-strong); }
.rail-child[aria-current="page"] { color: #fff; }

.rail-child[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 22px;
  width: 2px;
  height: 14px;
  border-radius: 1px;
  background: var(--primary);
}

.rail-child .ext { margin-left: auto; opacity: 0.5; width: 12px; height: 12px; }

.rail-rule { margin: 14px 10px 0; border-top: 1px solid var(--ink-line); }

.rail-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.rail-foot .who {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.rail-foot .who:hover { background: rgba(255, 255, 255, 0.06); }

.rail-avatar {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(108, 76, 241, 0.28);
  color: #cfc3ff;
}

.rail-foot .meta { min-width: 0; line-height: 1.25; }
.rail-foot .name { display: block; font-size: 13px; font-weight: 600; color: #fff;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-foot .role { display: block; font-size: 11px; color: var(--ink-faint); }

.rail-signout {
  width: 28px; height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.rail-signout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail-signout svg { width: 15px; height: 15px; }

/* ============================================================== topbar === */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.crumbs { font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .sep { color: var(--faint); margin: 0 8px; }
.crumbs .here { color: var(--text); font-weight: 600; }

.topbar-search { margin-left: auto; position: relative; display: flex; align-items: center; }
.topbar-search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--faint); }

.topbar-search input {
  width: 280px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 12px 0 34px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.16);
}

.search-link, .nav-toggle {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-link:hover, .nav-toggle:hover { background: var(--surface-subtle); color: var(--text); }

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

/* ============================================================= content === */

.content { padding: 28px 32px 64px; }
.wrap { max-width: 1200px; margin: 0 auto; }

h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
h2 { font-size: 15px; font-weight: 650; margin: 28px 0 12px; }
h3 { font-size: 14px; font-weight: 650; margin-bottom: 4px; }

.page-head { margin-bottom: 22px; }
.caption { color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.page-head .caption { margin-top: 2px; }
.section-note { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.eyebrow a { color: var(--muted); text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* ========================================================== dashboard === */

.greet { margin-bottom: 20px; }
.greet h1 { font-size: 24px; font-weight: 600; }
.greet .line { font-size: 13px; color: var(--muted); margin-top: 2px; }

.dash {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

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

.panel-head h2 { font-size: 13px; font-weight: 650; margin: 0; }
.panel-head a { font-size: 12px; text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.stat .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat .value { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.stat .value.warn { color: var(--warn-text); }
.stat .value.danger { color: var(--danger-text); }

.alert-tile {
  border-left: 3px solid;
  border-radius: 10px;
  padding: 12px 14px;
}

.alert-tile .t { font-size: 13px; font-weight: 650; }
.alert-tile .b { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.alert-tile a { display: inline-block; margin-top: 6px; font-size: 13px; }

.alert-tile.danger { background: var(--danger-bg); border-color: var(--danger-border); }
.alert-tile.danger .t { color: var(--danger-text); }
.alert-tile.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.alert-tile.warn .t { color: var(--warn-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chip:hover { background: var(--surface-subtle); border-color: var(--border-strong); }
.chip svg { width: 15px; height: 15px; }

.chip.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.primary:hover { background: var(--primary-hover); }

.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }

.area-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.area-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-pop); }
.area-card.empty { opacity: 0.62; }
.area-card svg { width: 20px; height: 20px; color: var(--primary); }
.area-card .n { font-size: 14px; font-weight: 650; margin-top: 8px; }

.area-card .blurb {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.area-card .count { font-size: 12px; color: var(--faint); margin-top: 10px; }

/* =========================================================== tool rows === */

.tool-list { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

.tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.tool-row:last-child { border-bottom: none; }
.tool-row:hover { background: var(--surface-subtle); }
.tool-row.dead { color: var(--muted); cursor: default; }
.tool-row.dead:hover { background: transparent; }

.tool-mark {
  width: 28px; height: 28px;
  flex: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.tool-mark svg { width: 15px; height: 15px; }

.tool-main { min-width: 0; flex: 1; }
.tool-name { font-size: 14px; font-weight: 600; }
.tool-summary { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-open { font-size: 13px; color: var(--primary); flex: none; }
.tool-row .ext { width: 13px; height: 13px; color: var(--faint); flex: none; }

.chip-area {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.pill {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--muted);
}

.pill.beta { background: var(--warn-bg); color: var(--warn-text); }
.pill.retired { background: var(--surface-sunken); color: var(--faint); }
.pill.hidden-row { background: var(--surface-sunken); color: var(--faint); }

/* =========================================================== feed rows === */

.feed { list-style: none; }

.feed li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 36px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.feed li:last-child { border-bottom: none; }
.feed .what { font-size: 13px; color: var(--text); flex: 1; min-width: 0; }
.feed .who { font-size: 12px; color: var(--muted); }
.feed .when { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.feed .where { display: block; font-size: 12px; color: var(--faint); }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; align-items: baseline; }
.dl dt { color: var(--muted); }
.dl dd { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.dl dd a { text-decoration: none; }
.dl dd a:hover { text-decoration: underline; }

.dl.sys { font-size: 12.5px; }
.dl.sys dt { color: var(--faint); }
.dl.sys dd { color: var(--text-soft); text-align: right; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--success-text); }
.dot.bad { background: var(--danger-text); }

/* ================================================== retained components === */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.card-tight { padding: 14px 16px; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.14);
}

input:disabled { background: var(--surface-subtle); color: var(--muted); }

input[type=file] {
  width: 100%;
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 0.85rem 1rem;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

input[type=file]:hover { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }

.checkline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-soft); }
.checkline input[type=checkbox] { width: auto; accent-color: var(--primary); }
.checkline label { margin: 0; font-weight: 500; font-size: 13.5px; color: var(--text-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }

button, .btn {
  display: block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.62rem 1.3rem;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  margin-top: 14px;
}

button:hover, .btn:hover { background: var(--primary-hover); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-quiet { background: var(--surface-subtle); border: 1px solid var(--border); color: var(--muted); }
.btn-quiet:hover { background: var(--surface-sunken); color: var(--text); }

.btn-small { width: auto; margin: 0; padding: 0.32rem 0.75rem; font-size: 12.5px; }
.btn-inline { width: auto; margin-top: 0; }

.alert {
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  margin-bottom: 14px;
  font-size: 13.5px;
  border: 1px solid transparent;
}

.alert.error   { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger-text); }
.alert.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.alert.warning { background: var(--warn-bg);    border-color: var(--warn-border);    color: var(--warn-text); }
.alert.info    { background: var(--primary-soft); border-color: #ded4ff; color: #4a2fc0; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}

.metric .label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.metric .value { font-size: 24px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.metric .value.ok   { color: var(--success-text); }
.metric .value.warn { color: var(--warn-text); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-sunken);
  color: var(--muted);
}

.badge.ok     { background: var(--success-bg); color: var(--success-text); }
.badge.warn   { background: var(--warn-bg);    color: var(--warn-text); }
.badge.danger { background: var(--danger-bg);  color: var(--danger-text); }

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }

table.data th {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; height: 40px; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-subtle); }

.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 12.5px; }

.empty-state {
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-subtle);
}

.muted-row { padding: 10px 0; font-size: 13px; color: var(--muted); }

/* ========================================================= auth pages === */

.auth-split { display: grid; grid-template-columns: 44% 56%; min-height: 100vh; }

.auth-panel {
  background: linear-gradient(160deg, #6c4cf1, #4326b8);
  color: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-panel img { height: 22px; width: auto; display: block; }
.auth-panel .pitch { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.86); max-width: 34ch; }
.auth-panel .foot { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }

.auth-side { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-form { width: 100%; max-width: 360px; }
.auth-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.auth-step { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.auth-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }

.auth-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--faint);
}

.code-input {
  width: 100%;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  padding: 0.6rem 0.5rem;
  font-family: var(--font);
}

.resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.linkish {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: auto;
}

.linkish:hover { background: none; text-decoration: underline; }
.linkish:disabled { color: var(--faint); cursor: not-allowed; text-decoration: none; }

/* ================================================== standalone messages === */

.standalone { min-height: 100vh; display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.standalone .inner { max-width: 520px; text-align: center; }
.standalone img { height: 16px; width: auto; margin: 0 auto 24px; display: block; }
.error-code { font-size: 40px; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }

/* ============================================================= drawer === */

.scrim { display: none; }

/* ========================================================= responsive === */

@media (max-width: 1180px) {
  .dash { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-12, .span-8, .span-7, .span-5, .span-4 { grid-column: span 6; }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 68px minmax(0, 1fr); }
  .rail { padding: 18px 8px 12px; align-items: stretch; }
  .rail-brand { padding: 0; text-align: center; }
  .rail-brand img { display: none; }
  .rail-brand .sub { margin-top: 0; font-size: 10px; letter-spacing: 0.08em; }
  .rail-group, .rail-item span, .rail-child, .rail-foot .meta { display: none; }
  .rail-item { justify-content: center; padding: 0; }
  .rail-foot { flex-direction: column; gap: 8px; }
  .rail-foot .who { justify-content: center; flex: none; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: fixed;
    left: -264px;
    top: 0;
    width: 264px;
    padding: 18px 12px 12px;
    transition: left 0.18s ease;
  }

  .rail-brand img { display: block; }
  .rail-brand { padding: 0 16px; text-align: left; }
  .rail-brand .sub { margin-top: 6px; font-size: 11px; letter-spacing: 0.14em; }
  .rail-group, .rail-item span, .rail-child, .rail-foot .meta { display: revert; }
  .rail-item { justify-content: flex-start; padding: 0 10px; }
  .rail-foot { flex-direction: row; gap: 10px; }
  .rail-foot .who { justify-content: flex-start; flex: 1; }

  body.nav-open .rail { left: 0; }

  body.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 39, 0.45);
    z-index: 30;
  }

  .nav-toggle { display: grid; order: -1; }
  .topbar { padding: 0 16px; }
  .topbar-search { display: none; }
  .search-link { display: grid; margin-left: auto; }
  .content { padding: 20px 16px 48px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .span-12, .span-8, .span-7, .span-5, .span-4 { grid-column: span 1; }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .metrics, .split { grid-template-columns: 1fr; }
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-panel { min-height: 96px; padding: 20px 24px; flex-direction: row; align-items: center; }
  .auth-panel .pitch, .auth-panel .foot { display: none; }
  .auth-side { min-height: calc(100vh - 96px); }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { text-align: left; margin-bottom: 8px; }
}
