/*
 * FurryTales legal site (furrytales.appquant.co): the app's look, for long-form documents.
 *
 * Source of the look: App-Quant/pawsitcom origin/main aef30ef, web/src/styles/tokens.css (colours, type, radii,
 * shadows), web/src/styles/components.css (buttons, cards, notices, rows, wordmark), web/src/ps/app/set.css (logo tile)
 * and web/src/ps/app/legal.css (the in-app legal links). Token names keep the app's --ps-* names.
 *
 * Static pages only: no JavaScript, no cookies, no trackers and no third-party requests (the font is self-hosted).
 * No inline styles or data: URIs are needed, so a strict CSP (style-src 'self'; font-src 'self'; img-src 'self') works.
 * Light only, like the app (mobile/app.json userInterfaceStyle "light").
 * Keep this file at the site root, next to assets/: the font URLs below are relative to this file.
 * The pages are generated by scripts/build.mjs; the classes it uses are the ones below.
 */

/* ---- Font: Figtree 400-800 (SIL OFL 1.1, assets/fonts/OFL.txt), split exactly like the app's.
   Turkish needs both files: ç ö ü ı are in "latin", ğ ş İ Ğ Ş in "latin-ext". ---- */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/figtree-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/figtree-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens: the app's light set. Ratios are measured (WCAG 2), vs the page unless noted. ---- */
:root {
  color-scheme: light;

  --ps-ink: #2a1f27;            /* text, outlines: 14.3:1 page, 15.9:1 paper */
  --ps-ink-soft: #6e5f63;       /* muted text: 5.5:1 page, 6.0:1 paper, 5.0:1 sunken */
  --ps-bg: #f7f3ec;             /* the app's page: plaster with faint stripes */
  --ps-sunken: #efe8dc;         /* table heads */
  --ps-line: #ddd2c0;           /* decorative hairline only */
  --ps-line-group: rgb(43 27 36 / 0.16); /* quiet borders of lists, cards, pills */
  --ps-paper: #ffffff;          /* cards */
  --ps-couch-500: #ad3225;      /* primary button: white on it 6.4:1 */
  --ps-couch-600: #8f271c;      /* primary hover: white 8.5:1 */
  --ps-couch-700: #9a2c21;      /* links, kicker, "Furry": 6.9:1 page, 7.6:1 paper */
  --ps-lamp-200: #f8ebc8;       /* lamp notice, icon tiles */
  --ps-lamp-300: #f5d98f;       /* selection, mark */
  --ps-lamp-500: #f0b840;       /* marigold highlight, always with ink text (8.8:1) */
  --ps-brand-yellow: #fccc25;   /* the icon and the splash: the logo tile only */
  --ps-tv-100: #dce9e7;         /* info notice */
  --ps-tv-500: #1d5c64;         /* focus ring: 6.9:1 page, 7.6:1 paper */
  --ps-danger: #a8231b;         /* 5.7:1 on its tint */
  --ps-danger-tint: #fbe0d8;
  --ps-on-primary: #ffffff;

  --ps-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ps-font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --ps-radius-xs: 6px;
  --ps-radius-sm: 10px;
  --ps-radius-md: 16px;         /* buttons, notices, lists */
  --ps-radius-lg: 20px;         /* cards */
  --ps-radius-pill: 999px;

  /* Even, faint lifts (the app dropped its offset "cel" shadows) */
  --ps-shadow-sm: 0 1px 2px rgb(42 31 39 / 0.05), 0 4px 12px rgb(42 31 39 / 0.09);
  --ps-shadow: 0 1px 2px rgb(42 31 39 / 0.05), 0 6px 18px rgb(42 31 39 / 0.1);
  --ps-glow: rgb(255 201 77 / 0.5); /* the lamp's glow */

  --ps-focus: var(--ps-tv-500);
  --ps-gutter: 16px;
  --ps-page: 44rem;             /* header, card and footer width: about 70 characters a line inside the card */
  --ps-dur: 160ms;
  --ps-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* The app's wallpaper motif: vertical stripes with small diamonds (decorative, very low contrast) */
  --ps-wallpaper:
    radial-gradient(circle at 50% 50%, rgb(150 120 90 / 0.07) 0 1.5px, transparent 2px) 14px 18px / 28px 36px,
    repeating-linear-gradient(90deg, transparent 0 22px, rgb(150 120 90 / 0.035) 22px 34px, transparent 34px 56px);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--ps-wallpaper), var(--ps-bg);
  color: var(--ps-ink);
  font: 400 1rem / 1.65 var(--ps-font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--ps-lamp-300); color: var(--ps-ink); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ps-ink);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem); line-height: 1.08; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; letter-spacing: 0; }
