/* FVTimer legal pages — editorial styling, no external fonts or assets. */

:root {
  color-scheme: light dark;

  --paper: #faf8f4;
  --surface: #fffdfa;
  --ink: #171513;
  --ink-soft: #5f5a53;
  --rule: #e6e0d6;
  --accent: #c81e32;
  --accent-soft: #ffe9eb;
  --header-bg: rgba(250, 248, 244, 0.82);

  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
           "Songti SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --measure: 43rem;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12100e;
    --surface: #181512;
    --ink: #eae5dd;
    --ink-soft: #a49c90;
    --rule: #2b2622;
    --accent: #ff6b78;
    --accent-soft: #2a1518;
    --header-bg: rgba(18, 16, 14, 0.8);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

/* Ambient wash so the page does not read as a flat sheet of colour. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52rem 30rem at 50% -12%, var(--accent-soft), transparent 62%);
}

/* Very light grain to break digital flatness. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- chrome ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 8px 0;
  z-index: 20;
  font: 500 0.9rem/1 var(--sans);
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
}

.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 600 0.95rem/1 var(--sans);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--accent);
}

.brand:hover { text-decoration: none; }

.brand-logo::before { display: none; }

.brand-logo picture { display: block; }

.brand-logo img {
  display: block;
  width: 140px;
  height: auto;
}

.lang {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
}

.lang a {
  display: block;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  font: 500 0.78rem/1.5 var(--sans);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

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

.lang a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

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

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  padding: 5rem 0 2.75rem;
}

.eyebrow {
  margin: 0;
  font: 600 0.7rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 1rem 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 5.2vw, 3.15rem);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font: 400 0.85rem/1.6 var(--sans);
  color: var(--ink-soft);
}

.meta span:not(:first-child)::before {
  content: "·";
  margin-right: 0.5rem;
  color: var(--rule);
}

/* ---------- document body ---------- */

.doc {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--ink);
  padding-bottom: 1rem;
}

.doc h2 {
  margin: 3.25rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-wrap: balance;
  scroll-margin-top: 5rem;
}

.doc h2:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: 0;
}

.doc h3 {
  margin: 2rem 0 0.35rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.doc p {
  margin: 0.95rem 0;
  text-wrap: pretty;
}

.doc ul {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.doc li {
  position: relative;
  padding-left: 1.45rem;
}

.doc li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.78em;
  width: 0.36rem;
  height: 0.36rem;
  background: var(--accent);
  opacity: 0.5;
  transform: rotate(45deg);
  border-radius: 1px;
}

.doc strong {
  font-weight: 600;
}

.callout {
  margin: 2.25rem 0 2.75rem;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px 12px 12px 3px;
}

.callout p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

/* ---------- links, code, footer ---------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color 160ms ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

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

code {
  font: 0.86em/1.5 var(--mono);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.08em 0.35em;
}

.site-footer {
  max-width: var(--measure);
  margin: 5rem auto 0;
  padding: 1.75rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font: 400 0.82rem/1.6 var(--sans);
  color: var(--ink-soft);
}

.site-footer p { margin: 0; }

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

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- landing ---------- */

.landing h2 {
  margin: 2.75rem 0 1rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.landing ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.6rem;
}

.landing li {
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.landing li:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  transform: translateY(-1px);
}

.landing li a { text-decoration: none; }
.landing li a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  body { font-size: 16.5px; }
  .hero { padding: 3.25rem 0 2rem; }
  .doc { font-size: 1.03rem; }
  .doc h2 { margin-top: 2.75rem; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- print ---------- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before,
  body::after,
  .site-header,
  .site-footer,
  .skip-link,
  .lang { display: none !important; }
  main { max-width: none; padding: 0; }
  .hero { padding: 0 0 1rem; }
  h1 { font-size: 22pt; }
  .doc h2 { page-break-after: avoid; border-top-color: #ccc; }
  a { color: #000; text-decoration: underline; }
  .callout { border: 1px solid #bbb; border-left: 3px solid #000; background: #fff; }
}
