/* yield - minimal GeekNews style */

/* Default theme (GeekNews) */
:root {
  --bg: #f6f6ef;
  --bg-hover: #fff8e6;
  --text: #000;
  --text-muted: #666;
  --link: #000;
  --link-hover: #ff6600;
  --accent: #ff6600;
  --border: #e0e0e0;
  --code-bg: #f0f0f0;
}

/* Gruvbox Dark */
[data-theme="gruvbox-dark"] {
  --bg: #282828;
  --bg-hover: #3c3836;
  --text: #ebdbb2;
  --text-muted: #a89984;
  --link: #ebdbb2;
  --link-hover: #fe8019;
  --accent: #fe8019;
  --border: #504945;
  --code-bg: #3c3836;
}

/* Gruvbox Light */
[data-theme="gruvbox-light"] {
  --bg: #fbf1c7;
  --bg-hover: #f2e5bc;
  --text: #3c3836;
  --text-muted: #7c6f64;
  --link: #3c3836;
  --link-hover: #d65d0e;
  --accent: #d65d0e;
  --border: #d5c4a1;
  --code-bg: #f2e5bc;
}

/* Nord */
[data-theme="nord"] {
  --bg: #2e3440;
  --bg-hover: #3b4252;
  --text: #eceff4;
  --text-muted: #d8dee9;
  --link: #eceff4;
  --link-hover: #88c0d0;
  --accent: #88c0d0;
  --border: #4c566a;
  --code-bg: #3b4252;
}

/* Dracula */
[data-theme="dracula"] {
  --bg: #282a36;
  --bg-hover: #44475a;
  --text: #f8f8f2;
  --text-muted: #6272a4;
  --link: #f8f8f2;
  --link-hover: #ff79c6;
  --accent: #ff79c6;
  --border: #44475a;
  --code-bg: #44475a;
}

/* Solarized Dark */
[data-theme="solarized-dark"] {
  --bg: #002b36;
  --bg-hover: #073642;
  --text: #839496;
  --text-muted: #586e75;
  --link: #93a1a1;
  --link-hover: #b58900;
  --accent: #b58900;
  --border: #073642;
  --code-bg: #073642;
}

/* Monokai */
[data-theme="monokai"] {
  --bg: #272822;
  --bg-hover: #3e3d32;
  --text: #f8f8f2;
  --text-muted: #75715e;
  --link: #f8f8f2;
  --link-hover: #a6e22e;
  --accent: #a6e22e;
  --border: #3e3d32;
  --code-bg: #3e3d32;
}

/* Catppuccin Mocha */
[data-theme="catppuccin"] {
  --bg: #1e1e2e;
  --bg-hover: #313244;
  --text: #cdd6f4;
  --text-muted: #a6adc8;
  --link: #cdd6f4;
  --link-hover: #f5c2e7;
  --accent: #cba6f7;
  --border: #45475a;
  --code-bg: #313244;
}

/* Tokyo Night */
[data-theme="tokyo-night"] {
  --bg: #1a1b26;
  --bg-hover: #24283b;
  --text: #a9b1d6;
  --text-muted: #565f89;
  --link: #c0caf5;
  --link-hover: #7aa2f7;
  --accent: #bb9af7;
  --border: #3b4261;
  --code-bg: #24283b;
}

/* Ayu Dark */
[data-theme="ayu-dark"] {
  --bg: #0d1017;
  --bg-hover: #131721;
  --text: #bfbdb6;
  --text-muted: #636a72;
  --link: #bfbdb6;
  --link-hover: #ffb454;
  --accent: #e6b450;
  --border: #1c212b;
  --code-bg: #131721;
}

/* GitHub Dark */
[data-theme="github-dark"] {
  --bg: #0d1117;
  --bg-hover: #161b22;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --link: #c9d1d9;
  --link-hover: #58a6ff;
  --accent: #58a6ff;
  --border: #30363d;
  --code-bg: #161b22;
}

/* Atom One Dark */
[data-theme="one-dark"] {
  --bg: #282c34;
  --bg-hover: #2c323c;
  --text: #abb2bf;
  --text-muted: #5c6370;
  --link: #abb2bf;
  --link-hover: #61afef;
  --accent: #c678dd;
  --border: #3e4451;
  --code-bg: #2c323c;
}

