/* inboxy.net — v0.1 marketing styles.
 * Restrained palette, generous whitespace, content-first. No frameworks.
 * Plan §8 calls for Tailwind eventually; hand-written for now to avoid the
 * build step until there's a second page that benefits. */

:root {
  --ink: #1f1d1a;
  --ink-soft: #4a4640;
  --ink-faint: #7a746b;
  --paper: #fbf9f5;
  --paper-card: #ffffff;
  --rule: #e9e3d8;
  --accent: #b85c00;
  --accent-soft: #fff2e1;
  --max: 68ch;
}

* { box-sizing: border-box; }
html {
  color-scheme: light;
  /* Reserve scrollbar space so pages that don't overflow don't shift content
   * horizontally vs pages that do. `scrollbar-gutter: stable` is the modern
   * way; `overflow-y: scroll` is the legacy fallback for older WebKit. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Sticky-footer column: short pages push the footer to the viewport bottom
   * instead of leaving it floating mid-screen. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
a:hover { border-bottom-color: var(--accent); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; background: var(--accent-soft); padding: 0.05em 0.32em; border-radius: 3px; color: var(--ink); }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header nav {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  max-width: calc(var(--max) + 12ch); padding: 0 1.5rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  border: none;
  letter-spacing: -0.01em;
}
.brand-dot { color: var(--ink-faint); font-weight: 500; }
.nav-links { display: flex; gap: 1.3rem; font-size: 0.95rem; }
.nav-links a { color: var(--ink-soft); border: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links .cta-link { color: var(--accent); font-weight: 500; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  padding: 5rem 1.5rem 3.5rem;
}
.hero h1 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 2rem;
}
.hero-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem;
  margin: 0;
}
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  border-radius: 6px;
  border: none;
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.cta-note { color: var(--ink-faint); font-size: 0.92rem; }

/* ── Three-up ───────────────────────────────────────── */
.three-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  padding: 2rem 1.5rem 3rem;
}
.three-up article {
  padding: 1.5rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.three-up h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.three-up p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ── Section commons ────────────────────────────────── */
.guarantees, .how, .footnote-section {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--rule);
}
h2 {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.6rem;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}
.guarantees ul { padding: 0; list-style: none; margin: 0 0 1rem; }
.guarantees li { padding: 0.7rem 0; border-top: 1px solid var(--rule); color: var(--ink-soft); }
.guarantees li:first-child { border-top: none; }
.guarantees li strong { color: var(--ink); }
.guarantees-note { color: var(--ink-faint); font-size: 0.95rem; margin-top: 1rem; }

.how-steps {
  margin: 0;
  padding-left: 1.4rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  color: var(--ink-soft);
}
.how-steps li strong { color: var(--ink); }

.footnote-section p { color: var(--ink-faint); font-size: 0.95rem; margin: 0; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  flex-shrink: 0;
}
/* Match the header's inner width so the brand line and the footer tagline
 * land at the same horizontal column on every page, regardless of which
 * max-width the page body picks. */
.site-footer .container {
  max-width: calc(var(--max) + 12ch);
  padding: 0 1.5rem;
}
.site-footer .tagline { font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--ink); }
.site-footer .meta { font-size: 0.9rem; color: var(--ink-faint); margin: 0; }
.site-footer .meta a { color: var(--ink-soft); border: none; }
.site-footer .meta a:hover { color: var(--ink); }

@media (max-width: 540px) {
  .site-header nav { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .nav-links { flex-wrap: wrap; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3ece0;
    --ink-soft: #c8c0b2;
    --ink-faint: #8e8678;
    --paper: #161412;
    --paper-card: #1d1b18;
    --rule: #2c2823;
    --accent: #ff9a3c;
    --accent-soft: #2a1c0c;
    --ok-bg: #16321a;
    --ok-border: #3aa14c;
    --ok-ink: #c2e9c8;
    --err-bg: #3a1717;
    --err-border: #d44747;
    --err-ink: #f6c9c9;
    --warn-bg: #36280c;
    --warn-border: #cf8a2a;
  }
  html { color-scheme: dark; }
}

:root {
  --ok-bg: #eef7ed;
  --ok-border: #2f8a3c;
  --ok-ink: #1f3d22;
  --err-bg: #fdecec;
  --err-border: #c53030;
  --err-ink: #7d1717;
  --warn-bg: #fff8e6;
  --warn-border: #b85c00;
}

/* ── Account pages ─────────────────────────────────── */
.acct-page {
  padding: 2rem 1.5rem 3rem;
  margin: 0 auto;
  max-width: 72ch;
}
.acct-page .signed-in {
  color: var(--ink-faint); font-size: 0.92rem; margin: 0 0 0.4rem;
}
.acct-page h1 {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.9rem;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}
.acct-page h2 {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}
.acct-page p { color: var(--ink-soft); }
.acct-page p.muted { color: var(--ink-faint); font-size: 0.9rem; }

.acct-tabs {
  display: flex; flex-wrap: wrap;
  gap: 0.4rem 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
}
.acct-tabs a {
  color: var(--ink-faint);
  border: none;
  font-size: 0.95rem;
}
.acct-tabs a:hover { color: var(--ink); }
.acct-tabs a.active { color: var(--ink); font-weight: 600; }

.acct-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}
.acct-card.padded { padding: 1.5rem; }
.acct-cards {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.acct-cards .label { font-size: 0.85rem; color: var(--ink-faint); }
.acct-cards .value { font-size: 1.7rem; font-weight: 600; line-height: 1; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  border-left: 3px solid var(--rule);
  background: var(--paper-card);
}
.flash.ok { background: var(--ok-bg); border-left-color: var(--ok-border); color: var(--ok-ink); }
.flash.err { background: var(--err-bg); border-left-color: var(--err-border); color: var(--err-ink); }

.row-form {
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
  padding: 1rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin-bottom: 2rem;
}
.row-form input[type="text"],
.row-form input:not([type]),
.row-form input[type="email"] {
  flex: 1; min-width: 200px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--paper); color: var(--ink);
  font: inherit;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 4px;
  font: inherit; cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); }
