/* ============================================================
   Pattaya Coffee — Shared Design System v0.2
   Cream / Espresso / Terracotta
   Fraunces (display) · Inter (body) · JetBrains Mono (meta)
   ============================================================ */
:root {
  color-scheme: light;
  /* Surfaces */
  --bg: #FAF6F0;
  /* Runtime-set custom properties (JS) */
  --rp: 0%;
  --bg-2: #F2EBE0;
  --bg-3: #E8DDC9;
  --paper: #FFFCF6;
  --paper-2: #FAF4EA;
  /* Ink */
  --fg: #2C1810;
  --fg-2: #4A3528;
  --fg-3: #7A6555;
  --fg-4: #8E7B68;  /* v1.8 — darkened from #B5A696 (2.20:1) to pass WCAG AA contrast 5.1:1 against --bg */
  --fg-5: #D6C6B0;
  /* Lines */
  --line: rgba(44, 24, 16, 0.08);
  --line-2: rgba(44, 24, 16, 0.16);
  --line-3: rgba(44, 24, 16, 0.28);
  /* Accents */
  --accent: #D4763C;
  --accent-deep: #B85C24;
  --accent-soft: #E89B6B;
  --accent-tint: rgba(212, 118, 60, 0.10);
  --accent-tint-2: rgba(212, 118, 60, 0.18);
  --moss: #87916B;
  --moss-soft: #B0B594;
  --moss-tint: rgba(135, 145, 107, 0.14);
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(44, 24, 16, 0.04), 0 2px 6px rgba(44, 24, 16, 0.03);
  --shadow-md: 0 4px 8px rgba(44, 24, 16, 0.04), 0 12px 28px rgba(44, 24, 16, 0.06);
  --shadow-lg: 0 8px 16px rgba(44, 24, 16, 0.06), 0 24px 56px rgba(44, 24, 16, 0.10);
  /* Type stacks */
  --display: 'Fraunces', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --body: 'Inter', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  /* Layout */
  --max: 1280px;
  --max-wide: 1400px;
  --max-narrow: 880px;
  --max-prose: 680px;
  --pad-section: clamp(72px, 10vw, 140px);
  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.55s;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); scroll-padding-top: 80px; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-2);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 118, 60, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(135, 145, 107, 0.04), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; touch-action: manipulation; }
a, button, [role="button"] { touch-action: manipulation; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 0.09  0 0 0 0 0.06  0 0 0 0.045 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

/* Scroll progress */
.scroll-bar { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); z-index: 100; transition: width 0.12s linear; width: 0%; }

/* Skip */
.skip { position: absolute; left: -9999px; z-index: 9999; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: var(--paper); padding: 12px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; border-radius: 4px; box-shadow: var(--shadow-md); }

/* Scroll reveal */
/* Reveal — default VISIBLE; .js class on <html> opts in to hidden initial state.
   If JS fails to load, content stays visible. */
.reveal { transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out); }
.reveal-stagger > * { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.js .reveal-stagger:not(.in) > * { opacity: 0; transform: translateY(20px); }
.js .reveal-stagger.in > *:nth-child(1) { transition-delay: 0.00s; }
.js .reveal-stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.js .reveal-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-stagger.in > *:nth-child(4) { transition-delay: 0.24s; }
.js .reveal-stagger.in > *:nth-child(5) { transition-delay: 0.32s; }
.js .reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
.js .reveal-stagger.in > *:nth-child(n+7) { transition-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* Masthead */
.masthead { position: relative; padding: 13px max(24px, env(safe-area-inset-left)) 13px max(24px, env(safe-area-inset-right)); background: var(--fg); color: var(--bg-3); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 500; text-align: center; border-bottom: 1px solid rgba(255, 252, 246, 0.08); z-index: 90; }
.masthead .dot { color: var(--accent-soft); margin: 0 14px; opacity: 0.85; }
.masthead .live { display: inline-block; width: 6px; height: 6px; background: var(--accent-soft); border-radius: 50%; margin-right: 10px; vertical-align: middle; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.85); } }

