@font-face {
  font-family: "Tapok Sans";
  src: local("Funnel Sans"), local("Inter"), local("Arial");
  font-display: swap;
}

@font-face {
  font-family: "Tapok Display";
  src: local("Newsreader"), local("Iowan Old Style"), local("Georgia");
  font-display: swap;
}

:root {
  font-family: "Tapok Sans", system-ui, sans-serif;
  color: #1b3a28;
  background: #f5f3ee;
  font-synthesis: none;
  --ink: #1b3a28;
  --muted: #4a6b52;
  --line: #dde4dc;
  --paper: #faf9f5;
  --green: #1b6b3a;
  --green-hover: #14562f;
  --deep: #1b3a28;
  --mint: #e9ece5;
  --mint-strong: #dde8dd;
  --danger: #a64133;
  --warning: #f3e8d3;
  --radius: 8px;
  --page: min(1200px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
a { color: var(--green); text-underline-offset: 3px; }

.skip {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.skip:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 64px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f5f3ee;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 6px; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--ink); }
.site-header .nav-cta { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.nav-cta span { width: 7px; height: 7px; border-radius: 50%; background: #2b9a51; }

main { display: flow-root; min-height: calc(100vh - 129px); background: var(--paper); }
footer {
  width: 100%;
  min-height: 64px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  background: #f5f3ee;
  border-top: 1px solid var(--line);
  font-size: .76rem;
}
footer .footer-brand { color: var(--ink); font-size: .9rem; font-weight: 800; text-decoration: none; }
footer nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
footer nav a { color: var(--muted); text-decoration: none; }

.hero,
.section,
.trust,
.page-head,
.app-grid,
.metrics,
.portal-callout,
.auth-card,
.state,
.legal,
.editor {
  width: var(--page);
  margin-inline: auto;
}

.hero {
  min-height: 896px;
  padding: 40px 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  background: var(--paper);
}
.hero-copy { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--mint);
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero-kicker span { width: 6px; height: 6px; border-radius: 50%; background: #2b9a51; }
.hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Tapok Display", Georgia, serif;
  font-size: clamp(3.5rem, 6vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}
.lead {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}
.hero .actions { margin-top: 2px; justify-content: center; }
.hero-demo { width: min(920px, 100%); }
.hero-demo > .eyebrow { margin: 0 0 8px; }
.hero-demo > h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Tapok Display", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -.035em;
}
.hero-demo > p:not(.eyebrow) { max-width: 680px; margin: 8px auto 18px; color: var(--muted); font-size: .88rem; }
.hero-code-stage { position: relative; width: min(850px, 100%); height: 300px; margin: auto; }
.integration-card {
  position: absolute;
  width: min(560px, 76%);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 40px #1b3a2810;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.integration-card header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: var(--mint);
  border-bottom: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 700;
}
.integration-card header small { color: var(--muted); font: 700 .63rem ui-monospace, monospace; }
.code-card-meta { display: inline-flex; align-items: center; gap: 10px; }
.copy-state { min-width: 88px; padding: 3px 7px; color: var(--green) !important; background: #ffffffa8; border-radius: 4px; text-align: center; }
.copy-state.copied { color: #fff !important; background: #2b8a4a; }
.copy-state.error { color: #fff !important; background: var(--danger); }
.integration-card pre { min-height: 180px; margin: 0; padding: 18px; overflow: auto; }
.integration-card code { color: #294d34; font: .72rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.syntax-keyword { color: #6d28d9; font-weight: 750; }
.syntax-string { color: #a1420b; }
.syntax-function { color: #075985; font-weight: 700; }
.syntax-property { color: #0f766e; }
.syntax-literal { color: #9f1239; }
.syntax-comment { color: #718078; font-style: italic; }
.base-card { left: 5%; top: 46px; z-index: 1; transform: rotate(-3deg); }
.connect-card { right: 4%; top: 18px; z-index: 2; transform: rotate(2.2deg); }
.integration-card:hover,
.integration-card:focus-visible {
  z-index: 6;
  border-color: #9dbca4;
  box-shadow: 0 26px 56px #1b3a2824;
  transform: translateY(-8px) rotate(0) scale(1.018);
}
.integration-card:active { transform: translateY(-3px) rotate(0) scale(1.008); }
.integration-card[data-copy-state="copied"] { border-color: #2b8a4a; }

.eyebrow {
  color: var(--muted);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.button,
button {
  min-height: 42px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.button:hover, button:hover { background: var(--green-hover); transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.secondary { color: var(--ink) !important; background: var(--mint) !important; }
.quiet { min-height: auto; padding: 6px 8px; color: var(--muted) !important; background: transparent !important; }
.danger { background: var(--danger); }
.danger-text { color: var(--danger) !important; }

.section { padding: 88px 0; }
.section.compact { padding: 34px 0; }
.section h2,
.trust h2,
.portal-callout h2 {
  margin: .25em 0;
  color: var(--ink);
  font-family: "Tapok Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 550;
  letter-spacing: -.04em;
  line-height: 1.02;
}
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.feature-grid article,
.app-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature-grid article:first-child { background: var(--mint); }
.feature-grid h3 { margin: .5em 0; font: 550 2rem "Tapok Display", Georgia, serif; }
.feature-grid p { color: var(--muted); line-height: 1.6; }
.number { color: var(--green); font: 700 .75rem ui-monospace, monospace; }
.trust { margin-bottom: 88px; padding: 50px; color: #eef5ef; background: var(--deep); border-radius: 10px; }
.trust .eyebrow { color: #a8c5ae; }
.trust h2 { max-width: 850px; color: #fff; }
.trust ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 36px; padding: 0; list-style: none; }
.trust li::before { content: "✓"; margin-right: 10px; color: #87c897; font-weight: 900; }

.docs-layout {
  width: var(--page);
  margin: 48px auto 70px;
  display: grid;
  grid-template-columns: 270px minmax(0, 820px);
  gap: 48px;
  align-items: start;
}
.docs-layout > * { min-width: 0; }
.docs-layout aside { position: sticky; top: 88px; }
.docs-layout aside nav { display: grid; gap: 4px; }
.docs-layout aside a { padding: 10px 12px; color: var(--muted); border-radius: 6px; text-decoration: none; font-size: .83rem; }
.docs-layout aside a.active { color: var(--ink); background: var(--mint); font-weight: 700; }
.doc h1,
.auth-card h1,
.legal h1,
.page-head h1 {
  margin: .14em 0;
  color: var(--ink);
  font-family: "Tapok Display", Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}
.doc h2,
.legal h2 { margin-top: 2em; font: 600 1.8rem "Tapok Display", Georgia, serif; }
.doc p,
.doc li,
.legal p,
.legal li { color: #344d3b; font-size: .98rem; line-height: 1.72; }
.legal ul { padding-left: 1.25rem; }
.code { margin: 26px 0; color: #e5efe7; background: var(--deep); border-radius: 8px; overflow: hidden; }
.code > span { display: block; padding: 10px 16px; color: #a8c5ae; border-bottom: 1px solid #ffffff1a; font: .7rem ui-monospace, monospace; }
.code pre { margin: 0; padding: 20px; overflow: auto; }

.auth-card {
  max-width: 520px;
  margin-top: 64px;
  margin-bottom: 80px;
  padding: 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 50px #1b3a280d;
}
.auth-card h1 { font-size: 3rem; }
.auth-card p { color: var(--muted); line-height: 1.55; }
.auth-card label,
.editor label,
.inline-form label { display: grid; gap: 7px; margin: 18px 0; color: var(--ink); font-size: .8rem; font-weight: 700; }
.hint { color: var(--muted); font-size: .72rem; font-weight: 400; }
.auth-card input,
.editor input,
.editor textarea,
.inline-form input {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b8c7bc;
  border-radius: 6px;
}
.sber { width: 100%; background: #21a038; }
.sber:hover { background: #19852e; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.fine { color: var(--muted); font-size: .76rem; }

.page-head { padding: 56px 0 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-head h1 { font-size: clamp(2.8rem, 6vw, 4rem); }
.page-head p { margin-bottom: 0; color: var(--muted); }
.profile-tabs { width: var(--page); margin: 0 auto; padding: 4px; display: flex; gap: 5px; background: var(--mint); border-radius: 6px; }
.profile-tabs a { padding: 9px 14px; color: var(--muted); border-radius: 5px; font-size: .78rem; font-weight: 700; text-decoration: none; }
.profile-tabs a:first-child, .profile-tabs a:hover { color: var(--ink); background: var(--paper); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.section-title { display: flex; justify-content: space-between; }
.section-title h2 { font-size: 2rem; }
.section-title p { color: var(--muted); }
.list { display: grid; gap: 8px; }
.row {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.row h3 { margin: 0 0 5px; font-size: 1rem; }
.row p { margin: 0; color: var(--muted); font-size: .82rem; }
.row details { margin-top: 12px; color: var(--muted); font-size: .83rem; }
.consent > div, .review > div:first-child { min-width: 0; }
.empty, .state { padding: 34px; color: var(--muted); text-align: center; background: var(--paper); border: 1px dashed #b8c5bc; border-radius: 8px; }
.state { margin-top: 72px; }
.state.error { color: #702a27; border-color: #d6aaa8; }
.state button { margin-top: 20px; }
.spinner { display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: middle; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.portal-callout { padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 30px; color: #fff; background: var(--deep); border-radius: 10px; }
.portal-callout h2 { color: #fff; }
.portal-callout p { color: #c5d8c9; }
.danger-zone { margin-bottom: 60px; padding-inline: 24px !important; border: 1px solid #d9b7af; border-radius: 8px; }

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card-top { display: flex; justify-content: space-between; }
.badge { padding: 5px 9px; color: var(--muted); background: var(--mint); border-radius: 999px; font-size: .7rem; font-weight: 800; }
.badge.approved { color: #235d36; background: #ddebdc; }
.badge.in_review { color: #795e1c; background: #f5e8c9; }
.badge.rejected, .badge.revoked { color: #852f29; background: #f8deda; }
.app-card h2 { font: 600 1.45rem "Tapok Display", Georgia, serif; }
.app-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.app-card dl div { padding: 10px; background: var(--mint); border-radius: 6px; }
.app-card dt { color: var(--muted); font-size: .65rem; }
.app-card dd { margin: 4px 0 0; color: var(--ink); font-size: .82rem; font-weight: 700; }
.app-card small { display: block; margin-top: 18px; color: var(--muted); }
.rotation-note { width: 100%; margin: 0; color: #772f2b; font-size: .74rem; }
.rejection, .form-error, .warning { padding: 12px; color: #772f2b; background: #fff0ee; border-radius: 6px; }
.editor { margin-bottom: 30px; padding: 28px; background: var(--mint); border: 1px solid var(--line); border-radius: 10px; }
.editor-head { display: flex; justify-content: space-between; }
.editor-head h2 { margin: 0; font: 600 2rem "Tapok Display", Georgia, serif; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.editor fieldset { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.scope-row { display: grid; grid-template-columns: 290px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.scope-row:last-child { border-bottom: 0; }
.scope-row .check { display: flex; align-items: center; gap: 8px; margin: 0; }
.scope-row .check input { width: auto; }
.scope-row .check code { color: var(--ink); font-size: .82rem; }
.scope-option > p { margin: 5px 0 0 29px; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.scope-row > input { margin: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #10271ccc; }
.modal { width: min(620px, 100%); max-height: calc(100dvh - 40px); padding: 34px; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 10px; box-shadow: 0 30px 100px #0005; }
.modal h2 { font: 600 2rem "Tapok Display", Georgia, serif; }
.modal label { display: grid; gap: 7px; margin: 18px 0; }
.modal code { display: block; padding: 12px; background: var(--mint); border-radius: 6px; }
.modal .secret { user-select: all; }
.modal .close { width: 100%; margin-top: 18px; }
.modal{width:min(620px,100%);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain}

.admin-shell { width: 100%; display: grid; grid-template-columns: 248px minmax(0, 1fr); background: var(--paper); }
.admin-nav { min-width: 0; color: #dce9df; background: var(--deep); }
.admin-nav-inner { position: sticky; top: 64px; height: calc(100vh - 64px); padding: 28px 24px 22px; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.admin-nav .eyebrow { flex: 0 0 auto; margin-top: 0; color: #a8c5ae; }
.admin-nav h2 { flex: 0 0 auto; margin: 0 0 24px; color: #fff; font: 600 2rem "Tapok Display", Georgia, serif; }
.admin-nav nav { display: grid; gap: 4px; }
.admin-nav nav a { padding: 10px 12px; color: #c6d7ca; border-radius: 6px; text-decoration: none; font-size: .8rem; }
.admin-nav nav a.active, .admin-nav nav a:hover { color: #fff; background: #31583e; }
.admin-note { flex: 0 0 auto; margin: auto 0 0; padding-top: 28px; color: #9eb2a3; font-size: .7rem; line-height: 1.5; }
.admin-content { min-width: 0; padding: 0 40px 56px; }
.admin-content section[id] { scroll-margin-top: 84px; }
.admin-content .page-head,
.admin-content .section,
.admin-content .metrics { width: 100%; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metrics article { padding: 18px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.metrics span { display: block; color: var(--ink); font-size: 2rem; font-weight: 800; }
.health { padding: 8px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.health.ok { color: #145c2f; background: #d8f2e0; }
.health.bad { color: #852f29; background: #f8deda; }
.inline-form { max-width: 700px; display: flex; align-items: end; gap: 12px; }
.inline-form label { flex: 1; margin: 0; }
.table-wrap { margin-top: 20px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--mint); }

.legal { max-width: 800px; padding: 64px 0 80px; }
.legal h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); }
.legal-notice { padding: 16px; color: #6d5a31 !important; background: var(--warning); border: 1px solid #d8c49d; border-radius: 7px; }
.not-found { border-style: solid; }
.not-found > span { display: block; color: #b8c7bc; font: 500 clamp(5rem, 15vw, 8rem) "Tapok Display", Georgia, serif; line-height: 1; }
.not-found h1 { margin: 10px 0; font: 600 clamp(2rem, 5vw, 3rem) "Tapok Display", Georgia, serif; }
.not-found p { margin-bottom: 24px; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  :root { --page: min(100% - 32px, 1200px); }
  .site-header { height: 56px; padding-inline: 16px; }
  .site-header nav { gap: 12px; }
  .site-header nav a:not(.nav-cta) { display: none; }
  main { display: flow-root; min-height: calc(100vh - 165px); }
  footer { min-height: 109px; padding: 18px 16px; align-items: flex-start; flex-direction: column; gap: 8px; }
  footer nav { margin-left: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero { min-height: auto; padding: 48px 0 32px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.1rem); }
  .hero-code-stage { height: auto; display: grid; gap: 12px; }
  .integration-card { position: static; width: 100%; transform: none; }
  .integration-card:hover, .integration-card:focus-visible { transform: translateY(-2px); }
  .integration-card pre { min-height: auto; }
  .feature-grid, .app-grid, .metrics { grid-template-columns: 1fr; }
  .trust { width: 100%; margin-bottom: 0; padding: 40px 20px; border-radius: 0; }
  .trust ul { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; }
  .docs-layout aside { position: static; overflow: auto; }
  .docs-layout aside nav { display: flex; white-space: nowrap; }
  .docs-layout aside a { background: var(--mint); }
  .page-head, .portal-callout, .row { align-items: flex-start; flex-direction: column; }
  .profile-tabs { overflow-x: auto; white-space: nowrap; }
  .page-head { padding-top: 38px; }
  .page-head h1 { font-size: 3rem; }
  .form-grid, .scope-row { grid-template-columns: 1fr; }
  .scope-row { gap: 4px; }
  .app-card dl { grid-template-columns: 1fr; }
  .inline-form { display: block; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { min-height: auto; }
  .admin-nav-inner { position: static; height: auto; padding: 12px 16px; overflow: visible; }
  .admin-nav h2, .admin-nav .eyebrow, .admin-note { display: none; }
  .admin-nav nav { display: flex; gap: 6px; overflow-x: auto; }
  .admin-nav nav a { flex: 0 0 auto; background: #31583e; }
  .admin-content { padding: 0 16px 40px; }
  .auth-card { margin-top: 40px; padding: 24px; }
}

/* Shared forms also cover email and operator review outside .editor. */
form label { display: grid; gap: 8px; margin: 16px 0; font-size: .875rem; font-weight: 600; }
form input:not([type="checkbox"]):not([type="hidden"]),
form textarea, form select {
  width: 100%; min-width: 0; min-height: 44px; padding: 12px 13px;
  color: var(--ink); background: var(--paper); border: 1px solid #b8c7bc;
  border-radius: 6px; line-height: 1.4;
}
form textarea { resize: vertical; }
form select { cursor: pointer; }
form fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
form legend { padding: 0 8px; font-weight: 700; font-size: .9rem; }
form .check { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
form input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
select:focus-visible { outline: 3px solid #78c28f; outline-offset: 3px; }
form details { margin: 20px 0; padding-block: 16px; border-block: 1px solid var(--line); }
summary { cursor: pointer; line-height: 1.5; }
details[open] > summary { margin-bottom: 16px; }
.section > .editor, .section > .section { width: 100%; }
.section > .section { padding-block: 28px; }
.profile-settings > .section { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; }
.profile-settings h3 { margin-top: 0; font-size: 1.2rem; }
.profile-settings p, .app-card p { line-height: 1.6; }
.profile-settings dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 0; }
.profile-settings dl > div { padding: 14px; background: var(--mint); border-radius: 6px; }
.profile-settings dt { color: var(--muted); font-size: .8rem; }
.profile-settings dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.profile-settings form + form, .profile-settings form + button { margin-top: 20px; }
.profile-settings form:not(.editor) { max-width: 640px; }
.section-title, .editor-head, .card-top { align-items: center; gap: 16px; }
.row > .actions { margin-top: 0; flex-shrink: 0; }
.row > div, .app-card, .page-head > div { min-width: 0; }
.page-head p, .row p, .app-card dd, .badge { overflow-wrap: anywhere; }
.app-card > details { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.app-card form fieldset { padding: 14px; }
.badge { display: inline-flex; align-items: center; line-height: 1.35; }
.admin-content .section h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; }
.portal-callout + .danger-zone { margin-top: 32px; }
.inline-form + .empty { margin-top: 20px; }
.auth-card { margin-block: 48px; }
.auth-card .fine { margin-bottom: 0; }
@media (max-width: 900px) {
  .editor { padding: 16px; }
  .editor fieldset, form fieldset { padding: 16px; }
  .profile-settings > .section { padding: 20px; }
  .profile-settings dl { grid-template-columns: 1fr; }
  .section-title, .editor-head { flex-wrap: wrap; }
  .inline-form { display: flex; flex-direction: column; align-items: stretch; }
  .inline-form > button { align-self: flex-start; }
  .auth-card { margin-block: 28px; }
  form input:not([type="checkbox"]):not([type="hidden"]), form textarea, form select { font-size: 16px; }
  .scope-row .check { flex-wrap: wrap; }
  .scope-row .check span { flex-basis: 100%; margin-left: 28px; }
  .portal-callout { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .spinner { animation-duration: 1.5s; }
}
