/*
Theme Name: Gnogro Focus
Theme URI: https://gnogro.com.br/
Author: Gnogro
Description: Um tema editorial para fotografia, com galerias imersivas e leitura confortável.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gnogro-focus
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Native editorial design. System type keeps the photographs in focus. */
:root {
  color-scheme: light;
  --color-bg: #f8f8f6;
  --color-surface: #fff;
  --color-soft: #efefec;
  --color-text: #20201f;
  --color-muted: #686864;
  --color-line: #d9d9d4;
  --color-line-strong: #a9a9a2;
  --color-inverse: #fafaf8;
  --color-focus: #45453d;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --shell: 1440px;
  --gutter: clamp(22px, 4.25vw, 80px);
  --space-section: clamp(54px, 7vw, 104px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #171716;
    --color-surface: #20201f;
    --color-soft: #282826;
    --color-text: #edede8;
    --color-muted: #aaaaa3;
    --color-line: #393936;
    --color-line-strong: #686861;
    --color-inverse: #171716;
    --color-focus: #deded3;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #171716;
  --color-surface: #20201f;
  --color-soft: #282826;
  --color-text: #edede8;
  --color-muted: #aaaaa3;
  --color-line: #393936;
  --color-line-strong: #686861;
  --color-inverse: #171716;
  --color-focus: #deded3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.lightbox-open, body.has-lightbox { overflow: hidden; }
::selection { background: var(--color-text); color: var(--color-bg); }
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button, input, textarea, select { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
button, input, textarea, select { border-radius: 0; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 5px;
}
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.15; font-weight: 650; }
p { margin: 0 0 1.3em; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 14px 22px;
  margin: 0;
  clip: auto;
  background: var(--color-text);
  color: var(--color-inverse);
}
.site-shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.site-main { min-height: 55vh; padding-bottom: var(--space-section); }

/* Header and navigation */
.site-header { position: relative; z-index: 30; border-bottom: 1px solid var(--color-line); }
.site-header > .site-shell, .site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 80px;
}
.site-branding { flex: 0 0 auto; padding-block: 12px; }
.site-title { display: block; font-size: 32px; font-weight: 750; letter-spacing: -.065em; line-height: 1; text-decoration: none; }
.site-title a { text-decoration: none; }
.site-description { display: block; margin: 5px 0 0; color: var(--color-muted); font-size: 10px; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }
.custom-logo-link { display: block; }
.custom-logo { max-width: 160px; max-height: 48px; width: auto; }
.primary-navigation { margin-left: auto; }
.primary-navigation ul { list-style: none; padding: 0; margin: 0; }
.primary-navigation .menu { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.primary-navigation .menu > li { position: relative; }
.primary-navigation a { display: flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 550; text-decoration: none; }
.primary-navigation .current-menu-item > a, .primary-navigation .current-menu-ancestor > a, .primary-navigation a:hover { text-decoration: underline; text-underline-offset: 6px; }
.primary-navigation .menu-item-has-children > a::after { content: "+"; margin-left: 7px; color: var(--color-muted); font-size: 14px; font-weight: 400; }
.primary-navigation .sub-menu, .primary-navigation .children {
  position: absolute;
  z-index: 40;
  left: -18px;
  top: 100%;
  min-width: 210px;
  padding: 10px 0;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  box-shadow: 0 10px 24px rgb(0 0 0 / .06);
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.primary-navigation .sub-menu li, .primary-navigation .children li { position: relative; }
.primary-navigation .sub-menu a, .primary-navigation .children a { padding: 9px 18px; line-height: 1.4; }
.primary-navigation .sub-menu .sub-menu, .primary-navigation .children .children { top: -11px; left: calc(100% - 1px); }
.primary-navigation li:hover > .sub-menu, .primary-navigation li:focus-within > .sub-menu,
.primary-navigation li:hover > .children, .primary-navigation li:focus-within > .children {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--color-soft); }
.theme-toggle svg, .menu-toggle svg { width: 19px; height: 19px; }
.menu-toggle { display: none; }
.menu-toggle__lines, .menu-toggle__lines::before, .menu-toggle__lines::after { display: block; width: 20px; height: 1px; background: currentColor; }
.menu-toggle__lines { position: relative; }
.menu-toggle__lines::before, .menu-toggle__lines::after { position: absolute; content: ""; left: 0; transition: transform .2s var(--ease); }
.menu-toggle__lines::before { top: -6px; }
.menu-toggle__lines::after { top: 6px; }
.nav-open .menu-toggle__lines { background: transparent; }
.nav-open .menu-toggle__lines::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-toggle__lines::after { top: 0; transform: rotate(-45deg); }

/* Home, feature and photo stories */
.home-intro { padding-block: clamp(42px, 5vw, 76px) clamp(32px, 4vw, 56px); }
.intro-label { display: block; margin-bottom: 15px; color: var(--color-muted); font-size: 11px; font-weight: 550; letter-spacing: .13em; text-transform: uppercase; }
.home-intro h1 { max-width: 1050px; font-size: clamp(40px, 5.5vw, 78px); letter-spacing: -.055em; line-height: 1.06; font-weight: 550; text-wrap: balance; }
.intro-description { max-width: 540px; margin-top: 20px; color: var(--color-muted); font-size: 16px; line-height: 1.6; }
.featured-story { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: stretch; gap: clamp(28px, 4vw, 64px); }
.featured-story__image { display: block; overflow: hidden; background: var(--color-soft); }
.featured-story__image img { width: 100%; height: 100%; min-height: 360px; aspect-ratio: 3/2; object-fit: cover; transition: transform .65s var(--ease); }
.featured-story__image:hover img { transform: scale(1.025); }
.featured-story__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 16px; }
.entry-kicker { display: inline-block; margin-bottom: 17px; color: var(--color-muted); font-size: 11px; font-weight: 550; letter-spacing: .11em; text-decoration: none; text-transform: uppercase; }
.entry-kicker:hover { text-decoration: underline; }
.featured-story__title { margin-bottom: 20px; font-size: clamp(28px, 3.3vw, 48px); font-weight: 550; line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.featured-story__title a, .story-card__title a { text-decoration: none; }
.featured-story__title a:hover, .story-card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.entry-meta, .article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--color-muted); font-size: 12px; line-height: 1.6; }
.entry-meta a, .article-meta a { text-decoration: none; }
.entry-meta a:hover, .article-meta a:hover { text-decoration: underline; }
.entry-summary { margin-top: 21px; color: var(--color-muted); font-size: 15px; line-height: 1.7; }
.text-link { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; margin-top: 19px; font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--color-text); }
.text-link:hover { gap: 22px; }
.text-link svg { width: 18px; height: 18px; }
.text-link { transition: gap .2s var(--ease); }
.category-nav { display: flex; align-items: center; gap: 6px 24px; flex-wrap: wrap; margin-top: var(--space-section); padding-block: 12px; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.category-nav__link { display: inline-flex; align-items: center; min-height: 44px; position: relative; color: var(--color-muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.category-nav__link:hover, .category-nav__link.is-active { color: var(--color-text); }
.category-nav__link.is-active { font-weight: 650; }
.category-nav__link.is-active::after { position: absolute; content: ""; bottom: -10px; left: 0; right: 0; height: 2px; background: var(--color-text); }
.stories-heading { padding-block: 34px 26px; font-size: 22px; font-weight: 550; letter-spacing: -.025em; }
.stories-heading h2 { font-size: 22px; font-weight: 550; letter-spacing: -.025em; }
.stories-heading p { margin-top: 7px; color: var(--color-muted); font-size: 14px; }
.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; }
.story-card { min-width: 0; }
.story-card__media { display: block; overflow: hidden; background: var(--color-soft); }
.story-card__media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .65s var(--ease); }
.story-card__media:hover img { transform: scale(1.035); }
.story-card__body { padding-top: 19px; }
.story-card__category { display: inline-block; margin-bottom: 10px; color: var(--color-muted); font-size: 11px; font-weight: 550; letter-spacing: .06em; text-decoration: none; }
.story-card__category:hover { text-decoration: underline; }
.story-card__title { font-size: clamp(21px, 2vw, 28px); font-weight: 550; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.story-card__summary { margin-top: 12px; color: var(--color-muted); font-size: 14px; line-height: 1.7; }
.story-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 14px; margin-top: 15px; color: var(--color-muted); font-size: 11px; }
.story-card__meta a { text-decoration: none; }
.story-card__meta a:hover { text-decoration: underline; }
.image-placeholder, .story-card__no-image { display: flex; align-items: center; justify-content: center; min-height: 200px; aspect-ratio: 3/2; padding: 24px; background: var(--color-soft); color: var(--color-muted); font-size: 14px; text-align: center; }

/* Archives and search */
.archive-header { padding-block: clamp(44px, 6vw, 84px) 42px; }
.archive-header h1, .page-title { font-size: clamp(36px, 5vw, 68px); font-weight: 550; letter-spacing: -.05em; line-height: 1.1; overflow-wrap: anywhere; }
.archive-description { max-width: 640px; margin-top: 20px; color: var(--color-muted); }
.archive-description p { margin-bottom: .7em; }
.archive-header + .category-nav { margin-top: 0; }
.search-form { display: flex; align-items: stretch; gap: 0; max-width: 580px; margin-block: 24px; }
.search-form label { flex: 1; min-width: 0; }
.search-field { flex: 1; min-width: 0; width: 100%; height: 48px; padding: 10px 14px; border: 1px solid var(--color-line-strong); background: var(--color-surface); color: var(--color-text); appearance: none; }
.search-submit, .button, input[type="submit"], .wp-block-button__link { min-height: 48px; padding: 12px 22px; border: 1px solid var(--color-text); background: var(--color-text); color: var(--color-inverse); font-size: 13px; font-weight: 600; line-height: 1.6; text-decoration: none; white-space: nowrap; }
.search-submit:hover, .button:hover, input[type="submit"]:hover, .wp-block-button__link:hover { opacity: .82; }
.no-results, .empty-state { max-width: 680px; padding-block: 30px 60px; }
.no-results h2, .empty-state h2 { margin-bottom: 20px; font-size: 28px; font-weight: 550; letter-spacing: -.03em; }
.no-results p, .empty-state p { color: var(--color-muted); }
.pagination { margin-top: 60px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; padding: 7px 13px; border: 1px solid var(--color-line); font-size: 13px; text-decoration: none; }
.page-numbers:hover { border-color: var(--color-text); }
.page-numbers.current { border-color: var(--color-text); background: var(--color-text); color: var(--color-inverse); }
.page-numbers.dots { border-color: transparent; }

/* Articles and the original WordPress content */
.article-header { max-width: 1080px; padding-block: clamp(44px, 6vw, 88px) 36px; }
.article-header .entry-kicker { margin-bottom: 19px; }
.article-title { max-width: 1000px; font-size: clamp(36px, 5vw, 70px); font-weight: 550; letter-spacing: -.05em; line-height: 1.08; overflow-wrap: anywhere; text-wrap: balance; }
.article-meta { margin-top: 24px; }
.article-intro { max-width: 760px; margin-top: 28px; color: var(--color-muted); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.65; }
.article-cover { margin: 0 0 44px; background: var(--color-soft); }
.article-cover img { width: 100%; max-height: 80vh; object-fit: cover; }
.entry-content { max-width: 760px; margin-inline: auto; font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.entry-content > * { margin-top: 0; margin-bottom: 1.5em; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2 { margin-top: 2em; margin-bottom: .8em; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.entry-content h3 { margin-top: 1.7em; margin-bottom: .8em; font-size: 25px; letter-spacing: -.025em; }
.entry-content h4 { font-size: 21px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote, .wp-block-quote { margin-inline: 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--color-text); font-size: 21px; line-height: 1.6; }
.entry-content blockquote cite { color: var(--color-muted); font-size: 13px; font-style: normal; }
.entry-content hr { height: 1px; margin-block: 40px; border: 0; background: var(--color-line); }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content td, .entry-content th { padding: 12px; border-bottom: 1px solid var(--color-line); text-align: left; }
.entry-content pre { overflow-x: auto; padding: 20px; background: var(--color-soft); font-size: 14px; }
.entry-content a:not(.gallery-item):not(.wp-block-button__link) { text-decoration-color: var(--color-line-strong); }
.entry-content a:not(.gallery-item):hover { text-decoration-color: var(--color-text); }
.entry-content .wp-block-image img { height: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption, .entry-content figcaption { margin-top: 9px; color: var(--color-muted); font-size: 12px; line-height: 1.6; }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 24px 20px 0; }
.alignright { float: right; margin: 0 0 20px 24px; }
.entry-content::after { content: ""; display: table; clear: both; }
.wp-block-embed__wrapper { position: relative; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper { aspect-ratio: 16/9; }
.wp-block-embed.is-type-video iframe { width: 100%; height: 100%; }
.entry-content > .alignwide { width: min(calc(100vw - var(--gutter) * 2), 1120px); max-width: none; margin-left: 50%; transform: translateX(-50%); }

/* Galleries retain a consistent contact sheet and open the complete image. */
.gallery-section { clear: both; margin-top: clamp(40px, 6vw, 80px); }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 22px; padding-top: 26px; border-top: 1px solid var(--color-line); }
.gallery-heading h2 { margin: 0; font-size: 24px; font-weight: 550; letter-spacing: -.03em; }
.gallery-count { color: var(--color-muted); font-size: 12px; }
.gallery-heading h2 .gallery-count { display: inline-block; margin-left: 12px; font-weight: 400; letter-spacing: 0; vertical-align: middle; }
.gallery-open { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--color-line-strong); background: transparent; font-size: 12px; line-height: 1.4; }
.gallery-open:hover { background: var(--color-text); border-color: var(--color-text); color: var(--color-inverse); }
.gallery-open svg { width: 17px; height: 17px; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; clear: both; }
.entry-content > .photo-gallery, .entry-content > .gallery-section { width: min(var(--shell), calc(100vw - var(--gutter) * 2)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.photo-gallery .gallery-item { position: relative; display: block; min-width: 0; margin: 0; overflow: hidden; background: var(--color-soft); cursor: zoom-in; }
.photo-gallery .gallery-item > a { display: block; }
.photo-gallery .gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; transition: transform .5s var(--ease), opacity .2s var(--ease); }
.photo-gallery .gallery-item:hover img { transform: scale(1.035); }
.photo-gallery .gallery-item:focus-visible { outline-offset: 3px; }
.photo-zoomable { cursor: zoom-in; }
.photo-gallery figcaption { padding: 8px 0; }
.gallery-note { margin-top: 13px; color: var(--color-muted); font-size: 12px; }
.post-navigation { margin-top: 64px; padding-top: 30px; border-top: 1px solid var(--color-line); }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { display: inline-flex; flex-direction: column; gap: 6px; font-size: 18px; font-weight: 550; line-height: 1.35; text-decoration: none; letter-spacing: -.02em; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation .nav-subtitle { color: var(--color-muted); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.post-navigation a > span { color: var(--color-muted); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 35px; color: var(--color-muted); font-size: 12px; }
.post-tags a { text-decoration: none; }
.post-tags a:hover { text-decoration: underline; }

/* Immersive gallery: image, controls and caption each have their own space. */
.lightbox {
  --color-focus: #fff;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: #111110;
  color: #f5f5f1;
  overflow: hidden;
  color-scheme: dark;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgb(10 10 9 / .97); }
.lightbox__toolbar { position: relative; z-index: 3; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 66px; padding: 10px 22px; border-bottom: 1px solid #2e2e2b; background: #111110; }
.lightbox__toolbar button, .lightbox__original { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 10px 12px; border: 1px solid transparent; background: transparent; color: #f5f5f1; font-size: 12px; line-height: 1; text-decoration: none; white-space: nowrap; }
.lightbox__toolbar button:hover, .lightbox__original:hover { border-color: #555550; background: #232321; }
.lightbox button svg, .lightbox__original svg { width: 20px; height: 20px; flex: 0 0 auto; }
.lightbox button > span[aria-hidden="true"] { font-size: 24px; line-height: 1; }
.lightbox__close { margin-left: 10px; }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 16px 76px; overflow: hidden; }
.lightbox__image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: opacity .2s var(--ease); }
.lightbox__prev, .lightbox__next { position: absolute; z-index: 2; top: 50%; display: flex; justify-content: center; align-items: center; min-width: 48px; min-height: 56px; padding: 10px; border: 1px solid #45453f; background: rgb(17 17 16 / .8); color: #f5f5f1; transform: translateY(-50%); }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }
.lightbox__prev:hover, .lightbox__next:hover { background: #363630; border-color: #88887e; }
.lightbox__footer { position: relative; z-index: 3; display: flex; align-items: flex-start; gap: 14px 24px; padding: 15px 26px 20px; border-top: 1px solid #2e2e2b; background: #111110; }
.lightbox__counter { flex: 0 0 auto; min-width: 64px; padding-top: 2px; color: #bebeb6; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.lightbox__caption { max-width: 1000px; max-height: 11vh; margin: 0; overflow-y: auto; color: #e8e8e1; font-size: 13px; line-height: 1.7; }
.lightbox__status { position: absolute; z-index: 2; left: 50%; top: 50%; max-width: calc(100% - 150px); padding: 16px 22px; background: #20201e; color: #f5f5f1; font-size: 14px; line-height: 1.6; text-align: center; transform: translate(-50%, -50%); }
.lightbox__status:empty { display: none; }
.lightbox.is-loading .lightbox__image { opacity: .15; }
.lightbox.has-error .lightbox__image { opacity: 0; }
.lightbox.is-zoomed .lightbox__stage { overflow: auto; justify-content: flex-start; align-items: flex-start; padding: 20px 76px; }
.lightbox.is-zoomed .lightbox__image { width: auto; height: auto; max-width: none; max-height: none; margin: auto; cursor: zoom-out; touch-action: pan-x pan-y; }
.lightbox.is-zoomed .lightbox__prev, .lightbox.is-zoomed .lightbox__next { position: fixed; }
.lightbox.is-zoomed .lightbox__zoom { background: #363630; border-color: #66665e; }

/* Comments, forms and footer */
.comments-area { max-width: 760px; margin: 64px auto 0; padding-top: 32px; border-top: 1px solid var(--color-line); }
.comments-title, .comment-reply-title { margin-bottom: 26px; font-size: 25px; font-weight: 550; letter-spacing: -.03em; }
.comment-list, .comment-list .children { padding: 0; list-style: none; }
.comment-list .children { padding-left: 26px; }
.comment-body { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--color-line); }
.comment-author { font-size: 14px; }
.comment-author .avatar { float: left; width: 38px; margin: 0 12px 8px 0; }
.comment-metadata { margin-bottom: 14px; color: var(--color-muted); font-size: 11px; }
.comment-metadata a { text-decoration: none; }
.comment-content { clear: both; font-size: 15px; }
.reply { font-size: 12px; }
.comment-respond { margin-top: 38px; }
.comment-form p { margin-bottom: 18px; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 13px; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea, .post-password-form input[type="password"] { width: 100%; padding: 12px 14px; border: 1px solid var(--color-line-strong); background: var(--color-surface); color: var(--color-text); font-size: 15px; line-height: 1.6; }
.comment-form textarea { min-height: 160px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--color-muted); opacity: 1; }
.comment-notes, .logged-in-as, .comment-form-cookies-consent { color: var(--color-muted); font-size: 12px; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
.comment-form-cookies-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-text); }
.comment-form-cookies-consent label { margin: 0; font-size: 12px; }
.required { font-size: 12px; }
.site-footer { border-top: 1px solid var(--color-line); }
.site-footer.site-shell { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-block: 38px; }
.site-footer > .site-shell, .site-footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-block: 38px; }
.footer-brand { font-size: 27px; font-weight: 750; line-height: 1; letter-spacing: -.065em; text-decoration: none; }
.footer-brand > a { text-decoration: none; }
.footer-brand > p { margin-top: 12px; color: var(--color-muted); font-size: 12px; font-weight: 400; line-height: 1.7; letter-spacing: 0; }
.footer-description { margin-top: 12px; color: var(--color-muted); font-size: 12px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-muted); font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--color-text); text-decoration: underline; }
.footer-links > span { color: var(--color-muted); font-size: 11px; }
.footer-copyright, .site-info { color: var(--color-muted); font-size: 11px; }
.site-footer .footer-copyright { margin-top: 13px; }

/* Tablet and mobile keep the visual order and full-size touch targets. */
@media (min-width: 768px) and (max-width: 1100px) {
  .site-header > .site-shell, .site-header__inner { gap: 20px; }
  .primary-navigation .menu { gap: 18px; }
  .primary-navigation a { font-size: 12px; }
  .site-description { max-width: 180px; }
  .featured-story { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; }
  .featured-story__image img { min-height: 340px; }
  .featured-story__title { font-size: 32px; }
  .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  :root { --gutter: 22px; }
  .site-header > .site-shell, .site-header__inner { min-height: 72px; gap: 10px; flex-wrap: wrap; }
  .site-branding { margin-right: auto; }
  .site-title { font-size: 30px; }
  .site-description { margin-top: 5px; font-size: 9px; }
  .header-actions { gap: 2px; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .primary-navigation { order: 10; width: 100%; margin: 0; padding-bottom: 20px; }
  .js .primary-navigation { display: none; }
  .js .nav-open .primary-navigation { display: block; }
  .primary-navigation .menu { display: block; }
  .primary-navigation .menu > li { border-top: 1px solid var(--color-line); }
  .primary-navigation .menu > li > a { padding: 13px 0; font-size: 15px; }
  .primary-navigation .sub-menu, .primary-navigation .sub-menu .sub-menu, .primary-navigation .children, .primary-navigation .children .children { position: static; min-width: 0; padding: 0 0 8px 18px; border: 0; box-shadow: none; visibility: visible; opacity: 1; background: transparent; transform: none; }
  .primary-navigation .sub-menu a, .primary-navigation .children a { min-height: 44px; padding: 8px 0; font-size: 13px; }
  .home-intro { padding-block: 34px 30px; }
  .intro-label { margin-bottom: 13px; font-size: 10px; }
  .home-intro h1 { max-width: 650px; font-size: clamp(36px, 8.8vw, 55px); }
  .intro-description { max-width: 420px; margin-top: 17px; font-size: 14px; }
  .featured-story { grid-template-columns: 1fr; gap: 22px; }
  .featured-story__image img { height: auto; min-height: 0; aspect-ratio: 3/2; }
  .featured-story__body { padding: 0; }
  .entry-kicker { margin-bottom: 12px; }
  .featured-story__title { max-width: 600px; margin-bottom: 14px; font-size: clamp(28px, 6.5vw, 40px); }
  .entry-summary { max-width: 540px; margin-top: 14px; font-size: 14px; }
  .text-link { margin-top: 12px; }
  .category-nav { flex-wrap: nowrap; gap: 24px; margin-top: 42px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .category-nav__link { flex: 0 0 auto; font-size: 12px; }
  .stories-heading { padding-block: 28px 22px; }
  .stories-grid { grid-template-columns: 1fr; gap: 36px; }
  .story-card__body { padding-top: 15px; }
  .story-card__category { margin-bottom: 8px; }
  .story-card__title { font-size: 25px; }
  .story-card__summary { margin-top: 10px; }
  .story-card__meta { margin-top: 11px; }
  .archive-header { padding-block: 36px 30px; }
  .archive-header h1, .page-title { font-size: 40px; }
  .archive-description { margin-top: 16px; font-size: 15px; }
  .article-header { padding-block: 36px 28px; }
  .article-title { font-size: clamp(34px, 8vw, 52px); }
  .article-meta { margin-top: 20px; font-size: 11px; }
  .article-intro { margin-top: 22px; font-size: 17px; }
  .article-cover { margin-bottom: 30px; }
  .article-cover img { max-height: 65vh; }
  .entry-content { font-size: 16px; line-height: 1.8; }
  .entry-content blockquote { padding-left: 19px; font-size: 19px; }
  .alignleft, .alignright { float: none; margin: 0 0 20px; }
  .photo-gallery { grid-template-columns: 1fr; gap: 10px; }
  .gallery-heading { align-items: center; margin-bottom: 16px; padding-top: 20px; }
  .gallery-heading h2 { font-size: 22px; }
  .gallery-open { font-size: 11px; }
  .post-navigation { margin-top: 44px; }
  .post-navigation .nav-links { gap: 22px; }
  .post-navigation a { font-size: 16px; }
  .pagination { margin-top: 40px; }
  .comments-area { margin-top: 44px; }
  .site-footer.site-shell, .site-footer > .site-shell, .site-footer__inner { flex-direction: column; gap: 18px; padding-block: 30px; }
  .footer-links { gap: 6px 22px; }
  .footer-description { max-width: 320px; }
  .lightbox__toolbar { gap: 2px; min-height: 60px; padding: 7px 8px; }
  .lightbox__toolbar button, .lightbox__original { padding: 10px; }
  .lightbox__close { margin-left: auto; }
  .lightbox__stage { padding: 8px 0; }
  .lightbox__prev, .lightbox__next { min-width: 44px; min-height: 50px; padding: 8px; background: rgb(17 17 16 / .7); border-color: #45453f; }
  .lightbox__prev { left: 6px; }
  .lightbox__next { right: 6px; }
  .lightbox__footer { flex-direction: column; gap: 6px; padding: 12px 18px max(16px, env(safe-area-inset-bottom)); }
  .lightbox__counter { padding: 0; font-size: 11px; }
  .lightbox__caption { max-height: 15vh; font-size: 12px; }
  .lightbox__status { max-width: calc(100% - 110px); padding: 12px; font-size: 12px; }
  .lightbox.is-zoomed .lightbox__stage { padding: 8px; }
}

@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .site-description { font-size: 8px; }
  .home-intro h1 { font-size: 34px; }
  .search-submit { padding-inline: 14px; }
  .gallery-heading { align-items: flex-start; }
  .gallery-open { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .featured-story__image:hover img, .story-card__media:hover img, .photo-gallery .gallery-item:hover img { transform: none; }
}

@media print {
  :root { color-scheme: light; --color-bg: #fff; --color-text: #111; --color-muted: #555; --color-line: #ccc; }
  .site-header, .site-footer, .post-navigation, .comments-area, .gallery-open, .lightbox { display: none !important; }
  .site-shell { width: 100%; }
  .site-main { padding-bottom: 0; }
  .article-header { padding-top: 0; }
  .entry-content { max-width: 100%; }
  .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  img, .story-card, .gallery-item { break-inside: avoid; }
}