[id] { scroll-margin-top: 1.25rem; }

p { margin: 0 0 1rem; }
strong, b { font-weight: 700; }
small { font-size: 0.875rem; }
address { font-style: normal; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; }
code {
  padding: 0.1em 0.35em;
  border-radius: var(--ps-radius-xs);
  background: var(--ps-sunken);
  font-family: var(--ps-font-mono);
  font-size: 0.9em;
}
mark { padding: 0 0.15em; border-radius: 3px; background: var(--ps-lamp-300); color: inherit; }
hr { margin: 2rem 0; border: 0; border-top: 1.5px dashed var(--ps-line); }

/* Links: the app's couch red, always underlined (never colour alone) */
a {
  color: var(--ps-couch-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

/* Focus: the app's teal ring colour, as an outline (survives forced colours and follows wrapped links) */
:focus-visible { outline: 3px solid var(--ps-focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; } /* <main tabindex="-1">, the skip link's target: not a control */

/* ---- Long-form flow (zero-specificity :where, so every component below can set its own spacing) ---- */
.prose :where(p, ul, ol, dl, figure, blockquote, pre, table) { margin-top: 0; margin-bottom: 1rem; }
.prose :where(h2) { margin: 2.5rem 0 0.75rem; }
.prose :where(h3) { margin: 1.75rem 0 0.5rem; }
.prose :where(h4) { margin: 1.25rem 0 0.375rem; }
.prose :where(section + section) { margin-top: 2.5rem; }
.prose :where(section > :first-child) { margin-top: 0; }
.prose :where(section > :last-child) { margin-bottom: 0; }
.prose > :first-child { margin-top: 0; }
.prose :where(ul, ol) { padding-left: 1.375rem; }
.prose :where(li + li) { margin-top: 0.375rem; }
.prose :where(li > ul, li > ol) { margin-top: 0.375rem; margin-bottom: 0; }
.prose :where(ul > li)::marker { color: var(--ps-couch-700); }
.prose :where(ol > li)::marker { font-weight: 700; }
.prose :where(p) { text-wrap: pretty; }
.prose :where(blockquote) { margin-inline: 0; padding-left: 1rem; border-left: 4px solid var(--ps-lamp-500); }
/* A heading reached from the contents gets a short lamp glow (no layout shift) */
.prose :where(h2, h3):target { border-radius: var(--ps-radius-xs); background: var(--ps-lamp-200); box-shadow: 0 0 0 0.375rem var(--ps-lamp-200); }

/* ---- Skip link: hidden until focused ---- */
.skip {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-ink);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Page width: 16px gutters on phones ---- */
.wrap { width: min(100% - 2 * var(--ps-gutter), var(--ps-page)); margin-inline: auto; }

/* ---- Header: the logo tile + wordmark, and the language switch ---- */
.site-header { padding-block: 0.75rem 0.5rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--ps-ink);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand b, .wordmark b { color: var(--ps-couch-700); font-weight: 800; }
/* The app icon as a little outlined tile (set.css .ps-logo) */
.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 27%;
  background: var(--ps-brand-yellow);
  box-shadow: 0 0 0 1.5px var(--ps-ink);
  object-fit: cover;
}

/* Language switch: the app's pill link (.ps-pill-link). Small to the eye, 44px to the finger. */
.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0 0.875rem;
  border: 1.5px solid var(--ps-line-group);
  border-radius: var(--ps-radius-pill);
  background: var(--ps-paper);
  color: var(--ps-ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.lang::after { content: ""; position: absolute; inset: -5.5px -2px; }
.lang svg { width: 1rem; height: 1rem; flex: none; }
.lang:hover { background: var(--ps-sunken); }

/* ---- The document: text on the wallpaper on phones, a paper card from tablet width ---- */
.doc { padding-block: 1rem 0.5rem; }
.doc-head { margin-bottom: 1.75rem; }
.kicker {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--ps-couch-700);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
}
.doc-head > p { margin: 0.75rem 0 0; }
.doc-meta { margin: 0.75rem 0 0; color: var(--ps-ink-soft); font-size: 0.875rem; line-height: 1.5; }
.lede, .doc-head > .lede { margin: 1rem 0 0; font-size: 1.125rem; line-height: 1.55; }

@media (min-width: 48em) {
  body { font-size: 1.0625rem; }
  .doc {
    margin-top: 0.5rem;
    padding: 2.75rem 3rem 3rem;
    border: 1.5px solid var(--ps-line-group);
    border-radius: var(--ps-radius-lg);
    background: var(--ps-paper);
    box-shadow: var(--ps-shadow);
  }
  .doc :is(.toc, .facts) { background: var(--ps-bg); }
}

/* ---- Contents ---- */
.toc {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem 1.125rem;
  border: 1.5px solid var(--ps-line-group);
  border-radius: var(--ps-radius-md);
  background: var(--ps-paper);
}
.toc-title { margin: 0 0 0.375rem; font-size: 0.9375rem; letter-spacing: 0; }
/* A plain list: the headings carry their own numbers where the document numbers its sections */
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; break-inside: avoid; }
.toc a { display: inline-block; padding-block: 0.25rem; line-height: 1.4; }
@media (min-width: 48em) { .toc ul { columns: 2; column-gap: 2.5rem; } }

/* ---- Notices: the app's .ps-notice (info = TV teal, lamp = summary, warn = danger) ---- */
.notice {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid transparent; /* shows as a border in forced colours */
  border-radius: var(--ps-radius-md);
  background: var(--ps-tv-100);
  color: var(--ps-ink);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.notice :is(p, ul, ol) { margin: 0 0 0.5rem; }
.notice > :last-child { margin-bottom: 0; }
.notice-title { display: block; margin: 0 0 0.25rem; font-size: 1rem; font-weight: 800; }
.notice--lamp { background: var(--ps-lamp-200); }
.notice--warn { background: var(--ps-danger-tint); }
.notice--warn .notice-title { color: var(--ps-danger); }

/* ---- Facts (the data controller's details): a definition list on a card ---- */
.facts {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--ps-line-group);
  border-radius: var(--ps-radius-md);
  background: var(--ps-paper);
}
.facts > div { display: grid; gap: 0.125rem; }
.facts dt { color: var(--ps-ink-soft); font-size: 0.8125rem; font-weight: 700; line-height: 1.4; }
.facts dd { margin: 0; }
@media (min-width: 40em) { .facts > div { grid-template-columns: 11rem 1fr; gap: 1rem; } }

/* ---- Tables (sub-processors, retention). The wrapper scrolls sideways only when the table must (WCAG 1.4.10
   allows it for data tables); give it tabindex="0", role="region" and a label so keyboards can scroll it.
   The edge shades show that more of the table is hidden. ---- */
.table-wrap {
  margin: 0 0 1rem;
  overflow-x: auto;
  border: 1.5px solid var(--ps-line-group);
  border-radius: var(--ps-radius-md);
  background:
    linear-gradient(to right, var(--ps-paper) 30%, rgb(255 255 255 / 0)) left center / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--ps-paper) 30%, rgb(255 255 255 / 0)) right center / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(42 31 39 / 0.24), rgb(42 31 39 / 0)) left center / 1rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(42 31 39 / 0.24), rgb(42 31 39 / 0)) right center / 1rem 100% no-repeat scroll,
    var(--ps-paper);
}
.table-wrap > table { margin: 0; }
/* Four or more columns: scroll on phones rather than one-word lines; fits the desktop card (about 37.8rem inside). */
.table-wrap--wide > table { min-width: 36rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
caption { padding: 0.875rem 1rem 0.5rem; color: var(--ps-ink); font-weight: 800; text-align: left; }
th, td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; }
thead th { background: var(--ps-sunken); font-size: 0.8125rem; font-weight: 800; line-height: 1.35; }
tbody th { font-weight: 700; }
tbody tr + tr > * { border-top: 1px solid var(--ps-line-group); }
td small, th small { display: block; margin-top: 0.125rem; color: var(--ps-ink-soft); font-size: 0.8125rem; font-weight: 400; }

