/* Shared, locally hosted type and layout system. Loaded after the original base styles. */
:root {
  --paper:#fbfbf8; --surface:#efefea; --ink:#151515; --muted:#555550;
  --line:#262626; --rule:#d3d3cc; --dark:#101110; --on-dark:#fafaf5;
  --text-meta:1rem; --text-body:1.125rem; --text-reading:1.25rem;
  --text-control:1.125rem; --text-card:1.625rem; --text-section:2.75rem; --text-page:4rem;
}
html { font-size:100%; scroll-padding-top:32px; }
body { font-size:var(--text-body); line-height:1.7; }
small, figcaption, kbd, sub, sup { font-size:var(--text-meta); }
h1,h2,h3 { font-family:var(--serif); font-weight:500; line-height:1.3; overflow-wrap:anywhere; }
h1 { font-size:var(--text-page); }
h2 { font-size:var(--text-section); }
h3 { font-size:var(--text-card); }
button,input,textarea,select { font-size:var(--text-control); line-height:1.5; }
input::placeholder,textarea::placeholder { font-size:var(--text-control); color:#686861; opacity:1; }
.container { width:min(1280px,calc(100% - 96px)); }
.icon { width:22px; height:22px; }
.text-link,.button,.button.small,.nav-link,.nav-start,.hero-secondary,
.filter-tab,.archive-controls select,.archive-search input,.pagination button,
.article-byline>.text-link,.article-end a,.search-field input,.contact-links a,
.studio-heading>.button,.studio-sidebar nav button,.studio-savebar>.button,
.tool-actions .button,.tool-panel form>.button,.hero-buttons .button,
.side-feature .text-link,.section-heading>.text-link,.news-heading .text-link,
.preview-note a,.footer-links a,.hero-motion-toggle {
  font-size:var(--text-control); line-height:1.5;
}
.button,.button.small { max-width:100%; white-space:normal; overflow-wrap:anywhere; min-height:54px; padding:12px 18px 12px 22px; gap:22px; border-radius:0; }
.button-icon { width:32px; height:32px; }
.button.outline { border-color:var(--line); }
.icon-button { width:46px; height:46px; }
.text-link { white-space:normal; gap:14px; }
.round-link,.circle-arrow { width:48px; height:48px; }
.skip-link { font-size:var(--text-control); top:-120px; }
.skip-link:focus { top:12px; }
:where(a,button,input,textarea,select):focus-visible { outline-width:3px; }

/* Larger controls get their own space, including on narrow screens. */
.site-header { position:relative; top:auto; padding:18px 22px; container-type:inline-size; }
body:has(.home-hero) .site-header { background:#050605; }
.nav-wrap { min-height:80px; max-width:1440px; gap:20px; padding:10px 14px 10px 24px; border-color:var(--line); }
.brand { font-size:1.5rem; gap:16px; min-width:0; white-space:normal; }
.desktop-nav { gap:2px; }
.nav-link { padding:12px 14px; }
.nav-start { padding:12px 18px; }
.nav-actions { gap:8px; }
.mobile-nav { border:1px solid var(--line); }
.mobile-nav a { padding:14px 16px; }
.home-hero { padding-top:0; }
.hero-grid { grid-template-columns:minmax(0,1.14fr) minmax(0,1fr); gap:40px; min-height:600px; padding-block:44px 64px; }
.hero-copy { min-width:0; }
.hero-copy h1 { font-size:clamp(56px,5vw,72px); line-height:1.3; letter-spacing:-.025em; font-weight:500; }
.eyebrow { font-size:var(--text-meta); letter-spacing:.16em; color:#c1c4ba; margin-bottom:26px; }
.hero-intro { max-width:480px; font-size:var(--text-body); line-height:1.7; color:#c4c7bf; margin-top:28px; }
.hero-buttons { flex-wrap:wrap; gap:24px; margin-top:32px; }
.hero-secondary { min-height:52px; color:#e0e3da; gap:16px; }
.hero-motion-toggle { padding:10px 14px; color:#d4dacd; }
.preview-note { font-size:var(--text-meta); gap:24px; padding-block:24px; border-color:var(--rule); }
.preview-note a { flex-shrink:0; }
.section { padding-block:88px; }
.section-heading { flex-wrap:wrap; gap:24px; margin-bottom:36px; padding-bottom:28px; border-bottom:1px solid var(--line); }
.section-heading>div { min-width:0; }
.section-heading h2,.news-heading h2,.related-section .section-heading h2 { font-size:var(--text-section); line-height:1.3; letter-spacing:-.02em; }
.section-heading p:not(.section-kicker) { max-width:660px; margin-top:18px; font-size:var(--text-body); line-height:1.7; }
.section-kicker { margin-bottom:18px; font-size:var(--text-meta); }
.module-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:24px; }
.card-index { flex-shrink:0; font:italic 1.25rem/1.4 Georgia,serif; }
.meta,.sample-label,.tag-text,.result-count,.breadcrumb,.news-category,.news-category span { font-size:var(--text-meta); line-height:1.6; }
.meta { gap:8px 14px; }
.sample-label { color:#59584d; border-color:#9a998b; white-space:normal; }
.featured-grid { grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); gap:0; border:1px solid var(--line); }
.lead-feature { display:flex; flex-direction:column; min-width:0; padding:32px; }
.lead-image { height:350px; margin-bottom:26px; }
.lead-feature .meta { margin-top:0; }
.lead-feature h3 { font-size:1.75rem; line-height:1.3; margin-top:0; }
.lead-feature>p,.side-feature p,.news-row p,.lesson-item p,.product-info>p,.article-card>p {
  max-width:none; font-size:var(--text-body); line-height:1.7; color:var(--muted); margin-top:18px;
}
.lead-feature>.text-link { margin-top:26px; padding-top:22px; border-top:1px solid var(--rule); }
.side-features { display:grid; grid-template-rows:1fr 1fr; gap:0; border-left:1px solid var(--line); min-width:0; }
.side-feature { grid-template-columns:88px minmax(0,1fr); gap:22px; padding:32px; border-bottom:1px solid var(--line); transition:background .2s,color .2s; }
.side-feature:last-child { padding:32px; border:0; }
.side-image { height:124px; }
.side-feature .module-topline { margin-bottom:16px; gap:14px; }
.side-feature h3,.lesson-item h3,.product-info h3,.article-card h2,.related-section .article-card h2 { margin-top:0; font-size:var(--text-card); line-height:1.3; }
.side-feature .text-link { margin-top:24px; }

/* News is arranged as a reading ledger; tutorial and product grids retain covers. */
.news-section { padding-block:80px; border-block:1px solid var(--line); background:var(--surface); }
.news-layout { display:block; }
.news-heading { max-width:820px; margin-bottom:40px; }
.news-heading br { display:none; }
.news-heading p { margin-top:20px; font-size:var(--text-body); line-height:1.7; }
.news-heading .text-link { margin-top:24px; }
.news-list { border-top:1px solid var(--line); }
.news-row,.news-row:first-child,.news-row:last-child { grid-template-columns:170px minmax(0,1fr) 48px; gap:32px; padding:32px 24px; border-bottom:1px solid var(--line); transition:background .2s,color .2s; }
.news-category { color:var(--muted); }
.news-category span { margin-top:10px; }
.news-row h3 { font-size:var(--text-card); line-height:1.3; }
.news-row .circle-arrow { width:48px; height:48px; border-color:var(--line); }
.aihot-news-row { align-items:start; }
.news-feed-story { min-width:0; }
.news-feed-time { display:flex; flex-direction:column; gap:8px; margin-top:20px; }
.news-feed-time span { margin:0; font-size:var(--text-meta); }
.news-feed-time strong { font:500 22px/1.3 var(--sans); color:var(--ink); }
.news-category .news-time-label { display:block; margin-top:10px; font-size:var(--text-meta); }
.aihot-news-row p.news-feed-source { margin:0 0 14px; font-size:var(--text-meta); line-height:1.6; color:var(--muted); overflow-wrap:anywhere; }
.aihot-news-row p.news-feed-summary { margin:18px 0 0; font-size:var(--text-body); line-height:1.7; }
.news-feed-reason { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.news-feed-reason>span { display:block; font-size:var(--text-meta); line-height:1.6; font-weight:500; }
.aihot-news-row .news-feed-reason p { margin:10px 0 0; font-size:var(--text-body); line-height:1.7; }
.news-original-link { display:inline-flex; padding-block:8px; margin-top:18px; font-size:var(--text-control); line-height:1.5; text-decoration:underline; text-underline-offset:5px; }
.news-feed-credit,.news-feed-notice { font-size:var(--text-meta); line-height:1.7; margin:24px 0 0; overflow-wrap:anywhere; }
.news-feed-credit a { text-decoration:underline; text-underline-offset:4px; }
.news-feed-empty { padding:32px 0; font-size:var(--text-body); line-height:1.7; }
.news-feed-empty a { margin-top:20px; }
.news-detail { padding-bottom:64px; }
.news-detail .article-heading { max-width:1120px; }
.news-detail .article-heading h1 { overflow-wrap:anywhere; }
.news-detail-source-name { font-size:var(--text-meta); line-height:1.7; overflow-wrap:anywhere; }
.news-detail .article-byline { gap:20px; }
.news-detail .article-byline .news-detail-source-name { margin:0; }
.news-detail #news-detail-source {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 24px;
  margin-top:32px; padding:24px; border:1px solid var(--rule); background:var(--surface);
}
.news-detail #news-detail-source h2 { grid-column:1; margin:0; font-size:1.75rem; line-height:1.3; }
.news-detail #news-detail-source .news-detail-source-name { grid-column:1; margin:0; font-size:var(--text-body); }
.news-detail-links {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
  grid-column:2; grid-row:1 / span 2; align-self:center; width:19rem; max-width:100%; margin:0;
}
.news-detail-links .text-link,.news-detail .article-end>a {
  display:inline-flex; justify-content:center; align-items:center; gap:12px;
  min-width:0; min-height:56px; padding:12px 16px; margin:0;
  border:1px solid var(--line); border-radius:0; background:var(--paper); color:var(--ink);
  font-family:var(--sans); font-size:var(--text-control); font-weight:400; line-height:1.5;
  text-decoration:none; white-space:nowrap; transition:background .18s,color .18s;
}
.news-detail .article-end {
  flex-direction:row; flex-wrap:wrap; align-items:center; gap:16px 24px;
  margin-top:24px; padding-top:24px; border-color:var(--rule);
}
.news-detail .article-end>span { font-size:var(--text-meta); line-height:1.7; }
.news-detail-links .text-link:focus-visible,.news-detail .article-end>a:focus-visible { outline:2px solid var(--ink); outline-offset:4px; }
@media (hover:hover) and (pointer:fine) {
  .news-detail-links .text-link:hover,.news-detail .article-end>a:hover { background:var(--dark); color:var(--on-dark); }
}
@media(max-width:767px) {
  .news-detail { padding-bottom:48px; }
  .news-detail #news-detail-source { grid-template-columns:minmax(0,1fr); padding:20px; gap:12px; }
  .news-detail-links { grid-column:1; grid-row:auto; width:100%; margin-top:8px; }
  .news-detail-links .text-link { padding-inline:12px; }
}
.news-feed-archive { padding-top:48px; }
.news-feed-archive .aihot-news-row { background:var(--surface); }
@media (hover:hover) and (pointer:fine) {
  .aihot-news-row:hover .news-feed-time strong { color:var(--on-dark); }
  .aihot-news-row:hover :is(.news-feed-category,.news-feed-time span) { color:#e1e2d9; }
  .aihot-news-row:hover .news-feed-reason { border-color:#85877e; }
}
@media(max-width:639px) {
  .aihot-news-row .news-category { align-items:center; gap:12px 20px; }
  .aihot-news-row .news-feed-time { flex-direction:row; flex-wrap:wrap; align-items:center; gap:12px; margin:0; }
  .aihot-news-row .news-feed-time strong { font-size:20px; }
  .aihot-news-row .news-category .news-time-label { width:100%; margin:0; }
  .aihot-news-row .news-feed-category { margin:0; }
}
.lessons-grid,.products-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,24rem),1fr)); gap:0; border-top:1px solid var(--line); border-left:1px solid var(--line); }
.lesson-item,.product-card { display:flex; flex-direction:column; min-width:0; padding:32px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); transition:background .2s,color .2s; }
.lesson-image { height:280px; margin-bottom:26px; }
.lesson-item .meta { margin-top:0; }
.lesson-item>.text-link { padding-top:26px; margin-top:auto; }
.products-section { border-top:0; padding-top:0; }
.product-art { height:18.125rem; padding:32px; background:#eaeae5; color:var(--ink); }
.product-word { color:inherit; font-size:4rem; line-height:1.12; transform:none; padding-bottom:16px; }
.product-art-name { left:24px; bottom:20px; font-size:var(--text-meta); letter-spacing:.05em; color:inherit; }
.template-product .product-art { background:#252625; color:#fafaf5; }
.template-product .product-art-name { color:inherit; }
.template-product .product-art>.icon { filter:invert(1); }
.template-mark { transform:none; font-size:2.875rem; line-height:1.1; color:inherit; padding-bottom:32px; }
.template-mark>span { line-height:1.3; }
.product-info { display:flex; flex-direction:column; flex:1; padding-top:26px; }
.product-info .text-link { margin-top:auto; padding-top:26px; }
.about-strip { display:grid; grid-template-columns:64px minmax(0,1fr) 48px; align-items:center; gap:28px; padding-block:44px 64px; border-color:var(--line); }
.about-strip h2 { font-size:var(--text-card); line-height:1.3; }
.about-strip p { margin-top:12px; font-size:var(--text-body); line-height:1.7; }
.about-strip .round-link { margin-left:0; }

.page-heading { max-width:1050px; padding-top:64px; padding-bottom:64px; }
.page-heading h1,.product-heading h1,.about-heading h1,.studio-heading h1 { font-size:var(--text-page); line-height:1.3; letter-spacing:-.025em; }
.page-heading>p,.about-heading p,.studio-heading>div>p:last-child { font-size:var(--text-body); line-height:1.7; margin-top:24px; }
.breadcrumb { margin-bottom:28px; }
.archive-section { padding-bottom:88px; }
.archive-toolbar { flex-wrap:wrap; align-items:center; gap:24px; padding-block:22px; }
.filter-tabs { flex-wrap:wrap; gap:8px; flex-shrink:1; }
.filter-tab { min-height:50px; padding:11px 18px; border:1px solid transparent; }
.filter-tab:hover { border-color:var(--line); }
.archive-controls { flex-wrap:wrap; gap:18px; min-width:0; }
.archive-controls select { min-height:50px; max-width:230px; padding:10px 34px 10px 12px; border:1px solid var(--line); background:var(--paper); }
.archive-search { flex-direction:row; min-width:0; min-height:50px; gap:12px; padding:10px 14px; border:1px solid var(--line); }
.archive-search input { width:190px; min-width:0; padding:0; }
.result-count { margin-block:24px 32px; }
.archive-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,21rem),1fr)); gap:0; border-top:1px solid var(--line); border-left:1px solid var(--line); }
.article-card { display:flex; flex-direction:column; min-width:0; padding:28px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); transition:background .2s,color .2s; }
.article-image { height:220px; margin-bottom:26px; }
.image-placeholder { background:var(--surface); color:var(--muted); }
.article-card>.meta { margin-top:0; }
.article-card>p { margin-bottom:28px; }
.card-bottom { flex-wrap:wrap; gap:14px; margin-top:auto; padding-top:22px; border-top:1px solid var(--rule); }
.tag-text { padding:5px 12px; max-width:100%; overflow-wrap:anywhere; }
.pagination { flex-wrap:wrap; gap:12px; margin-top:40px; }
.pagination button { width:auto; min-width:48px; height:auto; min-height:48px; padding:8px 14px; }
.empty-state h2 { font-size:2.25rem; line-height:1.3; }
.empty-state p { font-size:var(--text-body); margin-top:20px; }

