/* Shared styles for the How to use and Roadmap pages. Same colors and type as the main site. */
:root {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --text: #ffffff; --muted: rgba(235, 235, 245, 0.68);
  --separator: rgba(84, 84, 88, 0.6); --link: #5eb0ff; --accent: #0071e3; --accent-ink: #ffffff; --done: #8e8e93; --bar: rgba(22, 22, 24, 0.78); --t-body: 17px; --t-sub: 15px; --t-foot: 13px; --t-title: clamp(32px, 4.6vw, 52px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #f2f2f7; --surface-2: #ffffff; --text: #000000; --muted: rgba(60, 60, 67, 0.85);
  --separator: rgba(60, 60, 67, 0.29); --link: #0058b0; --done: #6e6e73; --bar: rgba(249, 249, 251, 0.8);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-body)/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 0.5px solid var(--separator); position: sticky; top: 0; z-index: 5;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; min-height: 44px; }
.brand img { border-radius: 8px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: var(--t-sub); }
.top nav a[aria-current="page"] { background: var(--surface); color: var(--text); }
main { max-width: 1040px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
h1 { font: 700 var(--t-title)/1.08 var(--font-display); letter-spacing: -0.03em; margin: 0 0 12px; text-wrap: balance; }
.lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 40em; margin: 0 0 8px; }
h2 { font: 700 clamp(22px, 2.4vw, 28px)/1.2 var(--font-display); letter-spacing: -0.02em; margin: 48px 0 16px; }
h3 { font: 600 19px/1.3 var(--font-display); margin: 0 0 6px; }
.loading { color: var(--muted); }

/* How to use */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--t-sub); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.card { background: var(--surface); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card p { margin: 0; color: var(--muted); }
.card ol { margin: 4px 0 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: var(--t-sub); }
.try { margin-top: auto; padding-top: 8px; }
.try a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: var(--t-sub);
}
.try a:active { opacity: 0.7; }

/* Roadmap: inset grouped lists, like iOS Settings */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--t-sub); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.status { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.status svg { width: 20px; height: 20px; }
.status.progress { color: var(--accent); }
.status.planned { color: var(--muted); }
.status.shipped { color: var(--done); }
.group-head { margin: 28px 16px 8px; font-size: var(--t-foot); font-weight: 400; color: var(--muted); }
.group { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; overflow: hidden; }
.group li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; min-height: 44px; position: relative; }
.group li + li::before { content: ''; position: absolute; top: 0; right: 0; left: 50px; border-top: 0.5px solid var(--separator); }
.group .row-text { min-width: 0; }
.group h3 { margin: 0; font-size: var(--t-body); font-weight: 600; }
.group p { margin: 2px 0 0; color: var(--muted); font-size: var(--t-sub); }
.group-foot { margin: 8px 16px 0; font-size: var(--t-foot); color: var(--muted); }
/* shipped features are grayed out */
.shipped-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 16px; align-items: start; }
.group.done li { color: var(--done); font-size: var(--t-sub); padding: 10px 16px; }
.group.done li + li::before { left: 48px; }

.foot { border-top: 0.5px solid var(--separator); padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* the reader's settings from the main site: text size, easier-to-read font and high contrast */
:root[data-textsize="large"] { --t-body: 19px; --t-sub: 17px; --t-foot: 15px; }
:root[data-textsize="xlarge"] { --t-body: 22px; --t-sub: 20px; --t-foot: 17px; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); }
:root[data-readable="on"] { --font: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; --font-display: var(--font); }
:root[data-contrast="more"] { --muted: var(--text); --done: var(--text); --separator: #8e8e93; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