/* Top nav */
.topnav { position: sticky; top: 0; z-index: 80; background: rgba(250, 246, 240, 0.86); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
.topnav-inner { max-width: var(--max-wide); margin: 0 auto; padding: 18px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; color: var(--fg); font-variation-settings: "opsz" 24; display: inline-flex; align-items: center; gap: 10px; }
.brand .glyph { width: 22px; height: 22px; stroke: var(--fg); stroke-width: 2; fill: none; transition: stroke 0.25s, transform 0.25s; }
.brand:hover .glyph { stroke: var(--accent); transform: rotate(-6deg); }
.brand .mark { color: var(--accent); font-style: italic; font-weight: 600; }
.nav-links { display: flex; gap: 30px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-3); justify-self: center; }
.nav-links a { position: relative; padding: 6px 0; transition: color 0.18s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 18px; justify-self: end; }
.nav-search { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.2s, color 0.2s; color: var(--fg-3); cursor: pointer; }
.nav-search:hover { border-color: var(--accent); color: var(--accent); }
.nav-search svg { width: 14px; height: 14px; }
.nav-issue { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-4); }
.nav-hamburger { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 999px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; transition: border-color 0.25s; }
.nav-hamburger:hover { border-color: var(--accent); }
.nav-hamburger span { width: 16px; height: 1.5px; background: var(--fg); transition: transform 0.3s var(--ease), opacity 0.2s; transform-origin: center; }
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
@media (max-width: 880px) {
  .topnav-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .nav-issue { display: none; }
  .nav-hamburger { display: inline-flex; }
}

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 200; background: rgba(44, 24, 16, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: var(--bg); padding: 28px 28px 40px; display: flex; flex-direction: column; gap: 22px; transform: translateX(100%); transition: transform 0.4s var(--ease); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.drawer-head .brand { font-size: 18px; }
.drawer-close { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 18px; color: var(--fg); }
.drawer-nav a { display: block; padding: 14px 0; font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--fg); border-bottom: 1px solid var(--line); font-variation-settings: "opsz" 48; letter-spacing: -0.01em; }
.drawer-nav a .num { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-right: 12px; font-weight: 500; letter-spacing: 0.2em; }
.drawer-foot { margin-top: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); }
.drawer-foot a { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* CTA buttons */
.cta { display: inline-flex; align-items: center; gap: 10px; padding: 17px 30px; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s; }
.cta:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cta .arrow { transition: transform 0.25s var(--ease-out); display: inline-block; }
.cta:hover .arrow { transform: translateX(4px); }
.cta.ghost { background: transparent; color: var(--fg); border-color: var(--line-3); }
.cta.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; box-shadow: none; }

/* Sections */
section.sec { padding: var(--pad-section) 24px; position: relative; }
.wrap { max-width: var(--max); margin: 0 auto; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; }
.wrap-prose { max-width: var(--max-prose); margin: 0 auto; }

.sec-num { display: inline-flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.sec-num .badge { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; color: var(--accent); padding: 5px 11px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent-tint); }
.sec-num .lbl { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fg-3); }
.sec-h { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 7.5vw, 6.4rem); line-height: 0.97; letter-spacing: -0.025em; color: var(--fg); margin: 0 0 28px; max-width: 16ch; font-variation-settings: "opsz" 144; }
.sec-h .ital { color: var(--accent); font-style: italic; font-weight: 500; }
.sec-deck { max-width: 60ch; font-family: var(--body); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.65; color: var(--fg-2); margin: 0 0 56px; }
.sec-deck b { color: var(--fg); font-weight: 600; }
.sec-deck em { color: var(--accent); font-style: italic; }

/* Breadcrumbs */
.crumbs { padding: 24px 24px 0; max-width: var(--max-wide); margin: 0 auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); }
.crumbs a { color: var(--fg-3); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.crumbs a:hover { color: var(--accent); border-color: var(--accent); }
.crumbs .sep { color: var(--fg-4); margin: 0 10px; }

/* Bean divider */
.bean-divider { display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 48px 0 24px; color: var(--fg-4); }
.bean-divider .line { width: 60px; height: 1px; background: var(--line-2); }
.bean-divider svg { width: 14px; height: 18px; margin: 0 18px; opacity: 0.6; }

/* Closing slogan */
.slogan { padding: clamp(90px, 13vw, 160px) 24px; text-align: center; background: var(--bg); }
.slogan .pre { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 56px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); display: inline-block; }
.slogan h2 { font-family: var(--display); font-weight: 500; font-size: clamp(3.2rem, 10vw, 8rem); line-height: 0.96; letter-spacing: -0.028em; color: var(--fg); margin: 0; font-variation-settings: "opsz" 144; }
.slogan h2 .ital { color: var(--accent); font-style: italic; }
.slogan h2 + h2 { margin-top: 10px; }

