/* tf-platform-experience-v1 — content before decoration, familiar palette. */
.home-opening{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);grid-template-areas:"intro recent" "topics topics";gap:20px 24px;margin-top:28px}
.home-opening .spectrum-hero{grid-area:intro;display:block;position:relative;min-height:0;margin:0;padding:30px;align-content:center}
.home-opening .hero-copy{position:relative;z-index:1}.home-opening .spectrum-hero h1{font-size:clamp(30px,2.9vw,42px);line-height:1.45;margin:18px 0}
.home-opening .spectrum-hero .hero-visual{position:absolute;width:180px;height:180px;right:-40px;bottom:15px;opacity:.22;pointer-events:none}
.home-opening .visual-label,.home-opening .visual-footer{display:none}.home-opening .hero-description{font-size:14px;line-height:1.9;max-width:34em}
.home-opening .hero-actions{gap:16px;flex-wrap:wrap}.home-opening .hero-note{margin-top:22px}.home-opening .topic-spotlights{grid-area:topics;margin:0}
.home-opening .featured-section{grid-area:recent;margin:0;min-width:0}.home-opening .featured-section>.section-heading{margin:0 0 14px;align-items:center}
.home-opening .featured-section .eyebrow{margin-top:0}.home-opening .featured-section h2{font-size:23px}
.home-opening .featured-grid{grid-template-columns:minmax(0,1fr);gap:14px}
.home-opening .featured-card{grid-template-columns:30% minmax(0,1fr);min-height:155px;border-radius:16px}
.home-opening .featured-card .article-cover{min-height:155px}.home-opening .featured-copy{padding:16px 18px}
.home-opening .featured-copy h3{font-size:17px;line-height:1.55;margin:9px 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.home-opening .featured-copy p{font-size:13px;line-height:1.7;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-opening .featured-bottom{font-size:11px}.card p{font-size:14px;line-height:1.85}.card-content h3{font-size:19px}
.home-opening .spotlight strong{font-size:14px}.home-opening .spotlight small{font-size:11px}.journal{margin-top:32px}
.search-help{line-height:1.7}.empty-state p{font-size:14px}.pagination a{min-width:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center}
.reader-options{position:relative}.reader-options summary{list-style:none;cursor:pointer}.reader-options summary::-webkit-details-marker{display:none}
.reader-options-panel{position:absolute;top:calc(100% + 10px);left:0;z-index:20;display:grid;gap:14px;width:270px;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow);font-size:14px}
.reader-options-panel label{display:grid;gap:7px}.reader-options-panel select{width:100%;font:inherit}.reader-options-panel p{color:var(--muted);font-size:12px;margin:0}
.reading-toolbar{gap:8px}.reading-toolbar .tool-button,.reader-options summary{min-height:40px;display:inline-flex;align-items:center}
:root[data-reader-width=comfortable] main:has(>.reading-layout){max-width:1260px}
:root[data-reader-width=comfortable] body.focus-reading .reading-layout{max-width:920px}
:root[data-reader-spacing=roomy] .prose{line-height:2.25}:root[data-reader-spacing=standard] .prose{line-height:1.95}
.table-frame{margin:28px 0;max-width:100%;min-width:0}.table-window{overflow-x:auto;overscroll-behavior-x:contain;max-width:100%;border:1px solid var(--line);border-radius:10px}
.prose .table-window table{display:table;overflow:visible;min-width:100%;max-width:none;margin:0;border:0}
.table-hint{color:var(--muted);font-size:12px!important;margin:0 0 8px!important;text-align:right}
.code-box{position:relative;margin:24px 0}.prose .code-box pre{padding-top:48px;margin:0}.code-copy{position:absolute;right:10px;top:9px;z-index:1;font:inherit;font-size:12px;padding:5px 10px;background:var(--surface);color:var(--green);border:1px solid var(--line);border-radius:7px;cursor:pointer}
.gallery-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:0 0 14px}.gallery-count{font-size:13px;color:var(--muted);min-width:52px;text-align:center}
.gallery-controls button{font:inherit;font-size:13px;padding:9px 13px;border:1px solid var(--line);background:var(--soft);color:var(--ink);border-radius:9px;cursor:pointer;min-height:40px}
.gallery-controls button:disabled{opacity:.4;cursor:default}.image-viewer .viewer-image{max-height:calc(90dvh - 150px);overscroll-behavior:contain}
.image-viewer.is-zoomed .viewer-image{display:block}.image-viewer.is-zoomed .viewer-image img{width:160%;max-width:none;max-height:none;height:auto;object-fit:initial}
.library-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:20px 0}.library-actions button{font:inherit;padding:10px 16px;background:var(--surface);color:var(--green);border:1px solid var(--line);border-radius:10px;cursor:pointer}.library-actions small{font-size:12px;color:var(--muted)}
.site-footer .footer-links{display:flex;gap:18px}.site-footer .footer-links a{font-size:13px}
@media(max-width:1000px){.home-opening{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "topics" "recent"}.home-opening .spectrum-hero{padding:28px 32px}.home-opening .featured-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-opening .featured-card{grid-template-columns:28% minmax(0,1fr)}.home-opening .featured-copy p{display:none}.home-opening .hero-description br{display:none}.home-opening .topic-spotlights{grid-template-columns:repeat(4,minmax(0,1fr))}.home-opening .spotlight{padding:12px 10px;gap:8px}.home-opening .spotlight strong{font-size:12px}.home-opening .spotlight small{font-size:10px}}
@media(max-width:600px){
  .home-opening{margin-top:16px;gap:18px}.home-opening .spectrum-hero{padding:24px;min-height:0}.home-opening .spectrum-hero h1{font-size:29px;line-height:1.45;margin:14px 0}.home-opening .spectrum-hero .hero-visual{width:125px;height:125px;right:-30px;bottom:10px}.home-opening .spectrum-hero .hero-description{font-size:14px}.home-opening .hero-actions{margin-top:18px;gap:12px}.home-opening .hero-note{margin-top:16px}.home-opening .topic-spotlights{display:flex;overflow-x:auto;gap:10px;scroll-snap-type:x proximity;padding-bottom:4px}.home-opening .spotlight{flex:0 0 180px;scroll-snap-align:start;min-height:70px;padding:12px 10px}.home-opening .spotlight strong{font-size:12px}.home-opening .spotlight small{font-size:10px}
  .home-opening .featured-grid{grid-template-columns:minmax(0,1fr);gap:10px}.home-opening .featured-card{grid-template-columns:25% minmax(0,1fr);min-height:125px}.home-opening .featured-card .article-cover{min-height:125px}.home-opening .featured-copy{padding:13px}.home-opening .featured-copy h3{font-size:16px;-webkit-line-clamp:3}.home-opening .featured-bottom{font-size:11px}.home-opening .featured-section h2{font-size:22px}
  .card-content{padding:18px}.card-content h3{font-size:18px}.card p{font-size:14px}.search-help{font-size:12px}.topic-sidebar .journal-profile{display:none}.topic-sidebar nav{max-height:210px;overflow:auto}.topic-link{min-height:40px;font-size:13px}
  .reader-options-panel{position:fixed;left:18px;right:18px;top:auto;bottom:24px;width:auto;max-height:70dvh;overflow:auto;box-shadow:0 10px 70px #0004}.reading-toolbar{gap:7px}.reading-toolbar .tool-button{font-size:12px;padding:8px 10px}.gallery-controls{gap:7px}.gallery-controls button{font-size:12px;padding:8px 10px}.viewer-toolbar{gap:10px}.viewer-toolbar>span{overflow-wrap:anywhere;min-width:0}.image-viewer{padding:12px;max-height:96dvh}
  .site-footer .footer-links{flex-basis:100%}.header-actions .icon-button,.quick-search summary{min-width:40px;min-height:40px;display:grid;place-items:center}.prose h2,.prose h3{scroll-margin-top:100px}
}
@media(max-width:380px){.home-opening .spectrum-hero h1{font-size:25px}.home-opening .hero-actions{gap:10px}.home-opening .hero-actions .button{padding:11px 14px;font-size:13px}.home-opening .hero-actions .text-link{font-size:11px}}
/* tf-mobile-typography-v1: smaller type and rhythm for phone-sized reading. */
@media(max-width:600px){
  :root{--reading-size:16px}
  .home-opening .spectrum-hero{padding:22px}
  .home-opening .spectrum-hero h1{font-size:clamp(22px,6vw,26px);line-height:1.5;margin:12px 0}
  .home-opening .spectrum-hero .hero-description{font-size:13px;line-height:1.85}
  .section-heading h1{font-size:24px}.section-heading h2,.home-opening .featured-section h2,.reading-history h2{font-size:20px}
  .home-opening .featured-copy h3{font-size:15px;line-height:1.6}
  .card-content h3,.related-copy h3{font-size:16px;line-height:1.65}.card p{font-size:13px;line-height:1.8}
  .reading{padding:20px 16px}.article-heading h1{font-size:clamp(20px,5.6vw,24px);line-height:1.5}
  :root[data-reader-spacing=standard] .prose{line-height:1.85}
  .prose h2{font-size:1.25em;line-height:1.55;margin:1.8em 0 .8em;padding-left:12px}
  .prose h3{font-size:1.125em;line-height:1.65}
  .prose blockquote{margin:22px 0;padding:14px 16px}
  .prose th,.prose td{padding:10px 12px}
  .article-finish h2,.comments-section h2{font-size:20px;line-height:1.6}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}body{background-attachment:scroll}.illustrated-card:hover,.featured-card:hover{transform:none}}
