@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffcba4;
  --surface: #ffbe91;
  --card: #fff8f5;
  --card-soft: #fff1e7;
  --chip: #f3dfcf;
  --chrome: #ffb076;
  --primary: #994422;
  --on-primary: #ededed;
  --primary-container: #b85c38;
  --secondary: #476646;
  --secondary-container: #a4d59d;
  --on-secondary-container: #2c412a;
  --tertiary: #7c5700;
  --tertiary-fixed: #ffdeaa;
  --text: #241a10;
  --text-muted: #55433c;
  --outline: #88726b;
  --card-border: #ffb076;
  --header-bg: rgba(255, 190, 145, 0.78);
  --phone-bg: #3a2e23;
  --phone-text: #ffeee1;
  --shadow: 0 1px 2px rgba(36, 26, 16, 0.08), 0 10px 30px rgba(36, 26, 16, 0.1);
  --shadow-raised: 0 2px 4px rgba(36, 26, 16, 0.1), 0 18px 40px rgba(36, 26, 16, 0.16);
  --radius: 20px;
  --font-head: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #3a2e23;
  --surface: #2f261d;
  --card: #322820;
  --card-soft: #2a221a;
  --chip: #493c31;
  --chrome: #3a2e23;
  --primary: #ffb47b;
  --on-primary: #5c1d00;
  --primary-container: #994422;
  --secondary: #8bc986;
  --secondary-container: #3a5438;
  --on-secondary-container: #c8ecc3;
  --tertiary: #ffdeaa;
  --tertiary-fixed: rgba(255, 222, 170, 0.18);
  --text: #ffeee1;
  --text-muted: #dbc1b8;
  --outline: #88726b;
  --card-border: #55433c;
  --header-bg: rgba(47, 38, 29, 0.78);
  --phone-bg: #1a1410;
  --phone-text: #ffeee1;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
}
a:hover {
  text-decoration: underline;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
}
p {
  margin: 0 0 12px;
}
p:last-child {
  margin-bottom: 0;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 999px;
}
.skip-link:focus {
  left: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}
.brand-logo-dark {
  display: none;
}
[data-theme="dark"] .brand-logo-light {
  display: none;
}
[data-theme="dark"] .brand-logo-dark {
  display: block;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img {
  border-radius: 6px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--card-soft);
  color: var(--text);
  text-decoration: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-border);
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.icon-btn:hover {
  transform: translateY(-1px);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sun {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
.menu-btn {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: var(--card);
  color: var(--text);
  border-color: var(--card-border);
}
.btn small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.8;
  line-height: 1;
}
.btn .btn-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.btn svg {
  width: 22px;
  height: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero,
.doc-hero {
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after,
.doc-hero::before,
.doc-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}
.hero::before,
.doc-hero::before {
  width: 440px;
  height: 440px;
  top: -140px;
  left: -100px;
  background: var(--primary-container);
}
.hero::after,
.doc-hero::after {
  width: 400px;
  height: 400px;
  bottom: -160px;
  right: -60px;
  background: var(--secondary-container);
}
[data-theme="dark"] .hero::before,
[data-theme="dark"] .hero::after,
[data-theme="dark"] .doc-hero::before,
[data-theme="dark"] .doc-hero::after {
  opacity: 0.35;
}
.hero > .container,
.doc-hero > .container {
  position: relative;
  z-index: 1;
}
.hero {
  padding: 80px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin: 22px 0 18px;
  letter-spacing: -0.01em;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 560px;
  margin-top: 44px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1.2;
}
.stat span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.phone {
  width: 290px;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  border-radius: 44px;
  padding: 12px;
  background: var(--phone-bg);
  box-shadow: var(--shadow-raised);
  border: 1px solid var(--card-border);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.phone-screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(184, 92, 56, 0.45), transparent 60%), #2f261d;
  color: var(--phone-text);
  text-align: center;
  padding: 24px;
}
.phone-mode {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffb47b;
}
.ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#ffb47b 0 72%, rgba(255, 238, 225, 0.12) 72% 100%);
}
.ring-inner {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: #2f261d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-inner strong {
  font-family: var(--font-head);
  font-size: 2.3rem;
  line-height: 1;
}
.ring-inner span {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 6px;
}
.phone-note {
  font-size: 0.78rem;
  opacity: 0.75;
}
.phone-chips {
  display: flex;
  gap: 6px;
}
.phone-chips span {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #3a5438;
  color: #c8ecc3;
}

