/* Tokens from the approved visual direction: background #F7F7F4, primary #222D28, result #EDF2EC, text #161616. */
:root {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --result: #EDF2EC;
  --text: #161616;
  --muted: #6F716C;
  --line: #DEDFD9;
  --result-line: #D5DED6;
  --result-text: #22302A;
  --accent: #5B8468;
  --primary: #222D28;
  --on-primary: #F4F6F2;
  --chip: #E8E9E3;
  --danger: #A23A2C;
  --ins: #CFE3D2;
  --del: #8A8C86;
  --shadow: 0 1px 2px rgba(22, 22, 22, .04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #131614;
  --surface: #1B1F1C;
  --result: #1D2721;
  --text: #ECEEE9;
  --muted: #9A9D96;
  --line: #2C322E;
  --result-line: #304037;
  --result-text: #DCE7DD;
  --accent: #86B594;
  --primary: #DCE6DD;
  --on-primary: #18211C;
  --chip: #262B27;
  --danger: #EF9A8C;
  --ins: #2F4A38;
  --del: #7C8079;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131614; --surface: #1B1F1C; --result: #1D2721; --text: #ECEEE9; --muted: #9A9D96; --line: #2C322E;
    --result-line: #304037; --result-text: #DCE7DD; --accent: #86B594; --primary: #DCE6DD; --on-primary: #18211C;
    --chip: #262B27; --danger: #EF9A8C; --ins: #2F4A38; --del: #7C8079; --shadow: none;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) calc(22px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(22px + env(safe-area-inset-left));
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; justify-content: space-between; align-items: flex-start; }
.wordmark { margin: 0; font-size: 2.3rem; line-height: 1.1; font-weight: 800; letter-spacing: -.055em; }
.byline { margin: .5rem 0 0; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.round {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--chip);
  display: grid; place-items: center;
}
.round svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.intro { margin: 1.9rem 0 1.5rem; }
.intro h1 { margin: 0; font-size: clamp(1.75rem, 7.4vw, 2.3rem); line-height: 1.12; font-weight: 800; letter-spacing: -.035em; }
.intro p { margin: .35rem 0 0; color: var(--muted); font-size: 1.05rem; }

.gate { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.25rem; }
.gate label { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.gate input, fieldset input {
  flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0 .9rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
}

.desk { display: grid; gap: 1.25rem; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin-bottom: .6rem; }
.label { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0; }
.tools { display: flex; align-items: center; gap: .5rem; }
.chip {
  height: 36px; padding: 0 1rem; border: 0; border-radius: 12px; background: var(--chip); font-size: .92rem;
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); margin: 0 .2rem; }
.dot.done { background: var(--accent); }
.dot.busy { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.card {
  display: flex; flex-direction: column; flex: 1;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem .95rem;
}
.card:focus-within { border-color: var(--muted); }
.card.result { background: var(--result); border-color: var(--result-line); color: var(--result-text); }
textarea, .diff {
  display: block; width: 100%; min-height: 8.5rem; flex: 1; margin: 0; padding: 0; border: 0; background: transparent;
  resize: none; outline: none; font-size: 1.06rem; line-height: 1.55; color: inherit; overflow-y: auto;
}
textarea::placeholder { color: var(--muted); opacity: .75; }
.diff { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff ins { text-decoration: none; background: var(--ins); border-radius: 4px; padding: .05em .12em; }
.diff del { color: var(--del); text-decoration-thickness: 1px; }
.meta { margin: .8rem 0 0; font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.result .meta { color: var(--accent); }
.meta.over { color: var(--danger); font-weight: 600; }

.action { display: grid; gap: .75rem; }
.primary {
  display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; height: 62px;
  border: 0; border-radius: 22px; background: var(--primary); color: var(--on-primary);
  font-size: 1.1rem; font-weight: 700; transition: opacity .15s;
}
.primary:disabled { opacity: .45; }
.primary.busy { opacity: 1; }
.spark { width: 20px; height: 20px; fill: currentColor; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.primary.busy .spark { display: none; }
.primary.busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { margin: 0; padding: .8rem 1rem; border-radius: 14px; border: 1.5px solid var(--danger); color: var(--danger); font-size: .95rem; }

.pair { display: flex; gap: .8rem; margin-top: .9rem; }
.secondary {
  flex: 1; height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1rem;
}
.secondary:disabled { opacity: .5; }

.note { margin-top: 1.75rem; text-align: center; font-size: .88rem; color: var(--muted); }
.note summary { list-style: none; cursor: pointer; }
.note summary::-webkit-details-marker { display: none; }
.note .more { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.note p { max-width: 60ch; margin: .75rem auto 0; text-align: left; }
.note a { color: inherit; }

dialog {
  width: min(420px, calc(100vw - 32px)); border: 1.5px solid var(--line); border-radius: 22px; padding: 1.25rem 1.35rem 1.1rem;
  background: var(--bg); color: var(--text);
}
dialog::backdrop { background: rgba(10, 14, 12, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
dialog h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
fieldset { border: 0; margin: 1.1rem 0 0; padding: 0; }
legend { margin-bottom: .55rem; }
.segmented { display: flex; gap: .3rem; padding: .28rem; border-radius: 14px; background: var(--chip); }
.segmented button { flex: 1; height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: .95rem; }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.hint { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }

/* Tablets and desktop: original and refined side by side, the action under the original. */
@media (min-width: 860px) {
  .page { max-width: 1180px; padding-left: calc(40px + env(safe-area-inset-left)); padding-right: calc(40px + env(safe-area-inset-right)); padding-top: calc(32px + env(safe-area-inset-top)); }
  .intro { margin: 2.2rem 0 1.9rem; }
  .intro h1 { font-size: 2.6rem; }
  .gate { max-width: 420px; }
  .desk { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: 1.75rem; row-gap: .9rem; }
  .pane:first-child { grid-column: 1; grid-row: 1; }
  .action { grid-column: 1; grid-row: 2; }
  .pane:last-child { grid-column: 2; grid-row: 1 / span 2; }
  .pane:last-child .pair { margin-top: .9rem; }
  .pane:last-child .secondary { height: 62px; border-radius: 22px; }
  textarea, .diff { min-height: 22rem; max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .dot.busy, .spinner { animation-duration: 2.5s; }
  .primary { transition: none; }
}

#challenge:empty { display: none; }

.legal { display: flex; justify-content: center; gap: 1.25rem; margin-top: .9rem; }
.legal a { color: inherit; text-underline-offset: 2px; }

/* Privacy, terms and support pages */
.doc { max-width: 720px; }
.doc .back { display: inline-block; margin-top: 1.5rem; color: var(--muted); }
.doc h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -.03em; margin: 1.5rem 0 .3rem; }
.doc h2 { font-size: 1.15rem; margin: 1.8rem 0 .4rem; }
.doc p, .doc li { font-size: 1rem; line-height: 1.6; }
.doc ul { padding-left: 1.2rem; }
.doc .date { color: var(--muted); font-size: .9rem; }
.doc hr { border: 0; border-top: 1.5px solid var(--line); margin: 2.5rem 0; }
.doc a { color: inherit; }

textarea:focus-visible { outline: none; } /* the card around it shows the focus */

.consent-text { margin: .8rem 0 0; font-size: 1rem; line-height: 1.5; }
#consent .pair { margin-top: 1.1rem; }
.secondary.strong { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 700; }
dialog a { color: inherit; }

/* ---- Website (getnotslop.com): same tokens, same type, same cards as the editor ---- */
.site { font-size: 17px; }
.site .skip { position: absolute; left: -999px; }
.site .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: .5rem .8rem; border-radius: 10px; z-index: 5; }
.site-nav, .site main, .site-foot { max-width: 1120px; margin: 0 auto; padding-left: calc(22px + env(safe-area-inset-left)); padding-right: calc(22px + env(safe-area-inset-right)); }
.site-nav { display: flex; align-items: center; gap: 1rem; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: 12px; flex-wrap: wrap; }
.site-nav .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; margin-right: auto; }
.site-nav .brand img { border-radius: 10px; display: block; }
.site-nav .wordmark { font-size: 1.6rem; }
.site-nav nav { display: flex; gap: 1.2rem; flex-wrap: wrap; order: 3; width: 100%; padding-top: .4rem; }
.site-nav nav a, .site-foot nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .35rem 0; }
.site-nav nav a:hover, .site-foot nav a:hover { color: var(--text); }
.nav-cta { height: 40px; padding: 0 1rem; display: inline-flex; align-items: center; border-radius: 12px; background: var(--chip); color: inherit; text-decoration: none; font-size: .95rem; font-weight: 600; }
.hero { display: grid; gap: 2rem; padding: 2.2rem 0 1rem; }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -.04em; }
.hero .sub { margin: .5rem 0 0; font-size: 1.25rem; color: var(--muted); }
.hero .lead, .band .lead { margin: 1.2rem 0 0; font-size: 1.08rem; line-height: 1.55; max-width: 34em; }
.cta { text-decoration: none; margin-top: 1.5rem; max-width: 22rem; }
a.secondary.cta { display: flex; align-items: center; justify-content: center; color: inherit; }
.beta-note { margin: .8rem 0 0; font-size: .9rem; color: var(--muted); }
.example { display: grid; gap: .6rem; align-content: start; }
.example .label { margin: .4rem 0 0; }
.example .card p { margin: 0; font-size: 1.06rem; line-height: 1.55; }
.example .card .meta { margin-top: .8rem; font-size: .85rem; }
.band { padding: 3rem 0 0; }
.band h2 { margin: 0 0 1.2rem; font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: -.03em; line-height: 1.15; }
.features, .steps, .stores { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.features h3, .steps h3, .stores h3 { margin: 0 0 .3rem; font-size: 1.08rem; letter-spacing: -.01em; }
.features p, .steps p, .stores p { margin: 0; color: var(--muted); line-height: 1.5; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; padding-left: 3rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.stores { margin-top: 1.4rem; }
.stores .card { flex: none; }
.stores .soon { color: var(--accent); font-weight: 600; }
.faq details { border-top: 1.5px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: .6rem 0 0; color: var(--muted); line-height: 1.55; max-width: 44em; }
.site-foot { margin-top: 3.5rem; padding-top: 1.6rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); border-top: 1.5px solid var(--line); display: grid; gap: 1.1rem; }
.site-foot .wordmark { font-size: 1.5rem; }
.site-foot nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-foot .copy { margin: 0; color: var(--muted); font-size: .88rem; }
@media (min-width: 860px) {
  .site-nav, .site main, .site-foot { padding-left: 40px; padding-right: 40px; }
  .site-nav { flex-wrap: nowrap; padding-top: 28px; }
  .site-nav nav { order: 0; width: auto; padding-top: 0; }
  .hero { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; padding: 4rem 0 2rem; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 2rem 2.2rem; }
  .steps, .stores { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .stores { grid-template-columns: repeat(2, minmax(0, 22rem)); }
  .band { padding-top: 4.5rem; }
  .site-foot { grid-template-columns: 1fr auto; align-items: end; }
  .site-foot .copy { grid-column: 1 / -1; }
}
