/* StyleTwin legal site. Colours are the app's own (shared/core AppColors): pearl, ink, graphite. */
:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --pearl: #f4f4f6;
  --line: #e9e9ec;
  --ink: #131317;
  --muted: #767684;
  --link: #131317;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101014;
    --pearl: #1f1f25;
    --line: #2c2c32;
    --ink: #f4f4f6;
    --muted: #a1a1ad;
    --link: #f4f4f6;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }

.shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 15px;
}
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--ink); }

main { padding: 40px 0 64px; }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.2; }
h1 { margin: 0 0 10px; font-size: clamp(32px, 7vw, 46px); }
h2 { margin: 40px 0 10px; font-size: 24px; }
h3 { margin: 26px 0 6px; font-size: 18px; }
p, ul { margin: 0 0 16px; }
ul { padding-inline-start: 22px; }
li + li { margin-top: 6px; }

.lede { color: var(--muted); font-size: 19px; }
.updated { color: var(--muted); font-size: 14px; margin-top: 12px; }

.card {
  background: var(--pearl);
  border-radius: 18px;
  margin: 28px 0;
  padding: 20px 22px;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.toc {
  columns: 2;
  column-gap: 24px;
  list-style: none;
  padding: 0;
  font-size: 15px;
}
.toc li { break-inside: avoid; margin: 0 0 6px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}
.grid a {
  background: var(--pearl);
  border-radius: 16px;
  color: var(--ink);
  font-weight: 650;
  padding: 18px;
  text-decoration: none;
}
.grid a span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-top: 4px;
}

.hero { text-align: center; padding-top: 16px; }
.hero img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 18px; }

/* Content pages (built by legal_site/build_site.py from legal_site/pages/*.md). */
.answer {
  background: var(--pearl);
  border-radius: 18px;
  margin: 24px 0;
  padding: 18px 22px;
}
.answer p:last-child, .limits p:last-child, .limits ul:last-child, .note p:last-child { margin-bottom: 0; }

.steps ol { counter-reset: step; list-style: none; padding: 0; margin: 0 0 8px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 46px; margin: 0 0 16px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}

.limits { border-inline-start: 3px solid var(--line); margin: 28px 0; padding-block: 2px; padding-inline: 18px 0; }
.note { color: var(--muted); font-size: 15px; }

/* Phone screenshots: two across on a phone, up to three across on a wide screen. */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 24px 0 30px; }
.shots-1 { grid-template-columns: minmax(0, 280px); }
.shots-2 { grid-template-columns: repeat(2, minmax(0, 280px)); }
figure.shot { margin: 0; }
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--pearl);
}
figure.shot figcaption { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 8px; }

/* Wide tables scroll inside themselves on a phone, never the page. */
.table-wrap { overflow-x: auto; margin: 20px 0 28px; }
table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 15px; line-height: 1.45; }
table.cols-2, table.cols-3 { min-width: 0; }
table.cols-4 { min-width: 520px; }
th, td { border-bottom: 1px solid var(--line); padding-block: 10px; padding-inline: 0 12px; text-align: start; vertical-align: top; }
thead th { color: var(--muted); font-size: 13px; font-weight: 600; }
tbody th { font-weight: 650; }

/* Guide calculators ({{tool:…}} in build_site.py, kept live by tools.js). */
.tool { background: var(--pearl); border-radius: 18px; margin: 24px 0 30px; padding: 18px 20px; }
.tool-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 14px; }
.tool-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tool-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 12px;
}
.tool-field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.tool-answer { margin: 18px 0 0; }
.tool-answer strong { display: block; font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; }
.tool-answer span { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Colour dots ({{sw:<name>}}): the app's closet palette. */
.sw { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; margin-inline-end: 0.35em; vertical-align: -0.05em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.sw-white { background: #F5F4F1; }
.sw-cream { background: #E8DFCB; }
.sw-stone { background: #CDC1A8; }
.sw-grey { background: #9B9A98; }
.sw-khaki { background: #B39C77; }
.sw-tan { background: #B8814A; }
.sw-chocolate { background: #3A2A22; }
.sw-terracotta { background: #B7613F; }
.sw-yellow { background: #D6AE3B; }
.sw-red { background: #B23A32; }
.sw-burgundy { background: #6B2A33; }
.sw-pink { background: #E2B4B0; }
.sw-olive { background: #5E6B35; }
.sw-sage { background: #98AE94; }
.sw-blue { background: #4F7CAC; }
.sw-navy { background: #2A3C5E; }
.sw-black { background: #232120; }
@media (prefers-color-scheme: dark) { .sw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); } }

.related { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.related li + li { margin-top: 0; }
.related a { display: block; height: 100%; background: var(--pearl); border-radius: 14px; padding: 14px 16px; color: var(--ink); font-weight: 600; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* The page's 2:3 Pinterest picture and its Save link (Pinterest's plain share URL; no script). */
.pin-card {
  display: grid;
  grid-template-columns: minmax(0, 200px) 1fr;
  gap: 22px;
  align-items: center;
  background: var(--pearl);
  border-radius: 18px;
  margin: 40px 0 0;
  padding: 18px;
}
.pin-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pin-card h2 { margin: 0 0 8px; font-size: 22px; }
.pin-card p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 14px; }
.pin-card p:last-child { margin-bottom: 0; }
.pin-save {
  display: inline-block;
  background: #e60023;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  padding: 10px 18px;
  text-decoration: none;
  white-space: nowrap;
}
.pin-save:hover { background: #c8001f; }

.cta { margin-top: 40px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-block;
  background: var(--ink);
  border-radius: 999px;
  color: var(--paper);
  font-weight: 650;
  padding: 11px 20px;
  text-decoration: none;
}
.button:hover { opacity: .88; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 22px 0 40px;
}
footer a { color: var(--muted); }
footer .langs { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 2px 14px; min-height: 0; margin-top: 12px; padding: 0; font-size: 13px; }
footer .langs a { padding: 4px 0; text-decoration: none; }
footer .langs a[aria-current] { color: var(--ink); font-weight: 600; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-top: 28px; }
  .toc { columns: 1; }
  .grid { grid-template-columns: 1fr; }
  .pin-card { grid-template-columns: minmax(0, 120px) 1fr; gap: 16px; padding: 14px; }
}
