/* Subpage styles — extends styles.css */

.page-header {
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, oklch(0.88 0.005 250 / 0.4) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent);
}
.breadcrumb {
  color: var(--mute);
  margin-bottom: 32px;
  position: relative;
}
.breadcrumb a { color: var(--ink-soft); border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.breadcrumb a:hover { border-color: var(--ink-soft); }
.bc-sep { margin: 0 8px; color: var(--hairline-strong); }

.page-title {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 8px 0 24px;
  text-wrap: balance;
  max-width: 22ch;
  position: relative;
}
.page-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
  position: relative;
}

.nav-links a.is-current { color: var(--ink); font-weight: 500; }

/* ---------- Long-form prose (regulatory/credentials) ---------- */
.longform {
  padding: clamp(48px, 7vw, 80px) 0;
}
.longform-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.longform-toc {
  position: sticky;
  top: 88px;
  font-size: 13px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.toc-list a { color: var(--ink-soft); transition: color 0.15s; }
.toc-list a:hover { color: var(--ink); }
.toc-list a.active { color: var(--ink); font-weight: 500; }

.longform-body {
  max-width: 720px;
}
.longform-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 56px 0 16px;
  scroll-margin-top: 88px;
}
.longform-body h2:first-child { margin-top: 0; }
.longform-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 8px;
  color: var(--ink);
}
.longform-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.longform-body ul {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  padding-left: 22px;
  margin: 0 0 18px;
}
.longform-body li { margin-bottom: 6px; }
.longform-body strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 24px 0;
}
.callout-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.callout p { margin: 0; font-size: 15px; }

.source-cite {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  padding: 6px 0;
  border-top: 1px dashed var(--hairline);
  margin-top: 12px;
}
.source-cite::before { content: "↗ "; }

/* ---------- Framework table (regulatory page) ---------- */
.framework-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.framework-table th, .framework-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.framework-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.framework-table td.num { font-family: var(--serif); font-size: 22px; color: var(--ink); width: 60px; }
.framework-table td .arch-name { font-weight: 500; color: var(--ink); }
.framework-table td .arch-desc { font-size: 13px; color: var(--mute); margin-top: 2px; }

/* ---------- Comparison table ---------- */
.comparison-wrap { overflow-x: auto; margin: 24px 0 8px; }
.comparison-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}
.comparison-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
  position: sticky; top: 0;
}
.comparison-table td {
  padding: 14px 18px 14px 14px;
  border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--ink-soft);
  min-width: 110px;
  white-space: normal;
  word-break: normal;
}
.comparison-table td:first-child { color: var(--ink); font-weight: 500; }
.comparison-table td:last-child { border-right: none; }
.comparison-table tr:hover td { background: var(--bg-alt); }

/* ---------- Reference Tool page ---------- */
.tool-shell {
  padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 7vw, 96px);
}
.tool-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
.tool-input {
  background: transparent;
  position: sticky;
  top: 88px;
}
.tool-input .field { margin-bottom: 12px; }
.tool-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0; }
.tool-fields-row .field { margin-bottom: 0; }

.tool-output {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.tool-output-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.muni-name {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.muni-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  margin-top: 6px;
}
.muni-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}
.muni-status-pill.is-mandatory { background: oklch(0.94 0.05 145); border-color: oklch(0.78 0.1 145); color: oklch(0.32 0.13 145); }
.muni-status-pill.is-discretionary { background: oklch(0.96 0.06 75); border-color: oklch(0.85 0.12 75); color: oklch(0.4 0.14 75); }
.muni-status-pill.is-voluntary { background: oklch(0.94 0.04 250); border-color: oklch(0.78 0.06 250); color: oklch(0.32 0.13 250); }
.muni-status-pill.is-unprofiled { color: var(--mute); }

