/* Product website (#208). Colours are the app's tokens (tokens.css, generated from design/tokens.json); light and dark
   follow the system. No external fonts, scripts or images. */
@font-face {
  font-family: "Inter";
  src: url("/assets/inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-feature-settings: "cv11", "ss01";
}

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 2;
}
.skip:focus { left: 1rem; }

/* ---- header and footer ---- */
.top {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--outline);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand img { border-radius: 7px; }
.top nav { display: flex; gap: 1.1rem; }
.top nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.top nav a:hover { color: var(--primary); }

.foot {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--outline);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 1rem; }
.foot nav a { color: var(--text); text-decoration: none; }
.foot nav a:hover, .foot nav a[aria-current] { color: var(--primary); text-decoration: underline; }

/* ---- content ---- */
main.wrap { padding-top: 2.5rem; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 2.75rem 0 0.75rem; padding-top: 0.5rem; }
h3 { font-size: 1.15rem; font-weight: 650; margin: 2rem 0 0.5rem; }
h2, h3 { scroll-margin-top: 4.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin: 0.3rem 0; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--outline); margin: 2.5rem 0; }

code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
pre {
  background: var(--surface2);
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--primary);
  background: var(--primary-tint, var(--surface2));
  border-radius: 0 10px 10px 0;
}
blockquote p:last-child { margin-bottom: 0; }

.table {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.9rem; }
th { background: var(--surface2); font-weight: 650; }
tr + tr td, tbody tr:first-child td { border-top: 1px solid var(--outline); }

.badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.85rem;
  font-weight: 500;
}

.toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--surface2);
}
.toc p { margin: 0 0 0.4rem; font-weight: 650; font-size: 0.9rem; color: var(--text-secondary); }
.toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.2rem 2rem;
  margin: 0;
  padding-left: 1.25rem;
}
.toc li { margin: 0; }

/* ---- home ---- */
.home h1 {
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  margin-top: 1.5rem;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home > p:first-of-type { font-size: 1.2rem; color: var(--text-secondary); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1rem; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary-fill);
  color: var(--on-primary-fill);
  font: 600 1rem/1 inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.button.secondary {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* ---- deletion request form ---- */
.request {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0;
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--outline);
}
.request label { font-weight: 600; }
.request textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--outline-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.request button { justify-self: start; }

@media (max-width: 34rem) {
  .top nav { gap: 0.8rem; }
  .top nav a:nth-child(2) { display: none; }
  th, td { padding: 0.55rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

@media print {
  .top, .foot, .skip, .toc { display: none; }
  body { background: #fff; color: #000; }
}