/* ---- Buttons: the app's .btn (mailto actions on Support and Delete your account) ---- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--ps-ink);
  border-radius: var(--ps-radius-md);
  background: var(--ps-paper);
  color: var(--ps-ink);
  font: 700 1rem / 1.25 var(--ps-font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ps-dur) var(--ps-ease), transform 120ms var(--ps-ease);
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn:hover { background: var(--ps-sunken); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ps-couch-500); color: var(--ps-on-primary); box-shadow: var(--ps-shadow-sm); }
.btn--primary:hover { background: var(--ps-couch-600); }
.btn--block { width: 100%; }
@media (min-width: 40em) { .btn--block { width: auto; min-width: 18rem; } } /* full width in the thumb zone on phones only */

/* ---- Rows: the app's Settings list (.ps-rows), for the home page's documents ---- */
.rows {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1.5px solid var(--ps-line-group);
  border-radius: var(--ps-radius-md);
  background: var(--ps-paper);
}
.rows > li { margin: 0; }
.rows > li + li { border-top: 1px solid var(--ps-line-group); }
.row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 60px;
  padding: 0.75rem 1rem;
  color: var(--ps-ink);
  text-decoration: none;
  transition: background-color var(--ps-dur) var(--ps-ease);
}
.row:hover { background: var(--ps-bg); }
.row:focus-visible { border-radius: var(--ps-radius-md); outline-offset: -4px; } /* inside the list's rounded clip */
.row-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: var(--ps-radius-sm);
  background: var(--ps-lamp-200);
  color: var(--ps-ink);
}
.row-icon svg { width: 1.375rem; height: 1.375rem; }
.row-main { flex: 1; min-width: 0; line-height: 1.35; }
.row-title { display: block; font-weight: 700; }
.row-sub { display: block; margin-top: 0.125rem; color: var(--ps-ink-soft); font-size: 0.875rem; }
.row::after { /* chevron */
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border-top: 2px solid var(--ps-ink-soft);
  border-right: 2px solid var(--ps-ink-soft);
  transform: rotate(45deg);
}