/* Night Owl */
[data-theme="night-owl"] {
  --bg: #011627;
  --bg-hover: #0b2942;
  --text: #d6deeb;
  --text-muted: #637777;
  --link: #d6deeb;
  --link-hover: #7fdbca;
  --accent: #c792ea;
  --border: #1d3b53;
  --code-bg: #0b2942;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 20px;
}

header h1 {
  font-size: 18px;
  font-weight: bold;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 15px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

/* Items */
.items {
  list-style: none;
  counter-reset: item;
}

.item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  counter-increment: item;
}

.item::before {
  content: counter(item) ".";
  color: var(--text-muted);
  font-size: 13px;
  margin-right: 8px;
}

.item-header {
  display: inline;
}

.item-title {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

/* Read-state: visited articles dim, GeekNews-style (color-only per browser privacy) */
.item-title:visited {
  color: var(--text-muted);
}

.item-title:hover {
  color: var(--link-hover);
}

.item-domain {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 5px;
}

.item-summary {
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Flatten markdown list to inline text */
.item-summary ul {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item-summary li {
  display: inline;
}

.item-summary li::after {
  content: " / ";
  color: var(--text-muted);
}

.item-summary li:last-child::after {
  content: "";
}

.item-summary strong {
  font-weight: 600;
}

.item-comment {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.item-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.tag {
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 5px;
  font-size: 11px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.pagination a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 3px;
}

.pagination a:hover {
  color: var(--accent);
  background: var(--bg-hover);
}

.pagination-current {
  color: var(--accent);
  font-weight: 600;
  padding: 4px 8px;
}

.pagination-disabled {
  color: var(--border);
  padding: 4px 8px;
}

.pagination-pages {
  display: flex;
  gap: 2px;
}

.pagination-ellipsis {
  color: var(--text-muted);
  padding: 4px 4px;
  user-select: none;
}

/* Footer */
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--accent);
}

footer .disclaimer {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.75;
}

/* Keyboard hint (index only) — surfaces existing j/k//o nav, text-first */
.kbd-hint {
  margin-bottom: 8px;
  font-size: 11px;
}

.kbd-hint kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 5px;
  line-height: 1.5;
}

.kbd-sep {
  opacity: 0.5;
  margin: 0 4px;
}

/* Post detail page */
.post article {
  max-width: 700px;
}

.post h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.post h2 a {
  color: var(--link);
  text-decoration: none;
}

.post h2 a:hover {
  color: var(--link-hover);
}

.post .post-meta {
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.post .post-summary {
  line-height: 1.8;
  margin-bottom: 20px;
}

.post .post-summary ul {
  margin: 10px 0;
  padding-left: 25px;
}

.post .post-summary li {
  margin: 8px 0;
}

.post .post-summary strong {
  font-weight: 600;
}

.post .post-comment {
  background: var(--bg-hover);
  padding: 15px;
  border-left: 3px solid var(--accent);
  margin-bottom: 20px;
  font-size: 13px;
}

.post .post-link {
  margin-top: 30px;
}

.post .post-link a {
  color: var(--accent);
  text-decoration: none;
}

/* Report type badge */
.item-type-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Report items on index */
.item--report {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  background: var(--bg-hover);
  margin: 0 -12px;
  padding: 15px 12px;
  border-radius: 0 4px 4px 0;
}

.item--report .item-summary {
  -webkit-line-clamp: 3;
}

/* Hide block-level/inline noise in index summary */
.item-summary h2,
.item-summary h3,
.item-summary h4,
.item-summary hr,
.item-summary table,
.item-summary sup,
.item-summary .footnotes {
  display: none;
}

.item-summary p {
  display: inline;
}

.item-summary p::after {
  content: " ";
}

/* Post detail: tables */
.post .post-summary table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 13px;
  overflow-x: auto;
  display: block;
}

.post .post-summary thead th {
  background: var(--bg-hover);
  font-weight: 600;
  text-align: left;
}

.post .post-summary th,
.post .post-summary td {
  border: 1px solid var(--border);
  padding: 6px 10px;
}

.post .post-summary tr:hover {
  background: var(--bg-hover);
}

/* Post detail: headings inside summary */
.post .post-summary h2 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.post .post-summary h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
}

.post .post-summary h4 {
  font-size: 1rem;
  margin: 16px 0 6px;
  font-weight: 600;
}

/* Post detail: paragraphs */
.post .post-summary p {
  margin: 8px 0;
}

