/*
Theme Name: Цыплаковы — семейная хроника
Theme URI: https://tsyplakof.narod.ru/
Author: Семейный архив Цыплаковых
Description: Исторический семейный архив в бежево-коричневой гамме: главная, автоматическая лента публикаций и удобный редактор WordPress.
Version: 3.1.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: tsyplakov-archive
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --paper: #f6eee3;
  --cream: #ede0cf;
  --ink: #151311;
  --body: #151311;
  --muted: #65594e;
  --brown: #65462f;
  --button: #795536;
  --button-hover: #62412a;
  --line: #cbb59b;
  --accent: #a17d56;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 35px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brown); text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brown); outline-offset: 6px; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); line-height: 1.17; font-weight: 700; }
::selection { background: #d8c1a1; color: #111; }
.container { width: min(var(--container), calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 22px; background: var(--button); color: #fff; z-index: 100; border-radius: 30px; }
.skip-link:focus { top: 15px; }

/* A quiet centered menu; the main wordmark lives on the hero photograph. */
.site-header { position: relative; z-index: 20; background: var(--paper); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: center; }
.site-header--home .header-inner { border-bottom: 1px solid var(--line); }
.nav-list { display: flex; align-items: center; justify-content: center; gap: 65px; list-style: none; padding: 0; margin: 0; }
.nav-list a { display: block; padding-block: 22px; font-size: 18px; line-height: 1.4; transition: color .18s ease; }
.nav-list a:hover, .nav-list .current-menu-item > a { color: #111; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; }
.menu-toggle, .mobile-menu-label { display: none; }
.brand { display: inline-flex; flex-direction: column; align-items: center; color: #111; }
.brand-name { font-size: 36px; font-weight: 700; line-height: 1.1; }
.brand-tag { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 17px; font-style: italic; line-height: 1.25; }
.brand-tag::before, .brand-tag::after { content: ''; width: 32px; height: 1px; background: var(--accent); }
.site-header--inner .header-inner { flex-direction: column; padding-top: 25px; }
.brand--header .brand-name { font-size: 34px; }
.brand--header .brand-tag { font-size: 15px; }
.site-header--inner .nav-list a { padding-block: 23px; }

/* Hero: genuine archival photograph, with live accessible text on top. */
.hero { padding-top: 16px; }
.hero-image-wrap { position: relative; isolation: isolate; overflow: hidden; }
.hero-photo { width: 100%; height: clamp(380px, 37vw, 570px); object-fit: cover; object-position: center 49%; filter: grayscale(1) sepia(.32) saturate(.65) brightness(1.08) contrast(.88); }
.hero-image-wrap::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 44% 35% at 50% 51%, #f6eee3f7 0%, #f6eee3e8 35%, #f6eee3a6 62%, #f6eee300 100%); }
.hero-wordmark { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; text-align: center; }
.wordmark-line { display: flex; align-items: center; justify-content: center; gap: 22px; max-width: 100%; }
.hero-wordmark h1 { font-size: clamp(65px, 7.8vw, 126px); line-height: 1.04; letter-spacing: -.04em; overflow-wrap: anywhere; }
.wordmark-branch { width: clamp(55px, 7.5vw, 108px); flex: 0 0 auto; opacity: .9; }
.wordmark-branch--right { transform: scaleX(-1); }
.wordmark-tag { display: flex; align-items: center; justify-content: center; gap: 25px; font-size: clamp(25px, 2.8vw, 42px); font-style: italic; line-height: 1.3; margin-top: 10px; color: #111; }
.wordmark-tag::before, .wordmark-tag::after { content: ''; width: clamp(35px, 6vw, 85px); height: 1px; background: #3e332b; }
.hero-caption { display: flex; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 24px 24px 0; font-size: 17px; font-style: italic; }
.hero-caption::before, .hero-caption::after { content: ''; width: 55px; height: 1px; background: var(--line); }
.hero-intro { text-align: center; padding-top: 21px; padding-bottom: 92px; }
.hero-lead { max-width: 1000px; margin-inline: auto; font-size: 19px; line-height: 1.65; }
.hero-intro .button { margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 47px; padding: 11px 34px 12px; border: 1px solid var(--button); border-radius: 999px; background: var(--button); color: #fff; text-align: center; font: 700 17px/1.45 var(--serif); transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.button:hover { background: var(--button-hover); border-color: var(--button-hover); transform: translateY(-1px); }
.text-link { display: inline-flex; align-items: center; gap: 14px; font-size: 17px; color: var(--brown); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover { color: #111; }
.text-link > span[aria-hidden] { font: 25px/1 var(--serif); text-decoration: none; }

/* Drawn dividers deliberately sit in whitespace. */
.ornament-divider { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.ornament-divider::before, .ornament-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.ornament-divider > img { width: 104px; height: 28px; flex: 0 0 auto; }
.section-title { text-align: center; font-size: clamp(35px, 3.5vw, 50px); margin: 32px 0 78px; }
.story-section { padding-bottom: 92px; }
.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.story-row--reverse .story-copy { grid-column: 2; grid-row: 1; }
.story-row--reverse .story-media { grid-column: 1; grid-row: 1; }
.story-copy h3 { font-size: clamp(29px, 2.8vw, 39px); margin-bottom: 22px; }
.story-copy p { font-size: 19px; line-height: 1.7; max-width: 465px; }
.story-copy .text-link { margin-top: 23px; }
.story-divider { margin-block: 75px; }
.story-media { display: block; position: relative; padding: 8px; border: 1px solid var(--accent); border-radius: 10px; background: #eee0cc; }
.story-media > img { width: 100%; height: 340px; object-fit: cover; filter: grayscale(1) sepia(.35) contrast(.9); border-radius: 4px; }
.story-media--portrait > img { object-position: center 28%; }
.story-media--enterprise > img { object-fit: contain; }
.story-media--place > img { object-position: center; }
.frame-corner { position: absolute; width: 43px; height: 43px; background: url('assets/decor/corner.svg') center/contain no-repeat; z-index: 2; pointer-events: none; }
.frame-corner--tl { top: -9px; left: -9px; }
.frame-corner--tr { top: -9px; right: -9px; transform: rotate(90deg); }
.frame-corner--bl { bottom: -9px; left: -9px; transform: rotate(-90deg); }
.frame-corner--br { bottom: -9px; right: -9px; transform: rotate(180deg); }
.factory-sketch { width: min(100%, 460px); height: auto; margin-top: 31px; opacity: .8; }

/* Last three posts, with the compact editorial layout from the chosen design. */
.news-section { padding-bottom: 88px; }
.news-section > .container > .ornament-divider:first-child { margin-bottom: 65px; }
.news-section > .container > .ornament-divider:last-child { margin-top: 62px; }
.news-section h2 { font-size: clamp(30px, 3.2vw, 44px); margin-bottom: 42px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; }
.news-card { min-width: 0; }
.card-link { display: block; color: var(--ink); }
.card-media { position: relative; height: 245px; overflow: hidden; border-radius: 5px; background: #e9d9c2; }
.card-media > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.6); transition: transform .25s ease; }
.card-media--contain > img { object-fit: contain; }
.card-link:hover .card-media > img { transform: scale(1.025); }
.card-arrow { display: none; }
.card-meta { font: 13px/1.5 var(--serif); color: var(--muted); margin-top: 20px; margin-bottom: 12px; }
.news-card h3 { font-size: 28px; line-height: 1.23; overflow-wrap: anywhere; }
.card-link:hover h3 { color: var(--brown); }
.card-excerpt { font-size: 17px; line-height: 1.7; margin-top: 17px; color: var(--ink); }
.card-read { display: inline-flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 16px; color: var(--brown); text-decoration: underline; text-underline-offset: 5px; }
.news-grid--compact { gap: 40px; }
.news-grid--compact .card-link { display: grid; grid-template-columns: 46% minmax(0, 1fr); gap: 20px; align-items: start; }
.news-grid--compact .card-media { height: 150px; }
.news-grid--compact .card-meta, .news-grid--compact .card-excerpt, .news-grid--compact .card-read { display: none; }
.news-grid--compact h3 { font-size: 21px; line-height: 1.3; }
.news-grid--compact .card-copy::after { content: ''; display: block; width: 43px; height: 1px; background: var(--accent); margin-top: 17px; }
.section-action { text-align: center; margin-top: 42px; }
.image-placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #71573e; font: 55px/1 var(--serif); }
.image-placeholder > span { font: 13px/1.4 var(--serif); }
.empty-state { padding: 30px 0; grid-column: 1/-1; font-size: 18px; }

/* Full-width, generously padded book band. */
.book-section { width: 100%; background: var(--cream); padding-block: 120px; }
.book-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr) 145px; gap: 65px; align-items: center; }
.book-stage { padding-inline: 8px; }
.book-cover { width: 244px; height: auto; margin-inline: auto; box-shadow: 5px 8px 16px #49331c2d, 1px 2px 4px #49331c25; }
.book-copy { padding-left: 40px; border-left: 1px solid var(--line); }
.book-copy h2 { font-size: clamp(29px, 2.8vw, 40px); line-height: 1.2; max-width: 600px; }
.book-facts { display: flex; flex-wrap: wrap; gap: 4px 15px; margin-top: 18px; font-size: 16px; line-height: 1.5; }
.book-facts span + span::before { content: '·'; margin-right: 15px; }
.book-description { font-size: 18px; line-height: 1.7; margin-top: 23px; max-width: 580px; }
.book-copy .button { margin-top: 28px; }
.book-sprig { width: 145px; height: auto; opacity: .82; }

.about-section { padding-block: 112px 84px; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 75px; align-items: start; }
.about-grid h2 { font-size: clamp(31px, 3vw, 42px); line-height: 1.2; }
.about-copy { padding-left: 48px; border-left: 1px solid var(--line); }
.about-copy p { font-size: 18px; line-height: 1.7; }
.about-copy p + p { margin-top: 17px; }
.contact-link { display: flex; align-items: center; gap: 15px; width: fit-content; margin-top: 22px; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.contact-link svg { width: 26px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.1; }
.about-link { margin-top: 24px; }
.site-footer { padding-bottom: 28px; }
.site-footer .ornament-divider { margin-bottom: 46px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.footer-nav { display: flex; align-items: center; gap: 35px; flex-wrap: wrap; font-size: 16px; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-top: 36px; font-size: 13px; color: var(--muted); }
.footer-bottom a { color: var(--brown); text-decoration: underline; text-underline-offset: 4px; }

/* The same type, colors and generous reading rhythm on every inner page. */
.page-header { position: relative; padding: 63px 0 66px; border-bottom: 1px solid var(--line); background: #f1e6d8; }
.page-header::after { content: ''; position: absolute; bottom: -14px; left: calc(50% - 57px); width: 114px; height: 28px; background: url('assets/decor/flourish.svg') center/104px 28px no-repeat, var(--paper); }
.page-header h1 { font-size: clamp(38px, 4.8vw, 65px); line-height: 1.15; max-width: 1000px; margin-top: 21px; }
.page-description { max-width: 760px; font-size: 20px; line-height: 1.7; margin-top: 24px; }
.breadcrumbs, .eyebrow { font-size: 15px; color: var(--muted); }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 4px; }
.breadcrumbs > span { margin-inline: 12px; }
.posts-section { padding: 75px 0 100px; }
.posts-section .news-grid { row-gap: 65px; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 60px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 7px 17px; border: 1px solid var(--line); border-radius: 24px; }
.pagination .current { background: var(--button); color: #fff; border-color: var(--button); }
.entry-wrap { padding: 70px 0 95px; }
.entry-prose { max-width: 820px; margin-inline: auto; font: 20px/1.85 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.entry-prose > p { margin-bottom: 25px; }
.entry-prose h2 { font-size: 36px; line-height: 1.23; margin: 52px 0 23px; }
.entry-prose h3 { font-size: 28px; line-height: 1.25; margin: 36px 0 20px; }
.entry-prose a { color: var(--brown); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.entry-prose ul, .entry-prose ol { padding-left: 26px; margin: 24px 0 30px; }
.entry-prose li { margin-block: 10px; }
.entry-prose figure { margin: 38px auto; }
.entry-prose figure img { width: auto; max-width: 100%; max-height: 670px; margin-inline: auto; }
.entry-prose figcaption { text-align: center; margin: 15px auto 0; font: 15px/1.65 var(--serif); color: var(--muted); max-width: 700px; }
.entry-prose blockquote { border-left: 2px solid var(--accent); padding-left: 27px; margin: 32px 0; font-style: italic; }
.entry-prose table { width: 100%; border-collapse: collapse; font-size: 17px; }
.entry-prose th, .entry-prose td { border: 1px solid var(--line); padding: 12px; text-align: left; }
.entry-prose .wp-block-table { overflow-x: auto; }
.entry-prose pre { padding: 20px; background: var(--cream); overflow: auto; font-size: 15px; }
.entry-prose .wp-block-button__link { padding: 12px 28px; background: var(--button); color: #fff; border-radius: 999px; font: 17px/1.5 var(--serif); text-decoration: none; }
.entry-prose .wp-block-columns { gap: 35px; }
.article-cover { max-width: 870px; margin: 0 auto 45px; padding: 24px; background: #eee0ce; }
.article-cover img { max-height: 550px; object-fit: contain; margin-inline: auto; }
.article-source { padding-top: 25px; border-top: 1px solid var(--line); margin-top: 40px; font-size: 15px; color: var(--muted); }
.article-navigation { display: flex; justify-content: space-between; gap: 35px; border-top: 1px solid var(--line); padding-top: 25px; margin-top: 40px; font-size: 16px; }
.article-navigation a { max-width: 47%; }
.back-link { display: inline-flex; gap: 12px; align-items: center; margin-top: 26px; font-size: 16px; }
.aligncenter { margin-inline: auto; }
.icon-arrow { width: 18px; height: 18px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Self-contained HTML preview: real navigation is replaced by page dialogs. */
.preview-dialog { width: min(1100px, 94vw); max-height: 90vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.preview-dialog::backdrop { background: #2d211bd6; backdrop-filter: blur(3px); }
.dialog-bar { display: flex; position: sticky; top: 0; z-index: 5; justify-content: space-between; align-items: center; gap: 20px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 25px; }
.dialog-label { font: 15px/1.5 var(--serif); }
.dialog-close { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #111; font: 29px/1 var(--serif); }
.dialog-content { padding: 0; }
.dialog-content .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 1600px) {
  .container { max-width: 1280px; }
  .story-row { gap: 120px; }
  .story-media > img { height: 365px; }
}
@media (max-width: 1150px) {
  .container { width: calc(100% - 80px); }
  .nav-list { gap: 43px; }
  .story-row { gap: 65px; }
  .story-media > img { height: 300px; }
  .news-grid--compact { gap: 27px; }
  .news-grid--compact .card-link { gap: 15px; }
  .news-grid--compact .card-media { height: 130px; }
  .news-grid--compact h3 { font-size: 18px; }
  .book-grid { grid-template-columns: 210px minmax(0, 1fr) 90px; gap: 35px; }
  .book-copy { padding-left: 30px; }
  .book-sprig { width: 90px; }
  .book-facts { gap: 4px 10px; font-size: 15px; }
  .book-facts span + span::before { margin-right: 10px; }
  .about-grid { gap: 45px; }
  .about-copy { padding-left: 35px; }
  .footer-nav { gap: 24px; font-size: 15px; }
}
@media (max-width: 850px) {
  .container { width: calc(100% - 52px); }
  .header-inner { min-height: 72px; }
  .nav-list { gap: 32px; }
  .nav-list a { font-size: 17px; }
  .hero-photo { height: 390px; }
  .hero-wordmark h1 { font-size: 75px; }
  .wordmark-line { gap: 15px; }
  .wordmark-branch { width: 64px; }
  .wordmark-tag { font-size: 30px; }
  .hero-lead { font-size: 18px; }
  .hero-intro { padding-bottom: 70px; }
  .section-title { margin-bottom: 58px; }
  .story-row { gap: 42px; }
  .story-copy h3 { font-size: 30px; margin-bottom: 18px; }
  .story-copy p { font-size: 17px; }
  .story-copy .text-link { font-size: 16px; }
  .story-media > img { height: 270px; }
  .story-divider { margin-block: 58px; }
  .factory-sketch { margin-top: 24px; }
  .news-section > .container > .ornament-divider:first-child { margin-bottom: 50px; }
  .news-grid--compact { grid-template-columns: 1fr; gap: 30px; }
  .news-grid--compact .card-link { grid-template-columns: 175px 1fr; gap: 25px; }
  .news-grid--compact .card-media { height: 130px; }
  .news-grid--compact h3 { font-size: 24px; max-width: 400px; }
  .news-grid--compact .card-copy { align-self: center; }
  .news-section h2 { margin-bottom: 34px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-section { padding-block: 90px; }
  .book-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 42px; position: relative; }
  .book-sprig { display: none; }
  .book-copy h2 { font-size: 31px; }
  .book-description { font-size: 17px; }
  .book-facts { gap: 5px 10px; }
  .about-section { padding-block: 85px 65px; }
  .about-grid { gap: 32px; }
  .about-grid h2 { font-size: 32px; }
  .about-copy { padding-left: 30px; }
  .about-copy p { font-size: 17px; }
  .contact-link { font-size: 18px; gap: 10px; }
  .footer-main { align-items: flex-start; }
  .footer-nav { max-width: 300px; gap: 15px 25px; }
  .footer-main .brand-name { font-size: 31px; }
  .footer-bottom { align-items: flex-start; font-size: 12px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 24px; }
  .container { width: calc(100% - 40px); }
  .header-inner { min-height: 65px; justify-content: space-between; }
  .mobile-menu-label { display: inline; font-size: 16px; color: var(--brown); }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; padding: 9px; background: transparent; border: 0; border-radius: 50%; color: var(--brown); }
  .menu-toggle > span { width: 26px; height: 1px; background: currentColor; transition: transform .18s ease; }
  .menu-toggle[aria-expanded="true"] > span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 10px 25px 22px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 16px #71503712; }
  .site-nav.is-open { display: block; }
  .nav-list { align-items: stretch; flex-direction: column; gap: 0; }
  .nav-list a { padding: 13px 0; font-size: 18px; }
  .site-header--inner .header-inner { flex-direction: row; padding-block: 13px; }
  .site-header--inner .mobile-menu-label { display: none; }
  .site-header--inner .nav-list a { padding-block: 13px; }
  .brand--header .brand-name { font-size: 26px; }
  .brand--header .brand-tag { font-size: 13px; margin-top: 4px; }
  .brand--header .brand-tag::before, .brand--header .brand-tag::after { width: 20px; }
  .hero { padding-top: 10px; }
  .hero-photo { height: 345px; object-position: 51% center; }
  .hero-image-wrap::after { background: radial-gradient(ellipse 75% 31% at 50% 50%, #f6eee3f7 0%, #f6eee3e8 40%, #f6eee398 72%, #f6eee300 100%); }
  .hero-wordmark { padding-inline: 14px; }
  .hero-wordmark h1 { font-size: clamp(41px, 10vw, 65px); letter-spacing: -.04em; }
  .wordmark-line { gap: 8px; }
  .wordmark-branch { width: 38px; }
  .wordmark-tag { font-size: clamp(21px, 4.6vw, 28px); gap: 12px; margin-top: 10px; }
  .wordmark-tag::before, .wordmark-tag::after { width: 28px; }
  .hero-caption { font-size: 14px; gap: 16px; padding-top: 20px; }
  .hero-caption::before, .hero-caption::after { width: 28px; }
  .hero-intro { padding-top: 20px; padding-bottom: 58px; }
  .hero-lead { font-size: 17px; line-height: 1.7; max-width: 420px; }
  .hero-intro .button { margin-top: 24px; }
  .button { font-size: 16px; padding: 10px 25px 11px; min-height: 46px; }
  .ornament-divider > img { width: 88px; height: 24px; }
  .section-title { font-size: 35px; margin-top: 29px; margin-bottom: 43px; }
  .story-section { padding-bottom: 60px; }
  .story-row { grid-template-columns: 1fr; gap: 31px; }
  .story-row--reverse .story-copy, .story-row--reverse .story-media { grid-column: auto; grid-row: auto; }
  .story-copy h3 { font-size: 30px; margin-bottom: 17px; }
  .story-copy p { font-size: 17px; max-width: 100%; }
  .story-copy .text-link { margin-top: 19px; }
  .story-media { width: calc(100% - 6px); margin-inline: auto; padding: 6px; }
  .story-media > img { height: clamp(240px, 70vw, 390px); }
  .story-media--portrait > img { object-position: center 27%; }
  .frame-corner { width: 36px; height: 36px; }
  .frame-corner--tl { top: -7px; left: -7px; }
  .frame-corner--tr { top: -7px; right: -7px; }
  .frame-corner--bl { bottom: -7px; left: -7px; }
  .frame-corner--br { bottom: -7px; right: -7px; }
  .story-divider { margin-block: 43px; }
  .factory-sketch { width: min(100%, 400px); margin-top: 25px; }
  .news-section { padding-bottom: 57px; }
  .news-section > .container > .ornament-divider:first-child { margin-bottom: 42px; }
  .news-section > .container > .ornament-divider:last-child { margin-top: 43px; }
  .news-section h2 { font-size: 31px; line-height: 1.22; margin-bottom: 32px; }
  .news-grid { grid-template-columns: 1fr; gap: 40px; }
  .news-grid--compact { gap: 28px; }
  .news-grid--compact .card-link { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
  .news-grid--compact .card-media { height: 110px; }
  .news-grid--compact h3 { font-size: 20px; }
  .news-grid--compact .card-copy::after { margin-top: 14px; }
  .section-action { margin-top: 34px; }
  .book-section { padding-block: 67px 72px; }
  .book-grid { grid-template-columns: 1fr; gap: 38px; }
  .book-cover { width: 218px; }
  .book-copy { border-left: 0; padding-left: 0; text-align: left; }
  .book-copy h2 { font-size: 33px; line-height: 1.23; }
  .book-facts { font-size: 16px; margin-top: 19px; }
  .book-description { font-size: 18px; margin-top: 21px; }
  .book-copy .button { margin-top: 25px; }
  .book-sprig { display: block; position: absolute; top: 30px; right: 0; width: 62px; opacity: .58; }
  .about-section { padding-block: 64px 55px; }
  .about-grid { grid-template-columns: 1fr; gap: 29px; }
  .about-grid h2 { font-size: 33px; }
  .about-copy { border-left: 0; padding-left: 0; }
  .about-copy p { font-size: 17px; }
  .contact-link { margin-top: 24px; font-size: 19px; }
  .about-link { font-size: 16px; }
  .site-footer .ornament-divider { margin-bottom: 33px; }
  .footer-main { flex-direction: column; align-items: center; gap: 30px; }
  .footer-nav { justify-content: center; max-width: 100%; font-size: 15px; gap: 16px 28px; }
  .footer-main .brand-name { font-size: 34px; }
  .footer-main .brand-tag { font-size: 16px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 30px; font-size: 12px; }
  .page-header { padding: 39px 0 45px; }
  .page-header h1 { font-size: 38px; overflow-wrap: anywhere; }
  .page-description { font-size: 18px; margin-top: 20px; }
  .breadcrumbs { font-size: 14px; }
  .posts-section { padding: 55px 0 65px; }
  .posts-section .news-grid { row-gap: 45px; }
  .card-media { height: 250px; }
  .news-card h3 { font-size: 29px; }
  .card-excerpt { font-size: 17px; }
  .entry-wrap { padding: 46px 0 65px; }
  .entry-prose { font-size: 18px; line-height: 1.8; }
  .entry-prose h2 { font-size: 31px; margin-top: 40px; }
  .entry-prose h3 { font-size: 26px; }
  .article-cover { padding: 14px; }
  .article-navigation { flex-direction: column; gap: 20px; font-size: 16px; }
  .article-navigation a { max-width: 100%; }
  .dialog-bar { padding: 10px 16px; }
  .dialog-content .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .container { width: calc(100% - 32px); }
  .wordmark-branch { width: 29px; }
  .hero-wordmark h1 { font-size: 38px; }
  .wordmark-tag { font-size: 20px; }
  .wordmark-tag::before, .wordmark-tag::after { width: 18px; }
  .news-grid--compact .card-link { grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
  .news-grid--compact h3 { font-size: 18px; }
  .book-sprig { width: 48px; }
  .contact-link { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Native WordPress blocks: same design, with editable text, media and sections. */
.tsy-block-front > .alignfull { max-width: none; margin-inline: 0; }
.tsy-block-front > .wp-block-group { margin-block-start: 0; }
.tsy-block-front .wp-block-cover.hero-image-wrap { height: clamp(380px, 37vw, 570px); min-height: 0; padding: 0; }
.tsy-block-front .hero-image-wrap > .wp-block-cover__image-background { filter: grayscale(1) sepia(.32) saturate(.65) brightness(1.08) contrast(.88); object-position: center 49%; }
.tsy-block-front .hero-image-wrap > .wp-block-cover__inner-container { position: relative; z-index: 3; height: 100%; width: 100%; color: var(--ink); }
.tsy-block-front .hero-brand-title { display: flex; align-items: center; justify-content: center; gap: 22px; }
.tsy-block-front .hero-brand-title::before, .tsy-block-front .hero-brand-title::after { content: ''; display: block; width: clamp(55px, 7.5vw, 108px); height: 64px; flex: 0 0 auto; background: url('assets/decor/branch.svg') center/contain no-repeat; }
.tsy-block-front .hero-brand-title::after { transform: scaleX(-1); }
.tsy-block-front .hero-caption { margin-top: 0; }
.tsy-block-front .hero-intro > .wp-block-buttons { margin-top: 28px; }
.tsy-block-front .wp-block-buttons { gap: 16px; }
.tsy-block-front .tsy-button > .wp-block-button__link { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; border: 1px solid var(--button); border-radius: 999px; padding: 11px 34px 12px; color: #fff; background: var(--button); font: 700 17px/1.45 var(--serif); text-decoration: none; transition: background-color .18s ease; }
.tsy-block-front .tsy-button > .wp-block-button__link:hover { background: var(--button-hover); border-color: var(--button-hover); }
hr.wp-block-separator.ornament-divider { display: block; width: 100%; height: 28px; max-width: none; padding: 0; border: 0; opacity: 1; color: transparent; background: url('assets/decor/flourish.svg') center/104px 28px no-repeat, linear-gradient(var(--paper), var(--paper)) center/120px 100% no-repeat, linear-gradient(var(--line), var(--line)) center/100% 1px no-repeat; }
.tsy-block-front .story-row.wp-block-columns { display: grid; gap: 100px; margin-bottom: 0; }
.tsy-block-front .story-row > .wp-block-column { min-width: 0; margin: 0; }
.tsy-block-front .story-row--reverse > .story-picture { grid-column: 1; grid-row: 1; }
.tsy-block-front .story-row .story-media { margin: 0; }
.tsy-block-front .story-row .story-copy > .text-link { display: block; }
.tsy-block-front .story-copy > .text-link > a { color: var(--brown); text-decoration: underline; text-underline-offset: 5px; }
.tsy-block-front .factory-sketch.wp-block-image { margin-left: 0; margin-right: 0; margin-bottom: 0; }
.tsy-block-front .factory-sketch.wp-block-image > img { width: 100%; height: auto; }
.tsy-block-front .antique-frame::before { content: ''; position: absolute; inset: -9px; pointer-events: none; z-index: 2; background: url('assets/decor/corner.svg') left top/43px 43px no-repeat, url('assets/decor/corner-tr.svg') right top/43px 43px no-repeat, url('assets/decor/corner-bl.svg') left bottom/43px 43px no-repeat, url('assets/decor/corner-br.svg') right bottom/43px 43px no-repeat; }
.tsy-latest-posts > .wp-block-post-template { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; list-style: none; padding: 0; margin: 0; }
.tsy-latest-posts .query-card { display: grid; grid-template-columns: 46% minmax(0, 1fr); gap: 20px; align-items: start; }
.tsy-latest-posts .card-media { width: 100%; margin: 0; height: 150px; }
.tsy-latest-posts .card-media > a { display: block; height: 100%; }
.tsy-latest-posts .card-media img { width: 100%; height: 100%; object-fit: cover; }
.tsy-latest-posts .wp-block-post-title { margin: 0; font-size: 21px; line-height: 1.3; }
.tsy-latest-posts .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.tsy-latest-posts .wp-block-post-title a:hover { color: var(--brown); text-decoration: underline; text-underline-offset: 4px; }
.tsy-block-front .book-stage.wp-block-image { margin: 0; }
.tsy-block-front .book-stage > img { width: 244px; height: auto; margin-inline: auto; box-shadow: 5px 8px 16px #49331c2d, 1px 2px 4px #49331c25; }
.tsy-block-front .book-copy > .wp-block-buttons { margin-top: 28px; }
.tsy-block-front .book-grid::after { content: ''; display: block; width: 145px; height: 185px; background: url('assets/decor/oak-sprig.svg') center/contain no-repeat; opacity: .82; }
.tsy-block-front .about-copy .contact-link { display: flex; align-items: center; gap: 15px; }
.tsy-block-front .about-copy .contact-link::before { content: ''; flex: 0 0 auto; width: 26px; height: 21px; background: url('assets/decor/envelope.svg') center/contain no-repeat; }
.tsy-block-front .about-copy .contact-link a { font-weight: 700; }
@media (min-width: 1600px) { .tsy-block-front .story-row.wp-block-columns { gap: 120px; } }
@media (max-width: 1150px) {
  .tsy-block-front .story-row.wp-block-columns { gap: 65px; }
  .tsy-latest-posts > .wp-block-post-template { gap: 27px; }
  .tsy-latest-posts .query-card { gap: 15px; }
  .tsy-latest-posts .card-media { height: 130px; }
  .tsy-latest-posts .wp-block-post-title { font-size: 18px; }
  .tsy-block-front .book-grid::after { width: 90px; height: 125px; }
}
@media (max-width: 850px) {
  .tsy-block-front .story-row.wp-block-columns { gap: 42px; }
  .tsy-block-front .hero-brand-title { gap: 15px; }
  .tsy-block-front .hero-brand-title::before, .tsy-block-front .hero-brand-title::after { width: 64px; }
  .tsy-latest-posts > .wp-block-post-template { grid-template-columns: 1fr; gap: 30px; }
  .tsy-latest-posts .query-card { grid-template-columns: 175px 1fr; gap: 25px; }
  .tsy-latest-posts .card-copy { align-self: center; }
  .tsy-latest-posts .wp-block-post-title { font-size: 24px; }
  .tsy-block-front .book-grid::after { display: none; }
}
@media (max-width: 640px) {
  .tsy-block-front .wp-block-cover.hero-image-wrap { height: 345px; }
  .tsy-block-front .hero-brand-title { gap: 8px; }
  .tsy-block-front .hero-brand-title::before, .tsy-block-front .hero-brand-title::after { width: 38px; height: 35px; }
  .tsy-block-front .hero-intro > .wp-block-buttons { margin-top: 24px; }
  .tsy-block-front .tsy-button > .wp-block-button__link { font-size: 16px; padding: 10px 25px 11px; min-height: 46px; }
  hr.wp-block-separator.ornament-divider { height: 24px; background-size: 88px 24px, 100px 100%, 100% 1px; }
  .tsy-block-front .story-row.wp-block-columns { grid-template-columns: 1fr; gap: 31px; }
  .tsy-block-front .story-row--reverse > .story-picture { grid-column: auto; grid-row: auto; }
  .tsy-block-front .story-row .story-media { margin-inline: auto; }
  .tsy-block-front .antique-frame::before { inset: -7px; background-size: 36px 36px; }
  .tsy-latest-posts > .wp-block-post-template { gap: 28px; }
  .tsy-latest-posts .query-card { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
  .tsy-latest-posts .card-media { height: 110px; }
  .tsy-latest-posts .wp-block-post-title { font-size: 20px; }
  .tsy-block-front .book-stage > img { width: 218px; }
  .tsy-block-front .book-copy > .wp-block-buttons { margin-top: 25px; }
  .tsy-block-front .book-grid::after { display: block; position: absolute; top: 30px; right: 0; width: 62px; height: 85px; opacity: .58; }
}
@media (max-width: 360px) {
  .tsy-block-front .hero-brand-title::before, .tsy-block-front .hero-brand-title::after { width: 29px; }
  .tsy-latest-posts .query-card { grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
  .tsy-latest-posts .wp-block-post-title { font-size: 18px; }
  .tsy-block-front .book-grid::after { width: 48px; }
}
.tsy-block-front .story-row.wp-block-columns:not(.are-vertically-aligned-top):not(.are-vertically-aligned-bottom) { align-items: center !important; }

/* Articles in History use the same cards and reading layout as Publications. */
.history-jump-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px 36px; margin-top: 28px; font-size: 17px; }
.history-jump-links a { text-decoration: underline; text-underline-offset: 5px; }
.history-articles { scroll-margin-top: 35px; }
.history-articles .section-title { margin-bottom: 45px; }
.history-overview { padding: 0 0 100px; }
.history-overview .section-title { margin: 45px 0; }
@media (max-width: 600px) {
  .history-jump-links { gap: 12px 24px; font-size: 16px; }
  .history-overview { padding-bottom: 65px; }
  .history-overview .section-title { margin: 35px 0; }
}