.tool-output-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--hairline);
}
.tool-output-section:last-child { border-bottom: none; }
.tos-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 12px;
}
.tos-body { font-size: 15px; line-height: 1.6; color: var(--ink); }
.tos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tos-kv-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tos-kv-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--hairline); }
.tos-kv-list li:last-child { border-bottom: none; }
.tos-kv-list .k { color: var(--mute); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.tos-kv-list .v { color: var(--ink); text-align: right; }

.tos-doc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.tos-doc-list li {
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.doc-title { font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.doc-desc { font-size: 13px; color: var(--mute); }

.muni-list-empty {
  padding: 64px 28px;
  text-align: center;
  color: var(--mute);
  font-size: 15px;
}

.tool-disclaimer {
  margin-top: 16px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--mute);
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  line-height: 1.5;
}

/* ---------- Services page ---------- */
.services-tiers {
  padding: clamp(48px, 7vw, 80px) 0;
}
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.svc-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 960px) {
  .svc-grid-3 { grid-template-columns: 1fr; }
}
.svc-card {
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.svc-card-recommended { border-width: 2px; }
.svc-flag {
  position: absolute;
  top: 0;
  right: 24px;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.svc-card.is-dark { background: var(--bg-deep); color: oklch(0.75 0.005 250); border-color: var(--bg-deep); }
.svc-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
}
.svc-card.is-dark .svc-eyebrow { color: oklch(0.7 0.01 250); }
.svc-title { font-family: var(--serif); font-size: 32px; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
.svc-card.is-dark .svc-title { color: oklch(0.90 0.005 250); }
.svc-desc { font-size: 15px; color: var(--ink-soft); margin: 0 0 24px; max-width: 36ch; }
.svc-card.is-dark .svc-desc { color: oklch(0.78 0.005 250); }
.svc-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 18px;
}
.svc-card.is-dark .svc-price-row { border-color: oklch(0.3 0.01 250); }
.svc-price { font-family: var(--serif); font-size: 44px; letter-spacing: -0.025em; line-height: 1; }
.svc-card.is-dark .svc-price { color: oklch(0.85 0.005 250); }
.svc-period { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.svc-card.is-dark .svc-period { color: oklch(0.7 0.01 250); }
.svc-features { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; flex: 1; }
.svc-features li { display: flex; align-items: start; gap: 10px; }
.svc-card .check { color: var(--green); font-weight: 700; flex-shrink: 0; width: 16px; }
.svc-card.is-dark .check { color: oklch(0.85 0.12 145); }

.svc-cta-row { display: flex; gap: 8px; }

/* ---------- FAQ page ---------- */
.faq-page-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq-cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.faq-cat-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.faq-cat-list a:hover, .faq-cat-list a.active { background: var(--bg-alt); color: var(--ink); }

.faq-section { margin-bottom: 48px; }
.faq-section h2 {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  scroll-margin-top: 88px;
}
.faq-section .sec-sub { font-size: 14px; color: var(--mute); margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }

/* ---------- Validation / Credentials page ---------- */
.creds-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin: 32px 0;
}
.creds-stat {
  padding: 24px 0;
  border-right: 1px solid var(--hairline);
}
.creds-stat:last-child { border-right: none; padding-left: 24px; }
.creds-stat:not(:first-child) { padding-left: 24px; }
.creds-stat-value { font-family: var(--serif); font-size: 36px; letter-spacing: -0.02em; line-height: 1; margin-bottom: 6px; }
.creds-stat-label { font-size: 13px; color: var(--mute); }

/* ---------- Dashboard page ---------- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 48px;
}
.dash-stat {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
}
.dash-stat-value {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 8px;
  color: var(--ink);
}
.dash-stat-label {
  font-size: 13px;
  color: var(--mute);
  margin: 0;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 48px 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}
.dash-section-head h2 {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
}
.dash-add-btn {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-add-btn:hover { background: oklch(0.25 0.01 250); }

.app-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.app-card:hover {
  border-color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.app-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.app-card-row:last-child { margin-bottom: 0; }

.app-card-name {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.app-card-meta {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.app-card-days {
  font-size: 12px;
  color: var(--mute);
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-badge.is-draft { background: oklch(0.90 0.01 250); color: var(--ink); }
.status-badge.is-submitted { background: oklch(0.50 0.12 250); color: white; }
.status-badge.is-check { background: oklch(0.70 0.13 70); color: var(--ink); }
.status-badge.is-procedure { background: oklch(0.65 0.15 40); color: white; }
.status-badge.is-besluit { background: oklch(0.60 0.15 130); color: white; }

.milestone-bar {
  display: flex;
  gap: 2px;
  height: 4px;
  background: transparent;
  border-radius: 2px;
  overflow: hidden;
}
.milestone-segment {
  flex: 1;
  background: var(--hairline);
  transition: background 0.15s;
}
.milestone-segment.is-done {
  background: oklch(0.60 0.15 130);
}

.app-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-alt);
  border-radius: 8px;
}
.app-empty-title {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
.app-empty-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* Unauthenticated state */
.dash-unauth {
  text-align: center;
  padding: 80px 20px;
}
.dash-unauth-title {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.dash-unauth-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 32px;
}
.dash-unauth-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.dash-unauth-actions button {
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dash-unauth-actions .btn-login {
  background: var(--ink);
  color: var(--bg);
}
.dash-unauth-actions .btn-login:hover { background: oklch(0.25 0.01 250); }
.dash-unauth-actions .btn-register {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.dash-unauth-actions .btn-register:hover { background: var(--bg-alt); }

/* Detail panel (slide-in overlay) */
.app-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.app-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 450px);
  background: var(--bg);
  box-shadow: -2px 0 16px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  animation: slideInRight 0.2s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.app-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.app-detail-title {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.app-detail-muni {
  font-size: 13px;
  color: var(--mute);
  margin: 0;
}
.app-detail-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-detail-close:hover { color: var(--ink); }

.app-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.app-detail-section {
  margin-bottom: 32px;
}
.app-detail-section h3 {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 12px;
}
.app-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}
.app-detail-label {
  color: var(--mute);
  font-weight: 500;
}
.app-detail-value {
  color: var(--ink);
}

.milestone-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.milestone-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.milestone-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hairline);
  margin-top: 5px;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.milestone-dot:hover { background: var(--ink); }
.milestone-dot.is-done {
  background: oklch(0.60 0.15 130);
}
.milestone-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.milestone-date {
  font-size: 12px;
  color: var(--mute);
}

.notes-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-alt);
  resize: vertical;
  min-height: 100px;
}
.notes-textarea::placeholder { color: var(--mute); }