.block {
  padding: 72px 0;
}
.block-alt {
  background: var(--surface);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.section-head {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 660px;
}
.eyebrow {
  display: inline-block;
  color: var(--tertiary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-raised);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: var(--tertiary-fixed);
  color: var(--tertiary);
}
.feature:nth-child(3n + 2) .feature-icon {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.feature:nth-child(3n) .feature-icon {
  background: var(--chip);
  color: var(--primary);
}
.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.feature p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mode {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mode-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-raised);
}
.mode-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.mode h3 {
  font-size: 1.45rem;
  margin: 0;
}
.mode .tagline {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}
.mode ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mode li {
  display: flex;
  gap: 10px;
  font-size: 0.93rem;
  margin: 0;
}
.mode li::before {
  content: "\2713";
  color: var(--secondary);
  font-weight: 700;
}
.mode li.no::before {
  content: "\2715";
  color: var(--outline);
}
.mode li.no {
  color: var(--text-muted);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.step p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq details,
.acc {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.faq details {
  padding: 18px 22px;
}
.faq summary,
.acc > summary,
details.toc > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker,
.acc > summary::-webkit-details-marker,
details.toc > summary::-webkit-details-marker {
  display: none;
}
.faq summary::after,
.acc > summary::after,
details.toc > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after,
.acc[open] > summary::after,
details.toc[open] > summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--text-muted);
  margin: 12px 0 0;
}

.cta {
  margin: 0 auto 80px;
  max-width: 1120px;
  text-align: center;
  padding: 64px 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  box-shadow: var(--shadow-raised);
}
[data-theme="dark"] .cta {
  background: linear-gradient(135deg, var(--primary-container), #5c1d00);
  color: #ffeee1;
}
.cta h2 {
  color: inherit;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.cta p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 28px;
}
.cta .btn {
  background: #fff8f5;
  color: #994422;
}

.site-footer {
  border-top: 1px solid var(--card-border);
  background: var(--surface);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.doc-hero {
  padding: 56px 0 36px;
  text-align: center;
}
.doc-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin: 16px 0 10px;
  letter-spacing: -0.01em;
}
.doc-hero .lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}
.doc-hero .meta {
  margin: 0;
}
.meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.doc-tabs a {
  padding: 8px 16px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.doc-tabs a:hover {
  text-decoration: none;
  background: var(--card-soft);
}
.doc-tabs a[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 20px calc(72px + env(safe-area-inset-bottom));
}
.page > * + * {
  margin-top: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card > h2:not(:first-child) {
  margin-top: 22px;
}
.card h2,
.page > section > h2 {
  font-size: 1.45rem;
  margin: 0 0 10px;
}
h3 {
  font-size: 1.05rem;
  margin: 18px 0 4px;
  font-family: var(--font-body);
  font-weight: 700;
}
h3:first-child {
  margin-top: 0;
}
.card.summary {
  background: var(--secondary-container);
  border-color: transparent;
  color: var(--on-secondary-container);
}
.card.summary h2 {
  color: var(--on-secondary-container);
}
.card.summary strong {
  color: inherit;
}

.callout {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.95rem;
  margin-top: 14px;
}
.callout.warn {
  background: var(--tertiary-fixed);
  color: var(--text);
}
.callout.info {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
li + li {
  margin-top: 6px;
}
li > ul,
li > ol {
  margin-top: 6px;
  margin-bottom: 0;
}
ul.checks,
ul.crosses {
  list-style: none;
  padding-left: 0;
}
ul.checks li,
ul.crosses li {
  position: relative;
  padding-left: 30px;
}
ul.checks li::before,
ul.crosses li::before {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}
ul.checks li::before {
  content: "\2713";
  background: var(--secondary);
  color: #fff8f5;
}
[data-theme="dark"] ul.checks li::before {
  color: #1a331a;
}
ul.crosses li::before {
  content: "\2715";
  background: var(--outline);
  color: #fff8f5;
}
.summary ul.checks li::before {
  background: var(--on-secondary-container);
  color: var(--secondary-container);
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding-left: 0;
}
ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 42px;
  min-height: 30px;
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.rows {
  margin: 0;
}
.rows > div {
  padding: 12px 0;
  border-top: 1px solid var(--card-border);
}
.rows > div:first-child {
  border-top: 0;
  padding-top: 0;
}
.rows > div:last-child {
  padding-bottom: 0;
}
.rows dt {
  font-weight: 700;
  margin: 0 0 2px;
}
.rows dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

details.toc {
  padding: 16px 22px;
}
details.toc ol {
  margin: 12px 0 0;
  padding-left: 22px;
}
details.toc a {
  font-weight: 500;
}

.group-title {
  margin: 28px 0 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tertiary);
}
.group-title:first-child {
  margin-top: 0;
}
.acc + .acc {
  margin-top: 10px;
}
.acc > summary {
  padding: 16px 20px;
  min-height: 56px;
  line-height: 1.4;
}
.acc-body {
  padding: 0 20px 18px;
  font-size: 0.97rem;
}
.acc-body > * + * {
  margin-top: 10px;
}
.acc-body .rows dd {
  font-size: 0.95rem;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.topics a {
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.topics a:hover {
  text-decoration: none;
  background: var(--card-soft);
}

.linklist {
  display: grid;
  gap: 10px;
}
.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.linklist a:hover {
  text-decoration: none;
  background: var(--card-soft);
}
.linklist a span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.linklist a::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--primary);
  border-top: 2px solid var(--primary);
  transform: rotate(45deg);
}

.not-found {
  text-align: center;
  padding: 72px 20px 96px;
}
.not-found .big {
  font-family: var(--font-head);
  font-size: clamp(4rem, 14vw, 8rem);
  line-height: 1;
  font-weight: 700;
  margin: 0 0 8px;
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.not-found .lead {
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 460px;
}

html[data-embed] {
  --header-h: 0px;
  --card: var(--surface);
  --shadow: none;
  --radius: 16px;
}
html[data-embed] body {
  transition: none;
}
html[data-embed] .site-header,
html[data-embed] .site-footer,
html[data-embed] .skip-link,
html[data-embed] .doc-hero,
html[data-embed] .cta-wrap,
html[data-embed] .browser-only {
  display: none !important;
}
html:not([data-embed]) .embed-only {
  display: none !important;
}
html[data-embed] .page {
  max-width: none;
  margin: 0;
  padding: 16px 20px calc(28px + env(safe-area-inset-bottom));
}
html[data-embed] .page > * + * {
  margin-top: 14px;
}
html[data-embed] .card {
  padding: 18px;
  box-shadow: none;
}
html[data-embed] .card.summary {
  border: 1px solid var(--card-border);
}
html[data-embed] .card h2,
html[data-embed] .page > section > h2 {
  font-size: 1.3rem;
}
html[data-embed] .acc,
html[data-embed] .linklist a {
  box-shadow: none;
}
html[data-embed] .acc > summary {
  padding: 14px 16px;
}
html[data-embed] .acc-body {
  padding: 0 16px 16px;
}
html[data-embed] details.toc {
  padding: 14px 18px;
}
html[data-embed] .topics {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -20px;
  padding: 2px 20px;
}
html[data-embed] .topics::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1100px) {
  .menu-btn {
    display: grid;
  }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
  }
  .nav a {
    padding: 14px 16px;
    font-size: 1rem;
  }
  .nav.open {
    display: flex;
  }
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero p.lead,
  .stats {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .feature-grid,
  .mode-grid,
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  :root {
    --header-h: 60px;
  }
  .header-cta {
    display: none;
  }
  .feature-grid,
  .mode-grid,
  .step-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 1.25rem;
  }
  .hero {
    padding: 48px 0 56px;
  }
  .block {
    padding: 56px 0;
  }
  .doc-hero {
    padding: 40px 0 24px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .page {
    padding-bottom: 56px;
  }
  .card {
    padding: 20px;
  }
  .cta {
    margin: 0 20px 56px;
    padding: 44px 20px;
    border-radius: 28px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 380px) {
  .container {
    padding: 0 16px;
  }
  .stat span {
    font-size: 0.75rem;
  }
  .brand-logo {
    height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
@media print {
  .site-header,
  .site-footer,
  .doc-tabs,
  .cta-wrap {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card,
  .acc {
    box-shadow: none;
    background: #fff;
    border-color: #999;
  }
}


/* Permission page */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
}
.badge.optional {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.perm-id {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-word;
}
.perm h3 {
  margin-bottom: 0;
}
.perm h4 {
  margin: 16px 0 6px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
