/* Almanac website. Source: tools/site/style.css — copied with a content hash by tools/site/build.mjs. No inline styles anywhere (strict CSP). */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --bg-soft: #f5f5fb; --card: #ffffff;
  --ink: #17172e; --ink-2: #3d4058; --muted: #585b74; --line: #e3e3ee;
  --accent: #4a3fcf; --accent-hover: #382eb3; --accent-soft: #eeedff; --on-accent: #ffffff;
  --verified: #1a6ddb; --on-verified: #ffffff;
  --note-bg: #fff8e8; --note-line: #efcf8a; --note-ink: #4d3500;
  --shadow-sm: 0 1px 2px rgb(23 23 46 / 6%);
  --shadow: 0 1px 2px rgb(23 23 46 / 5%), 0 12px 32px -14px rgb(23 23 46 / 22%);
  --radius: 18px; --maxw: 1160px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c17; --bg-soft: #11132a; --card: #161931;
    --ink: #eceefb; --ink-2: #c8cbe0; --muted: #a2a6c2; --line: #2a2e4f;
    --accent: #aab2ff; --accent-hover: #c6cbff; --accent-soft: #23274f; --on-accent: #0e1030;
    --verified: #6aa8ff; --on-verified: #0b0c17;
    --note-bg: #2a2212; --note-line: #6e5622; --note-ink: #f4e2b8;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 12px 32px -14px rgb(0 0 0 / 65%);
  }
}