.app-detail-actions {
  padding: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 8px;
  flex-direction: column;
}
.btn-save-notes, .btn-update-status, .btn-delete {
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-save-notes {
  background: var(--ink);
  color: var(--bg);
}
.btn-save-notes:hover { background: oklch(0.25 0.01 250); }
.btn-update-status {
  background: var(--bg-alt);
  color: var(--ink);
}
.btn-update-status:hover { background: oklch(0.88 0.005 250); }
.btn-delete {
  background: oklch(0.50 0.18 30);
  color: white;
}
.btn-delete:hover { background: oklch(0.40 0.18 30); }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: min(100%, 500px);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease-out;
  z-index: 2000;
  position: relative;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-title {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--mute);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  font-family: inherit;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--mute);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--bg-alt);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .longform-grid, .tool-grid, .faq-page-grid { grid-template-columns: 1fr; }
  .longform-toc, .tool-input { position: static; }
  .svc-grid { grid-template-columns: 1fr; }
  .creds-stats { grid-template-columns: 1fr; }
  .creds-stat { border-right: none; border-bottom: 1px solid var(--hairline); padding: 18px 0 !important; }
  .tos-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .app-detail-panel { width: 100%; }
}

@media (max-width: 600px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-section-head { flex-direction: column; gap: 16px; align-items: flex-start; }
  .app-detail-panel { width: 100%; }
  .dash-unauth-actions { flex-direction: column; }
}

