* { box-sizing: border-box; }
/* Same-origin page changes progressively morph the daily-card entry into the reader. Browsers that
   do not implement cross-document View Transitions ignore this block and keep normal navigation. */
@view-transition { navigation: auto; }
::view-transition-group(daily-cards) { animation-duration: var(--duration-emphasis); animation-timing-function: var(--ease-emphasis); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--duration-page); animation-timing-function: var(--ease-standard); }
html { font-size: var(--font-size-root); scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--font-size-body); line-height: var(--line-height-normal); letter-spacing: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, select, input { color: var(--text); }
button, select { min-height: var(--control-height); background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-md); transition: var(--transition-control); }
button { padding: 9px 14px; }
select { appearance: none; padding: 8px 34px 8px 12px; max-width: 100%; font-size: .875rem; }
button:hover, select:hover { border-color: var(--accent-line); background-color: var(--surface-hover); }
button:active { transform: translateY(1px); }
button:disabled, select:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; z-index: 100; left: 20px; top: -100px; padding: 10px 16px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--layout-header); padding: 18px var(--space-7); margin: auto; display: flex; align-items: center; gap: 44px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; line-height: 1.15; }
.brand-logo { color: #58a6ff; }
.brand span { font-size: 1.15rem; font-weight: 750; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 5px; font-size: .75rem; letter-spacing: .04em; font-weight: 450; color: var(--muted); }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.main-nav a { font-size: .9rem; font-weight: 600; padding: 8px 13px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.preferences { margin-left: auto; display: flex; gap: 8px; }
.preferences select { border-color: transparent; background: var(--bg); }
.workspace { max-width: var(--layout-content); margin: 0 auto; padding: var(--space-12) var(--space-7) var(--space-16); min-height: 65vh; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .15em; color: var(--accent); margin: 0 0 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.3; margin: 0; letter-spacing: -.025em; overflow-wrap: anywhere; }
.intro { color: var(--muted); margin: 12px 0 0; }
.search { display: flex; align-items: center; gap: 10px; max-width: 440px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { width: 100%; min-width: 0; border: none; background: transparent; outline: none; font-size: .875rem; }
.search input::placeholder { color: var(--muted); }
/* Filter chips. The build renders every chip; web/app.js collapses what does not fit
   into the "more" menu, so the row never scrolls horizontally. Without JS the row wraps. */
.chip-filter { position: relative; display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
/* Single line by default; index.html restores wrapping under <noscript>. */
.chip-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 14px; border: var(--border-width) solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font: inherit; font-size: var(--font-size-sm); font-weight: 550; line-height: 1.5; white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
.chip:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { background: transparent; border-color: transparent; color: var(--faint); cursor: not-allowed; }
.chip-count { font-size: .75rem; font-weight: 450; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover:not(:disabled) .chip-count, .chip.is-active .chip-count, .chip:disabled .chip-count { color: inherit; opacity: .88; }
.chip-more { flex: 0 0 auto; }
.chip-caret { flex: 0 0 auto; opacity: .7; }
.chip-menu { position: absolute; z-index: 40; top: calc(100% + var(--space-2)); right: 0; min-width: 236px; display: flex; flex-direction: column; gap: 1px; padding: 6px; border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-menu); }
.chip-menu[hidden] { display: none; }
.chip-menu .chip { width: 100%; justify-content: flex-start; gap: 12px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; font-weight: 500; text-align: left; }
.chip-menu .chip::before { content: '✓'; flex: 0 0 auto; font-size: .8em; color: var(--accent); visibility: hidden; }
.chip-menu .chip.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip-menu .chip.is-active::before { visibility: visible; }
.chip-menu .chip-count { margin-left: auto; color: var(--muted); }
.chip-menu .chip:hover:not(:disabled) .chip-count, .chip-menu .chip.is-active .chip-count { color: inherit; }
.chip-select { position: relative; display: none; align-items: center; gap: 8px; min-width: 0; }
.chip-select-label { flex: 0 0 auto; color: var(--muted); font-size: .8125rem; }
.chip-select select { min-width: 0; }
.select-control { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.select-control select { width: 100%; }
.select-control-chevron { position: absolute; right: 12px; pointer-events: none; color: var(--muted); }
.chip-select .select-control-chevron { right: 12px; }
/* Selected chips use the solid accent on light. Dark themes use a soft fill because their
   accent colors are intentionally light and need dark text or a low-contrast surface. */
:root[data-theme="dark"] .chip.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.filters-divider { flex: 0 0 auto; align-self: stretch; width: 1px; margin: 9px 2px; background: var(--line); }
.feed { background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.feed-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 20px; padding: 27px 26px; border-bottom: 1px solid var(--line); position: relative; }
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--surface-hover); }
.item-number { font-size: .75rem; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 29px; }
.item-source { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: .75rem; margin-bottom: 7px; }
.repo-owner { border-left: 1px solid var(--line); padding-left: 12px; }
.item-content h2 { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 1.15rem; line-height: 1.5; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
.item-content h2 svg { color: var(--faint); align-self: start; margin-top: 5px; }
.summary { margin: 10px 0 12px; color: var(--muted); font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.original-label { display: inline-block; color: var(--muted); font-size: .75rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-bottom: 8px; }
.item-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); }
.item-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.item-meta svg { width: 14px; height: 14px; }
.language i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tag { padding: 2px 7px; background: var(--subtle); border-radius: 4px; font-size: .75rem; }
.item-links { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 14px; font-size: .75rem; color: var(--muted); }
.item-links svg { width: 12px; height: 12px; }
.today-stars { font-size: .75rem; color: var(--accent); }
.empty { text-align: center; padding: 64px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.empty > svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: 12px; }
.empty h2 { font-size: 1.3rem; margin: 0 0 10px; }
.empty p { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--control-height); padding: 9px var(--space-4); background: var(--surface); border: var(--border-width) solid var(--line); border-radius: var(--radius-md); font-size: var(--font-size-md); font-weight: 600; transition: var(--transition-control); }
.button:hover { border-color: var(--accent-line); background: var(--surface-hover); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: var(--color-on-accent); border-color: var(--accent); }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 90%, #000); color: var(--color-on-accent); border-color: var(--accent); }
.footer { max-width: var(--layout-content); padding: var(--space-6) var(--space-7) 36px; margin: auto; border-top: var(--border-width) solid var(--line); display: flex; align-items: center; gap: var(--space-6); color: var(--muted); font-size: var(--font-size-sm); flex-wrap: wrap; }
.footer p { flex: 1; margin: 0; min-width: 0; }
.footer-icp { color: var(--muted); text-decoration: none; white-space: nowrap; }
.footer-icp:hover { color: var(--text); text-decoration: underline; }
.footer-brand { font-weight: 650; color: var(--text); font-size: .875rem; }
.footer-brand span { color: var(--accent); }
.comments-panel { margin-top: 28px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.comments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.comments-heading .eyebrow { margin: 0 0 7px; }
.comments-heading h2 { margin: 0; font-size: 1.35rem; }
.comments-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.comments-heading > a { flex: none; color: var(--accent); font-size: .875rem; font-weight: 650; text-decoration: none; }
.comments-heading > a:hover { text-decoration: underline; }
.comments-panel .giscus, .comments-panel .giscus-frame { width: 100%; }
.archive-month { margin-top: 32px; }
.archive-month h2 { margin: 0 0 14px; color: var(--text); font-size: 1.2rem; font-weight: 750; }
.archive-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); gap: 1px; }
.archive-weekdays { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; background: var(--surface); }
.archive-weekdays span { padding: 12px 14px; color: var(--muted); font-size: .875rem; font-weight: 700; text-align: right; }
.archive-weekdays .is-weekend { color: var(--accent); }
.archive-day { min-width: 0; min-height: 146px; padding: 15px; background: var(--surface); }
.archive-day.is-outside { background: var(--bg); }
.archive-day.is-empty { color: var(--muted); opacity: .52; }
.archive-day.is-weekend .archive-day-number { color: var(--accent); }
.archive-day.has-report { display: flex; flex-direction: column; text-decoration: none; transition: background .16s ease, box-shadow .16s ease; }
.archive-day.has-report:hover { position: relative; z-index: 1; background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--accent-line); }
.archive-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.archive-day-heading > span { color: var(--accent); font-size: .75rem; }
.archive-day-number { font-size: 1.15rem; line-height: 1; }
.archive-day-full { display: none; }
.archive-day-meta { display: grid; gap: 6px; margin-top: auto; padding-top: 16px; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.archive-day-meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.archive-day-meta svg { flex: 0 0 auto; width: 14px; height: 14px; }
.archive-day.has-comments .archive-comment-count { color: var(--accent); font-weight: 650; }
/* One filter row: lens on the left, then the two controls that describe the data being compared
   (observation period and which sources participate). The source control reads as a select but
   opens a checklist, because the API recomputes first-seen dates for any source combination. */
.trend-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 18px; margin: -4px 0 18px; }
.trend-controls-tail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.trend-source-select { position: relative; display: flex; align-items: center; gap: 12px; }
.trend-source-select > span { color: var(--muted); font-size: .8rem; font-weight: 650; }
.trend-select-button { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; }
.trend-select-button[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.trend-select-caret { flex: 0 0 auto; opacity: .6; }
.trend-select-panel { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; display: grid; gap: 8px; width: min(320px, calc(100vw - 40px)); padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-menu); }
.trend-select-actions { display: flex; justify-content: flex-end; gap: 6px; }
.trend-select-actions button { min-height: 28px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--muted); font: inherit; font-size: .75rem; cursor: pointer; }
.trend-select-actions button:hover { border-color: var(--accent); color: var(--accent); }
.trend-source-options { display: grid; gap: 1px; max-height: 264px; overflow-y: auto; }
.trend-source-options label { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: .8rem; cursor: pointer; }
.trend-source-options label:hover { background: var(--bg); }
.trend-source-options label:has(input:checked) { color: var(--accent); }
.trend-source-options input { flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
.trend-source-options span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-source-options em { flex: 0 0 auto; color: var(--muted); font-size: .72rem; font-style: normal; font-variant-numeric: tabular-nums; }
.trend-select-panel p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.trend-select-panel p:empty { display: none; }
.trend-grid[aria-busy="true"] { opacity: .55; }
.trend-period, .trend-facets { display: flex; align-items: center; gap: 12px; }
.trend-period > span, .trend-facets > span { color: var(--muted); font-size: .8rem; font-weight: 650; }
.trend-period > div, .trend-facets > div { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.trend-period button, .trend-facets button { min-height: 32px; padding: 5px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; }
.trend-period button:hover, .trend-facets button:hover { color: var(--text); }
.trend-period button[aria-pressed="true"], .trend-facets button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.trend-window { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 22px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.trend-window > div { display: grid; gap: 3px; }
.trend-window span { color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.trend-window b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.trend-window p { grid-column: 1 / -1; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.trend-grid[hidden] { display: none; }
.trend-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.trend-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.trend-kind { color: var(--accent); font-size: .68rem; font-weight: 750; letter-spacing: .11em; }
.trend-card h2 { margin: 4px 0 0; font-size: 1.35rem; letter-spacing: -.02em; }
.trend-card h2 a, .trend-metrics b a { color: inherit; text-decoration: none; }
.trend-card h2 a:hover, .trend-metrics b a:hover { color: var(--accent); }
.trend-change { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--positive-line); border-radius: 999px; background: var(--positive-soft); color: var(--positive); font-size: .78rem; font-variant-numeric: tabular-nums; }
.trend-change.is-down { background: var(--subtle); color: var(--muted); }
.trend-change.is-new { letter-spacing: .04em; }
.trend-metrics { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 18px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.trend-metrics b { color: var(--text); }
.trend-spark { margin: 0 0 18px; }
.trend-spark-heading { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: .72rem; font-weight: 650; }
.trend-bars { display: flex; align-items: flex-end; gap: 5px; height: 58px; padding: 7px 6px 0; border-bottom: 1px solid var(--line); background: linear-gradient(to top, var(--accent-soft), transparent 72%); }
.trend-bar { display: flex; align-items: flex-end; flex: 1 1 0; height: 100%; min-width: 3px; }
.trend-bar i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .72; transition: height .18s ease, opacity .18s ease; }
.trend-bar:hover i { opacity: 1; }
.trend-axis { display: flex; justify-content: space-between; padding-top: 5px; color: var(--faint); font-size: .65rem; font-variant-numeric: tabular-nums; }
.trend-card h3 { margin: 0 0 8px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.trend-card ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.trend-card li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.trend-card li a { min-width: 0; overflow: hidden; font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.trend-card li a span { margin-left: 5px; color: var(--accent); }
/* A top-level topic lists the sub-topics published this period; the same chip row also sits between a
   category page heading and its range control when the topic has children. The number stays visible so
   a rolled-up parent is never mistaken for a topic that grew on its own. */
.trend-subtopics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 16px; color: var(--muted); font-size: .78rem; }
.trend-subtopics > span { font-weight: 650; }
.trend-subtopics a { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.trend-subtopics a:hover { border-color: var(--accent); color: var(--accent); }
.trend-subtopics em { color: var(--faint); font-style: normal; font-variant-numeric: tabular-nums; }
.trend-subtopics-page { margin: -10px 0 22px; }

/* A neutral interface still needs a restrained data ink on the trends page. Keep this separate
   from both the fixed brand blue and the visitor-selected interaction accent. */
:root[data-accent="neutral"] body[data-view="trends"] { background: var(--bg); }
:root[data-accent="neutral"] .trend-kind { color: #68707c; }
:root[data-accent="neutral"] .trend-change {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}
:root[data-accent="neutral"] .trend-bars { background: linear-gradient(to top, #f1f2f4, transparent 72%); }
:root[data-accent="neutral"] .trend-bar i { background: #636b77; opacity: .78; }
:root[data-theme="dark"][data-accent="neutral"] .trend-kind { color: #a6adb8; }
:root[data-theme="dark"][data-accent="neutral"] .trend-bars { background: linear-gradient(to top, #202329, transparent 72%); }
:root[data-theme="dark"][data-accent="neutral"] .trend-bar i { background: #9ca4b0; }
.trend-card li time { flex: 0 0 auto; color: var(--faint); font-size: .72rem; font-variant-numeric: tabular-nums; }
.trend-empty { grid-column: 1 / -1; margin: 0; padding: 54px 20px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); text-align: center; }
.trend-cluster-tools { justify-content: space-between; }
.trend-cluster-tools > div:first-child { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; }
.trend-cluster-tools b { color: var(--text); }
.tag-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; margin: -12px 0 16px; color: var(--muted); font-size: .75rem; }
.tag-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tag-legend i { padding: 3px 6px; border-radius: 5px; font-size: .6rem; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.tag-key-devtrends { background: var(--accent-soft); color: var(--accent); }
.tag-key-source { background: var(--subtle); color: var(--muted); }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: .875rem; color: var(--muted); margin-bottom: 30px; overflow-wrap: anywhere; }
.project-hero { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.project-identity { display: flex; align-items: flex-start; gap: 18px; }
.project-mark { display: grid; place-items: center; flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border-radius: 16px; background: linear-gradient(140deg, #101a30, #1d4ed8); color: #fff; font-size: 1.25rem; font-weight: 800; letter-spacing: -.05em; }
.project-mark.has-logo { background: #fff; border: 1px solid var(--line); }
.project-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.project-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.project-heading h1 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.project-owner { color: var(--muted); margin: 8px 0 2px; font-size: .8125rem; }
.project-source-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .8125rem; }
.project-source-line time { padding-left: 10px; border-left: 1px solid var(--line); }
.project-source-line .source-mini { flex-basis: 28px; }
.project-summary { max-width: 880px; margin: 22px 0 0; font-size: 1rem; line-height: 1.8; color: var(--muted); overflow-wrap: anywhere; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; color: var(--muted); }
.project-tags .tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.project-tags .tag small, .item-tags .tag small { padding-right: 6px; border-right: 1px solid currentColor; font-size: .75rem; font-weight: 750; letter-spacing: 0; line-height: 1.15; opacity: 1; }
.project-tags .tag-source small, .project-tags .tag-language small, .item-tags .tag-source small, .item-tags .tag-language small { color: var(--text); border-right-color: var(--line); }
.project-tags .tag-source, .item-tags .tag-source { background: var(--subtle); color: var(--muted); }
.project-tags .tag-language, .item-tags .tag-language { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.project-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 24px; margin-top: 26px; align-items: start; }
.project-sidebar { min-width: 0; }
@media (min-width: 901px) { .project-sidebar.is-sticky { position: sticky; top: 20px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; margin-bottom: 22px; min-width: 0; }
.panel h2 { font-size: 1.1rem; margin: 0 0 16px; }
.panel p { color: var(--muted); overflow-wrap: anywhere; }
.caption { color: var(--muted); font-size: .8125rem; }
.facts { margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.facts > div:last-child { border: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 1px solid var(--line); padding: 0 0 25px 22px; position: relative; }
.timeline li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); position: absolute; left: -4px; top: 9px; }
.timeline time { font-size: .875rem; font-weight: 600; }
.timeline p { margin: 4px 0 7px; font-size: .875rem; }
.timeline .source-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8125rem; color: var(--accent); }
/* Product detail pages list one row per source: name on top, first/last sighting and how many
   times it showed up underneath. The last row drops the timeline tail so a single-source product
   does not end in a dangling 25px line. */
.timeline.source-history li { padding-bottom: 18px; }
.timeline.source-history li:last-child { padding-bottom: 0; }
.timeline.source-history b { font-size: .9375rem; }
.timeline.source-history .source-history-meta { margin: 3px 0 0; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.related-list { display: grid; gap: 16px; }
.related-list a { display: block; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.related-list a:last-child { padding: 0; border: 0; }
.related-list b { font-size: .875rem; overflow-wrap: anywhere; }
.related-list span { display: block; color: var(--muted); margin-top: 4px; font-size: .8125rem; }
@media (max-width: 900px) {
  .topbar-inner { gap: 20px; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; }
  .workspace { padding-top: 32px; }
  .project-layout { grid-template-columns: minmax(0,1fr); }
  .project-sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  .feed-item { gap: 14px; padding: 23px 20px; }
  .archive-day { min-height: 132px; padding: 10px; }
  .archive-day-meta { gap: 5px; font-size: .76rem; }
  .archive-day-meta svg { width: 13px; height: 13px; }
}
@media (max-width: 600px) {
  .comments-panel { padding: 20px 16px; border-radius: 14px; }
  .comments-heading { display: block; }
  .comments-heading > a { display: inline-block; margin-top: 12px; }
  .topbar-inner { padding: 15px 18px 12px; gap: 16px; }
  .brand small { display: none; }
  .brand span { font-size: 1rem; }
  .brand img { width: 30px; height: 30px; }
  .preferences { gap: 4px; }
  .preferences select { font-size: .75rem; padding-left: 7px; padding-right: 17px; }
  .main-nav { justify-content: space-between; gap: 2px; }
  .main-nav a { padding: 7px 13px; }
  .workspace { padding: 28px 16px 44px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .intro { font-size: .875rem; }
  .search { max-width: none; }
  .feed-item { grid-template-columns: minmax(0,1fr); padding: 22px 18px; gap: 12px; }
  .item-number { display: none; }
  .item-content h2 { font-size: 1.125rem; }
  .chip-select select, .main-nav a { min-height: 44px; }
  .summary { -webkit-line-clamp: 4; }
  .archive-month { margin-top: 28px; }
  .archive-calendar { display: flex; flex-direction: column-reverse; gap: 10px; overflow: visible; border: 0; background: none; }
  .archive-weekdays, .archive-day.is-empty, .archive-day.is-outside { display: none; }
  .archive-day { min-height: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; }
  .archive-day-heading { align-items: baseline; }
  .archive-day-number { display: none; }
  .archive-day-full { display: block; font-size: 1rem; }
  .archive-day-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-top: 9px; padding-top: 0; font-size: .875rem; }
  .footer { padding: 24px 18px; flex-wrap: wrap; gap: 12px; }
  .footer p { flex-basis: calc(100% - 120px); }
  .project-hero, .panel { padding: 22px 18px; }
  .project-heading { flex-wrap: wrap; }
  .project-identity { gap: 13px; }
  .project-mark { flex-basis: 58px; width: 58px; height: 58px; border-radius: 13px; }
  .project-source-line time { display: none; }
  .project-sidebar { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Discovery layout shared by the daily feed and report pages. */
body { background: radial-gradient(ellipse at 52% 12%, var(--accent-soft), transparent 55%), var(--bg); }
.topbar { background: var(--surface); }
.topbar-inner { max-width: 1536px; padding: 15px 48px; gap: 28px; min-height: 72px; }
.brand span { font-size: 1.35rem; }
.brand small { display: none; }
.main-nav a { position: relative; font-weight: 600; padding: 8px 14px; }
.main-nav a[aria-current="page"]::after { content: ''; position: absolute; height: 3px; background: var(--accent); bottom: -15px; left: 20px; right: 20px; border-radius: 4px; }
.header-search { margin-left: auto; width: 280px; padding: 7px 12px; border-radius: 24px; background: var(--bg); }
.header-search svg { width: 17px; height: 17px; }
.header-search input { font-size: .8125rem; }
.header-search kbd { white-space: nowrap; font-size: .75rem; padding: 1px 6px; border-radius: 4px; background: var(--subtle); }
.preferences { margin-left: 0; }
.preferences select { font-size: .8125rem; background: transparent; border-color: var(--line); }
.workspace { max-width: 1536px; padding: 26px 48px 64px; }
/* The discovery feed benefits from a wider canvas than text-oriented pages. Keep some breathing
   room on large displays, but spend most of the extra width on project titles and summaries. */
/* Discovery, archive, trends and project routes share one desktop canvas. Their internal grids can differ,
   but switching routes must not make the page frame visibly jump narrower. */
body[data-view="report"] .topbar-inner,
body[data-view="archive"] .topbar-inner,
body[data-view="trends"] .topbar-inner,
body[data-view="trend-cluster"] .topbar-inner,
body[data-view="project"] .topbar-inner,
body[data-view="report"] .workspace,
body[data-view="archive"] .workspace,
body[data-view="trends"] .workspace,
body[data-view="trend-cluster"] .workspace,
body[data-view="project"] .workspace { max-width: 1720px; }
body:not([data-view="report"]) .workspace { padding-top: 48px; }
.discovery-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.discovery-main { min-width: 0; }
.discovery-hero { position: relative; min-height: 334px; display: flex; align-items: center; overflow: hidden; padding: 24px 6px 30px; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow { font-size: .6875rem; letter-spacing: .22em; margin-bottom: 14px; font-weight: 650; }
.hero-copy h1 { font-size: clamp(2rem, 2.8vw, 2.7rem); font-weight: 750; line-height: 1.32; letter-spacing: -.02em; }
.hero-copy .intro { font-size: 1.0625rem; line-height: 1.75; margin-top: 15px; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; }
.hero-stats > div { display: flex; align-items: center; gap: 14px; }
.hero-stats > div + div { border-left: 1px solid var(--line); padding-left: 25px; }
.stat-icon { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 50%; width: 45px; height: 45px; }
.stat-icon svg { width: 22px; height: 22px; }
.hero-stats b { display: block; font-size: 1.25rem; line-height: 1.3; }
.hero-stats small { display: block; font-size: .8125rem; color: var(--muted); }
.hero-art { position: absolute; width: 49%; right: 0; top: -10px; bottom: 0; pointer-events: none; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; opacity: .8; }
.hero-art > span { position: absolute; bottom: 26px; right: 8px; color: var(--muted); font-family: cursive; font-style: italic; letter-spacing: .1em; text-align: center; line-height: 1.7; font-size: .8rem; transform: rotate(-7deg); }
.discovery-results { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 14px; }
.filters { display: flex; gap: 16px; align-items: center; margin: 0; padding: 14px 0; }
.feed-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.filters > .feed-tools:only-child { margin-left: auto; }
.feed-tools select { font-size: .8125rem; padding: 8px 24px 8px 11px; max-width: 168px; }
.feed { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.feed-item { grid-template-columns: 30px 56px minmax(280px, 1fr) 150px 64px; gap: 14px; min-height: 96px; padding: 15px 0; align-items: center; }
.discovery-results .feed-item { content-visibility: auto; contain-intrinsic-size: auto 96px; }
/* 标签回到产品信息列，来源与热度保留稳定宽度；中等宽度只压缩主列。 */
@media (max-width: 900px) { .feed-item { grid-template-columns: 30px 48px minmax(0, 1fr) 150px 62px; gap: 12px; } }
.item-number { padding: 0; font-size: .8125rem; text-align: center; color: var(--faint); }
.item-avatar { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: #101a30; color: white; font-size: 1.05rem; font-weight: 750; letter-spacing: -.05em; box-shadow: inset 0 0 0 1px #ffffff20; }
.item-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 头像是装饰性回退（无配图时显示首字母，aria-hidden）。白色字母必须对渐变最亮一端
   也达到 4.5:1，否则字母看不清：#cd8bff 只有 2.40、#4b92ff 3.06、#44c9b3 2.04。
   下面把明度压到刚好达标，保留原有色相。 */
.avatar-1 { background: linear-gradient(140deg, #5b21b6, #7c3aed); }
.avatar-2 { background: linear-gradient(140deg, #e9eef7, #fff); color: #132445; }
.avatar-3 { background: linear-gradient(140deg, #1d4ed8, #2563eb); }
.avatar-4 { background: linear-gradient(140deg, #0b5f5a, #0f766e); }
.item-primary { min-width: 0; }
.item-primary h2 { margin: 0; font-size: 1rem; line-height: 1.45; font-weight: 700; letter-spacing: -.008em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-primary .summary { margin: 3px 0 0; font-size: .8125rem; line-height: 1.55; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
/* PC 标签独占描述下方一行，信息层级更清楚；超出的标签保持单行裁切。 */
.item-tags { --tag-height: calc(.75rem * 1.35 + 6px); display: flex; flex-wrap: nowrap; gap: 5px; max-height: var(--tag-height); margin-top: 7px; overflow: hidden; }
.item-tags .tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; line-height: 1.35; white-space: nowrap; }
.item-tags .tag-source { background: var(--subtle); color: var(--muted); }
.item-tags .tag-language { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.item-tags .tag-date { flex: 0 0 auto; background: var(--subtle); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
/* 数据源名称必须留在徽标右侧一行内：换到徽标下面会把整行撑高，名字过长时用省略号收尾（title 给出全名）。 */
.item-source { display: flex; flex-wrap: nowrap; align-items: center; min-width: 0; gap: 8px; font-size: .75rem; color: var(--muted); }
.item-source .source-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-mini { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #101a30; font-size: .625rem; font-weight: 800; overflow: hidden; }
.source-mini svg { width: 15px; height: 15px; }
.source-mini img { display: block; width: 100%; height: 100%; object-fit: contain; }
.item-score { display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-score svg { width: 15px; height: 15px; }
/* Keep the score away from the highlighted row edge on desktop. Mobile uses a narrower score
   track and does not need this extra inset. */
@media (min-width: 601px) { .item-score { padding-right: 12px; } }
.original-label { display: none; }
.side-panel { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); margin-bottom: 16px; }
.side-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-heading h2, .daily-card h2 { font-size: 1rem; line-height: 1.4; margin: 0; }
.side-heading a, .side-heading > span { font-size: .75rem; color: var(--accent); }
.source-entry { display: flex; align-items: center; gap: 13px; padding: 11px 5px; border-bottom: 1px solid var(--line); border-radius: 9px; transition: background-color .16s ease, color .16s ease; }
.source-entry:is(a):hover { background: var(--accent-soft); color: var(--accent); }
.source-entry:is(a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.source-entry:last-child { border: 0; padding-bottom: 2px; }
.source-directory b { font-size: .875rem; display: block; line-height: 1.45; }
.source-directory small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.source-badge { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #101a30; font-size: .83rem; font-weight: 750; overflow: hidden; }
.source-badge img { display: block; width: 100%; height: 100%; object-fit: contain; }
.source-arrow { margin-left: auto; color: var(--muted); }
.daily-card { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px; border-radius: 10px; background: var(--accent-soft); }
.daily-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--accent); }
/* The mark is an SVG now: the old ↗ glyph sat off-centre and its ink touched the circle edge. */
.daily-icon svg { width: 22px; height: 22px; }
.daily-card p { margin: 4px 0 0; font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.daily-card .button { flex-basis: 100%; justify-content: space-between; font-size: .875rem; }
.daily-card small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.sidebar-signature { padding: 28px 10px; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.sidebar-signature b { color: var(--text); font-size: 1.0625rem; letter-spacing: -.01em; }
.sidebar-signature p { margin: 5px 0 14px; }
.sidebar-signature i { display: block; font-family: cursive; font-size: 1rem; letter-spacing: .04em; }
.footer { max-width: 1440px; }
body[data-view="report"] .footer,
body[data-view="archive"] .footer,
body[data-view="trends"] .footer,
body[data-view="trend-cluster"] .footer,
body[data-view="project"] .footer { max-width: 1624px; }
.home-entry { display: none; }
body[data-view="cards"] { visibility: hidden; }
:root[data-theme="dark"] .hero-art { opacity: .65; }
@media (min-width: 1450px) { .discovery-layout { grid-template-columns: minmax(0, 1fr) 320px; }.discovery-hero { min-height: 345px; }.feed-item { padding: 17px 0; } }
@media (min-width: 1500px) { .trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1361px) { .discovery-sidebar.is-sticky { position: sticky; top: 20px; } }
@media (max-width: 1360px) { .topbar-inner { padding: 15px 28px; gap: 16px; flex-wrap: wrap; }.workspace { padding: 24px 28px 48px; }.main-nav { order: 0; width: auto; }.header-search { order: 3; width: 100%; max-width: none; }.preferences, .header-search + .preferences { margin-left: auto; }.main-nav a[aria-current="page"]::after { bottom: -5px; }.discovery-layout { grid-template-columns: minmax(0, 1fr); }.discovery-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }.side-panel { margin: 0; }.sidebar-signature { align-self: center; }.hero-art { opacity: .9; }.hero-copy h1 { font-size: 2.4rem; } }
@media (max-width: 760px) { .trend-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .trend-select-panel { width: min(320px, calc(100vw - 28px)); } }
/* 手机端：序号隐藏，头像占第一列；标题列里日期已移除，所以分数列直接顶到第一行。 */
@media (max-width: 600px) { .topbar-inner { padding: 13px 16px; gap: 10px; }.brand span { font-size: 1.1rem; }.main-nav { order: 2; width: 100%; justify-content: flex-start; gap: 12px; }.main-nav a { padding: 7px 10px; font-size: .875rem; }.preferences select { max-width: 112px; }.workspace { padding: 12px 14px 32px; }.discovery-hero { min-height: 330px; padding: 25px 4px; }.hero-copy .eyebrow { font-size: .625rem; letter-spacing: .14em; }.hero-copy h1 { font-size: 1.9rem; line-height: 1.35; }.hero-copy .intro { font-size: .9rem; line-height: 1.7; }.hero-art { width: 75%; right: -24%; opacity: .16; }.hero-art > span { display: none; }.hero-stats { gap: 20px; margin-top: 22px; }.hero-stats small { font-size: .8125rem; }.discovery-results { padding: 0 10px; }.filters { gap: 10px; }.chip-row { display: none; }.chip-select { display: flex; flex: 1 1 auto; }.chip-select select { width: 100%; }.filters-divider { display: none; }.feed-tools { margin-left: auto; }.feed-tools select { max-width: 132px; }.feed-item { grid-template-columns: 42px minmax(0, 1fr) 55px; gap: 10px; min-height: 80px; padding: 14px 0; align-items: center; }.item-avatar { width: 42px; height: 42px; border-radius: 10px; font-size: .875rem; }.item-primary h2 { font-size: .9375rem; }.item-primary .summary { font-size: .8125rem; }.item-tags, .item-source { grid-column: 2 / -1; }.item-tags { display: none; }.item-score { grid-column: 3; grid-row: 1; }.discovery-sidebar { grid-template-columns: minmax(0, 1fr); }.sidebar-signature { padding: 12px 5px; } }
@media (max-width: 600px) { .item-tags.has-date { display: flex; }.item-tags.has-date .tag:not(.tag-date) { display: none; } }
@media (max-width: 760px) { .trend-controls, .trend-controls-tail { align-items: stretch; flex-direction: column; }.trend-period, .trend-facets, .trend-source-select { justify-content: space-between; }.trend-period > div, .trend-facets > div { overflow-x: auto; } }
@media (max-width: 600px) { .trend-period, .trend-facets, .trend-source-select { align-items: flex-start; }.trend-period > span, .trend-facets > span, .trend-source-select > span { padding-top: 9px; }.trend-period button, .trend-facets button { padding-inline: 10px; white-space: nowrap; }.trend-window { grid-template-columns: minmax(0, 1fr); padding: 17px; }.trend-window p { grid-column: 1; }.trend-card { padding: 18px; }.trend-card li { align-items: flex-start; }.trend-card li time { padding-top: 2px; } }

@media (max-width: 600px) {
  /* One compact header on every ordinary mobile page. The desktop route tabs are deliberately
     absent: mobile opens on Today's Discoveries and the card reader is its primary route. */
  .topbar-inner { flex-wrap: nowrap; min-height: 64px; padding: 11px 14px; gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { overflow: hidden; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
  .main-nav { display: none; }
  .preferences { margin-left: auto; gap: 2px; }
  .theme-picker summary { width: 34px; height: 38px; }
  .language-picker > summary { max-width: 116px; min-height: 38px; padding-inline: 7px; gap: 6px; font-size: .75rem; }
  .language-picker > summary svg:first-child { width: 16px; }
  /* Entries to the standalone flows (card reader, trends). One compact card each, stacked. */
  .home-entry { view-transition-name: home-entry; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "icon copy arrow" "icon progress arrow"; align-items: center; gap: 4px 14px; min-height: 112px; margin: 8px 0 6px; padding: 18px; border: 1px solid var(--accent-line); border-radius: 18px; background: linear-gradient(120deg, var(--accent-soft), var(--surface)); color: var(--text); box-shadow: 0 10px 28px #14264a0a; }
  .home-entry:hover { color: var(--text); border-color: var(--accent); }
  .home-entry-icon { grid-area: icon; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; background: var(--accent); color: var(--color-on-accent); }
  .home-entry-icon svg { width: 28px; height: 28px; }
  .home-entry > span:nth-child(2) { grid-area: copy; }
  .home-entry b, .home-entry small { display: block; }
  .home-entry b { font-size: 1.125rem; line-height: 1.3; }
  .home-entry small { margin-top: 3px; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
  .home-entry strong { grid-area: progress; color: var(--accent); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .home-entry-arrow { grid-area: arrow; align-self: stretch; display: grid; place-items: center; color: var(--accent); font-size: 1.35rem; }
  /* Mobile reads the current report through the card flow, so on that one report the dense feed and
     the controls that exist only to filter it (search box, category/sort row, empty state) are not
     shown. The markup still ships for the desktop layout, which keeps the list, and archived days
     keep the list on mobile too — they have no card page to send the reader to. */
  body[data-home-entries="1"] .header-search,
  body[data-home-entries="1"] .discovery-results { display: none; }
  /* An archived day has no card entry (nothing to send the reader to), so its mobile page keeps the
     list instead of showing an empty screen. */
  body[data-home-entries="1"]:not([data-cards-available="1"]) .discovery-results,
  body[data-home-entries="1"]:not([data-cards-available="1"]) .header-search { display: revert; }
  body[data-view="cards"] { visibility: visible; overflow: hidden; }
  body[data-view="cards"] .topbar, body[data-view="cards"] .footer { display: none; }
  /* The workspace takes exactly the viewport minus the topbar. `flex: 1` on a body column does that
     without hard-coding the topbar height (it was 69px in a `calc`, but the bar renders 73px, which
     scrolled the page by 20px). Two flex details matter: `width: 100%` because a cross-axis `auto`
     margin stops a flex item from stretching to the body's width, and `border-box` so the padding is
     part of the height instead of adding to it. */
  /* `body { overflow: hidden }` alone is not enough: the waiting cards sit 14–26px lower than the top
     one, which stretched the document and left 16px of page scroll. The page is a fixed app screen, so
     the root is locked too. */
  html:has(body[data-view="cards"]) { height: 100%; overflow: hidden; }
  body[data-view="cards"] { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
  body[data-view="cards"] .workspace { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; padding: 8px 10px 10px; box-sizing: border-box; }
  .cards-page { view-transition-name: daily-cards; position: relative; height: 100%; max-width: 520px; margin: 0 auto; }
  .cards-close, .swipe-position { position: absolute; z-index: 8; top: 12px; border: 1px solid color-mix(in srgb, var(--line) 72%, transparent); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 4px 18px #14264a12; backdrop-filter: blur(10px); }
  .cards-close { right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); font-size: .9rem; }
  .swipe-position { right: 58px; min-width: 58px; padding: 5px 10px; border-radius: 999px; color: var(--muted); font-size: .6875rem; font-variant-numeric: tabular-nums; line-height: 1.4; text-align: center; white-space: nowrap; }
  /* The deck fills the stage: the card is always the full available height, so the screen has no
     unused band above or below it. Unused height stays between the metadata and the primary action. */
  .swipe-stage { --swipe-offset: 0px; position: relative; height: 100%; min-height: 0; touch-action: pan-y; }
  .swipe-stage.is-dragging { transition: none; }
  .swipe-item { position: absolute; inset: 0; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 12px 32px #14264a14; transform-origin: 50% 100%; will-change: transform; }
  .swipe-item[data-depth="0"] { z-index: 3; cursor: grab; }
  .swipe-item[data-depth="1"] { z-index: 2; }
  .swipe-item[data-depth="2"] { z-index: 1; }
  .swipe-item[data-depth="previous"] { z-index: 2; visibility: hidden; opacity: 0; transform: translateY(14px) scale(.94); }
  /* The waiting cards are scenery: they sit slightly smaller and lower until their turn comes. */
  .swipe-item[data-depth="1"] { transform: translateY(14px) scale(.94); }
  .swipe-item[data-depth="2"] { transform: translateY(26px) scale(.88); }
  .swipe-source { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 10px 126px 10px 14px; min-height: 58px; color: var(--muted); font-size: .6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .swipe-source .source-mini { flex-basis: 28px; }
  /* A fixed ratio, not a stretch: the picture keeps its 16:9-ish shape, and the leftover card height
     goes to the text instead. Letting the image absorb the remainder turned a wide screenshot into a
     near-square crop, which read as a badly framed picture rather than a bigger one. */
  .swipe-visual { position: relative; flex: 0 0 clamp(112px, 22svh, 190px); overflow: hidden; margin: 0 11px; border-radius: 14px; background: var(--subtle); }
  .swipe-visual.has-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .swipe-visual.has-image::after { content: ''; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, #0b122033); pointer-events: none; }
  .swipe-visual.is-typographic { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 17px; padding: 22px; background: radial-gradient(circle at 85% 15%, var(--accent-line), transparent 42%), linear-gradient(145deg, var(--accent-soft), var(--subtle)); }
  .swipe-mark { display: grid; place-items: center; width: 74px; height: 74px; overflow: hidden; border-radius: 18px; background: #101a30; color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -.05em; box-shadow: 0 10px 28px #10234b1f; }
  .swipe-mark.has-logo { background: #fff; }
  .swipe-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
  .swipe-wordmark { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: clamp(1.15rem, 5.6vw, 1.55rem); line-height: 1.4; font-weight: 760; letter-spacing: -.02em; overflow-wrap: anywhere; }
  /* The copy and its metadata read as one content block directly under the picture. */
  .swipe-copy { flex: 0 0 auto; min-height: 0; padding: 13px 15px 0; }
  .swipe-copy h2 { display: -webkit-box; margin: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 1.08rem; line-height: 1.38; letter-spacing: -.015em; overflow-wrap: anywhere; }
  /* The summary line count is capped by the card, not fixed: `swipe-meta` and the open button keep
     their space (flex: 0 0 auto), so a short card simply shows fewer lines than a tall one instead
     of the text being clipped while a gap sits underneath. */
  .swipe-copy .summary { display: -webkit-box; margin: 7px 0 0; overflow: hidden; -webkit-line-clamp: 9; -webkit-box-orient: vertical; color: var(--muted); font-size: .8125rem; line-height: 1.55; overflow-wrap: anywhere; }
  .swipe-original { display: inline-block; margin-top: 6px; color: var(--muted); font-size: .6875rem; }
  .swipe-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-top: 0; padding: 8px 15px 0; overflow: hidden; }
  .swipe-meta .tag { padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; line-height: 1.4; }
  .swipe-score { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: .75rem; }
  .swipe-score svg { width: 15px; height: 15px; }
  .swipe-open { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin: auto 15px 13px; padding: 8px 13px; border-radius: 11px; background: var(--accent); color: var(--color-on-accent); font-size: .8125rem; font-weight: 700; }
  .swipe-open:hover { color: var(--color-on-accent); }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-item { animation: none !important; transition: none !important; }
  ::view-transition-group(root), ::view-transition-group(daily-cards) { animation-duration: .01ms; }
}

/* Header preferences: icon theme menu and globe language selector. */
.preferences { margin-left: auto; align-items: center; gap: 22px; flex-shrink: 0; }
.header-search + .preferences { margin-left: 0; }
.theme-picker { position: relative; }
.theme-picker summary { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; cursor: pointer; list-style: none; color: var(--text); }
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover, .theme-picker[open] summary { color: var(--accent); background: var(--accent-soft); }
.theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: block; }
.theme-options { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 190px; padding: 6px; border: var(--border-width) solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-floating); }
.theme-options button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: 0; background: transparent; padding: 8px 10px; font-size: .875rem; text-align: left; }
.theme-options button:hover, .theme-options button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.theme-options button > span:first-child { width: 18px; text-align: center; }
.theme-option-icon { display: grid; flex: 0 0 18px; place-items: center; color: var(--muted); }
.theme-options button:hover .theme-option-icon, .theme-options button[aria-pressed="true"] .theme-option-icon { color: inherit; }
.theme-check { margin-left: auto; visibility: hidden; }
.theme-options button[aria-pressed="true"] .theme-check { visibility: visible; }
.theme-options-divider { height: 1px; margin: 6px 5px 8px; background: var(--line); }
.accent-options-label { display: block; padding: 0 8px 5px; color: var(--muted); font-size: .72rem; font-weight: 650; }
.accent-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.theme-options .accent-options button { position: relative; justify-content: center; min-height: 42px; padding: 7px; }
.accent-swatch { width: 20px !important; height: 20px; border: 1px solid #0002; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff8; }
.accent-swatch.is-neutral { background: #242424; }
.accent-swatch.is-blue { background: #1b57df; }
.accent-swatch.is-forest { background: #0f766e; }
.accent-swatch.is-violet { background: #6d28d9; }
.accent-options .theme-check { position: absolute; right: 3px; bottom: 0; margin: 0; font-size: .7rem; font-weight: 800; }
.menu-picker { position: relative; }
.menu-picker > summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px; border: var(--border-width) solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; list-style: none; font-size: .875rem; font-weight: 520; white-space: nowrap; transition: var(--transition-control); }
.menu-picker > summary::-webkit-details-marker { display: none; }
.menu-picker > summary:hover, .menu-picker[open] > summary { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.menu-caret { margin-left: 3px; color: var(--muted); transition: transform var(--duration-fast) var(--ease-standard); }
.menu-picker[open] .menu-caret { transform: rotate(180deg); }
.menu-options { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; display: flex; flex-direction: column; gap: 1px; min-width: 190px; padding: 6px; border: var(--border-width) solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-floating); }
.menu-options button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; }
.menu-options button:hover, .menu-options button:focus-visible, .menu-options button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.menu-options button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-check { margin-left: auto; color: var(--accent); visibility: hidden; }
.menu-options button[aria-checked="true"] .menu-check { visibility: visible; }
.language-picker > summary { min-height: 38px; padding-inline: 11px; }
.language-picker .menu-options { min-width: 156px; }
.sort-picker > summary { min-width: 142px; justify-content: space-between; }
@media (max-width: 600px) { .preferences, .header-search + .preferences { margin-left: auto; }.preferences { gap: 7px; }.theme-picker summary { width: 36px; height: 38px; }.language-picker > summary { padding-inline: 8px; font-size: .8125rem; }.language-picker > summary svg:first-child { width: 17px; }.theme-options { right: -80px; } }

/* A row's gallery is the only place its pictures can appear when it has no GitHub detail page — and
/* Product screenshots belong to project detail pages; the discovery feed stays one dense text row. */
.item-gallery { display: none; align-items: center; gap: 5px; margin-top: 8px; }

/* Repositories that remain on GitHub Trending are useful context, but not new discoveries. They stay
   collapsed below the feed and keep the shape of a feed row — description, mark, tags, project link —
   because that is what makes them worth opening. Only the source and total-star columns give way:
   for a repository we have already shown, today's stars and how often it appeared say everything. */
.trending-continuation { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.trending-continuation summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; cursor: pointer; list-style: none; }
.trending-continuation summary::-webkit-details-marker { display: none; }
.trending-continuation summary > span { display: inline-flex; align-items: center; gap: 8px; }
.trending-continuation summary svg { width: 18px; height: 18px; color: var(--muted); }
.trending-continuation summary small, .trending-continuation > p, .trending-continuation .item-continuation { color: var(--muted); }
.trending-continuation[open] summary small { transform: rotate(180deg); }
.trending-continuation > p { margin: 0; padding: 0 16px 12px; font-size: .8125rem; }
.trending-continuation .feed { padding: 0 16px 8px; }
.trending-continuation .feed-item { min-height: 0; padding: 13px 0; }
.trending-continuation .feed-item:first-child { border-top: 1px solid var(--line); }
/* The source and score tracks stay in place so a continuation row lines up with the feed above it;
   the continuation line spans both. */
.trending-continuation .item-continuation { display: flex; align-items: center; justify-content: flex-end; grid-column: 4 / -1; font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .trending-continuation .feed-item { grid-template-columns: 42px minmax(0, 1fr); }.trending-continuation .item-continuation { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; white-space: normal; } }
.panel .item-gallery { display: flex; }
.gallery-thumb { position: relative; flex: 0 0 auto; width: 54px; height: 34px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); }
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--accent-line); }
/* Each thumbnail names where its image came from: the source's own media, our own capture of the
   official site, or the site's og:image. Without it a reader cannot tell a platform screenshot
   from a marketing card, and the three carry very different weight. */
.gallery-origin {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 3px;
  background: var(--color-overlay); color: #fff;
  font-size: .5625rem; line-height: 1.35; letter-spacing: .01em;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel .gallery-origin { font-size: .625rem; padding: 2px 5px; }
.gallery-more { display: grid; place-items: center; color: var(--muted); font-size: .75rem; font-weight: 700; }
/* Product marks carry their own background and corner radius, so the avatar must not add a second plate:
   any padding here shows the mark's own square nested inside ours, and a barely-off-white mark (#f6f6f6)
   exposes a seam. Filling the tile leaves one clean rounded square, and transparent marks keep the white. */
.item-avatar.has-logo { background: #fff; box-shadow: none; }
.item-avatar img.is-logo { padding: 0; background: #fff; object-fit: contain; }
/* A mark that is itself a pale transparent drawing (pacifio/atlas 的 #FFFFEE 就是) disappears on the
   white tile, so those keep the site's dark navy and drop the white fill on the image — the mark then
   shows in its own colour instead of turning into an outline. Which marks those are is decided once
   per mark from its own pixels (scripts/mark-tone.js) and rides on the row as `item.markTone`; the
   three mark tiles share one plate, and these rules come after the white ones so they win the tie. */
.item-avatar.is-light, .swipe-mark.is-light, .project-mark.is-light { background: #101a30; }
.item-avatar.is-light img.is-logo, .swipe-mark.is-light img, .project-mark.is-light img { background: transparent; }
.panel .item-gallery { margin-top: 0; }
.panel .gallery-thumb { width: 92px; height: 58px; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 5vmin; background: var(--color-overlay); }
.lightbox-dialog { position: relative; display: grid; place-items: center; max-width: 100%; max-height: 100%; }
.lightbox-image { display: block; max-width: 100%; max-height: 80vh; border-radius: 10px; background: var(--surface); box-shadow: 0 24px 60px #00000059; }
.lightbox-close, .lightbox-step { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-color: #ffffff2e; background: #101a30e6; color: #fff; font-size: 1.25rem; line-height: 1; }
.lightbox-close:hover, .lightbox-step:hover { border-color: #ffffff66; color: #fff; }
.lightbox-close { position: absolute; top: -16px; right: -16px; }
.lightbox-step { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-step.prev { left: -18px; }
.lightbox-step.next { right: -18px; }
.lightbox-counter { position: absolute; bottom: -36px; margin: 0; color: #fff; font-size: .8125rem; font-variant-numeric: tabular-nums; }
html.lightbox-open { overflow: hidden; }
@media (max-width: 600px) { .item-gallery { gap: 4px; }.gallery-thumb { width: 44px; height: 30px; }.panel .gallery-thumb { width: 74px; height: 48px; }.lightbox-close { top: 6px; right: 6px; }.lightbox-step.prev { left: 4px; }.lightbox-step.next { right: 4px; }.lightbox-step { width: 36px; height: 36px; } }

/* Trend category library: time-range switching and chunked browsing of the full archive. */
.cluster-range { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 2px 0 16px; }
.cluster-range > span { color: var(--muted); font-size: .8rem; font-weight: 650; }
.cluster-range-buttons { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.cluster-range button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; }
.cluster-range button:hover { color: var(--text); }
.cluster-range button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.cluster-range button em { font-style: normal; font-variant-numeric: tabular-nums; opacity: .7; }
.cluster-range-stats { flex: 1 1 100%; min-width: 0; margin: 0; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.load-more { display: block; width: 100%; margin: 18px 0 0; padding: 12px 16px; border-radius: 10px; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.load-more:hover { border-color: var(--accent-line); color: var(--accent); }
@media (max-width: 600px) { .cluster-range { align-items: flex-start; }.cluster-range-buttons { flex-wrap: wrap; } }