/* Post detail: footnotes */
.post .post-summary .footnotes {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 12px;
}

.post .post-summary .footnotes ol {
  padding-left: 20px;
}

.post .post-summary .footnotes li {
  margin: 4px 0;
}

.post .post-summary sup a {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.post .post-summary sup a:hover {
  text-decoration: underline;
}

/* Post detail: blockquotes */
.post .post-summary blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 12px 0;
  color: var(--text-muted);
  background: var(--bg-hover);
}

/* Post detail: code */
.post .post-summary code {
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 13px;
}

/* Post detail: horizontal rule */
.post .post-summary hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* About page */
.about {
  max-width: 600px;
}

.about h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.about .tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

.about section {
  margin-bottom: 32px;
}

.about h3 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about p {
  margin-bottom: 8px;
  line-height: 1.7;
}

.about ul {
  list-style: none;
  padding: 0;
}

.about li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.about li:last-child {
  border-bottom: none;
}

.about a {
  color: var(--accent);
  text-decoration: none;
}

.about a:hover {
  opacity: 0.7;
}

.about .links {
  display: flex;
  gap: 16px;
}

.about .links a {
  color: var(--text);
  font-weight: 500;
}

/* ── Explainers (evergreen reference notes) ────────── */
.explainers {
  max-width: 700px;
}

