/* Pamo website. Pop Thread, sharpened: warm paper, ink borders, hard shadows, narrow heavy numbers, mono labels. */
:root {
  --bg: #FBF7F1; --surface: #FFFFFF; --sunk: #F3EDE3;
  --ink: #17142B; --soft: #4A4660; --muted: #5E5A72; --line: #E2DBD0; --rule: #17142B; --shadow: #17142B;
  --accent: #FF5A1F; --on-accent: #17142B; --info: #2F54EB; --on-info: #FFFFFF; --hi: #FFC53D; --ok: #3DDC97; --on-hi: #17142B;
  --pbg: #17142B; --pfg: #FFFFFF; --pshadow: #FF5A1F;
  --band: #17142B; --band-fg: #FFFFFF; --band-soft: #C9C5DA; --band-muted: #9C97B5; --band-line: #3A3556;
  --tint-info: #E2E8FF; --info-text: #2341B8;
  --f-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 6px; --r-card: 8px;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121022; --surface: #1D1A33; --sunk: #181530;
    --ink: #F4F1FF; --soft: #C9C5DA; --muted: #A9A4C2; --line: #34304F; --rule: #CFCAE6; --shadow: #4A4566;
    --accent: #FF6A33; --on-accent: #17142B; --info: #6F8BFF; --on-info: #17142B; --hi: #FFC53D; --ok: #3DDC97; --on-hi: #17142B;
    --pbg: #F4F1FF; --pfg: #17142B; --pshadow: #FF6A33;
    --band: #0B0A17; --band-fg: #F4F1FF; --band-soft: #C9C5DA; --band-muted: #A9A4C2; --band-line: #34304F;
    --tint-info: #1F2652; --info-text: #A9B8FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121022; --surface: #1D1A33; --sunk: #181530;
  --ink: #F4F1FF; --soft: #C9C5DA; --muted: #A9A4C2; --line: #34304F; --rule: #CFCAE6; --shadow: #4A4566;
  --accent: #FF6A33; --on-accent: #17142B; --info: #6F8BFF; --on-info: #17142B; --hi: #FFC53D; --ok: #3DDC97; --on-hi: #17142B;
  --pbg: #F4F1FF; --pfg: #17142B; --pshadow: #FF6A33;
  --band: #0B0A17; --band-fg: #F4F1FF; --band-soft: #C9C5DA; --band-muted: #A9A4C2; --band-line: #34304F;
  --tint-info: #1F2652; --info-text: #A9B8FF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.55; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img, svg { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--hi); color: #17142B; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }

/* type */
.display { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; line-height: 0.9; letter-spacing: -0.01em; }
.h1 { font-size: clamp(48px, 7.4vw, 100px); }
.h2 { font-size: clamp(40px, 5.6vw, 72px); }
.h3 { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.eyebrow, .mono { font-family: var(--f-mono); font-weight: 500; }
.eyebrow { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--soft); max-width: 60ch; }
.soft { color: var(--soft); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tabular { font-variant-numeric: tabular-nums; }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); border-bottom: 2px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 24px; }
.mark { position: relative; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px; border: 2px solid var(--rule); background: var(--accent); color: #17142B; display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-display); font-weight: 800; font-size: 20px; line-height: 1; box-shadow: 2px 2px 0 var(--shadow); }
.mark::after { content: ""; position: absolute; right: -5px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--bg); }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: var(--r); }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r); border: 2px solid var(--rule); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.menu-btn { display: none; }
@media (max-width: 920px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 2px solid var(--rule); padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .head-actions .btn-sm.hide-sm { display: none; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: var(--r); border: 2px solid var(--rule); background: var(--surface); color: var(--ink); font-family: var(--f-body); font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--shadow); transition: transform 90ms ease-out, box-shadow 90ms ease-out; white-space: nowrap; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.btn-primary { background: var(--pbg); color: var(--pfg); box-shadow: 4px 4px 0 var(--pshadow); }
.btn-primary:hover { box-shadow: 5px 5px 0 var(--pshadow); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--shadow); }
.btn-primary.btn-sm { box-shadow: 3px 3px 0 var(--pshadow); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transition: none; transform: none; } }