@media print{
  @page{margin:15mm}
  html,body,main,.reading{background:white!important;color:#111!important;box-shadow:none!important;max-width:none!important;width:auto!important;margin:0!important;padding:0!important}
  .site-header,.site-footer,.reading-progress,.reading-aside,.mobile-toc,.reading-toolbar,.back,.resume-button,.comments-section,#comments,.article-finish,.related-section,.article-end,.back-to-top,.focus-exit,.toast,.image-viewer,.skip-link,.code-copy,.table-hint,.reading-history{display:none!important}
  .reading-layout{display:block!important;margin:0!important;padding:0!important}.article-heading h1{font-size:22pt!important}.article-meta{font-size:9pt!important}.article-heading{border:0!important}.prose{font-size:11pt!important;line-height:1.65!important;overflow:visible!important;color:#111!important}.prose h2{font-size:15pt!important;break-after:avoid}.prose h3{font-size:12pt!important;break-after:avoid}.prose a{color:#111!important}.prose blockquote{background:none!important;color:#111!important;border-color:#777!important}
  .prose img{max-height:180mm;max-width:100%!important;object-fit:contain;break-inside:avoid;box-shadow:none!important}.image-zoom-button{break-inside:avoid}.prose div.math,.prose span.math{overflow:visible!important}.prose mjx-container svg{max-width:100%!important;height:auto!important}.prose pre{white-space:pre-wrap;overflow-wrap:anywhere;overflow:visible!important}.table-frame,.table-window{overflow:visible!important;border:0}.prose .table-window table{width:100%!important;table-layout:fixed;min-width:0!important;font-size:8pt!important}.prose th,.prose td{min-width:0!important;padding:6px!important;overflow-wrap:anywhere;color:#111!important}.prose tr{break-inside:avoid}.code-box{margin:14px 0}.prose .code-box pre{padding:12px}
}