.exp-intro {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.exp-group {
  margin-bottom: 28px;
}

.exp-cat {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.exp-list {
  list-style: none;
}

.exp-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-title {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.exp-title:visited {
  color: var(--text-muted);
}

.exp-title:hover {
  color: var(--link-hover);
}

.exp-updated {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.exp-lede {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Explainer detail: one-line callout (한 줄 요약) */
.exp-callout {
  margin: 4px 0 24px;
  padding: 14px 16px;
  background: var(--bg-hover);
  border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

/* Explainer detail: rich content (tables/SVG/img) — text-first rule extended */
.explainer .post-summary img,
.explainer .post-summary svg {
  max-width: 100%;
  height: auto;
}

.exp-figure {
  margin: 18px 0;
}

.exp-figure figcaption,
.exp-figure .exp-cap {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Explainer detail: inline calculator widget (RIA 혜택 추정) */
.ria-calc {
  margin: 16px 0 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-hover);
}

.ria-period {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.ria-plabel {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  align-self: center;
}

.ria-period label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.ria-calc input {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ria-calc input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.ria-calc-unit {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* ISA calculator: type toggle + single input row */
.isa-calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.isa-calc-row .ria-plabel {
  min-width: 32px;
}

.isa-calc-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.isa-calc-row label input {
  width: 130px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.isa-calc-row label input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.ria-calc-out {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ria-saved {
  font-size: 15px;
  color: var(--text);
}

.ria-saved b {
  font-size: 24px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* result proportion bar: 절세액 vs 잔여 세금 */
.ria-bars {
  display: flex;
  gap: 2px;
  height: 8px;
  margin: 10px 0;
  border-radius: 4px;
  overflow: hidden;
}

.ria-bar {
  min-width: 2px;
}

.ria-bar-save {
  background: var(--accent);
}

.ria-bar-due {
  background: var(--border);
}

.ria-detail {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.ria-detail b {
  color: var(--text);
}

@media (max-width: 560px) {
  .ria-period {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .ria-plabel {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-weight: 600;
  }
  .ria-period label { font-size: 10px; }
  .ria-calc input { padding: 6px 5px; font-size: 12px; }
}

.ria-calc-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Explainer detail: product classifier ("이 상품이 잡히나?") */
.ria-clf {
  margin: 16px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.ria-clf-q {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ria-clf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ria-chip {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.ria-chip:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.ria-chip.sel {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.ria-clf-out {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 0 5px 5px 0;
  border-left: 3px solid var(--border);
  background: var(--bg-hover);
}

.ria-clf-out.is-hit {
  border-left-color: var(--accent);
}

.ria-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--bg);
  background: var(--text-muted);
}

.ria-clf-out.is-hit .ria-tag {
  background: var(--accent);
}

.ria-why {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}

.ria-act {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Explainer detail: sources + disclaimer */
.exp-sources {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.exp-sources h3 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.exp-sources ul {
  list-style: none;
  padding: 0;
}

.exp-sources li {
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}

.exp-sources a {
  color: var(--accent);
  text-decoration: none;
}

.exp-sources a:hover {
  text-decoration: underline;
}

.exp-disclaimer {
  margin-top: 28px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0.8;
}

/* Item links */
.item-summary-link,
.item-comment-link {
  text-decoration: none;
  color: inherit;
}

.item-summary-link:hover .item-summary,
.item-comment-link:hover .item-comment {
  background: var(--bg-hover);
}

/* Theme Selector */
.theme-selector {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-selector select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}

.theme-selector select:focus {
  outline: 1px solid var(--accent);
}

/* ── Layout: sidebar + main ───────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  font-size: 13px;
}

.side-section { margin-bottom: 20px; }

.side-head {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.side-list { list-style: none; }

.side-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
}

.side-list .side-item,
.side-list .side-filter {
  color: var(--text-muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-list .side-filter:hover { color: var(--link-hover); }

.side-list .count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.side-months { max-height: 220px; overflow-y: auto; }

/* ── Controls: search ─────────────────────────────── */
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 12px;
}

.search-sigil { color: var(--text-muted); font-size: 14px; }

#search {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  padding: 2px 0;
}

#search::placeholder { color: var(--text-muted); }

.meta-hint {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Chips ─────────────────────────────────────────── */
.chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chips-row:last-of-type { margin-bottom: 18px; }

.chips-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
  min-width: 42px;
}

.chip {
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.chip:hover { color: var(--text); border-color: var(--text-muted); }

.chip.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.chip-n {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
}

.chip.active .chip-n { color: var(--bg); opacity: 0.8; }

/* ── Badges (domain / lens) on items + entries ─────── */
.badge {
  font-size: 10px;
  letter-spacing: 0.03em;
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 6px;
  white-space: nowrap;
}

.badge--cat { color: var(--accent); border: 1px solid var(--accent); }
.badge--tag { color: var(--text-muted); border: 1px solid var(--border); }

.new-pill {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--link-hover);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ── Client filter results ─────────────────────────── */
#filter-results { margin-top: 4px; }

.fr-month {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin: 18px 0 4px;
}

.fr-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  border-radius: 4px;
}

.fr-entry:hover,
.fr-entry.cursor-here { background: var(--bg-hover); }
.fr-entry.cursor-here { box-shadow: inset 3px 0 0 var(--accent); }

.fr-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 38px;
}

.fr-titwrap { flex: 1; min-width: 0; }

.fr-title {
  color: var(--link);
  font-weight: 500;
}

.fr-entry:hover .fr-title { color: var(--link-hover); }

.fr-rel {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 8px;
}

.empty .sub { display: block; font-size: 12px; margin-top: 8px; }

/* ── Sidebar responsive ────────────────────────────── */
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .sidebar {
    position: static;
    max-height: none;
    order: 2;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
  }
  main { order: 1; }
  .side-months { max-height: 160px; }
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 12px;
    font-size: 15px;
  }

  header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  header h1 {
    font-size: 20px;
  }

  nav {
    gap: 20px;
  }

  nav a {
    font-size: 14px;
  }

  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .theme-selector select {
    display: none;
  }

  .theme-selector.open select {
    display: block;
    position: absolute;
    right: 12px;
    top: 50px;
    z-index: 100;
    padding: 8px 12px;
    font-size: 14px;
  }

  /* Items */
  .item {
    padding: 12px 0;
  }

  .item--report {
    margin: 0 -8px;
    padding: 12px 8px;
  }

  .item-title {
    font-size: 15px;
    line-height: 1.4;
    display: inline;
    word-break: keep-all;
  }

  .item-domain {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }

  .item-summary {
    font-size: 14px;
    margin-top: 10px;
  }

  .item-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .tag {
    margin-left: 0;
    padding: 4px 8px;
    font-size: 12px;
  }

  /* Post detail */
  .post h2 {
    font-size: 17px;
    line-height: 1.4;
  }

  .post .post-summary {
    font-size: 15px;
  }

  .post .post-summary ul {
    padding-left: 20px;
  }

  .post .post-summary li {
    margin: 10px 0;
  }

  /* About page */
  .about h2 {
    font-size: 20px;
  }

  .about h3 {
    font-size: 16px;
    margin-top: 24px;
  }

  .about p,
  .about li {
    font-size: 15px;
    line-height: 1.7;
  }

  .about ul {
    padding-left: 20px;
  }
}