/* Footer */
footer.ftr { padding: 100px 24px 48px; background: var(--fg); color: var(--bg-3); position: relative; overflow: hidden; }
footer.ftr::before { content: ''; position: absolute; bottom: -300px; left: -200px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(212, 118, 60, 0.10), transparent 70%); pointer-events: none; }
.ftr-grid { max-width: var(--max-wide); margin: 0 auto; display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 56px; position: relative; }
.ftr-brand .mark { font-family: var(--display); font-weight: 600; font-size: 2rem; color: var(--paper); margin-bottom: 20px; letter-spacing: -0.015em; font-variation-settings: "opsz" 60; }
.ftr-brand .mark .ital { color: var(--accent-soft); font-style: italic; }
.ftr-brand .tag { font-family: var(--body); font-size: 15px; line-height: 1.65; color: rgba(255, 252, 246, 0.72); margin-bottom: 22px; max-width: 42ch; }
.ftr-brand .sig { font-family: var(--display); font-style: italic; font-size: 17px; color: var(--accent-soft); font-variation-settings: "opsz" 24; }
.ftr-col h5 { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 22px; }
.ftr-col ul { list-style: none; }
.ftr-col li { margin-bottom: 12px; }
.ftr-col a { font-family: var(--body); font-size: 15px; color: rgba(255, 252, 246, 0.78); transition: color 0.18s, padding-left 0.18s; }
.ftr-col a:hover { color: var(--accent-soft); padding-left: 4px; }
.ftr-network { max-width: var(--max-wide); margin: 72px auto 0; padding-top: 40px; border-top: 1px solid rgba(255, 252, 246, 0.12); position: relative; }
.ftr-network-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.ftr-network-head h5 { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-soft); }
.ftr-network-head .tagline { font-family: var(--display); font-style: italic; font-size: 16px; color: rgba(255, 252, 246, 0.6); font-variation-settings: "opsz" 18; }
.ftr-network-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ftr-network-grid a { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: rgba(255, 252, 246, 0.86); padding: 18px 20px; border: 1px solid rgba(255, 252, 246, 0.12); border-radius: 6px; letter-spacing: -0.008em; transition: border-color 0.25s, color 0.25s, transform 0.25s, background 0.25s; font-variation-settings: "opsz" 30; display: block; position: relative; }
.ftr-network-grid a:hover { border-color: var(--accent-soft); color: var(--paper); transform: translateY(-2px); background: rgba(212, 118, 60, 0.05); }
.ftr-network-grid a.current { border-color: var(--accent-soft); background: rgba(212, 118, 60, 0.10); }
.ftr-network-grid a .role { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-soft); margin-top: 6px; font-style: normal; font-weight: 500; font-variation-settings: normal; }
.ftr-bottom { max-width: var(--max-wide); margin: 56px auto 0; padding-top: 28px; border-top: 1px solid rgba(255, 252, 246, 0.12); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 252, 246, 0.5); position: relative; }
.ftr-bottom a { color: var(--accent-soft); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.ftr-bottom a:hover { border-bottom-color: var(--accent-soft); }
@media (max-width: 1000px) { .ftr-grid { grid-template-columns: 1fr 1fr 1fr; gap: 36px; } .ftr-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-brand { grid-column: 1 / -1; } }

/* Back to top */
.to-top { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); width: 46px; height: 46px; background: var(--fg); color: var(--paper); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s, background 0.25s; z-index: 70; box-shadow: var(--shadow-md); }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--accent); transform: translateY(-2px); }