/* ---- Home: the dog in the TV under the lamp's glow ---- */
.hero { display: grid; justify-items: center; gap: 0.75rem; padding-block: 0.5rem 2rem; text-align: center; }
.hero-art {
  width: min(13rem, 60vw);
  padding: 0.75rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--ps-glow), rgb(255 201 77 / 0));
}
.hero-art img { width: 100%; filter: drop-shadow(0 10px 14px rgb(110 64 38 / 0.22)); }
.hero h1 { font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3rem); }
.hero p { max-width: 30rem; margin: 0; }
.hero-tagline { margin-top: -0.375rem; color: var(--ps-couch-700); font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }
.home-block { margin-top: 2rem; }
.home-block p { margin: 0 0 0.5rem; color: var(--ps-ink-soft); font-size: 0.9375rem; line-height: 1.5; }
.section-title { margin: 0 0 0.75rem; font-size: 1.0625rem; letter-spacing: -0.01em; }

/* The other language's documents on the home page: plain links, 44px to the finger */
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---- Footer: the app's legal links (legal.css .ps-legal-footer), the support address, the copyright ---- */
.site-footer {
  margin-top: 3rem;
  padding-bottom: 2rem;
  color: var(--ps-ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}
.site-footer .wrap { padding-top: 1rem; border-top: 1.5px solid var(--ps-line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ps-ink-soft); font-weight: 600; }
.footer-links a[aria-current="page"] { color: var(--ps-ink); font-weight: 800; text-decoration: none; }
.site-footer p { margin: 0.5rem 0 0; }
.footer-contact a { font-weight: 600; }

/* ---- Accessibility preferences ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .brand-logo { forced-color-adjust: none; }
  .btn--primary { border-color: ButtonText; }
  .table-wrap { background: Canvas; }
}

/* ---- Print: the text, black on white, with link targets written out ---- */
@media print {
  body { display: block; background: #ffffff; color: #000000; font-size: 11pt; }
  .skip, .lang, .toc, .footer-links, .hero-art { display: none !important; }
  .wrap { width: auto; }
  .doc { margin: 0; padding: 0; border: 0; box-shadow: none; }
  a { color: inherit; }
  .prose a[href^="http"]::after, .prose a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 0.9em; }
  h2, h3, h4 { break-after: avoid; }
  tr, .notice, .facts { break-inside: avoid; }
  .table-wrap { overflow: visible; border-color: #999999; background: none; }
  .notice { border-color: #999999; }
}
