/* Tabpoint
   Concept: every app is a tab in a stack (file-tab shapes), with one amber "point" as the only warm accent.
   No web fonts and no third-party requests: system type only. */
:root {
  --bg: #f1f5f6;
  --surface: #ffffff;
  --ink: #0f1e27;
  --muted: #4d606b;
  --line: #d3dde1;
  --brand: #0b6e6e;
  --brand-ink: #ffffff;
  --brand-soft: #dff0ef;
  --point: #f2a33a;
  --clock: #2b52d4;
  --reminder: #c63f27;
  --expense: #0a7650;
  --on-accent: #ffffff;
  --art-clock: #5f7fec;
  --art-reminder: #e56b55;
  --art-expense: #30a57a;
  --art-ink: #0b151b;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Roboto, system-ui, sans-serif;
  --font-body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b151b; --surface: #12212a; --ink: #e8f0f3; --muted: #9db2bc; --line: #24373f;
    --brand: #43c6ba; --brand-ink: #062a2a; --brand-soft: #123a3b; --point: #f5b24f;
    --clock: #8aa4ff; --reminder: #ff8f7a; --expense: #4fcb9d; --on-accent: #0b151b; color-scheme: dark;
    --art-clock: #8aa4ff; --art-reminder: #ff8f7a; --art-expense: #4fcb9d;
  }
}
:root[data-theme="dark"] {
  --bg: #0b151b; --surface: #12212a; --ink: #e8f0f3; --muted: #9db2bc; --line: #24373f;
  --brand: #43c6ba; --brand-ink: #062a2a; --brand-soft: #123a3b; --point: #f5b24f;
  --clock: #8aa4ff; --reminder: #ff8f7a; --expense: #4fcb9d; --on-accent: #0b151b; color-scheme: dark;
  --art-clock: #8aa4ff; --art-reminder: #ff8f7a; --art-expense: #4fcb9d;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-body);
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--point); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 720; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap {
  width: 100%; max-width: 1100px; margin-inline: auto;
  padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.eyebrow { font: 600 0.78rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: 0.9rem; color: var(--muted); }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.word { font: 600 1.35rem/1 var(--font-display); letter-spacing: -0.03em; }
.word b { font-weight: 800; color: var(--brand); }
.logo-bg { fill: var(--brand); }
.logo-tab { fill: var(--brand-ink); }
.logo-dot { fill: var(--point); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 550; font-size: 0.95rem; }
nav a:hover { background: var(--brand-soft); }
nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

/* hero */
.hero { padding-block: clamp(40px, 8vw, 88px) clamp(32px, 6vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px 48px; align-items: center; }
.hero h1 { margin-block: 16px 20px; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; text-decoration: none; font-weight: 650; padding: 12px 20px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--brand); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); }
.hero-art { width: 100%; height: auto; max-width: 430px; justify-self: end; }
.hero-art .edge { fill: var(--bg); }
.t-clock .fill { fill: var(--art-clock); }
.t-reminder .fill { fill: var(--art-reminder); }
.t-expense .fill { fill: var(--art-expense); }
.hero-art .front .line { fill: var(--art-ink); opacity: 1; }
.hero-art .front .line.soft { opacity: 0.45; }
.hero-art .front .point { fill: var(--point); }

/* sections */
section.block { padding-block: clamp(32px, 6vw, 64px); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 60ch; }
.section-head p { color: var(--muted); }

/* app tabs (cards) */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 28px 22px; }
.apptab { display: flex; flex-direction: column; min-width: 0; --c: var(--clock); }
.apptab.reminder { --c: var(--reminder); }
.apptab.expense { --c: var(--expense); }
.apptab .label {
  align-self: flex-start; margin-left: 0; padding: 7px 14px 8px; background: var(--c); color: var(--on-accent);
  border-radius: 10px 10px 0 0; font: 650 0.74rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.apptab .body {
  flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 0 var(--radius) var(--radius) var(--radius);
}
.app-icon { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.i-line { fill: none; }
.apptab p { color: var(--muted); }
.apptab .meta { font: 0.8rem/1.4 var(--font-mono); color: var(--muted); margin-top: auto; padding-top: 6px; }
.more { font-weight: 650; text-decoration: none; color: var(--c); }
.more:hover { text-decoration: underline; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.fact { padding: 20px 20px 22px 0; display: grid; gap: 6px; align-content: start; }
.fact h3 { display: flex; align-items: center; gap: 8px; }
.fact h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--point); flex: none; }
.fact p { color: var(--muted); font-size: 0.97rem; }

/* app page */
.app-head { padding-block: clamp(32px, 6vw, 60px) 24px; --c: var(--clock); }
.app-head.reminder { --c: var(--reminder); }
.app-head.expense { --c: var(--expense); }
.crumbs { font-size: 0.9rem; margin-bottom: 18px; }
.app-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-title .app-icon { stroke: var(--c); flex: none; }
.app-head .lead { margin-top: 14px; max-width: 52ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { font: 600 0.78rem/1 var(--font-mono); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.pill.c { background: var(--c); border-color: var(--c); color: var(--on-accent); }
.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 36px 48px; align-items: start; padding-bottom: clamp(32px, 6vw, 64px); }
.app-layout section + section { margin-top: 40px; }
.app-layout h2 { margin-bottom: 14px; }
.feature { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.feature h3 { font-size: 1rem; }
.feature p { color: var(--muted); }
.aside { display: grid; gap: 16px; position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.panel h2 { font-size: 1.05rem; margin: 0; }
.panel dl { margin: 0; display: grid; gap: 10px; }
.panel dt { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel dd { margin: 2px 0 0; }
.note { border-left: 4px solid var(--point); padding: 4px 0 4px 14px; color: var(--muted); }

/* permission table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
td:first-child { font-weight: 600; min-width: 10rem; }
td code { font: 0.8rem var(--font-mono); color: var(--muted); display: block; margin-top: 2px; overflow-wrap: anywhere; }

/* prose (privacy, terms) */
.prose-head { padding-block: clamp(32px, 6vw, 56px) 8px; max-width: 70ch; display: grid; gap: 12px; }
.prose { max-width: 70ch; padding-bottom: clamp(40px, 7vw, 80px); }
.prose h2 { margin-top: 44px; margin-bottom: 12px; font-size: 1.5rem; }
.prose h3 { margin-top: 26px; margin-bottom: 6px; }
.prose p, .prose li { color: var(--ink); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 12px; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 6px; margin: 0; }
.prose .toc { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; padding: 0; list-style: none; }
.prose .toc a { font-weight: 600; }

/* 404 */
.lost { padding-block: clamp(56px, 12vw, 140px); display: grid; gap: 16px; max-width: 46ch; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 36px; background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px; padding-bottom: 28px; }
.foot-h { font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot .brand { margin-bottom: 10px; }
.foot a { color: var(--ink); }
.foot .plain a { text-decoration: none; }
.foot .plain a:hover { text-decoration: underline; }
.legal { border-top: 1px solid var(--line); padding-block: 16px calc(18px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.88rem; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 360px; order: -1; }
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
}
@media (max-width: 520px) {
  .top { position: static; }
  td:first-child { min-width: 0; }
}