/* blocks */
.card { background: var(--surface); border: 2px solid var(--rule); border-radius: var(--r-card); box-shadow: 4px 4px 0 var(--shadow); padding: 22px; min-width: 0; }
.card-accent { box-shadow: 4px 4px 0 var(--pshadow); }
.sticker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 4px; border: 2px solid var(--rule); font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--hi); color: #17142B; transform: rotate(-3deg); }
.sticker.ok { background: var(--ok); }
.sticker.info { background: var(--info); color: var(--on-info); }
.sticker.accent { background: var(--accent); color: #17142B; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; border: 2px solid var(--rule); font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; background: var(--surface); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.rule-top { border-top: 2px solid var(--rule); }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.band { background: var(--band); color: var(--band-fg); }
.band .eyebrow { color: var(--band-muted); }
.band .lede, .band .soft { color: var(--band-soft); }
.icon-tile { width: 48px; height: 48px; border-radius: 8px; border: 2px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--shadow); color: #17142B; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; min-height: 52px; padding: 0 14px; border-radius: var(--r); border: 2px solid var(--rule); background: var(--surface); color: var(--ink); font-family: var(--f-body); font-size: 16px; }
.input::placeholder { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.form-note { font-size: 14px; color: var(--muted); }
.form-msg { font-size: 14px; padding: 10px 12px; border-radius: var(--r); border: 2px solid var(--rule); background: var(--tint-info); color: var(--info-text); }
.divider { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* footer */
.site-foot { border-top: 2px solid var(--rule); background: var(--surface); padding-block: 56px 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-grid h4 { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-grid a { text-decoration: none; font-size: 15px; }
.foot-grid a:hover { text-decoration: underline; }
.foot-base { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* legal */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-block: 56px 96px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.toc a { text-decoration: none; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--soft); }
.toc a:hover { border-left-color: var(--accent); color: var(--ink); }
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.15; margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--rule); scroll-margin-top: 100px; }
.prose h3 { font-family: var(--f-display); font-weight: 800; font-size: 20px; margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--rule); }
.table-wrap { overflow-x: auto; border: 2px solid var(--rule); border-radius: var(--r-card); background: var(--surface); }
.note { padding: 14px 16px; border-radius: var(--r-card); border: 2px dashed var(--muted); color: var(--soft); font-size: 15px; }
.summary { background: var(--surface); border: 2px solid var(--rule); border-radius: var(--r-card); box-shadow: 4px 4px 0 var(--pshadow); padding: 20px 22px; }
.summary ul { margin-top: 10px; }
.fill { background: var(--hi); color: #17142B; padding: 0 4px; border-radius: 3px; font-family: var(--f-mono); font-size: 0.85em; }
@media (max-width: 900px) { .legal { grid-template-columns: minmax(0, 1fr); gap: 24px; } .toc { position: static; flex-direction: row; flex-wrap: wrap; } .toc a { border-left: 0; border: 2px solid var(--line); border-radius: var(--r); } }

/* faq */
details.qa { border-bottom: 2px solid var(--line); }
details.qa summary { cursor: pointer; list-style: none; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 18px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-family: var(--f-mono); font-size: 22px; line-height: 1; color: var(--accent); }
details.qa[open] summary::after { content: "\2212"; }
details.qa .ans { padding: 0 0 18px; color: var(--soft); max-width: 70ch; }

/* auth */
.auth { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--band); color: var(--band-fg); padding-block: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-side .inner { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: 32px; display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.auth-side .lede { color: var(--band-soft); }
.auth-side .eyebrow { color: var(--band-muted); }
.auth-main { display: flex; align-items: center; justify-content: center; padding-block: 48px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.code-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-row input { width: 100%; min-width: 0; height: 64px; text-align: center; border-radius: var(--r); border: 2px solid var(--rule); background: var(--surface); color: var(--ink); font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-size: 36px; }
.code-row input:focus { box-shadow: 3px 3px 0 var(--pshadow); outline: none; }
@media (max-width: 860px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { padding-block: 32px; } .auth-side .thread-art { display: none; } }

/* thread */
.thread { height: 14px; background-image: radial-gradient(circle, var(--muted) 1.6px, transparent 2px); background-size: 12px 14px; background-repeat: repeat-x; background-position: left center; opacity: 0.7; }
.band .thread { background-image: radial-gradient(circle, var(--band-muted) 1.6px, transparent 2px); }

/* delete account */
.btn-danger { background: #B3300A; color: #FFFFFF; }
.form-msg.is-problem { background: var(--sunk); color: var(--ink); }
#del-flow [hidden] { display: none !important; }
