/* Shared styles for the Warbi website: home, Privacy, Terms and Support pages */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f4f4f5;
  --border: #ebebeb;
  --border-strong: #d9d9d9;
  --ink: #0a0a0a;
  --text: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --link-line: #d4d4d8;
  --green: #16a34a;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-line: #f59e0b;
  --header-h: 60px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-subtle: #111111;
    --bg-hover: #171717;
    --border: #1f1f1f;
    --border-strong: #2e2e2e;
    --ink: #ededed;
    --text: #b4b4b8;
    --muted: #8b8b93;
    --faint: #5e5e66;
    --link-line: #3f3f46;
    --green: #4ade80;
    --amber: #fbbf24;
    --amber-bg: #17130a;
    --amber-line: #a16207;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

strong {
  color: var(--ink);
  font-weight: 550;
}

p, ul, ol {
  margin: 0 0 1em;
}

ul, ol {
  padding-left: 1.25em;
}

li {
  margin-bottom: 0.4em;
  padding-left: 0.2em;
}

ul li::marker {
  color: var(--faint);
}

ol li::marker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85em;
}

em {
  font-style: normal;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
}

.brand-sub {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.brand-sub::before {
  content: "/";
  margin: 0 8px 0 2px;
  color: var(--faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--bg-hover);
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

/* ---------- Page heading ---------- */

.hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--border);
}

.kicker {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.lead {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 40px 0 0;
}

.dates div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dates dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.dates dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- At a glance ---------- */

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 48px 0 0;
  border-top: 1px solid var(--border);
}

.summary div {
  padding: 22px 24px 0 0;
}

.summary div + div {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.summary dt {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.summary dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 680px);
  justify-content: space-between;
  gap: 64px;
  padding: 0 0 96px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 80px);
  overflow-y: auto;
  padding-top: 56px;
  scrollbar-width: none;
}

.toc::-webkit-scrollbar {
  display: none;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc li {
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.active {
  color: var(--ink);
  border-left-color: var(--ink);
  font-weight: 500;
}

.toc-mobile {
  display: none;
}

.content {
  min-width: 0;
}

.sec {
  padding: 56px 0 8px;
}

.sec + .sec {
  border-top: 1px solid var(--border);
}

.sec > :last-child {
  margin-bottom: 48px;
}

.sec h2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.sec h2 .n {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.sec h2 .anchor {
  display: none;
}

.sec h3 {
  margin: 36px 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.sec h2 + h3 {
  margin-top: 0;
}

/* ---------- Callouts ---------- */

.callout {
  margin: 0 0 1.25em;
  padding: 14px 18px;
  border-left: 2px solid var(--ink);
  background: var(--bg-subtle);
  border-radius: 0 8px 8px 0;
}

.callout > :last-child,
.callout > div > :last-child {
  margin-bottom: 0;
}

.callout.warn {
  border-left-color: var(--amber-line);
  background: var(--amber-bg);
}

.callout.success {
  border-left-color: var(--green);
}

.caps {
  font-size: 0.94em;
  color: var(--ink);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 1.5em;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: var(--ink);
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.tag.yes {
  color: var(--ink);
}

.tag.yes::before {
  background: var(--amber-line);
}

.tag.no::before {
  background: var(--green);
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 10px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.2em;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 13px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.86;
}

/* ---------- Support page ---------- */

.search {
  position: relative;
  max-width: 560px;
  margin-top: 36px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 42px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder {
  color: var(--faint);
}

.search input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  pointer-events: none;
}

.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.quick a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 28px 24px 28px 0;
  color: var(--text);
  text-decoration: none;
}

.quick a + a {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.quick strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 550;
}

.quick strong::after {
  content: "→";
  color: var(--faint);
  font-weight: 400;
  transition: transform 0.15s ease, color 0.15s ease;
}

.quick a:hover strong::after {
  color: var(--ink);
  transform: translateX(3px);
}

.quick span {
  color: var(--muted);
  font-size: 14px;
}

.faq-group {
  padding-top: 56px;
}

.faq-group > h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.faq-group > h2 .count {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

details.faq {
  border-bottom: 1px solid var(--border);
}

details.faq:first-of-type {
  border-top: 1px solid var(--border);
}

details.faq summary {
  position: relative;
  display: block;
  padding: 18px 40px 18px 0;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::before,
details.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

details.faq summary::after {
  transform: rotate(90deg);
}

details.faq[open] summary::after {
  transform: rotate(0deg);
}

details.faq summary:hover::before,
details.faq summary:hover::after {
  background: var(--ink);
}

.faq-body {
  max-width: 640px;
  padding: 0 0 22px;
}

.faq-body > :last-child {
  margin-bottom: 0;
}

.empty {
  display: none;
  padding: 56px 0 0;
  color: var(--muted);
}

.empty.show {
  display: block;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 88px;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-subtle);
}

.contact h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.contact p {
  color: var(--muted);
}

.contact h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

.contact ul {
  margin: 0 0 14px;
  font-size: 14.5px;
}

.contact .note {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .toc {
    display: none;
  }

  .toc-mobile {
    display: block;
    margin-top: 32px;
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .toc-mobile summary {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
  }

  .toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .toc-mobile summary::after {
    content: "+";
    color: var(--muted);
    font-family: var(--mono);
  }

  .toc-mobile[open] summary::after {
    content: "−";
  }

  .toc-mobile ol {
    margin: 0;
    padding: 4px 16px 14px 2.6em;
    border-top: 1px solid var(--border);
    font-size: 14px;
  }

  .toc-mobile li {
    margin: 6px 0;
  }

  .toc-mobile a {
    color: var(--text);
    text-decoration: none;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick a:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .quick a:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .brand-sub {
    display: none;
  }

  .nav a {
    padding: 6px 8px;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .lead {
    font-size: 1.05rem;
  }

  .dates {
    gap: 12px 28px;
    margin-top: 28px;
  }

  .summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary div,
  .summary div + div {
    padding: 18px 0;
    border-left: 0;
  }

  .summary div + div {
    border-top: 1px solid var(--border);
  }

  .summary div:last-child {
    padding-bottom: 0;
  }

  .sec {
    padding-top: 44px;
  }

  .sec > :last-child {
    margin-bottom: 36px;
  }

  .sec h2 {
    font-size: 1.3rem;
  }

  .quick {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick a,
  .quick a + a {
    padding: 18px 0;
    border-left: 0;
  }

  .quick a + a {
    border-top: 1px solid var(--border);
  }

  .search kbd {
    display: none;
  }

  .contact {
    margin-top: 64px;
    padding: 28px 22px;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .toc,
  .toc-mobile,
  .search,
  .site-footer nav {
    display: none !important;
  }

  .doc {
    display: block;
  }

  .sec {
    break-inside: avoid-page;
  }

  a {
    text-decoration: none;
  }
}

/* ---------- Home page ---------- */

.home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.home-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--bg);
}

.home-main h1 {
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-main .lead {
  margin-top: 16px;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  max-width: 560px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.home-links a {
  flex: 1 1 100%;
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
}

.home-links a::after {
  content: "→";
  color: var(--faint);
  transition: transform 0.15s ease, color 0.15s ease;
}

.home-links a:hover::after {
  color: var(--ink);
  transform: translateX(3px);
}

.home-links strong {
  font-weight: 500;
}

.home-contact {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14.5px;
}
