/* Linger Art: the legal and support pages.
   The app's own language (ArtTourGuide/DESIGN.md): warm neutrals, a serif
   that names things, a plain sans for everything you read through, and one
   accent, the terracotta wall of the icon. Light and dark follow the device. */

:root {
  --canvas: #F6F4EF;
  --surface: #FFFFFF;
  --matte: #EAE6DE;
  --ink: #1C1A17;
  --ink-2: #57524A;
  --ink-3: #7A746A;
  --hairline: rgba(0, 0, 0, 0.09);
  --accent: #A04626;          /* terracotta, dark enough for text on the canvas */
  --accent-soft: rgba(180, 83, 47, 0.08);
  --gilt: #886420;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.05), 0 8px 24px rgba(40, 30, 20, 0.06);

  --serif: "Newsreader", ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --measure: 68ch;
  --radius-card: 24px;
  --radius-control: 12px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0E0D0C;
    --surface: #1A1917;
    --matte: #282522;
    --ink: #F1EDE6;
    --ink-2: #BDB6AB;
    --ink-3: #958E83;
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #E39A76;
    --accent-soft: rgba(227, 154, 118, 0.10);
    --gilt: #D9AF63;
    --shadow: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
}

/* Header: the icon, the name, three links. */

.site-header {
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.brand span {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  font-size: 15px;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

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

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

/* Type. */

main { padding: 48px 0 64px; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(34px, 6vw, 46px);
  margin: 0 0 12px;
}

h2 {
  font-size: clamp(25px, 4vw, 30px);
  margin: 56px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

h3 {
  font-size: 20px;
  margin: 32px 0 8px;
}

p, ul, ol { margin: 0 0 16px; }

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

li { margin: 0 0 8px; }

li::marker { color: var(--ink-3); }

strong { font-weight: 600; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

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

.lede {
  font-size: 19px;
  color: var(--ink-2);
  margin-bottom: 24px;
}

.meta {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 32px;
}

.ui {
  /* The app's own words: a button or a setting, as it reads on screen. */
  font-weight: 600;
  white-space: nowrap;
}

/* The short version, at the top of the policy. */

.brief {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px 28px 8px;
  margin: 0 0 40px;
}

.brief h2 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 22px;
}

.brief ul { padding-left: 0; list-style: none; }

.brief li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
}

.brief li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

@media (max-width: 480px) {
  .brief { padding: 20px 20px 4px; border-radius: 20px; }
}

/* Contents. */

.toc {
  margin: 0 0 16px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--hairline);
}

.toc h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.toc ol {
  columns: 2;
  column-gap: 32px;
  padding-left: 1.5em;
  font-size: 15px;
}

.toc li { break-inside: avoid; margin-bottom: 6px; }

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

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

@media (max-width: 560px) {
  .toc ol { columns: 1; }
}

/* A quiet note, for a fact worth setting apart. */

.note {
  background: var(--accent-soft);
  border-radius: var(--radius-control);
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 16px;
}

.note p:last-child { margin-bottom: 0; }

/* Tables (who receives what). */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

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

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

th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--matte);
}

/* Support: questions as disclosures, grouped. */

.faq-group { margin: 0 0 8px; }

.faq-group h2 { margin-bottom: 16px; }

details {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  margin: 0 0 10px;
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 48px 14px 18px;
  position: relative;
  font-weight: 600;
  line-height: 1.4;
}

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

summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

@media (prefers-reduced-motion: reduce) {
  summary::after { transition: none; }
}

details > div { padding: 0 18px 4px; color: var(--ink); }

details > div p, details > div li { font-size: 16px; }

/* Contact card. */

.contact {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin: 0 0 40px;
}

.contact p { margin-bottom: 8px; }

.contact .email {
  font-family: var(--serif);
  font-size: 24px;
  word-break: break-word;
}

/* Landing page. */

.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero img {
  width: 128px;
  height: 128px;
  border-radius: 29px;
  box-shadow: 0 2px 4px rgba(40, 30, 20, 0.08), 0 18px 40px rgba(110, 42, 22, 0.22);
  margin: 0 0 28px;
}

.hero h1 { margin-bottom: 16px; }

.hero .lede {
  font-family: var(--serif);
  font-size: clamp(21px, 3.4vw, 25px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 34ch;
  margin: 0 auto 28px;
}

.store-link {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}

.cards li { margin: 0; }

.cards a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
}

.cards a:hover { border-color: var(--accent); }

.cards strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cards span { font-size: 15px; color: var(--ink-2); }

/* Footer. */

.site-footer {
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--ink-3);
}

.site-footer .wrap {
  padding-top: 24px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

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

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

/* Credits: every painting in the Gallery, a table per room. */

.wrap.credits { max-width: calc(1120px + 2 * var(--gutter)); }

.credits .lede { max-width: var(--measure); }

.credits td .sub { display: block; font-size: 13px; color: var(--ink-3); }

.credits td .also { color: var(--ink-3); font-style: italic; }

.credits td.nowrap { white-space: nowrap; }

.credits td a { word-break: break-word; }