/* Mobile optimization for subpages (max-width 480px) */
@media (max-width: 480px) {
  .page-header {
    padding: clamp(32px, 5vw, 48px) 0 clamp(24px, 4vw, 32px);
  }

  .page-title {
    font-size: clamp(28px, 6vw, 40px);
    margin: 8px 0 16px;
  }

  .page-sub {
    font-size: 16px;
    margin: 0;
  }

  /* Longform layout */
  .longform-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .longform-toc {
    position: static;
    top: auto;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 12px;
  }

  .toc-title {
    font-size: 10px;
    margin-bottom: 12px;
  }

  .toc-list {
    gap: 8px;
  }

  .longform-body h2 {
    font-size: clamp(22px, 5vw, 32px);
    margin: 32px 0 12px;
  }

  .longform-body h3 {
    font-size: 16px;
    margin: 24px 0 8px;
  }

  .longform-body p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
  }

  /* Tool page */
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tool-input {
    position: static;
    top: auto;
    padding: 14px;
  }

  .tool-step-indicator {
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 0 20px;
  }

  .tsi-item {
    font-size: 11px;
  }

  .tsi-n {
    padding: 2px 5px;
    font-size: 10px;
  }

  .tsi-label {
    font-size: 11px;
  }

  .tsi-arrow {
    display: none;
  }

  .tool-step-block {
    padding: 12px;
    margin-bottom: 14px;
  }

  .tool-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .tool-step-num {
    font-size: 10px;
  }

  .tool-step-title {
    font-size: 13px;
  }

  .muni-list-scroll {
    max-height: 200px;
  }

  .muni-list-item {
    padding: 10px 12px;
    font-size: 14px;
    min-height: 44px;
  }

  .address-input {
    font-size: 16px;
    padding-left: 36px !important;
  }

  .address-icon {
    font-size: 14px;
  }

  .pdok-dropdown {
    max-height: 200px;
  }

  .pdok-item {
    padding: 12px;
    min-height: 40px;
  }

  /* Services page */
  .svc-grid {
    grid-template-columns: 1fr;
  }

  .svc-card {
    padding: 16px;
  }

  /* Credentials page */
  .creds-intro {
    font-size: 16px;
  }

  .creds-stats {
    grid-template-columns: 1fr;
  }

  .creds-stat {
    padding: 16px 0 !important;
    border: none;
    border-bottom: 1px solid var(--hairline);
  }

  .creds-stat:last-child {
    border-bottom: none;
  }

  /* FAQ page */
  .faq-page-grid {
    grid-template-columns: 1fr;
  }

  /* ToS/Privacy */
  .tos-grid {
    grid-template-columns: 1fr;
  }

  .tos-body h2 {
    font-size: clamp(20px, 5vw, 28px);
    margin: 28px 0 12px;
  }

  .tos-body h3 {
    font-size: 15px;
    margin: 20px 0 8px;
  }

  .tos-body p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Dashboard */
  .dash-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dash-stat {
    padding: 16px;
  }

  .dash-section-head {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .dash-section-title {
    font-size: 18px;
  }

  .dash-unauth-actions {
    flex-direction: column;
    gap: 10px;
  }

  .dash-unauth-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .app-detail-panel {
    width: 100%;
    padding: 12px;
  }
}

/* Tablet optimization (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .page-title {
    font-size: clamp(32px, 5vw, 44px);
  }

  .longform-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .longform-toc {
    padding: 14px;
    margin-bottom: 20px;
  }

  .toc-list {
    gap: 8px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-input {
    position: sticky;
    top: 88px;
    padding: 16px;
  }

  .tool-step-block {
    padding: 14px;
  }

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

  .creds-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dark mode overrides for tool page - comprehensive text color fixes */

/* Override CSS variables in dark mode for tool */
body[data-theme="dark"] .tool-shell {
  --mute: oklch(0.85 0.005 250);
  --ink-soft: oklch(0.92 0.005 250);
}

/* Catch all inline styles using var(--mute) in dark mode */
body[data-theme="dark"] [style*="color: var(--mute)"] {
  color: oklch(0.85 0.005 250) !important;
}

body[data-theme="dark"] [style*="color: 'var(--mute)'"] {
  color: oklch(0.85 0.005 250) !important;
}

/* Specific elements in tool */
body[data-theme="dark"] .muni-list-item {
  color: oklch(0.95 0.005 250) !important;
}

body[data-theme="dark"] .muni-list-item .mono.small,
body[data-theme="dark"] .muni-list-item span {
  color: oklch(0.80 0.005 250) !important;
}

body[data-theme="dark"] .muni-meta {
  color: oklch(0.80 0.005 250) !important;
}

body[data-theme="dark"] .muni-name {
  color: oklch(0.95 0.005 250) !important;
}

body[data-theme="dark"] .tos-label {
  color: oklch(0.95 0.005 250) !important;
}

body[data-theme="dark"] .tos-body {
  color: oklch(0.93 0.005 250) !important;
}

body[data-theme="dark"] .tos-kv-list .k {
  color: oklch(0.80 0.005 250) !important;
}

body[data-theme="dark"] .tos-kv-list .v {
  color: oklch(0.93 0.005 250) !important;
}

body[data-theme="dark"] .tos-kv-list .v.mono {
  color: oklch(0.85 0.005 250) !important;
}

body[data-theme="dark"] .tos-doc-list .doc-title {
  color: oklch(0.93 0.005 250) !important;
}

body[data-theme="dark"] .tos-doc-list .doc-desc {
  color: oklch(0.85 0.005 250) !important;
}

body[data-theme="dark"] .timeline-panel {
  --mute: oklch(0.85 0.005 250) !important;
}

body[data-theme="dark"] .timeline-panel > * {
  color: oklch(0.90 0.005 250) !important;
}

body[data-theme="dark"] .confidence-badge {
  color: oklch(0.85 0.005 250) !important;
}
