/* The app's identity: a black æ on ivory, set in EB Garamond. The ivory is the one in
   BrandHeader.swift (0.96, 0.93, 0.87); the ink is AccentColor (#141414). There is no
   other accent colour. Links are ink and underlined. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/ebgaramond.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5ede0;
  --card: #fbf6ec;
  --ink: #141414;
  --muted: #5c554b;
  --line: rgba(20, 20, 20, 0.16);
  --tile: #f5ede0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --card: #1c1b19;
    --ink: #f5eee4;
    --muted: #a8a095;
    --line: rgba(245, 238, 228, 0.18);
    --tile: #f5ede0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 42rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* Header */

.bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1.45rem; font-weight: 600; }
.mark-tile {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: var(--tile); color: #141414; border-radius: 10px;
  border: 1px solid rgba(20,20,20,0.18);
  font-size: 1.7rem; font-weight: 600; line-height: 1; padding-bottom: 3px;
}
.topnav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; font-size: 1.05rem; }
.topnav a { text-decoration: none; }
.topnav a:hover, .topnav a[aria-current] { text-decoration: underline; }
.topnav .get {
  background: var(--ink); color: var(--bg); padding: 4px 14px; border-radius: 999px; text-decoration: none;
}

/* Type */

h1 { font-size: clamp(2.1rem, 7vw, 2.9rem); line-height: 1.1; font-weight: 600; margin: 1.6rem 0 .5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.65rem; line-height: 1.2; font-weight: 600; margin: 2.4rem 0 .4rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 1.6rem 0 .1rem; }
p, li { margin: .7rem 0; }
ul, ol { padding-left: 1.3rem; }
.lede { font-size: 1.4rem; line-height: 1.45; color: var(--muted); margin-top: 0; }
.note, .updated, .source { color: var(--muted); font-size: 1rem; }
.updated { margin: 0 0 1.2rem; }
.crumbs { font-size: 1rem; color: var(--muted); margin-top: 1.4rem; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 .4em; }
.crumbs + h1 { margin-top: .6rem; }

/* Article furniture */

.answer { border: 1px solid var(--ink); border-radius: 4px; padding: 6px 20px 10px; margin: 1.2rem 0; background: var(--card); }
.answer h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; margin: .9rem 0 0; font-weight: 600; }
.takeaways { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .6rem 0 .6rem 1.3rem; margin: 1.4rem 0; }
.faq h3 { margin-top: 1.3rem; }
.keep ul { list-style: none; padding: 0; }
.keep li { border-bottom: 1px solid var(--line); padding: .5rem 0; margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 1.05rem; line-height: 1.4; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem .55rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
.tablewrap { overflow-x: auto; }

.cta { border-top: 1px solid var(--ink); margin-top: 2.6rem; padding-top: .4rem; }
.cta.inline { border: 1px solid var(--line); border-radius: 4px; padding: .2rem 18px; margin: 1.6rem 0; background: var(--card); }
.badge img { display: block; height: 50px; width: auto; margin: .6rem 0; }

/* Cards on hubs */
.cards { list-style: none; padding: 0; margin: 1.2rem 0; }
.cards li { border-top: 1px solid var(--line); padding: .9rem 0; margin: 0; }
.cards li:last-child { border-bottom: 1px solid var(--line); }
.cards a { font-size: 1.3rem; font-weight: 600; text-decoration: none; }
.cards a:hover { text-decoration: underline; }
.cards p { margin: .15rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.4; }

/* Home */
.shots { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 16px; margin: 1.5rem 0; }
.shots img { height: min(60vh, 26rem); width: auto; border-radius: 18px; border: 1px solid var(--line); flex: none; }

details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }

footer { border-top: 1px solid var(--line); margin-top: 3.2rem; padding: 20px 0 44px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: .5rem 0; }
footer a { color: var(--muted); }
footer p { margin: .5rem 0; }

@media (max-width: 480px) { body { font-size: 1.15rem; } }
