:root {
  --clay: #B04C25;
  --clay-dark: #8A3A18;
  --ink: #2A221C;
  --paper: #FFF9F3;
  --sand: #F6EDE2;
  --clay-soft: #F3E4D6;
  --amber: #C9894A;
  --muted: #5C4E44;
  --line: #E4D5C6;
  --danger: #9A3228;
  --danger-soft: #F8E6E2;
  --radius: 16px;
  --shadow: 0 18px 40px -24px rgba(42, 34, 28, 0.38);

  --pine: var(--clay);
  --pine-dark: var(--clay-dark);
  --cream: var(--sand);
  --pine-soft: var(--clay-soft);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.05rem;
  min-height: 100vh;
}
body.public-site {
  background-color: var(--sand);
  isolation: isolate;
}
body.public-site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../img/grinder-angled-hero.jpg?v=b19");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.2;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
img { max-width: 100%; height: auto; }
a { color: var(--clay-dark); }
a:hover { color: var(--ink); }
.wrap { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark { height: 48px; width: 48px; display: block; flex-shrink: 0; }
.brand-wordmark { height: 30px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem; }
.nav a:hover { color: var(--clay-dark); }
.banner {
  background: var(--clay-dark);
  color: var(--paper);
  padding: 0.7rem 0;
  font-size: 0.95rem;
}
.hero { padding: 3.4rem 0 3rem; }
.hero-intro { display: flex; align-items: center; gap: 1.6rem; margin: 0; }
.hero-splash { margin: 0; flex: 1 1 46%; min-width: 0; max-width: 34rem; }
.hero-splash img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: var(--sand);
}
.hero-title {
  min-width: 0;
  flex: 1 1 48%;
  background: var(--paper);
  border-radius: 24px;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-title h1 { margin: 0 0 0.7em; }
.hero-title .lead { margin-top: 0; }
.hero-title .actions { margin-top: 1.35rem; }
.hero-eyebrow { font-weight: 600; margin: 0 0 0.55rem; }
.paste-box.paste-home {
  margin-top: 1.6rem;
  background: var(--paper);
  border-radius: 24px;
  padding: 1.15rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

body.public-site .section > h1,
body.public-site .section > h2,
body.public-site .section > p,
body.public-site .wrap > section > h1,
body.public-site .wrap > section > p {
  background: var(--paper);
  border-radius: 16px;
  padding: 0.7rem 1rem 0.85rem;
  display: table;
  border: 1px solid var(--line);
}
body.public-site .section > h1,
body.public-site .wrap > section > h1 {
  margin-bottom: 0.7rem;
  padding-bottom: 0.65rem;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 0.7em; }
h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 38rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--clay); color: var(--paper) !important;
  text-decoration: none; border: 0; cursor: pointer;
  border-radius: 999px; padding: 0.7rem 1.2rem;
  font: inherit; font-weight: 600; font-size: 0.98rem;
}
.btn:hover { background: var(--clay-dark); }
.btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper); }
.btn-danger { background: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.preview {
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.35rem;
  border: 1px solid var(--line);
}
.preview-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: none; margin-bottom: 0.8rem; }
.preview-link { font-weight: 600; font-size: 1.15rem; }
.preview-dest { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 1rem; word-break: break-all; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.stat { background: var(--clay-soft); border-radius: 12px; padding: 0.85rem; }
.stat b { display: block; font-size: 1.4rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.section { padding: 3.2rem 0; }
.grid-3, .grid-2, .grid-4 { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line);
}
.card h3 { margin-bottom: 0.4rem; }
.muted { color: var(--muted); }
.flash { border-radius: 12px; padding: 0.8rem 1rem; margin: 1rem 0; }
.flash-success { background: var(--clay-soft); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
form.stack { display: grid; gap: 0.85rem; }
label { font-weight: 500; display: block; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=datetime-local], textarea, select {
  width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: var(--paper); color: var(--ink);
}
textarea { min-height: 8rem; }
.narrow { max-width: 32rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.site-footer {
  margin-top: 4rem; padding: 2.2rem 0 2.6rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.6rem 0 1rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer .credit a { color: var(--clay-dark); font-weight: 500; }
.price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card.featured { border-color: var(--clay); box-shadow: var(--shadow); }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-nav { background: var(--ink); color: var(--paper); padding: 1.3rem 1rem; }
.admin-nav a { color: var(--clay-soft); text-decoration: none; display: block; padding: 0.35rem 0.4rem; border-radius: 8px; }
.admin-nav a:hover { background: rgba(255,255,255,0.06); }
.admin-nav a.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
  padding: 0.15rem 0.15rem 0.7rem;
}
.admin-nav .brand-mark { height: 34px; width: 34px; }
.admin-nav .brand-wordmark { height: 18px; }
.admin-main { padding: 1.5rem 1.6rem 3rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.note { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 860px) {
  .hero, .grid-3, .grid-4, .grid-2, .admin-shell { grid-template-columns: 1fr; }
  .hero { padding-top: 1.6rem; }
  .hero-intro { flex-direction: column; align-items: stretch; gap: 1rem; }
  .hero-splash { max-width: none; flex-basis: auto; }
  .site-header { flex-direction: column; align-items: flex-start; }
}

.admin-nav .btn-ghost { color: var(--paper) !important; border-color: rgba(255,249,243,0.35); width: 100%; }
.admin-nav .btn-ghost:hover { background: rgba(255,255,255,0.08); }
.preview-dest { overflow-wrap: anywhere; }

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

.btn { min-height: 2.6rem; padding: 0.55rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--clay-dark) !important; border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--clay-soft); color: var(--ink) !important; }
.btn-small { min-height: 2rem; padding: 0.25rem 0.7rem; font-size: 0.9rem; font-weight: 500; }
.btn-danger { background: var(--danger); color: var(--paper) !important; }
.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.stack label, form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 500; }
input, select, textarea { font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
label.inline { flex-direction: row; align-items: center; font-weight: 500; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.flash { padding: 0.75rem 1rem; border-radius: 12px; margin: 0 0 1rem; }
.flash-success { background: var(--clay-soft); color: var(--ink); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.narrow { max-width: 36rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .back { margin-top: 0; }
.back { margin-bottom: 0.6rem; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--paper); }
.data-table th, .data-table td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table.roomy th, .data-table.roomy td { height: 48px; padding: 0.55rem 0.8rem; }
.data-table thead th { font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.row-link { cursor: pointer; }
.row-link:hover { background: var(--clay-soft); }
.short-mono, code, .backup-codes { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }
.copy-btn, .icon-btn { margin-left: 0.35rem; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 0.15rem 0.45rem; font: inherit; font-size: 0.8rem; color: var(--clay-dark); cursor: pointer; }
.copy-btn { opacity: 0; }
tr:hover .copy-btn, td:focus-within .copy-btn, .copy-btn:focus { opacity: 1; }
@media (max-width: 800px) { .copy-btn { opacity: 1; } }
.truncate { max-width: 20rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--clay-soft); }
.badge-active { background: var(--clay-soft); color: var(--clay-dark); }
.badge-paused { background: #ece4d8; color: var(--muted); }
.badge-disabled, .badge-error { background: var(--danger-soft); color: var(--danger); }
.badge-pending, .badge-verified { background: var(--clay-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin: 0 0 1rem; }
.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.8rem; }
.empty-state { text-align: left; max-width: 28rem; }
.empty-state .example, .example { color: var(--muted); font-size: 0.92rem; }
.help-tip { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1px solid var(--line); font-size: 0.75rem; font-weight: 700; text-decoration: none; color: var(--muted); vertical-align: middle; }
.help-tip:hover { background: var(--clay-soft); color: var(--ink); }
.tip-link { text-decoration: none; }
.tip-link[title]:hover::after { content: attr(title); position: absolute; display: block; background: var(--ink); color: var(--paper); font-size: 0.8rem; font-family: Outfit, sans-serif; padding: 0.3rem 0.5rem; border-radius: 8px; max-width: 22rem; z-index: 5; margin-top: 1.4rem; }
td, th, p { position: relative; }
.privacy-note { margin: 0.5rem 0 1rem; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.chart-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem 1rem; margin: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.chart-head h3 { font-size: 1.05rem; margin: 0; }
.chart-svg { display: block; max-width: 100%; }
.chart-range { display: flex; gap: 0.5rem; margin: 0.6rem 0 1rem; }
.chart-range a { padding: 0.2rem 0.55rem; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); color: var(--ink); }
.chart-range a[aria-current="page"] { background: var(--clay); color: var(--paper); border-color: var(--clay); }
.chart-table { margin-top: 0.6rem; overflow-x: auto; }
.donut-wrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.donut-legend { list-style: none; margin: 0; padding: 0; }
.donut-legend li { display: flex; gap: 0.4rem; align-items: center; margin: 0.2rem 0; }
.swatch { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; }
.sparkline { display: inline-block; vertical-align: middle; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1rem 0; }
.kpi b { font-size: 1.6rem; display: block; }
@media (max-width: 900px) { .chart-grid, .kpi-grid { grid-template-columns: 1fr; } }

body.dash-site { background: var(--sand); }
.dash-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.dash-sidebar { background: var(--paper); border-right: 1px solid var(--line); padding: 1.2rem 1rem 2rem; display: flex; flex-direction: column; }
.dash-sidebar .brand { display: flex; margin-bottom: 1.2rem; }
.dash-sidebar .brand-mark { height: 40px; width: 40px; }
.dash-sidebar .brand-wordmark { height: 22px; }
.dash-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.dash-nav a, .dash-sidebar-foot a { text-decoration: none; color: var(--ink); padding: 0.45rem 0.55rem; border-radius: 10px; font-weight: 500; }
.dash-nav a.is-active, .dash-sidebar-foot a.is-active { background: var(--clay-soft); color: var(--clay-dark); }
.dash-nav a:hover, .dash-sidebar-foot a:hover { background: var(--clay-soft); }
.dash-sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.15rem; padding-top: 1.5rem; }
.dash-main { padding: 1.2rem 1.6rem 5rem; min-width: 0; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dash-greeting { margin: 0; color: var(--muted); font-size: 0.95rem; }
.dash-tabbar, .dash-more { display: none; }
.paste-form { display: flex; gap: 0.5rem; }
.paste-form input { flex: 1; }
.starter-list { padding-left: 1.2rem; }
.starter-list .is-done { color: var(--muted); text-decoration: line-through; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.settings-tabs a { text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.settings-tabs a.is-active { background: var(--clay); color: var(--paper); border-color: var(--clay); }
.qr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.qr-card { text-align: center; }
.backup-codes { background: var(--clay-soft); padding: 1rem; border-radius: 12px; white-space: pre-wrap; }

.modal { position: fixed; inset: 0; background: rgba(42,34,28,0.45); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; box-sizing: border-box; overflow: hidden; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: var(--radius); padding: 1.4rem; padding-bottom: 1.6rem; width: min(32rem, 100%); max-height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow); }
.more-options { border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem 0.8rem; }
.more-options summary { cursor: pointer; font-weight: 600; }

body.admin-site { background: var(--sand); }
.admin-nav .nav-section { color: rgba(255,249,243,0.55); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0.9rem 0 0.2rem; }
.admin-nav a.is-active { background: rgba(255,255,255,0.1); color: var(--paper); }

@media (max-width: 860px) {
  .dash-shell { grid-template-columns: minmax(0, 1fr); }
  .dash-sidebar { display: none; }
  .dash-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--paper); border-top: 1px solid var(--line); z-index: 30; }
  .dash-tabbar a, .dash-tabbar button { background: none; border: 0; padding: 0.7rem 0.3rem 0.85rem; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--ink); text-decoration: none; text-align: center; }
  .dash-tabbar .is-active, .dash-tabbar .tab-new { color: var(--clay-dark); }
  .dash-tabbar .tab-new { color: var(--paper); background: var(--clay); margin: 0.35rem 0.3rem; border-radius: 999px; padding: 0.35rem 0; }
  .dash-more { display: none; position: fixed; bottom: 3.4rem; right: 0.6rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem; z-index: 31; min-width: 10rem; box-shadow: var(--shadow); }
  .dash-more:not([hidden]) { display: flex; flex-direction: column; }
  .dash-more a { padding: 0.4rem 0.6rem; text-decoration: none; color: var(--ink); }
  body.dash-site { scroll-padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px)); }
  .dash-main { padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)); }
  .dash-tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)); align-items: flex-end; }
  .modal-card { max-height: 100%; }

  .dns-records.table-wrap { overflow: visible; }
  .dns-records .data-table { width: 100%; border: 0; background: transparent; }
  .dns-records .data-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
  .dns-records .data-table, .dns-records .data-table tbody { display: block; }
  .dns-records .data-table tr { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.9rem; margin: 0 0 0.75rem; }
  .dns-records .data-table td { display: block; border: 0; padding: 0.3rem 0; overflow-wrap: anywhere; word-break: break-word; vertical-align: top; }
  .dns-records .data-table td::before { content: attr(data-label); display: block; font-weight: 600; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.15rem; font-family: inherit; }
  .dns-records .copy-btn { opacity: 1; margin-top: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.feature-card {
  display: flex;
  flex-direction: row;
  gap: 1.15rem;
  align-items: flex-start;
}
.feature-card .feature-art {
  display: block;
  width: 9rem;
  height: 9rem;
  margin: 0;
  border-radius: 16px;
  flex: 0 0 9rem;
  background: var(--clay-soft);
}
.feature-card .feature-copy {
  min-width: 0;
}
.feature-card .feature-copy h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}