.btn-ghost {
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.3rem 0.7rem; font-size: 0.85rem;
  border-radius: 4px; cursor: pointer; font: inherit;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); }
.btn-danger {
  background: transparent; color: var(--err-border);
  border: 1px solid var(--err-border);
  padding: 0.3rem 0.7rem; font-size: 0.85rem;
  border-radius: 4px; cursor: pointer; font: inherit;
}
.btn-danger:hover { background: var(--err-bg); }
.btn-danger-solid {
  background: var(--err-border); color: #fff;
  border: none; padding: 0.6rem 1.2rem;
  border-radius: 4px; cursor: pointer; font: inherit;
}

.acct-list {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.acct-list li {
  padding: 0.6rem 0.9rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.acct-list.retired { color: var(--ink-faint); font-size: 0.9rem; }
.acct-list.retired li {
  padding: 0.4rem 0.9rem; border: none; background: transparent;
}
.acct-list .meta { font-size: 0.82rem; color: var(--ink-faint); }
.acct-list code {
  font-family: ui-monospace, monospace; font-size: 0.95rem;
  background: transparent; padding: 0; color: inherit;
}

.danger-zone {
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  border-radius: 6px; padding: 1.5rem;
}
.danger-zone label > span { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.danger-zone input {
  padding: 0.5rem 0.7rem; border: 1px solid var(--rule); border-radius: 4px;
  font: inherit; width: 100%; max-width: 36ch;
  background: var(--paper); color: var(--ink);
}

.code-block {
  display: flex; gap: 0.5rem; align-items: stretch; margin-bottom: 2rem;
}
.code-block code,
.code-block pre {
  flex: 1; background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; border-radius: 4px;
  font-family: ui-monospace, monospace; font-size: 0.9rem;
  word-break: break-all; margin: 0;
}
.code-block pre { white-space: pre; overflow: auto; }
.code-block .btn { background: var(--ink); color: var(--paper); white-space: nowrap; font-size: 0.9rem; align-self: flex-start; }

.chip {
  font-size: 0.7rem; font-weight: 500;
  padding: 0.1rem 0.45rem; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
  display: inline-block;
}
.chip-this { background: var(--ok-bg); color: var(--ok-ink); margin-left: 0.5rem; }
.chip-urgent       { background: var(--err-bg);  color: var(--err-ink); }
.chip-receipt      { background: var(--ok-bg);   color: var(--ok-ink); }
.chip-newsletter   { background: #eef2f7;        color: #1d3a5c; }
.chip-verification { background: var(--warn-bg); color: #7d4a17; }
.chip-spam         { background: #f2f2f2;        color: var(--ink-faint); }
.chip-default      { background: #f2f2f2;        color: var(--ink-faint); }

.inbox-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.inbox-list li {
  padding: 0.7rem 1rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.inbox-list li.unread { background: var(--warn-bg); border-color: var(--warn-border); }
.inbox-list .head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.inbox-list .subject { font-weight: 500; font-size: 0.95rem; flex: 1; min-width: 200px; }
.inbox-list li.unread .subject { font-weight: 700; }
.inbox-list .meta { font-size: 0.82rem; color: var(--ink-faint); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.inbox-list .from { font-size: 0.85rem; color: var(--ink-soft); }
.inbox-list .summary { font-size: 0.85rem; color: var(--ink-faint); line-height: 1.5; }

.session-row .name { font-weight: 600; font-size: 0.95rem; }
.session-row .meta { font-size: 0.82rem; color: var(--ink-faint); }

/* Compact download chip used in inbox rows and message detail header. */
.dl-link {
  font-size: 0.78rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}
.dl-link:hover { color: var(--ink); border-color: var(--ink-faint); }

@media (prefers-color-scheme: dark) {
  .chip-newsletter { background: #1a253a; color: #cfe0ff; }
  .chip-verification { color: #f3d18a; }
  .chip-spam, .chip-default { background: #2a2722; color: var(--ink-faint); }
}
