/* tf-platform-enhance-v1: retain the existing theme; improve navigation and reading. */
.mobile-classic{display:none}.quick-search{position:relative}.quick-search summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:10px;padding:9px 12px;white-space:nowrap}
.quick-search summary::-webkit-details-marker{display:none}.quick-search form{position:absolute;right:0;top:calc(100% + 12px);z-index:30;display:flex;gap:8px;width:min(350px,calc(100vw - 36px));padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.quick-search input{min-width:0;flex:1}.quick-search button{white-space:nowrap}
.search-help{font-size:13px;color:var(--muted);margin:8px 0 18px}.filter-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.filter-chips a,.resume-button{padding:7px 12px;border:1px solid var(--line);border-radius:8px;color:var(--green);background:var(--soft);text-decoration:none;font:inherit}
.reading-history{margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.reading-history h2{font-size:20px}.reading-history header{display:flex;align-items:center;justify-content:space-between;gap:12px}.reading-history header button{background:none;color:var(--muted);padding:4px;font-size:13px;border:0}
.reading-history-link{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line);text-decoration:none}.reading-history-link:last-child{border:0}.reading-history-link span{min-width:0;overflow-wrap:anywhere}.reading-history-link small{white-space:nowrap;color:var(--muted)}
.draft-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 0;font-size:13px}.draft-tools button{padding:5px 10px;font-size:13px;background:var(--soft);color:var(--green);border:1px solid var(--line);border-radius:7px}.draft-tools p{flex-basis:100%;margin:0;color:var(--muted)}
.saved-filter{display:block;max-width:520px;margin:16px 0 24px}.saved-filter input{width:100%}.saved-filter-status{color:var(--muted);font-size:13px}
mark{background:#ffe6a5;color:#3b300b;border-radius:3px;padding:0 1px}:root[data-theme=dark] mark{background:#796226;color:#fff5da}
/* Keep the article wider than its directory, including on smaller laptops. */
main:has(>.reading-layout){max-width:1600px}
.reading-layout{grid-template-columns:minmax(0,1fr);gap:32px}
.reading-aside{display:none}.reading-layout .mobile-toc{display:block}
body.focus-reading .reading-layout{max-width:1200px}
@media(min-width:1101px){.reading-layout{grid-template-columns:minmax(0,1fr) 260px}.reading-aside{display:block}.reading-layout .mobile-toc{display:none}}
/* A flex item sizes to the complete formula; never create a vertical scrollbar. */
.prose pre{max-width:100%;overflow-x:auto}.prose table{display:block;max-width:100%;overflow-x:auto}
/* Article tables follow the reader's font size instead of the console's 11px cells. */
.prose table{font-size:1em}
.prose th,.prose td{font-size:inherit;line-height:1.7;white-space:normal;min-width:6em;vertical-align:top;padding:12px 16px}
.prose th{background:#f0eafa;color:#593b85;border-color:#d8c9ed;font-weight:600}
:root[data-theme=dark] .prose th{background:#382a50;color:#e9dcff;border-color:#75618e}
.prose div.math{max-width:100%;overflow-x:auto;overflow-y:hidden;padding-block:.2em}
.prose div.math mjx-container[display=true]{max-width:none;overflow:visible}
.prose span.math{display:inline-flex;vertical-align:baseline;max-width:100%;overflow-x:auto;overflow-y:hidden;padding-block:.2em;margin-block:-.2em}
.prose span.math>mjx-container{flex:none}
/* Preserve screen-reader MathML without letting its hidden box create scrollbars. */
.prose mjx-assistive-mml{width:1px!important;height:1px!important;padding:0!important}
.comment-main,.comment-child,.reading,.journal-content,.card-content{min-width:0}.comment-body{overflow-wrap:anywhere;white-space:pre-wrap}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--green);outline-offset:4px}
[hidden]{display:none!important}.feedback-page{max-width:650px;margin:60px auto;padding:24px}.feedback-page h1{font-size:30px}
@media(max-width:600px){.header-inner{gap:10px}.brand{flex-shrink:0;white-space:nowrap}.header-actions{gap:6px}.header-actions .style-switch{display:none}.mobile-classic{display:block}.quick-search summary{padding:8px}.quick-search form{position:fixed;right:18px;top:74px}.filter-chips a{font-size:12px}.reading-history{padding:14px}.reading-history-link{gap:10px}.draft-tools button{min-height:40px}.prose{overflow-wrap:anywhere}.prose img{height:auto}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* tf-platform-polish-v1: editorial visual refinements (2026-10-22). */
/* tf-platform-polish-v1: editorial visual refinements. */
:root {
  --paper: #f7f7f1;
  --surface: #fffefb;
  --ink: #21392e;
  --muted: #62756a;
  --green: #1e6b4e;
  --line: #e1e7db;
  --soft: #eef4e9;
  --accent: #b4784a;
  --shadow: 0 20px 50px -32px #18352847;
}
:root[data-theme="dark"] {
  --paper: #0f1713;
  --surface: #18241d;
  --ink: #e4ece1;
  --muted: #a3b4a7;
  --green: #9fd7ac;
  --line: #2c3d32;
  --soft: #213228;
  --accent: #d8a878;
  --shadow: 0 22px 50px -30px #000000aa;
}
html { scroll-behavior: smooth; }
body {
  background-image:
    radial-gradient(ellipse at 8% 0%, #9fd6b51f, transparent 42%),
    radial-gradient(ellipse at 92% 12%, #b9a8e21c, transparent 46%),
    radial-gradient(ellipse at 55% 100%, #ffc99a14, transparent 52%);
  background-attachment: fixed;
}
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--green) 32%, var(--line)) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--green) 28%, var(--line)); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Header */
.site-header { box-shadow: 0 1px 0 #1e6b4e0f, 0 18px 40px -38px #18352866; }
.brand img { box-shadow: 0 8px 18px -10px #1e6b4e66; }
#primary-nav a { transition: color .18s ease; }

/* Hero */
.spectrum-hero { border-radius: 30px; box-shadow: 0 40px 90px -70px #183528cc, inset 0 1px 0 #ffffffb3; }
.spectrum-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, #ffffff5c, transparent 34%), radial-gradient(circle at 78% 18%, #ffffff6b, transparent 40%);
}
.spectrum-hero h1 { letter-spacing: -.02em; text-wrap: balance; }
.spectrum-hero h1 em {
  background: linear-gradient(100deg, #1e6b4e 0%, #4f7f9e 55%, #8a6bb0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="dark"] .spectrum-hero h1 em {
  background: linear-gradient(100deg, #b7ecc4, #b9d7f2 55%, #d5bdf5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.spectrum-hero .button {
  background: linear-gradient(135deg, #237a58, #1c5f46);
  box-shadow: 0 14px 28px -16px #1e6b4eaa, inset 0 1px 0 #ffffff3d;
  transition: transform .18s ease, box-shadow .18s ease;
}
.spectrum-hero .button:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -16px #1e6b4ecc; }
.spectrum-hero .button span { transition: transform .18s ease; }
.spectrum-hero .button:hover span { transform: translate(2px, 2px); }
.hero-note strong { background: linear-gradient(120deg, var(--green), #6e8a6a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spectrum-star { animation: tf-twinkle 5s ease-in-out infinite; }
.star-two { animation-delay: -2.2s; }
@keyframes tf-twinkle { 0%, 100% { opacity: .55; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* Topic spotlights */
.spotlight { border-radius: 18px; box-shadow: 0 16px 34px -30px #18352855; transition: transform .2s, box-shadow .2s, border-color .2s; }
.spotlight:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -28px #18352866; border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); }
.spotlight-symbol { background: linear-gradient(145deg, var(--tone-soft), #ffffffb3); box-shadow: inset 0 1px 0 #fff, 0 8px 16px -14px #18352866; }
.spotlight-arrow { transition: transform .2s; }
.spotlight:hover .spotlight-arrow { transform: translate(2px, -2px); }

/* Section headings and counts */
.section-heading h1, .section-heading h2 { letter-spacing: -.015em; }
.section-heading .eyebrow { margin-bottom: 8px; }
.result-count { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; }
.journal-heading { align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* Cards */
.illustrated-card { border-radius: 18px; box-shadow: 0 24px 50px -44px #18352888; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }.illustrated-card:hover { transform: translateY(-5px); box-shadow: 0 32px 62px -40px #18352899; border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.card-cover-link { overflow: hidden; border-radius: 16px 16px 0 0; }
.cover-figure { transition: transform .55s ease; }
.illustrated-card:hover .cover-figure { transform: scale(1.035); }
.card-content h3 { font-weight: 650; letter-spacing: -.01em; }
.category-label { font-weight: 600; letter-spacing: .02em; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.featured-card { border-radius: 20px; box-shadow: 0 28px 60px -48px #18352899; transition: transform .22s, box-shadow .22s; }
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 36px 70px -46px #183528aa; }
.featured-copy h3 { font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.featured-copy, .featured-card, .card, .card-content, .tag-status { min-width: 0; }

/* Tag chips: keep the pastel rotation, soften the shape and interaction. */
.tag-chips a { border-radius: 999px; transition: border-color .18s, color .18s, transform .18s, box-shadow .18s; }
.tag-chips a:hover { border-color: color-mix(in srgb, var(--green) 38%, var(--line)); color: var(--green); transform: translateY(-1px); box-shadow: 0 10px 18px -16px #18352888; }
.tag-chips a[aria-current] { background: linear-gradient(135deg, var(--soft), #ffffff); }

/* Search */
.search { border-radius: 16px; box-shadow: 0 20px 40px -36px #18352888; }
.search-input { border-radius: 11px; background: #fff; transition: border-color .18s, box-shadow .18s; }
:root[data-theme="dark"] .search-input { background: var(--surface); }
.search-input:focus-within { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); border-color: color-mix(in srgb, var(--green) 55%, var(--line)); }
.search button { background: linear-gradient(135deg, #237a58, #1c5f46); border-radius: 11px; box-shadow: 0 12px 24px -16px #1e6b4eaa; }

/* Journal sidebar */
.journal-profile { border-radius: 20px; box-shadow: 0 24px 50px -44px #18352888; }
.profile-mark { border-radius: 20px; box-shadow: 0 14px 26px -18px #18352899, inset 0 1px 0 #ffffff4d; transform: rotate(-4deg); }
.journal-profile .button { background: linear-gradient(135deg, #237a58, #1c5f46); box-shadow: 0 12px 24px -18px #1e6b4eaa; }

/* Article reading */
.reading { border-radius: 24px; box-shadow: 0 40px 80px -66px #183528cc; background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 92%, var(--soft))); }
.article-heading h1 { letter-spacing: -.02em; text-wrap: balance; }
.prose h2 { border-left-width: 3px; letter-spacing: -.01em; }
.prose h3 { letter-spacing: -.005em; }
.prose blockquote { margin: 28px 0; padding: 16px 22px; border-radius: 0 14px 14px 0; background: linear-gradient(120deg, var(--soft), color-mix(in srgb, var(--soft) 35%, transparent)); }
.prose img { border: 1px solid var(--line); box-shadow: 0 24px 48px -38px #18352899; border-radius: 10px; }
.reading-aside nav a { transition: background .18s, color .18s; }
.reading-aside nav a.active { border-radius: 8px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent); }
.article-finish { border-radius: 18px; background: linear-gradient(140deg, var(--surface), var(--soft)); box-shadow: 0 24px 50px -46px #18352888; }


/* Readability and small components */
.card p, .featured-copy p { font-size: 12.5px; }
.topic-link { border-radius: 9px; transition: background .18s, color .18s; }
.pagination a { transition: border-color .18s, color .18s, background .18s; }
.pagination a:hover { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); color: var(--green); }
.filter-chips a { border-radius: 999px; transition: border-color .18s, color .18s, transform .18s; }
.filter-chips a:hover { border-color: color-mix(in srgb, var(--green) 38%, var(--line)); transform: translateY(-1px); }
.reading-history { border-radius: 18px; box-shadow: 0 22px 46px -42px #18352888; }

/* Footer */
.site-footer { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); padding-top: 34px; padding-bottom: 34px; gap: 26px; flex-wrap: wrap; }
.footer-brand { letter-spacing: 1.5px; }
.site-footer p { max-width: 360px; }
.footer-beian a { color: var(--muted); }
.footer-beian a:hover { color: var(--green); }

@media (max-width: 800px) {
  .spectrum-hero { border-radius: 22px; }
  .reading { border-radius: 18px; }
  .journal-heading { padding-bottom: 10px; }
  .site-footer { padding-top: 26px; padding-bottom: 26px; }
}
@media (max-width: 600px) {
  .spectrum-hero { border-radius: 20px; }
  .spectrum-hero h1 { font-size: 30px; }
  .section-heading h2 { font-size: 22px; }
  .reading { border-radius: 16px; }
  .site-footer { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .spectrum-star { animation: none; }
  .spotlight, .illustrated-card, .featured-card, .cover-figure { transition: none; }
}