.grid-3 .feature-card {
  flex-direction: column;
  gap: 0;
}
.grid-3 .feature-card .feature-art {
  flex: none;
  margin: 0 0 0.95rem;
}
@media (max-width: 860px) {
  .feature-card {
    flex-direction: column;
    gap: 0;
  }
  .feature-card .feature-art {
    width: 8.25rem;
    height: 8.25rem;
    flex: none;
    margin: 0 0 0.95rem;
  }
}

.admin-shell > .admin-nav, .admin-shell > .admin-main { min-width: 0; }
.admin-main .note a { overflow-wrap: anywhere; }

.schedule-box { border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.75rem; background: var(--paper); }
.schedule-box summary { cursor: pointer; font-weight: 600; min-height: 2.4rem; display: flex; align-items: center; }
.schedule-box .schedule-note { margin: 0.45rem 0 0.5rem; font-size: 0.88rem; color: var(--muted); font-weight: 400; }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 0.85rem; }
.schedule-fields label { margin: 0; }
.schedule-input-row { display: flex; gap: 0.4rem; align-items: center; }
.schedule-input-row input { flex: 1; min-width: 0; }
.schedule-input-row .btn { flex: none; }
.schedule-remove-wrap { margin: 0.5rem 0 0; }
.schedule-locked { border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.75rem; background: var(--paper); font-size: 0.92rem; color: var(--muted); }
.schedule-readonly { margin: 0.35rem 0 0.6rem; font-size: 0.92rem; }
label.schedule-clear-all { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 0.45rem; font-weight: 500; text-align: left; width: max-content; max-width: 100%; }
label.schedule-clear-all input[type=checkbox] { width: 1rem; height: 1rem; margin: 0; flex: none; }
.modal .schedule-fields { grid-template-columns: 1fr; }
.badge-scheduled { background: #efe4cf; color: #6a4a16; }
.badge-ended { background: #ece4d8; color: var(--muted); }
.badge-off { background: var(--danger-soft); color: var(--danger); }
.link-status { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; vertical-align: middle; }
.link-status-when { font-size: 0.78rem; color: var(--muted); font-weight: 400; line-height: 1.3; }
@media (max-width: 520px) {
  .schedule-fields { grid-template-columns: 1fr; }
}

.link-status-mobile { display: none; margin-top: 0.3rem; }
@media (max-width: 700px) {
  .col-dest, .col-spark, .col-status { display: none; }
  .link-status-mobile { display: block; }
  .link-status { max-width: none; }
}

.help-jump { font-size: 0.55em; font-weight: 600; vertical-align: super; margin-left: 0.25em; text-decoration: none; opacity: 0.7; }
.help-jump:hover, .help-jump:focus-visible { opacity: 1; text-decoration: underline; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.data-table td.num, .data-table th.num { text-align: right; }
.nowrap { white-space: nowrap; }
.small { font-size: 0.85em; }
.btn-sm { min-height: 2rem; padding: 0.25rem 0.75rem; font-size: 0.9rem; font-weight: 500; }
tr.row-link:focus-visible { outline: 2px solid var(--clay); outline-offset: -2px; background: var(--clay-soft); }
.modal-card h2 { margin-top: 0; }
.modal-foot { margin: 1rem 0 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0.6rem 0 1rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.action-list { display: flex; flex-direction: column; gap: 0.5rem; }
.action-list form { margin: 0; }
.action-list .btn, .action-list button { width: 100%; justify-content: center; }
.action-list .action-sep { border: 0; border-top: 1px solid var(--line); margin: 0.4rem 0; width: 100%; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin: 0.8rem 0 1rem; }
.detail-sections { display: grid; gap: 1rem; margin-top: 1rem; }
.detail-sections > .card h2 { margin-top: 0; font-size: 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.card-danger { border-color: var(--danger); }
.card-danger h2 { color: var(--danger); }
.card-danger .danger-block + .danger-block { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.status-line { margin: 0.4rem 0 0; }
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (max-width: 640px) {
  .kv { grid-template-columns: 1fr; gap: 0.1rem; }
  .kv dd { margin-bottom: 0.45rem; }
  .date-range { grid-template-columns: 1fr; }
  .pay-table .truncate { max-width: 9rem; }
}

[data-new-only][hidden] { display: none !important; }

.lang-switch { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; white-space: nowrap; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover, .lang-switch a:focus-visible { text-decoration: none; }
.lang-switch a.is-current { color: inherit; font-weight: 600; }
.lang-switch span[aria-hidden] { opacity: .5; }
.lang-suggest { background: #E6F2F3; border-bottom: 1px solid #CFE3E6; font-size: .92rem; padding: .45rem 0; }
.lang-suggest .wrap { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; }
.dash-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem 1.25rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line, #DCE8EA); font-size: .85rem; color: var(--muted); }
.dash-footer .credit { margin: 0; text-align: right; }
.dash-footer .credit .build { white-space: nowrap; }
.dash-sidebar-foot .lang-switch { margin: .25rem 0; }
@media (max-width: 640px) {
  .dash-footer { flex-direction: column; align-items: flex-end; }
}

.dash-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); justify-content: stretch; }
.dash-footer .footer-lang { justify-self: center; }
.dash-footer .credit { justify-self: end; }
@media (max-width: 760px) {
  .dash-footer { grid-template-columns: 1fr; justify-items: center; }
  .dash-footer .dash-footer-spacer { display: none; }
  .dash-footer .credit { justify-self: end; }
}

.flash-info { background: var(--sand); border: 1px solid var(--line); color: var(--ink); }
.impact-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.impact-words ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.impact-words li { margin: 0.25rem 0; }
.impact-tables { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 1rem; }
.impact-share .share-url { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.share-url input { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
.impact-public { padding-top: 2rem; max-width: 1100px; margin: 0 auto; }
.np-check td, .np-check th { vertical-align: top; }
.np-ok { color: #1F6B45; font-weight: 600; }
.np-bad { color: var(--danger); font-weight: 600; }
@media (max-width: 640px) {
  .impact-tables { grid-template-columns: 1fr; }
  .impact-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .dash-sidebar, .dash-top, .dash-tabbar, .dash-footer, body > header, .site-footer, .chart-range, .impact-share, .btn, .gchat, .consent-banner { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; border-color: #ccc; }
}
.np-settings label.check { display: flex; gap: 0.55rem; align-items: center; font-weight: 400; }
.np-settings label.check input { width: auto; margin: 0; flex: none; }
.np-settings fieldset { display: grid; gap: 0.35rem; }

/* Build 21.2: nav/footer hover affordance + NPO Directory outline pill */
.site-header .nav > a:not(.btn),
.site-header .lang-switch a,
.site-footer .footer-row nav a,
.site-footer .footer-row nav button.consent-open,
.site-footer .footer-row .credit a,
.site-footer .lang-switch a {
  position: relative;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding-bottom: 0.15rem;
}
.site-header .nav > a:not(.btn)::after,
.site-header .lang-switch a::after,
.site-footer .footer-row nav a::after,
.site-footer .footer-row nav button.consent-open::after,
.site-footer .footer-row .credit a::after,
.site-footer .lang-switch a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
  pointer-events: none;
}
.site-header .nav > a:not(.btn):hover::after,
.site-header .nav > a:not(.btn):focus-visible::after,
.site-header .lang-switch a:hover::after,
.site-header .lang-switch a:focus-visible::after,
.site-footer .footer-row nav a:hover::after,
.site-footer .footer-row nav a:focus-visible::after,
.site-footer .footer-row nav button.consent-open:hover::after,
.site-footer .footer-row nav button.consent-open:focus-visible::after,
.site-footer .footer-row .credit a:hover::after,
.site-footer .footer-row .credit a:focus-visible::after,
.site-footer .lang-switch a:hover::after,
.site-footer .lang-switch a:focus-visible::after {
  transform: scaleX(1);
}

.btn-outline {
  background: transparent !important;
  color: var(--clay-dark) !important;
  border: 2px solid var(--clay);
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--clay-soft) !important;
  color: var(--ink) !important;
  transform: translateY(-2px);
}

.site-header .nav a.btn {
  transition: background-color 200ms ease, transform 200ms ease, filter 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  text-decoration: none;
  cursor: pointer;
}
.site-header .nav a.btn::after {
  content: none;
  display: none;
}
.site-header .nav a.btn:hover,
.site-header .nav a.btn:focus-visible,
.site-header .nav a.btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 58, 71, 0.35);
}
.site-header .nav a.btn:not(.btn-outline):hover,
.site-header .nav a.btn:not(.btn-outline):focus-visible {
  filter: brightness(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .site-header .nav > a:not(.btn)::after,
  .site-header .lang-switch a::after,
  .site-footer .footer-row nav a::after,
  .site-footer .footer-row nav button.consent-open::after,
  .site-footer .footer-row .credit a::after,
  .site-footer .lang-switch a::after,
  .site-header .nav a.btn,
  .btn-outline {
    transition: none;
  }
  .site-header .nav a.btn:hover,
  .site-header .nav a.btn:focus-visible,
  .site-header .nav a.btn:active,
  .btn-outline:hover,
  .btn-outline:focus-visible,
  .btn-outline:active {
    transform: none;
    filter: none;
    box-shadow: none;
  }
}

/* Build 21.2: inactivity warning */
.idle-modal { z-index: 80; }
.idle-modal .modal-card { width: min(24rem, 100%); }

/* Build 21.3: taller header, right-justified menu, language links stacked above the main button */
.site-header { padding: 1.15rem 0; } /* with the stacked language row: about 25% taller than 21.2 (83px -> ~104px at desktop) */
.site-header .nav { flex: 1 1 auto; justify-content: flex-end; }
.site-header .nav-cta { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.site-header .nav-cta .lang-switch { font-size: 0.85rem; line-height: 1.2; }
.site-header .nav-cta form { margin: 0; }
@media (max-width: 860px) {
  .site-header { padding: 1.1rem 0; }
  .site-header .nav { justify-content: flex-start; }
  .site-header .nav-cta { flex-direction: row-reverse; align-items: center; flex-wrap: wrap; gap: 0.35rem 1.1rem; }
}

/* Build 21.4: menu text lines up with the main button; language links centered above the button;
   more breathing room: about 32px clear space above the language row and below the button (desktop). */
@media (min-width: 861px) {
  .site-header { padding: 2rem 0; align-items: center; }
  .site-header .nav { align-items: flex-end; }
  /* Plain links get the button's height so their text sits on the button's center line. */
  .site-header .nav > a:not(.btn) { min-height: 2.6rem; padding-bottom: 0; }
  .site-header .nav > a:not(.btn)::after { bottom: 0.45rem; }
  .site-header .nav-cta { flex-direction: column; align-items: center; gap: 0.65rem; }
  .site-header .nav-cta .lang-switch { justify-content: center; }
  .site-header .nav-cta form .btn { height: 2.6rem; min-height: 2.6rem; padding-top: 0; padding-bottom: 0; box-sizing: border-box; display: inline-flex; align-items: center; }
}
@media (max-width: 860px) {
  .site-header { padding: 1.35rem 0; }
}

/* Build 21.5: online status, two-step badges, link safety */
.online-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: #b9b1a9; }
.online-dot.is-online { background: #1f9d55; box-shadow: 0 0 0 2px rgba(31, 157, 85, .18); }
.online-text { font-size: .85em; }
.online-now-wrap { margin-left: .8rem; white-space: nowrap; }
.badge-exempt { background: #fff1c2; color: #6b4e00; }
.twofa-badge.badge-pending { background: #fde2dc; color: #8a2a12; }
.badge-review { background: #fff1c2; color: #6b4e00; }
.badge-unsafe { background: #fde2dc; color: #8a2a12; }
.notice.twofa-required, .link-safety-note { background: #fff6e0; border-left: 4px solid #d99a00; padding: .7rem .9rem; border-radius: 6px; }
.link-safety-note.is-unsafe { background: #fdecea; border-left-color: #c0392b; }
.link-review-host { font-size: 1.15rem; word-break: break-all; }
.link-safety .actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.flagged-table td { vertical-align: top; }
.flagged-table .actions-cell form { display: inline-block; margin: 0 .25rem .25rem 0; }
.flag-reason { font-size: .9em; }

/* Build 21.5: admin side nav (current page, sticky) and a condensed member page with jump links */
.admin-nav a.is-active { background: rgba(255,255,255,0.16); color: var(--paper); font-weight: 600; box-shadow: inset 3px 0 0 var(--paper); }
@media (min-width: 861px) {
  .admin-nav { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; overscroll-behavior: contain; }
}
.ud-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.4rem; }
.ud-pn { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ud-pn .is-disabled { opacity: 0.45; pointer-events: none; }
.ud-pos { font-size: 0.85rem; }
.ud-title { font-size: 1.35rem; margin: 0.2rem 0 0.4rem; overflow-wrap: anywhere; }
.ud-jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 0.3rem; overflow-x: auto; padding: 0.45rem 0; margin: 0 0 0.2rem; background: var(--paper, #fff); border-bottom: 1px solid rgba(0,0,0,0.08); scrollbar-width: thin; }
.ud-jump a { flex: none; padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid rgba(0,0,0,0.12); text-decoration: none; font-size: 0.85rem; white-space: nowrap; }
.ud-jump a:hover, .ud-jump a:focus-visible { background: rgba(0,0,0,0.05); }
.ud-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.5rem; }
.ud-grid > .card { grid-column: 1 / -1; padding: 0.8rem 1rem; }
.ud-grid h2[id] { scroll-margin-top: 3.4rem; }
.ud-grid > .card.ud-half { grid-column: auto; }
.ud-grid > .card h2 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.ud-grid .kv { gap: 0.15rem 0.8rem; margin: 0.3rem 0 0.5rem; font-size: 0.93rem; }
.ud-grid .kv dd .note { display: block; font-size: 0.8rem; margin-top: 0.15rem; }
.ud-grid .twofa-required-form { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 1000px) { .ud-grid { grid-template-columns: 1fr; } .ud-grid > .card.ud-half { grid-column: 1 / -1; } }

/* Build 21.8: link password fields and API keys */
.pw-fields { border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.8rem 0.7rem; display: grid; gap: 0.4rem; margin: 0; min-width: 0; }
.pw-fields legend { font-weight: 650; padding: 0 0.3rem; }
.pw-fields label.check, .api-keys label.check, .card label.check { display: flex; flex-direction: row; gap: 0.5rem; align-items: center; font-weight: 400; }
.pw-fields label.check input, .card label.check input { width: auto; margin: 0; flex: none; }
.api-key-once { background: #FFF9F3; border: 1px solid #E4D5C6; border-radius: 10px; padding: 0.7rem 0.9rem; }
.api-key-once code { display: block; word-break: break-all; font-size: 0.95rem; padding: 0.4rem 0; }
.api-doc pre { overflow-x: auto; background: #FFF9F3; border: 1px solid #E4D5C6; border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.85rem; }
