/* Easy Setup Stores — site styles.
   Same three-colour system as ETG and ETT: sumi ink, shu red, paper.
   The palette lives in shared/web/tokens.css (see tools/sync_shared_web.py). */

/* BEGIN shared:tokens — generated from shared/web/tokens.css by tools/sync_shared_web.py; do not edit here */
/* Shared design tokens — one source for ETT, ETG and ESS (see tools/sync_shared_web.py).
   Edit THIS file, then run `python3 tools/sync_shared_web.py`; never edit the
   copies between the BEGIN/END markers in each site's styles.css.

   Sites keep their own extras AFTER the markers (ETG's accent pair, the hero
   band, --radius). The accent here is the ETT/ESS red: #DA070E on paper,
   #E02C32 on ink, sampled from the app icon so white text on it and the red as
   text both clear 4.5:1 against its own ground. */

:root {
  color-scheme: dark;

  --ground: #0b0b0c;
  --surface: #141416;
  --surface-2: #1e1e21;
  --rim: #2e2e33;

  --ink: #f5f2ec;
  --ink-soft: #afaaa2;
  --ink-faint: #837d75;

  --accent: #e02c32;
  --accent-ink: #ffffff;
  --accent-wash: rgba(224, 44, 50, 0.16);
  --good: #5fc793;

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 62ch;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #faf8f5;
    --surface: #ffffff;
    --surface-2: #f0ede7;
    --rim: #dfd9cf;
    --ink: #14120f;
    --ink-soft: #55504a;
    --ink-faint: #7a746c;
    --accent: #da070e;
    --accent-ink: #ffffff;
    --accent-wash: rgba(218, 7, 14, 0.1);
    --good: #1c7a51;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --ground: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f0ede7;
  --rim: #dfd9cf;
  --ink: #14120f;
  --ink-soft: #55504a;
  --ink-faint: #7a746c;
  --accent: #da070e;
  --accent-ink: #ffffff;
  --accent-wash: rgba(218, 7, 14, 0.1);
  --good: #1c7a51;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0b0c;
  --surface: #141416;
  --surface-2: #1e1e21;
  --rim: #2e2e33;
  --ink: #f5f2ec;
  --ink-soft: #afaaa2;
  --ink-faint: #837d75;
  --accent: #e02c32;
  --accent-ink: #ffffff;
  --accent-wash: rgba(224, 44, 50, 0.16);
  --good: #5fc793;
}
/* END shared:tokens */

:root {
  --radius: 12px;
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }
a:hover { opacity: 0.85; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rim);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand svg { flex-shrink: 0; }
.brand picture, .brand-mark { flex-shrink: 0; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--accent); opacity: 1; }

/* lang switch injected by i18n.js */
.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 4px;
}

.lang-switch a { display: inline-flex; line-height: 0; }
.lang-switch svg { width: 22px; height: 22px; border-radius: 50%; opacity: 0.45; transition: opacity .15s, box-shadow .15s; }
.lang-switch a:hover svg { opacity: 0.75; }
.lang-switch a[aria-current] svg { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }

/* coffee link injected by i18n.js */
.coffee {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px; padding: 4px 10px;
  border: 1px solid var(--rim); border-radius: 999px;
  font-size: 0.85rem; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
}
.coffee:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
@media (max-width: 640px) { .coffee-label { display: none; } .coffee { padding: 4px 8px; margin-left: 4px; } }

/* ---------- intro ---------- */

.intro {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rim);
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 16px;
  max-width: 22ch;
}

.intro-lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0;
  line-height: 1.65;
}

/* ---------- tool section ---------- */

.tool-section { padding: 40px 0 56px; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 24px;
}

.col-output { display: flex; flex-direction: column; gap: 16px; }

/* ---------- form ---------- */

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 20px;
  color: var(--ink);
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--rim);
  border-radius: 8px;
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

input::placeholder,
textarea::placeholder { color: var(--ink-faint); }

textarea { resize: vertical; line-height: 1.5; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23837d75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.field-inline { display: flex; gap: 16px; }
.field-inline > div { flex: 0 0 auto; }
.field-inline select { width: auto; min-width: 100px; }

/* ---------- output card ---------- */

.output-card h2 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.output-intro {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
  line-height: 1.5;
}

.prompt-wrap {
  background: var(--surface-2);
  border: 1px solid var(--rim);
  border-radius: 8px;
  padding: 14px 16px;
  overflow: auto;
  max-height: 320px;
  margin-bottom: 14px;
}

.prompt-text {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, background .15s;
}

.btn:disabled { opacity: 0.4; cursor: default; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:not(:disabled):hover { opacity: 0.88; }

.copy-status {
  font-size: 0.85rem;
  color: var(--good);
}

/* ---------- tip card ---------- */

.tip-card { padding: 16px 20px; }

.tip {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.tip strong { color: var(--ink); }

/* ---------- accounts section ---------- */

section[id] { scroll-margin-top: 72px; }

.accounts-section {
  padding: 48px 0 56px;
  border-top: 1px solid var(--rim);
}

.accounts-section h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  align-items: start;
}

.acc-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.acc-meta {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0 0 16px;
}

.acc-steps {
  list-style: none;
  counter-reset: acc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acc-steps li {
  counter-increment: acc;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--rim);
  margin-right: 4px;
  vertical-align: 1px;
}

.tag-official { color: var(--ink-soft); }
.tag-tested   { color: var(--good); border-color: var(--good); }
.tag-reported { color: var(--ink-faint); border-style: dashed; }

/* ---------- checklist section ---------- */

.checklist-section {
  padding: 48px 0 64px;
  border-top: 1px solid var(--rim);
}

.checklist-section h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.checklist-intro {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.checklist-group h3 {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist li label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
  padding: 0;
  border: none;
  background: none;
  min-width: unset;
}

.checklist li:has(input:checked) label { color: var(--ink-faint); }
.checklist li:has(input:checked) span { text-decoration: line-through; }

/* ---------- support / privacy pages ---------- */

.band { padding: 48px 0 64px; }

.prose { max-width: var(--measure); }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 12px; }
.prose h2 { font-size: 1.15rem; margin: 32px 0 6px; }
.prose p { color: var(--ink-soft); margin: 0 0 12px; }
.prose .updated { font-size: 0.85rem; color: var(--ink-faint); }

.qa { max-width: var(--measure); margin-top: 32px; display: flex; flex-direction: column; gap: 24px; }
.qa h3 { font-family: var(--display); font-size: 1.05rem; margin: 0 0 4px; }
.qa p { color: var(--ink-soft); margin: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rim);
  padding: 32px 0 24px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.footer-brand {
  font-size: 0.9rem;
  margin-right: auto;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-link:hover { color: var(--accent); opacity: 1; }

.footer-coffee { font-size: 0.82rem; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0;
}

.footer-copy a { color: var(--ink-faint); text-decoration: none; }
.footer-copy a:hover { color: var(--accent); opacity: 1; }