*, *::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 { margin: 0; font: 400 1rem/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
:root:lang(zh) body { line-height: 1.75; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.nw { white-space: nowrap; }
/* Chinese wraps between any two characters; keep dates and times whole (they contain spaces to break at) */
:lang(zh) .when, :lang(zh) .facts dd, :lang(zh) .cal-meta, :lang(zh) .ev-meta { word-break: keep-all; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 10px; font-size: .95rem; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav a[aria-current] { color: var(--accent); }
.site-nav .lang-switch { margin-left: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; }
@media (max-width: 560px) { .site-nav .nav-secondary { display: none; } }
@media (max-width: 380px) {
  .brand { gap: 8px; font-size: 1rem; }
  .site-nav a { padding: 8px 6px; }
  .site-nav .lang-switch { margin-left: 2px; padding: 4px 9px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }

/* Hero */
.hero { position: relative; color: #fff; background:
  radial-gradient(60% 80% at 12% 0%, rgb(143 168 255 / 34%), transparent 62%),
  radial-gradient(45% 60% at 100% 0%, rgb(255 138 61 / 20%), transparent 62%),
  linear-gradient(135deg, #1b2a6b 0%, #2f2a8f 55%, #5b2db8 100%); }
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(44px, 8vw, 80px) 128px; }
.hero-icon { width: 112px; height: 112px; border-radius: 25px; margin-bottom: 28px; box-shadow: 0 18px 40px -12px rgb(5 6 30 / 65%), 0 0 0 1px rgb(255 255 255 / 16%); }
.eyebrow { margin: 0 0 12px; font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: rgb(255 255 255 / 84%); }
:lang(zh) .eyebrow { letter-spacing: .12em; }
.hero h1 { max-width: 15ch; margin-bottom: 18px; font-size: clamp(2.35rem, 7.4vw, 4.4rem); font-weight: 800; letter-spacing: -.026em; color: #fff; }
:lang(zh) .hero h1 { max-width: none; letter-spacing: .02em; }
.hero .lede { max-width: 42em; margin: 0 0 28px; font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: rgb(255 255 255 / 90%); text-wrap: balance; }
:lang(zh) .hero .lede { max-width: 36em; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.hero-meta li { padding: 6px 14px; border-radius: 999px; font-size: .92rem; color: #fff; background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 22%); }
/* a status, not a button or store badge: translucent like the other chips, with a "live" dot */
.hero-meta .soon { font-weight: 600; background: rgb(255 255 255 / 16%); border-color: rgb(255 255 255 / 36%); }
.hero-meta .soon::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #5ee6a8; box-shadow: 0 0 0 3px rgb(94 230 168 / 22%); vertical-align: 1px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .btn-primary { background: #fff; color: #2f2a8f; }
.hero .btn-primary:hover { background: #eceeff; color: #2f2a8f; }
.hero .btn-ghost { color: #fff; border-color: rgb(255 255 255 / 45%); }
.hero .btn-ghost:hover { color: #fff; background: rgb(255 255 255 / 12%); }
.hero :focus-visible { outline-color: #fff; }
@media (max-width: 560px) {
  .hero .wrap { padding-block: 32px 112px; }
  .hero-icon { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 20px; }
  .hero .lede { font-size: 1.04rem; }
  .hero-meta li { font-size: .88rem; }
}

/* Screenshot strip */
.shots-block { position: relative; margin-top: -96px; }
.shots { display: flex; gap: 16px; margin: 0; padding: 8px 20px 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: thin; }
.shot { flex: 0 0 auto; width: min(62vw, 250px); margin: 0; scroll-snap-align: start; }
.shot img { width: 100%; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.shot figcaption { margin-top: 10px; text-align: center; font-size: .92rem; font-weight: 500; color: var(--muted); }
@media (min-width: 1000px) {
  .shots { max-width: var(--maxw); margin-inline: auto; overflow: visible; justify-content: space-between; }
  .shot { width: calc((100% - 5 * 16px) / 6); }
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 46rem; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.section-head h2, .split h2 { font-size: clamp(1.75rem, 3.8vw, 2.6rem); font-weight: 750; }
.section-head p { margin: 0; font-size: 1.1rem; color: var(--muted); }
.kicker { display: block; margin-bottom: 10px; font-size: .9rem; font-weight: 650; letter-spacing: .02em; color: var(--accent); }
.more { margin: 32px 0 0; text-align: center; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.feature h3 { margin: 16px 0 6px; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--ink-2); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Category tiles */
.cat-tile { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; color: #fff; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%); }
.cat-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat-tile.sm { width: 34px; height: 34px; border-radius: 9px; } .cat-tile.sm svg { width: 19px; height: 19px; }
.cat-tile.lg { width: 76px; height: 76px; border-radius: 18px; } .cat-tile.lg svg { width: 40px; height: 40px; stroke-width: 1.8; }
.cat-finance { --c1: #7d7bff; --c2: #4f46e5; }
.cat-life { --c1: #45d16a; --c2: #1d9b46; }
.cat-entertainment { --c1: #ff6f9c; --c2: #dc2f6a; }
.cat-sports { --c1: #ffad45; --c2: #ef7414; }
.cat-culture { --c1: #c99d6c; --c2: #8b5e33; }
.cat-tech { --c1: #52a6ff; --c2: #1c6bd8; }
.cat-education { --c1: #3fcac1; --c2: #0e978f; }
.cat-other { --c1: #a3a7bb; --c2: #6a6f88; }

/* Calendar cards */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cal-card { position: relative; display: flex; gap: 16px; align-items: flex-start; height: 100%; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cal-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .cal-card:hover { transform: translateY(-2px); } }
.cal-card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.cal-body { min-width: 0; }
.cal-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.cal-card h3 a { color: var(--ink); text-decoration: none; }
.cal-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cal-card h3 a:focus-visible { outline: none; }
.cal-card .summary { margin: 0 0 10px; font-size: .95rem; color: var(--ink-2); }
.cal-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; padding: 0; list-style: none; font-size: .86rem; color: var(--muted); }
@media (min-width: 760px) {
  .cal-grid.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-grid.featured > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1080px) {
  .cal-grid.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal-grid.featured > li:last-child:nth-child(odd) { grid-column: auto; }
  .cal-grid.featured > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .cal-grid.featured > li:last-child:nth-child(3n+2) { grid-column: span 2; }
}
.curator { display: inline-flex; align-items: center; gap: 4px; }
.verified { display: inline-block; flex: none; width: 1.1em; height: 1.1em; vertical-align: -.18em; }
.verified .seal { fill: var(--verified); }
.verified .tick { fill: none; stroke: var(--on-verified); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Privacy band */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.split .lede { font-size: 1.1rem; color: var(--ink-2); }
.checks { display: grid; gap: 14px; margin: 0; padding: 24px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.closing { text-align: center; }
.closing p { max-width: 38rem; margin-inline: auto; color: var(--ink-2); font-size: 1.1rem; }

/* Footer */
.site-footer { padding-block: 36px 48px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.fineprint { margin: 0; }
.fineprint a { color: var(--muted); }

/* Page heads (catalog, calendar, legal) */
.page-head { padding-block: clamp(36px, 6vw, 64px) 16px; }
.page-head h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); font-weight: 800; letter-spacing: -.025em; }
.page-head .lede { max-width: 46rem; font-size: 1.15rem; color: var(--ink-2); }
.doc-meta { color: var(--muted); }
.count { display: inline-block; min-width: 1.7em; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8em; font-weight: 650; line-height: 1.7; text-align: center; letter-spacing: 0; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.cat-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 500; text-decoration: none; }
.cat-nav a:hover { border-color: var(--accent); color: var(--ink); }
.cat-section { padding-block: 28px; scroll-margin-top: 76px; }
.cat-section h2 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.catalog-end { padding-bottom: clamp(40px, 6vw, 72px); }

/* Calendar page */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.cal-head { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.cal-head h1 { margin: 0 0 6px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; color: var(--muted); }
.layout { display: grid; gap: 28px; padding-bottom: clamp(40px, 6vw, 72px); }
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .layout > aside { grid-column: 2; grid-row: 1; position: sticky; top: 84px; }
  .layout > .main-col { grid-column: 1; grid-row: 1; }
}
.main-col > section + section { margin-top: 40px; }
.main-col h2 { font-size: 1.45rem; }
.facts { margin: 0; padding: 4px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.get-app { margin-top: 16px; padding: 20px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #1b2a6b 0%, #2f2a8f 55%, #5b2db8 100%); }
.get-app h2 { margin-bottom: 6px; font-size: 1.1rem; color: #fff; }
.get-app p { margin: 0; color: rgb(255 255 255 / 90%); font-size: .95rem; }
.get-app :focus-visible { outline-color: #fff; }
.prose { max-width: 46rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.1rem; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.doc { padding-bottom: clamp(40px, 6vw, 72px); }
.callout { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--note-line); border-radius: 14px; background: var(--note-bg); color: var(--note-ink); }
.callout strong { color: inherit; }
.source-link { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }

/* Events table */
.table-card { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.events { width: 100%; border-collapse: collapse; font-size: .95rem; }
.events th, .events td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.events thead th { font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
:lang(zh) .events thead th { letter-spacing: .1em; }
.events .month th { padding-block: 8px; font-size: .9rem; color: var(--ink); background: var(--bg-soft); }
.events tbody:last-child tr:last-child > * { border-bottom: 0; }
.events .when { width: 36%; }
.when .d { display: block; font-weight: 600; }
.when .t, .when .tz { display: block; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.when .tz { font-size: .82rem; }
.ev-title { font-weight: 500; }
.ev-title.imp { font-weight: 700; }
.ev-sub { display: block; font-size: .88rem; color: var(--muted); }
.ev-notes { display: block; margin-top: 4px; font-size: .9rem; color: var(--ink-2); }
.ev-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.ev-meta b { font-weight: 600; color: var(--ink-2); }
.ev-link { display: inline-block; margin-top: 4px; font-size: .88rem; }
.pill { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .03em; line-height: 1.7; text-transform: uppercase; vertical-align: .12em; white-space: nowrap; }
.table-note { margin: -4px 0 14px; font-size: .92rem; color: var(--muted); }
@media (max-width: 560px) {
  .events { font-size: .92rem; }
  .events th, .events td { padding: 10px 12px; }
  .events .when { width: 40%; }
}
details.all-events { margin-top: 18px; }
details.all-events > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; }
details.all-events > summary::-webkit-details-marker { display: none; }
details.all-events > summary::before { content: ""; width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
details.all-events[open] > summary { margin-bottom: 16px; }
details.all-events[open] > summary::before { transform: rotate(45deg); }

/* 404 */
.notfound { padding-block: clamp(56px, 10vw, 120px); text-align: center; }
.notfound img { margin: 0 auto 24px; width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.notfound .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 8px; }

@media print {
  .site-header, .skip-link, .shots-block, .get-app { display: none !important; }
  .hero { color: #000; background: none; }
  .hero h1, .hero .lede, .hero-meta li { color: #000; }
  details.all-events > div { display: block; }
}