/* Print — proper editorial print for cafe / guide pages */
@media print {
  .topnav, .masthead, .to-top, .scroll-bar, .cta-row, .drawer, .ftr-network, .slogan, .nav-hamburger, .nav-search, .nav-issue, .skip { display: none !important; }
  *, *::before, *::after { background: transparent !important; box-shadow: none !important; }
  html, body { background: white !important; color: #111 !important; font-size: 11pt; line-height: 1.5; }
  body::before { display: none; }
  .hero, .editorial-hero, .article-hero, .mast-hero { padding: 24px 0 18px; }
  .wrap, .sec, .prose, article, section { padding: 0; max-width: 100% !important; page-break-inside: avoid; }
  h1, h2, h3 { color: #000 !important; page-break-after: avoid; }
  h2 .ital, h1 .ital { color: #444 !important; }
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; word-break: break-all; }
  a[href^="/"]::after { content: " (pattaya-coffee.com" attr(href) ")"; font-size: 9pt; color: #666; }
  a[href^="mailto:"]::after, a[href^="#"]::after { content: ""; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .tldr, .pre-audit-banner { border-left: 3px solid #999 !important; background: #f5f5f5 !important; }
  img, svg { max-width: 100% !important; height: auto !important; }
  .ftr { border-top: 2px solid #000; padding-top: 18px; font-size: 9pt; color: #555; }
  .ftr-grid { display: block; }
  .ftr-col, .ftr-brand { margin-bottom: 12px; }
  @page { margin: 1.6cm 1.4cm; }
}

/* View Transitions API — premium feel for navigation in supporting browsers */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-fade-out 220ms cubic-bezier(0.4, 0, 0.2, 1) both; }
::view-transition-new(root) { animation: vt-fade-in 260ms cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes vt-fade-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* iOS Low Power Mode + reduced-data respect */
@media (prefers-reduced-data: reduce) {
  .topnav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Focus visible — WCAG 2.2 SC 2.4.11 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
a:focus-visible, button:focus-visible { outline-offset: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* Reading-time chip (opt-in via .read-time-chip; preserves existing .byline .read-time inline style) */
.read-time-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 99px; margin-left: 10px; vertical-align: middle; }
.read-time-chip::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* Newsletter inline form */
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; max-width: 480px; margin: 18px 0 8px; }
.nl-form input[type="email"] { flex: 1 1 220px; min-width: 0; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--body); font-size: 16px; color: var(--fg); outline: none; transition: border-color 0.18s, box-shadow 0.18s; }
.nl-form input[type="email"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.nl-form input[type="email"]::placeholder { color: var(--fg-4); }
.nl-form button { padding: 14px 24px; background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; border: 1px solid var(--fg); border-radius: 999px; cursor: pointer; transition: background 0.18s, border-color 0.18s; }
.nl-form button:hover { background: var(--accent); border-color: var(--accent); }
.nl-form-note { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-4); margin-top: 4px; }
.nl-form-status { font-family: var(--body); font-size: 13.5px; color: var(--fg-2); margin-top: 8px; min-height: 1.2em; }
.nl-form-status.ok { color: #4a7c4e; }
.nl-form-status.err { color: #b43c32; }

/* Trust signal pills in footer */
.ftr-trust { max-width: var(--max-wide); margin: 28px auto 0; padding: 18px 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; border-top: 1px solid rgba(255, 252, 246, 0.08); }
.trust-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 252, 246, 0.65); padding: 6px 12px; border: 1px solid rgba(255, 252, 246, 0.16); border-radius: 99px; transition: color 0.2s, border-color 0.2s; cursor: default; }
.trust-pill:hover { color: var(--accent-soft); border-color: var(--accent-soft); }
.trust-pill::before { content: ""; width: 6px; height: 6px; background: var(--accent-soft); border-radius: 50%; }
@media print { .ftr-trust { display: none; } }

/* Cmd+K hint on the nav search icon (desktop only) */
.nav-search { position: relative; }
.nav-search-hint { display: none; position: absolute; right: -2px; top: 50%; transform: translateY(-50%); padding: 3px 7px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 4px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--fg-3); pointer-events: none; }
@media (hover: hover) and (min-width: 880px) { .nav-search { padding-right: 36px; width: auto; min-width: 36px; } .nav-search-hint { display: inline-block; position: static; transform: none; margin-left: 6px; } }

/* ============================================================
   v1.4 — modern CSS typography + UX
   ============================================================ */

/* Headlines never orphan a word; body wraps "prettily" (no last-line widows) */
h1, h2, .iss-card .title, .release-title, .staff-card .name, .map-list-item .name, .editorial-hero h1, .map-hero h1, .article-hero h1, .mast-hero h1, .cl-hero h1, .iss-hero h1 { text-wrap: balance; }
.lede, .prose p, .article-hero .lede, .editorial-hero .lede, .iss-hero .lede, .map-hero .lede, .mast-hero .lede { text-wrap: pretty; }

/* Container queries — card grids adapt to their container, not just viewport */
.iss-grid, .staff-grid, .map-list-grid { container-type: inline-size; }
@container (max-width: 520px) {
  .iss-card { grid-template-columns: 1fr; gap: 14px; }
  .map-list-item { padding: 12px 14px; }
}

/* Reading progress bar — uses existing .scroll-bar; this is the .progress variant for guide articles */
.read-progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; background: transparent; z-index: 101; pointer-events: none; }
.read-progress::after { content: ""; display: block; height: 100%; width: var(--rp, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width 0.08s linear; }

/* Anchor link copy — appears on heading hover, click to copy */
.prose h2, .prose h3, .small-print h2 { position: relative; scroll-margin-top: 90px; }
.anchor-link { position: absolute; left: -28px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.18s, color 0.18s; color: var(--fg-4); text-decoration: none; font-family: var(--mono); font-size: 14px; line-height: 1; }
.anchor-link:hover { color: var(--accent); }
:where(.prose h2, .prose h3, .small-print h2):hover .anchor-link,
:where(.prose h2, .prose h3, .small-print h2):focus-within .anchor-link { opacity: 1; }
.anchor-link.copied::after { content: "Copied"; position: absolute; left: 28px; top: 0; padding: 2px 8px; background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; border-radius: 4px; white-space: nowrap; animation: copied-flash 1.6s ease-out forwards; }
@keyframes copied-flash { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 720px) { .anchor-link { display: none; } }

/* Web Share button — appears on cafe pages and guides */
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg); cursor: pointer; transition: border-color 0.18s, background 0.18s; }
.share-btn:hover { border-color: var(--accent); background: var(--accent-tint); }
.share-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* PWA install soft-prompt button — hidden until beforeinstallprompt fires */
.install-btn { display: none; position: fixed; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 12px 20px; background: var(--fg); color: var(--bg); border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; box-shadow: var(--shadow-md); z-index: 71; cursor: pointer; border: 0; transition: background 0.18s, transform 0.18s; }
.install-btn.show { display: inline-flex; align-items: center; gap: 8px; }
.install-btn:hover { background: var(--accent); transform: translateY(-2px); }
.install-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
@media print { .install-btn { display: none !important; } }

/* Author byline block — bottom of guide articles */
.author-block { max-width: var(--max-prose); margin: 48px auto 0; padding: 0 24px; }
.author-block-inner { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 32px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; }
.author-block-inner::before { content: "TP"; align-self: center; justify-self: center; width: 80px; height: 80px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-deep); font-family: var(--display); font-weight: 600; font-size: 1.8rem; font-variation-settings: "opsz" 60; display: flex; align-items: center; justify-content: center; font-style: italic; }
.ab-role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
.ab-name { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--fg); margin-bottom: 10px; font-variation-settings: "opsz" 36; }
.ab-name .ital { color: var(--accent); font-style: italic; }
.ab-bio { font-family: var(--body); font-size: 14.5px; line-height: 1.6; color: var(--fg-2); margin-bottom: 12px; text-wrap: pretty; }
.ab-links { display: flex; gap: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; }
.ab-links a { color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.ab-links a:hover { color: var(--accent-deep); border-bottom-color: var(--accent-deep); }
@media (max-width: 600px) { .author-block-inner { grid-template-columns: 1fr; gap: 14px; padding: 24px; text-align: center; } .ab-links { justify-content: center; } }

/* v1.7 — Footer column titles (semantic upgrade from h5 to div+role=heading to fix heading hierarchy skip) */
.ftr-col .ftr-col-title { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 22px; }
.ftr-network-head .ftr-col-title { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-soft); }