/* Comfortable article measure, larger titles and readable utility text. */
.article-heading { max-width:1000px; padding-top:56px; }
.article-heading h1 { font-size:3.5rem; line-height:1.3; letter-spacing:-.02em; }
.article-deck,.product-description { font-size:var(--text-reading); line-height:1.7; max-width:820px; margin-top:28px; }
.article-byline { gap:20px 28px; margin-top:36px; font-size:var(--text-meta); }
.article-cover { max-width:1120px; margin-top:40px; }
.article-cover img { height:440px; }
.article-cover figcaption { font-size:var(--text-meta); margin-top:14px; }
.reading-layout { grid-template-columns:minmax(0,740px) 230px; gap:64px; padding-top:56px; }
.prose { font-size:var(--text-reading); line-height:1.75; color:#30302d; overflow-wrap:anywhere; }
.prose h2 { font-size:2.25rem; line-height:1.3; margin-block:48px 24px; }
.prose h3 { font-size:var(--text-card); line-height:1.3; margin-block:32px 18px; }
.prose p { margin-block:22px; }
.prose li { margin-block:14px; }
.prose code,.template-download pre { font-size:var(--text-body); line-height:1.7; }
.prose pre { background:var(--surface); }
.content-note { font-size:var(--text-meta); line-height:1.7; background:var(--surface); color:#4d4d45; border-color:var(--line); padding:22px 24px; }
.toc { padding-left:24px; font-size:var(--text-control); border-color:var(--line); }
.toc nav { gap:18px; font-size:var(--text-meta); line-height:1.7; }
.back-to-top { font-size:var(--text-meta); }
.article-tool { padding:28px; }
.article-tool>p:first-child,.article-end { font-size:var(--text-meta); }
.article-tool>p { font-size:var(--text-body); }
.article-end { flex-wrap:wrap; gap:20px; }
.related-section { max-width:1100px; }
.related-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; border-top:1px solid var(--line); border-left:1px solid var(--line); }
.product-heading { grid-template-columns:repeat(2,minmax(0,1fr)); gap:64px; padding-top:64px; }
.product-detail-art { min-height:370px; background:#eaeae5; overflow:hidden; }
.product-detail-art>span { font-size:4rem; line-height:1.12; transform:none; }
.product-detail-art small { font-size:var(--text-meta); letter-spacing:.06em; }
.kit-art { background:#252625; color:#fafaf5; }
.product-explainer { grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); gap:64px; padding-block:48px; }
.product-explainer h2,.tool-heading h2,.template-download h2,.about-body>h2,.contact-section h2 { font-size:2.25rem; line-height:1.3; }
.product-explainer p { font-size:var(--text-reading); line-height:1.7; }
.product-explainer p.muted { font-size:var(--text-body); }
.tool-panel { padding:40px; background:#f4f4ef; }
.tool-heading { flex-wrap:wrap; gap:24px; align-items:flex-start; }
.tool-heading p,.template-download p,.contact-links p { font-size:var(--text-body); line-height:1.7; }
.tool-heading>.tag-text { display:inline-block; }
.prompt-fields,.field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
label,.prompt-fields label { font-size:var(--text-control); gap:12px; min-width:0; }
textarea,input[type=text],input[type=email],input[type=url],input:not([type]),.social-row input,.selection-label select {
  font-size:var(--text-control); width:100%; min-width:0; padding:13px 15px; border:1px solid #85857e; border-radius:0; background:var(--paper);
}
textarea,.prompt-fields textarea { font-size:var(--text-control); line-height:1.7; }
.studio-layout .studio-panel :is(input,textarea,select) { font-size:var(--text-control); line-height:1.7; }
.field-grid label,.studio-layout label,.check-label { font-size:var(--text-control); }
.check-label input { width:22px; height:22px; flex-shrink:0; margin-top:5px; accent-color:var(--ink); }
.form-hint { font-size:var(--text-meta); line-height:1.7; margin-top:18px; }
.tool-actions { flex-wrap:wrap; gap:16px; }
.template-download { grid-template-columns:repeat(2,minmax(0,1fr)); gap:48px; border:1px solid var(--line); background:var(--surface); }
.template-download pre { max-height:500px; overflow-wrap:anywhere; }
.about-heading { padding-top:64px; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:64px; }
.about-monogram { border:1px solid var(--line); background:transparent; }
.about-body,.contact-section { grid-template-columns:minmax(0,1fr) minmax(0,1.8fr); gap:64px; border-color:var(--line); }
.contact-links { min-width:0; overflow-wrap:anywhere; }
.footer-main { gap:64px; }
.footer-main h2 { font-size:3rem; line-height:1.3; }
.footer-eyebrow,.footer-links>.muted,.footer-bottom,.footer-bottom>span,.footer-bottom>div { font-size:var(--text-meta); color:#c3c6bb; }
.footer-links { min-width:290px; gap:22px; }
.footer-brand { font-size:1.375rem; }
.footer-bottom { flex-wrap:wrap; gap:24px; }
.footer-bottom>span { margin-left:0; }
.footer-bottom>div { flex-wrap:wrap; gap:24px; }
.search-dialog { width:min(800px,calc(100% - 32px)); max-height:80dvh; margin:10dvh auto; padding:32px; border-color:var(--line); }
.dialog-heading h2 { font-size:2.25rem; }
.search-field { padding:14px 16px; gap:16px; border-color:var(--line); }
.search-field input { min-width:0; }
.search-status,.search-help,.search-result small { font-size:var(--text-meta); }
.search-result { padding-block:24px; }
.search-result h3 { font-size:var(--text-card); line-height:1.3; margin-top:14px; }
.search-result p { font-size:var(--text-body); line-height:1.7; margin-top:14px; }
.toast { font-size:var(--text-control); width:max-content; max-width:calc(100vw - 32px); }
.studio-heading { flex-wrap:wrap; padding-top:64px; gap:32px; }
.studio-status,.studio-help,.studio-savebar>span { font-size:var(--text-meta); }
.studio-layout { grid-template-columns:215px minmax(0,1fr); gap:36px; }
.studio-panel { padding:32px; }
.studio-panel h2 { font-size:2.25rem; }
.studio-panel h3 { font:500 var(--text-card)/1.3 var(--serif); }
.studio-panel>p { font-size:var(--text-body); }
.panel-title { flex-wrap:wrap; gap:20px; }
.social-row { grid-template-columns:140px minmax(0,1fr); gap:18px; }
.studio-savebar { flex-wrap:wrap; gap:20px; padding:18px 20px; }
.not-found h1 { font-size:var(--text-page); }

@media (hover:hover) and (pointer:fine) {
  :is(.article-card,.side-feature,.lesson-item,.product-card,.news-row):hover { color:var(--on-dark); background:var(--dark); }
  :is(.article-card,.side-feature,.lesson-item,.product-card,.news-row):hover :is(.meta,p,.sample-label,.tag-text,.news-category) { color:#e1e2d9; }
  :is(.article-card,.side-feature,.lesson-item,.product-card,.news-row):hover :is(.card-bottom,.circle-arrow,.tag-text) { border-color:#86877d; }
  :is(.article-card,.side-feature,.lesson-item,.product-card):hover .text-link .icon,
  .news-row:hover .circle-arrow .icon { filter:invert(1); }
}
@media (max-width:1150px) {
  .desktop-nav,.nav-start { display:none; }
  .menu-toggle { display:inline-grid; }
  .hero-copy h1 { font-size:3.5rem; }
  .featured-grid { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
  .side-feature { grid-template-columns:minmax(0,1fr); }
  .side-image { display:none; }
  .archive-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reading-layout { grid-template-columns:minmax(0,740px); }
  .article-aside { display:none; }
  .studio-layout { grid-template-columns:180px minmax(0,1fr); gap:24px; }
  .field-grid { grid-template-columns:1fr; }
}
@media (max-width:900px) {
  .container { width:calc(100% - 56px); }
  .hero-grid { grid-template-columns:minmax(0,1fr) minmax(0,.75fr); gap:24px; }
  .featured-grid { grid-template-columns:1fr; }
  .side-features { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:none; border-left:0; border-top:1px solid var(--line); }
  .side-feature { border-bottom:0; border-right:1px solid var(--line); }
  .side-feature:last-child { border-right:0; }
  .news-row,.news-row:first-child,.news-row:last-child { grid-template-columns:140px minmax(0,1fr) 48px; gap:24px; padding-inline:0; }
  .lesson-item,.product-card { padding:26px; }
  .lesson-image { height:220px; }
  .product-art { height:15.625rem; padding:24px; }
  .product-word { font-size:3.125rem; }
  .product-art-name { left:18px; bottom:16px; letter-spacing:0; }
  .product-heading { gap:32px; }
  .product-heading h1 { font-size:3.5rem; }
  .product-detail-art>span { font-size:3rem; }
  .product-explainer,.about-body,.contact-section { grid-template-columns:1fr; gap:28px; }
  .template-download,.prompt-fields { grid-template-columns:1fr; }
  .footer-main { gap:32px; align-items:flex-start; }
  .footer-main h2 { font-size:2.75rem; }
  .footer-links { min-width:230px; }
  .studio-layout { grid-template-columns:1fr; }
  .studio-sidebar { position:static; }
  .studio-sidebar nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
  .studio-sidebar nav button { padding:14px 10px; text-align:center; }
  .studio-help { display:none; }
}
@media (max-width:639px) {
  :root { --text-reading:1.125rem; --text-card:1.4375rem; --text-section:2rem; --text-page:2.5rem; }
  .container { width:calc(100% - 40px); }
  .site-header { top:auto; padding:12px; }
  .nav-wrap { min-height:68px; padding:9px 10px 9px 16px; gap:12px; }
  .brand { font-size:1.375rem; gap:12px; }
  .nav-actions { gap:0; }
  .icon-button { width:44px; height:44px; }
  .home-hero { padding-top:0; }
  .hero-grid { display:flex; flex-direction:column; align-items:stretch; gap:0; min-height:0; padding-top:32px; padding-bottom:0; }
  .hero-copy h1 { font-size:2.5rem; line-height:1.3; letter-spacing:-.025em; }
  .eyebrow { margin-bottom:24px; letter-spacing:.1em; }
  .hero-intro { max-width:100%; margin-top:24px; }
  .hero-buttons { margin-top:28px; gap:16px 20px; }
  .hero-buttons .button { min-height:54px; padding-inline:16px; gap:16px; }
  .hero-secondary { min-height:50px; }
  .hero-visual-space { height:270px; min-height:270px; }
  .hero-motion-toggle { right:20px; bottom:17px; }
  .preview-note { flex-direction:column; align-items:flex-start; gap:14px; padding-block:24px; }
  .preview-note>span { max-width:none; }
  .section { padding-block:56px; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:22px; margin-bottom:28px; padding-bottom:24px; }
  .section-heading h2 { font-size:var(--text-section); }
  .section-heading p:not(.section-kicker) { max-width:none; }
  .section-heading>.text-link { margin-top:0; }
  .lead-feature,.side-feature,.side-feature:last-child,.lesson-item,.product-card,.article-card { padding:24px; }
  .lead-image { height:240px; }
  .lead-feature h3 { font-size:1.5rem; line-height:1.3; }
  .lead-feature .meta { margin-top:0; }
  .side-features { grid-template-columns:1fr; }
  .side-feature { border-top:0; border-right:0; border-bottom:1px solid var(--line); }
  .side-feature:last-child { border-top:0; border-bottom:0; }
  .side-feature p { display:block; }
  .news-section { padding-block:56px; }
  .news-heading { margin-bottom:32px; }
  .news-row,.news-row:first-child,.news-row:last-child { grid-template-columns:minmax(0,1fr) 44px; gap:20px; padding-block:28px; }
  .news-category { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px 20px; }
  .news-category span { margin:0; }
  .news-row .circle-arrow { width:44px; height:44px; }
  .lessons-grid,.products-grid,.archive-grid,.related-grid { grid-template-columns:1fr; }
  .lesson-image { height:230px; }
  .products-section { padding-top:0; }
  .product-art { height:16.875rem; }
  .product-word { font-size:3.375rem; letter-spacing:-2px; }
  .product-art-name { left:20px; bottom:18px; }
  .about-strip { grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:24px; padding-block:32px 48px; }
  .about-initial { display:none; }
  .about-strip h2,.about-strip p { max-width:none; }
  .about-strip .round-link { width:44px; height:44px; }
  .page-heading { padding-top:44px; padding-bottom:40px; }
  .page-heading h1 { font-size:var(--text-page); }
  .archive-toolbar { align-items:stretch; gap:20px; padding-block:24px; }
  .archive-controls { display:grid; grid-template-columns:minmax(0,1fr); width:100%; gap:16px; }
  .archive-controls select { width:100%; max-width:none; }
  .archive-search input { width:100%; }
  .result-count { margin-block:24px; }
  .article-image { height:230px; }
  .article-card h2 { line-height:1.3; }
  .archive-section { padding-bottom:56px; }
  .article-heading { padding-top:44px; }
  .article-heading h1 { font-size:2.25rem; line-height:1.3; }
  .article-byline { gap:18px; margin-top:28px; }
  .article-byline>.text-link { margin-left:0; }
  .article-cover img { height:240px; }
  .article-cover figcaption { text-align:left; }
  .reading-layout { padding-top:36px; padding-inline:0; }
  .prose h2 { font-size:1.75rem; line-height:1.3; }
  .article-end { flex-direction:column; align-items:flex-start; }
  .product-heading,.about-heading { padding-top:64px; grid-template-columns:1fr; gap:36px; padding-top:44px; padding-bottom:48px; }
  .product-heading h1 { font-size:var(--text-page); }
  .product-description { max-width:none; }
  .product-detail-art { min-height:300px; padding-inline:24px; }
  .product-detail-art>span { font-size:3.25rem; }
  .product-explainer h2,.tool-heading h2,.template-download h2,.about-body>h2,.contact-section h2 { font-size:1.875rem; }
  .tool-panel,.template-download { padding:24px; margin-block:16px 48px; }
  .tool-actions { align-items:stretch; flex-direction:column; }
  .tool-actions .button { width:100%; }
  .about-heading h1 { font-size:var(--text-page); }
  .about-heading p { max-width:none; }
  .footer-main h2 { font-size:2.25rem; }
  .footer-links { min-width:0; }
  .footer-bottom>div { gap:20px; }
  .search-dialog { padding:24px; margin:6dvh auto; max-height:88dvh; }
  .dialog-heading h2 { font-size:1.875rem; }
  .studio-heading { align-items:flex-start; flex-direction:column; padding-top:44px; }
  .studio-heading h1 { font-size:var(--text-page); line-height:1.3; }
  .studio-sidebar nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .studio-panel { padding:24px; }
  .studio-panel h2 { font-size:1.875rem; }
  .social-row { grid-template-columns:1fr; gap:10px; padding-block:12px; border-bottom:1px solid var(--rule); }
  .studio-savebar { position:static; align-items:stretch; flex-direction:column; padding:20px; }
  .studio-savebar .button { width:100%; }
  .not-found h1 { font-size:var(--text-page); }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition-duration:.01ms!important; animation-duration:.01ms!important; }
}
@media print {
  .container { width:100%; }
  .article-heading,.page-heading { padding-top:24px; }
  .reading-layout { display:block; }
}

/* Intrinsic grids and type-relative queries also respond to enlarged reading text. */
.selected-section { container-type:inline-size; }
@container (max-width:64em) {
  .desktop-nav,.nav-start { display:none; }
  .menu-toggle { display:inline-grid; }
}
@container (max-width:60em) {
  .featured-grid { grid-template-columns:1fr; }
  .side-features { grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr)); grid-template-rows:none; border-left:0; border-top:1px solid var(--line); }
  .side-feature { border-top:0; border-bottom:0; border-right:1px solid var(--line); }
}
.not-found { padding-top:64px; }

.studio-layout .delete-item {font-size:var(--text-control);line-height:1.5;padding:12px 0;}
.daily-settings-list { display:grid; gap:0; border-top:1px solid var(--line); margin-top:28px; }
.daily-link-setting { display:flex; flex-direction:row; align-items:flex-start; gap:18px; padding:24px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.daily-link-setting input { width:24px; height:24px; flex-shrink:0; margin:3px 0 0; accent-color:var(--ink); }
.daily-link-setting>span { display:grid; gap:12px; min-width:0; }
.daily-link-setting strong { font-size:var(--text-control); font-weight:600; }
.daily-link-setting span span { font-size:var(--text-body); color:var(--muted); line-height:1.7; }
.daily-settings-help { margin-top:24px; font-size:var(--text-meta); line-height:1.7; }

/* Footer: editorial heading, real contact links, and square icon controls. */
.site-footer { padding-block:80px 24px; }
.footer-main { display:flex; flex-direction:row; justify-content:space-between; align-items:center; gap:48px; padding-bottom:64px; }
.footer-intro { flex:1 1 auto; min-width:0; }
.footer-main h2 { font-family:var(--serif); font-size:clamp(2.75rem,3.3vw,3.5rem); line-height:1.25; font-weight:400; }
.footer-eyebrow { margin-bottom:24px; }
.footer-social-links { display:flex; flex-wrap:nowrap; align-items:center; gap:12px; max-width:100%; margin-top:40px; }
.footer-social-button { display:grid; place-items:center; flex:0 1 56px; min-width:0; width:56px; aspect-ratio:1; border:1px solid var(--on-dark); border-radius:0; background:transparent; color:var(--on-dark); transition:background .18s,color .18s; }
.footer-social-button .icon { width:min(24px,60%); height:auto; filter:invert(1); }
.footer-contact-actions { display:flex; flex:0 0 auto; flex-wrap:nowrap; align-items:stretch; gap:12px; max-width:100%; }
.footer-contact-button { display:inline-flex; justify-content:center; align-items:center; gap:12px; min-width:0; min-height:56px; padding:12px 20px; border:1px solid var(--on-dark); border-radius:0; font-size:var(--text-control); line-height:1.5; font-weight:500; text-align:center; text-decoration:none; overflow-wrap:anywhere; transition:background .18s,color .18s; }
.footer-contact-button.is-light { background:var(--on-dark); color:var(--dark); }
.footer-contact-button.is-outline { background:transparent; color:var(--on-dark); }
.footer-contact-button .icon { width:20px; height:20px; flex-shrink:0; }
.footer-social-button:focus-visible,.footer-contact-button:focus-visible { outline:2px solid var(--on-dark); outline-offset:4px; }
.footer-bottom { border-color:#4f514c; }
.footer-bottom>div a { font-size:var(--text-meta); line-height:1.5; }
@media (hover:hover) and (pointer:fine) {
  .footer-social-button:hover { background:var(--on-dark); color:var(--dark); }
  .footer-social-button:hover .icon { filter:none; }
  .footer-contact-button.is-light:hover { background:transparent; color:var(--on-dark); }
  .footer-contact-button.is-light:hover .icon { filter:invert(1); }
  .footer-contact-button.is-outline:hover { background:var(--on-dark); color:var(--dark); }
}
@media(max-width:900px) {
  .footer-main { flex-direction:column; align-items:flex-start; gap:32px; }
  .footer-main h2 { font-size:2.75rem; }
}
@media(max-width:639px) {
  .site-footer { padding-block:56px 24px; }
  .footer-main { gap:28px; padding-bottom:40px; }
  .footer-main h2 { font-size:2.25rem; }
  .footer-social-links { margin-top:32px; gap:10px; }
  .footer-contact-actions { width:100%; }
  .footer-contact-button { flex:1 1 0; padding-inline:12px; }
}