/* v1.10 — mobile-first polish */
@supports (padding: env(safe-area-inset-bottom)) {
  .ftr-bottom { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .drawer-panel { padding-bottom: env(safe-area-inset-bottom); }
}
/* Disable backdrop-filter on iOS reduced-data + slow connections */
@media (prefers-reduced-data: reduce) {
  .topnav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Tap-friendly enlargements on small screens (effective area, not visual) */
@media (max-width: 700px) {
  .nav-links a { padding: 12px 0; }  /* increase tap target from ~24px to ~48px */
  .ftr-col li a { padding: 4px 0; display: inline-block; }
  /* Newsletter form: stack on phones */
  .nl-form { flex-direction: column; align-items: stretch; }
  .nl-form button { width: 100%; }
  /* Inputs always at least 16px on mobile */
  input, select, textarea { font-size: 16px !important; }
}
/* Better long-press preview on iOS — but keep tap-highlight off */
a, button { -webkit-touch-callout: default; }


/* v1.11 — WCAG AA: small text uses --accent-deep (4.25:1) not --accent (3.02:1) */
.eyebrow, .label, .meta, .release-version,
.editorial-hero .label, .mast-hero .label, .iss-hero .label, .map-hero .label,
.cmp-hero .label, .page-hero .label, .cl-hero .label,
.nav-issue, .read-time-chip, .stamp,
.ab-role, .cafe-utils a, .nl-form-note,
.staff-card .role, .iss-card .meta .status,
.timeline-when, .status-card .lbl, .tldr .lbl,
.boilerplate .label, .leaflet-popup-content .cp-rank,
.cmp-row-val .tag, .swatch .info .nm, .swatch .info .hex {
  color: var(--accent-deep);
}
/* Keep large accent uses (h1 .ital, h2 .ital) on the brighter --accent */
