/* A Mi Otthonunk — front end. Keeps the MagOne look (boxed white page on light grey, centred
   logo, ruled category bar, Roboto headings, serif summaries), tightened: one gutter, one card
   style, equal edges, quiet hover/press motion, visible focus. */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/roboto-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/roboto-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #efefef;
  --paper: #ffffff;
  --ink: #111111;
  --text: #2b2b2b;
  --mute: #666666;
  --soft: #8a8a8a;
  --line: #dddddd;
  --line-strong: #bbbbbb;
  --tint: #f5f5f5;
  --action: #111111;
  --action-hover: #333333;
  --nav-current: #666666;
  --danger: #b00020;
  --ok: #1e7b34;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --gut: 24px;          /* one gutter everywhere */
  --edge: 40px;         /* left/right content edge inside the white box */
  --radius: 0px;        /* MagOne is square; keep it */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --m-in: 150ms; --m-out: 120ms; --m-press: 90ms; --m-image: 600ms; --m-image-out: 400ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); line-height: 1.25; margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

/* ---------- Box ---------- */
.wrapper { max-width: 1400px; margin: 0 auto; background: var(--paper); }
/* Billboard above the header: full window width like the old site, never wider than the banner (1456 px) */
.topad { padding: 12px 0; }
.topad .ad { margin: 0; }
.topad .ad__link, .topad .ad__item { width: 100%; display: flex; justify-content: center; }
.topad img { width: 100%; max-width: 1456px; height: auto; }

/* ---------- Header ---------- */
.site-header { padding: 12px var(--edge) 0; margin-top: 12px; }
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gut); padding-bottom: 8px; border-bottom: 1px solid var(--mute); }
.masthead__menu { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.masthead__menu svg { font-size: 22px; }
.masthead__logo img { width: 346px; height: auto; }
.masthead__tools { justify-self: end; display: flex; flex-direction: column; align-items: flex-start; }
.tool { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.tool svg { font-size: 20px; }

.mainnav { border-bottom: 1px solid var(--mute); }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.mainnav a { display: flex; align-items: center; min-height: 40px; padding: 0 20px; font-size: 14px; text-transform: uppercase; color: var(--mute); position: relative; transition: color var(--m-out) var(--ease), background-color var(--m-out) var(--ease); }
.mainnav a::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--m-out) var(--ease); }
.mainnav a[aria-current="page"] { background: var(--nav-current); color: #fff; }
.mainnav__home a { padding: 0 20px; font-size: 18px; }
.mainnav__home a::after { display: none; }
@media (hover: hover) and (pointer: fine) {
  .mainnav a:hover { color: var(--ink); transition-duration: var(--m-in); }
  .mainnav a:not([aria-current]):hover::after { transform: scaleX(1); transition-duration: var(--m-in); }
  .mainnav__home a:not([aria-current]):hover { background: #eee; }
}

.searchbar { display: flex; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.searchbar input, .searchform input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); background: #fff; }

/* Drawer (phone menu + MENU button) */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .45); }
.drawer__panel { position: absolute; inset: 0 auto 0 0; width: min(360px, 88vw); background: #fff; padding: 56px 24px 24px; overflow-y: auto; animation: drawer-in 200ms var(--ease); }
@keyframes drawer-in { from { transform: translateX(-24px); opacity: 0; } }
.drawer__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 28px; background: none; border: 0; cursor: pointer; }
.drawer__search input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); margin-bottom: 16px; }
.drawer__nav { list-style: none; margin: 0; padding: 0; }
.drawer__nav a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); text-transform: uppercase; font-size: 14px; color: var(--ink); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 30px var(--edge) 40px; }
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.primary { min-width: 0; }
.sidebar__inner { position: sticky; top: 16px; display: grid; gap: 24px; }

/* ---------- Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; background: var(--action); color: #fff; border: 1px solid var(--action); font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease), border-color var(--m-out) var(--ease); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--action-hover); transform: translateY(-1px); transition-duration: var(--m-in); }
  .btn--ghost:hover { background: var(--tint); border-color: var(--ink); }
}
.btn:active { transform: translateY(1px) scale(.985); transition-duration: var(--m-press); }

.prose a, .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--m-out) var(--ease); }
@media (hover: hover) { .prose a:hover, .link:hover { text-decoration-color: currentColor; } }

/* ---------- Cards (one family) ---------- */
.card { position: relative; min-width: 0; }
.card__link { display: block; height: 100%; color: inherit; transition: transform 120ms var(--ease); }
.card__media { position: relative; overflow: hidden; background: #e6e6e6; aspect-ratio: 3 / 2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image-out) var(--ease); }
.card__noimg { position: absolute; inset: 0; background: linear-gradient(135deg, #e9e9e9, #dcdcdc); }
.card__title { font-size: 16px; font-weight: 700; color: #444; line-height: 1.3; margin-top: 12px; transition: color var(--m-out) var(--ease); }
.card__excerpt { font-family: var(--serif); font-size: 14px; line-height: 1.45; color: var(--mute); margin: 6px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .card__link:hover { transform: translateY(-2px); transition-duration: 180ms; }
  .card__link:hover .card__media img { transform: scale(1.03); transition-duration: var(--m-image); }
  .card__link:hover .card__title { color: var(--ink); }
}
.card__link:focus-visible { outline-offset: 4px; }

/* overlay card: title on the photo (feature blocks, slider) */
.card--overlay .card__link, .card--slide .card__link { position: relative; }
.card--overlay .card__media, .card--slide .card__media { height: 100%; aspect-ratio: auto; }
.card--overlay .card__body, .card--slide .card__body { position: absolute; inset: auto 0 0 0; padding: 48px 24px 18px; background: linear-gradient(to top, rgb(0 0 0 / .72), rgb(0 0 0 / 0)); }
.card--overlay .card__title, .card--slide .card__title { color: #fff; margin: 0; font-weight: 400; text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
@media (hover: hover) and (pointer: fine) { .card--overlay .card__link:hover .card__title, .card--slide .card__link:hover .card__title { color: #fff; } }

/* list card: archives and search */
.card--list .card__link { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gut); align-items: start; }
.card--list .card__title { margin-top: 0; font-size: 20px; }
.card--list .card__excerpt { font-size: 15px; margin-top: 8px; }

/* ---------- Home blocks ---------- */
.block { margin-top: 40px; }
.block:first-child { margin-top: 0; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.block__title { font-size: 20px; font-weight: 400; text-transform: uppercase; color: var(--mute); }
.block__title a { border-bottom: 1px solid var(--mute); padding-bottom: 2px; transition: color var(--m-out) var(--ease), border-color var(--m-out) var(--ease); }
.block__more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-family: var(--serif); font-size: 14px; color: var(--ink); }
@media (hover: hover) { .block__title a:hover { color: var(--ink); border-color: var(--ink); } .block__more:hover svg { transform: translateX(3px); } }
.block__more svg { transition: transform var(--m-out) var(--ease); stroke: currentColor; fill: none; stroke-width: 2; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gut); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px var(--gut); }
.grid4 .card__title { font-size: 15px; }
/* Big card + two small: the photos fill their slots and never size them (else tall photos push
   the rows past the box and the next section slides underneath) */
.feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 20px var(--gut); height: 420px; }
.feature .card, .feature .card__link, .feature .card__media { min-height: 0; height: 100%; }
.feature .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature .card:first-child { grid-row: 1 / 3; }
.feature .card:first-child .card__title { font-size: 26px; }
.feature .card:not(:first-child) .card__body { padding: 32px 18px 12px; }

/* Slider (no autoplay: it only moves when asked) */
.slider { position: relative; overflow: hidden; background: #111; aspect-ratio: 5 / 3; margin-bottom: 16px; }
.slider__track { display: flex; height: 100%; transition: transform 500ms var(--ease); }
.slider__slide { flex: 0 0 100%; height: 100%; }
.slider__slide .card, .slider__slide .card__link { height: 100%; }
.card--slide .card__media { height: 100%; }
.card--slide .card__body { padding: 80px 56px 48px; }
.card--slide .card__title { font-size: 36px; }
.slider__nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; display: grid; place-items: center; background: rgb(0 0 0 / .25); border: 0; color: #fff; cursor: pointer; font-size: 26px; transition: background-color var(--m-out) var(--ease); }
.slider__nav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.slider__nav--prev { left: 12px; } .slider__nav--next { right: 12px; }
@media (hover: hover) { .slider__nav:hover { background: rgb(0 0 0 / .55); } }
.slider__pause { position: absolute; right: 12px; bottom: 8px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: rgb(0 0 0 / .25); color: #fff; cursor: pointer; font-size: 18px; transition: background-color var(--m-out) var(--ease); }
@media (hover: hover) { .slider__pause:hover { background: rgb(0 0 0 / .55); } }
.slider__pause .i-play, .slider__pause[aria-pressed="true"] .i-pause { display: none; }
.slider__pause[aria-pressed="true"] .i-play { display: inline; }
.slider__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 4px; }
.slider__dots button { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; display: grid; place-items: center; }
.slider__dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / .55); transition: background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease); }
.slider__dots button[aria-current="true"]::before { background: #fff; transform: scale(1.15); }

/* ---------- Ads ---------- */
.ad { margin: 16px 0; display: grid; gap: 16px; justify-items: center; }
.ad--inline { margin: 24px 0; }
.ad__link { display: block; }
.ad img { margin: 0 auto; }
.sidebar .ad { margin: 0; }

/* ---------- Sidebar ---------- */
.widget { min-width: 0; }
.widget__title { font-size: 14px; text-transform: uppercase; color: var(--mute); font-weight: 500; margin-bottom: 12px; }
.widget--box { border: 1px solid var(--line); padding: 20px; }
.widget--html img { margin: 0 auto; }
.social { display: flex; justify-content: center; gap: 4px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; color: var(--ink); transition: color var(--m-out) var(--ease), transform var(--m-out) var(--ease); }
@media (hover: hover) { .social a:hover { color: var(--mute); transform: translateY(-2px); } }
.flipcover { display: block; position: relative; box-shadow: 0 6px 18px rgb(0 0 0 / .14); transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
@media (hover: hover) { .flipcover:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .18); } }
.flipcover__label { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px; background: rgb(0 0 0 / .65); color: #fff; text-align: center; font-size: 14px; }

/* ---------- Article ---------- */
.post__head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.post__cats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.post__cats a { color: var(--mute); }
.post__cats a:hover { color: var(--ink); }
.post__title { font-size: 40px; font-weight: 400; line-height: 1.15; }
.post__subtitle { font-size: 20px; color: var(--mute); margin: 10px 0 0; }
.post__meta { font-family: var(--serif); font-size: 13px; color: var(--mute); margin: 12px 0 0; }

.prose { font-size: 16px; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.prose > * { margin: 0 0 1.1em; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 26px; font-weight: 500; margin-top: 1.6em; }
.prose h3 { font-size: 21px; font-weight: 500; margin-top: 1.4em; }
.prose h4 { font-size: 18px; font-weight: 500; }
.prose img { margin: 1.4em auto; }
.prose p > img:only-child, .prose p > a:only-child > img { margin: 0 auto; }
.prose .alignleft { float: left; margin: .3em 24px 12px 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 12px 24px; max-width: 50%; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose figure { margin: 1.4em 0; }
.prose figure img { margin: 0; }
.prose figcaption { font-size: 13px; color: var(--mute); margin-top: 6px; text-align: center; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ink); font-family: var(--serif); font-size: 19px; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose::after { content: ""; display: block; clear: both; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.prose th, .prose thead td { font-weight: 700; text-align: left; }
.prose table.tbl-head thead :is(th, td), .prose table.tbl-head tr:first-child th { background: var(--ink); color: #fff; border-color: var(--ink); }
.prose table.tbl-striped tbody tr:nth-child(even) { background: #f4f4f2; }
.prose table.tbl-striped thead :is(th, td) { background: #e9e9e6; }
.prose table.tbl-plain :is(td, th) { border: 0; border-bottom: 1px solid var(--line); }
.prose table p { margin: 0; }
.video { margin: 0 0 1.2em; }
.video video, .prose video { display: block; width: 100%; height: auto; max-height: 85vh; background: #000; }
.embed { position: relative; aspect-ratio: 16 / 9; }
.embed iframe, .prose iframe { width: 100%; border: 0; }
.embed iframe { position: absolute; inset: 0; height: 100%; }
.embed { margin: 0 0 1.2em; background: #000; }
.prose iframe:is([src*="youtube"], [src*="vimeo"]):not(.embed iframe) { height: auto; aspect-ratio: 16 / 9; }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gut); }
.cols > p:empty { display: none; }
.cols .wp-caption { margin: 0 auto !important; max-width: 223px; }
.cols .wp-caption a { display: block; overflow: hidden; box-shadow: 0 4px 14px rgb(0 0 0 / .12); }
.cols .wp-caption img { transition: transform var(--m-image-out) var(--ease); }
@media (hover: hover) { .cols .wp-caption a:hover img { transform: scale(1.03); transition-duration: var(--m-image); } }
.cols figcaption { font-size: 15px; color: var(--ink); margin-top: 10px; }

.post__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.post__tags a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; background: var(--tint); font-size: 13px; color: var(--mute); transition: background-color var(--m-out) var(--ease), color var(--m-out) var(--ease); }
@media (hover: hover) { .post__tags a:hover { background: #e4e4e4; color: var(--ink); } }
.post__share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.post__newsletter { margin-top: 40px; padding: 28px; background: var(--tint); }
.post__newsletter h2 { font-size: 20px; text-transform: uppercase; font-weight: 400; color: var(--mute); }
.post__newsletter > p { margin: 6px 0 16px; font-family: var(--serif); }

/* Gallery */
/* Gallery: one row of 200×130 thumbnails that scrolls sideways, with arrows (the old carousel) */
.gallery { margin: 1.6em 0; }
.gallery__viewport { position: relative; }
.gallery__strip { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery__strip::-webkit-scrollbar { display: none; }
.gallery__strip li { flex: 0 0 200px; scroll-snap-align: start; margin: 0; }
.prose .gallery__strip, .prose .gallery__strip li { padding: 0; margin: 0; } /* article list indents must not shift the carousel */
.gallery__strip a { display: block; overflow: hidden; width: 200px; height: 130px; background: #e6e6e6; }
.gallery__strip img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; transition: transform var(--m-image-out) var(--ease); }
@media (hover: hover) { .gallery__strip a:hover img { transform: scale(1.03); transition-duration: var(--m-image); } }
.gallery__nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: rgb(255 255 255 / .9); color: var(--ink); box-shadow: 0 1px 6px rgb(0 0 0 / .25); cursor: pointer; font-size: 22px; transition: background-color var(--m-out) var(--ease); }
.gallery__nav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.gallery__nav--prev { left: 6px; } .gallery__nav--next { right: 6px; }
@media (hover: hover) { .gallery__nav:hover { background: #fff; } }
.gallery__count { font-size: 13px; color: var(--mute); margin: 4px 0 0; text-align: center; }
.gallery__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; margin-top: 8px; min-height: 8px; }
.gallery__dots button { width: 24px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.gallery__dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #c8c8c8; transition: background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease); }
.gallery__dots button[aria-current="true"]::before { background: var(--ink); transform: scale(1.15); }
@media (hover: hover) { .gallery__dots button:hover::before { background: var(--mute); } }

/* Pinterest "Mentés" button over article images */
.pin-wrap { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.pin-wrap.aligncenter { display: table; margin-left: auto; margin-right: auto; }
.pin-wrap > img { margin: 0 !important; }
.pin-it { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 18px; background: #e60023; color: #fff !important; font: 600 14px/1 var(--sans); text-decoration: none !important; opacity: 0; transform: translateY(-2px); transition: opacity var(--m-out) var(--ease), transform var(--m-out) var(--ease), background-color var(--m-out) var(--ease); box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
.pin-it svg { font-size: 20px; }
.pin-wrap:hover .pin-it, .pin-it:focus-visible { opacity: 1; transform: none; }
.pin-it:hover { background: #ad081b; }
@media (hover: none) { .pin-it { opacity: .92; transform: none; min-height: 32px; font-size: 13px; } }
.lightbox .lb-pin { display: flex; justify-content: center; align-items: center; min-height: 0; height: 100%; }
.lightbox .lb-pin img { max-height: 100%; }

/* Lightbox (a <dialog>): only shown while open */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgb(10 10 10 / .95); color: #fff; overflow: hidden; }
.lightbox[open] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; }
.lightbox::backdrop { background: rgb(10 10 10 / .9); }
.lightbox figure { grid-column: 2; grid-row: 1 / span 2; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100vh; padding: 48px 0 40px; gap: 12px; align-items: center; }
.lightbox img { max-width: 100%; max-height: 100%; margin: 0 auto; object-fit: contain; min-height: 0; }
.lightbox figcaption { max-width: 820px; margin: 0 auto; text-align: center; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: #e8e8e8; max-height: 22vh; overflow-y: auto; }
.lightbox figcaption:empty { display: none; }
.lightbox button { width: 56px; height: 56px; background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; justify-self: center; grid-row: 1 / span 2; }
.lightbox button svg { fill: none; stroke: currentColor; stroke-width: 2; }
.lightbox .lb-prev { grid-column: 1; } .lightbox .lb-next { grid-column: 3; }
.lightbox__close { position: absolute; top: 4px; right: 4px; z-index: 2; background: rgb(0 0 0 / .35) !important; }
.lightbox__pos { position: absolute; left: 0; right: 0; top: 14px; text-align: center; font-size: 14px; opacity: .8; margin: 0; }
@media (max-width: 760px) {
  .lightbox[open] { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lightbox .lb-prev, .lightbox .lb-next { display: none; }
  .lightbox figure { padding: 48px 8px 24px; }
}

/* ---------- Archives ---------- */
.archive__head { margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.archive__kind { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin: 0 0 4px; }
.archive__title { font-size: 34px; font-weight: 400; }
.archive__desc { font-family: var(--serif); color: var(--mute); margin: 10px 0 0; }
.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); font-size: 14px; transition: border-color var(--m-out) var(--ease), background-color var(--m-out) var(--ease); }
@media (hover: hover) { .chips a:hover { border-color: var(--ink); background: var(--tint); } }
.list { display: grid; gap: 32px; }
.empty { color: var(--mute); }
.searchform { display: flex; gap: 8px; margin-top: 16px; max-width: 640px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 40px 0 0; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); font-size: 15px; }
.pager [aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager__gap { border: 0 !important; }
@media (hover: hover) { .pager a:hover { border-color: var(--ink); } }

/* ---------- Flipbook reader ---------- */
.reader__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.reader__title { font-size: 28px; font-weight: 400; }
.reader__count { color: var(--mute); margin: 0; }
.reader__stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; background: #2a2a2a; padding: 28px 0; overflow: hidden; }

/* The book: leaves rotate around the spine (left edge of the right half). One shadow for the
   whole visible book, so there is no dark crease between the two pages. */
.book { --pw: 300px; --ph: 400px; position: relative; justify-self: center; width: calc(var(--pw) * 2); height: var(--ph); }
.book.is-single { width: var(--pw); }
.book__source { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.book.is-ready .book__source { display: none; }
.book__inner { position: absolute; inset: 0; transition: translate 700ms cubic-bezier(.45, .05, .25, 1); }
.book__shadow { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; box-shadow: 0 18px 40px rgb(0 0 0 / .45), 0 4px 10px rgb(0 0 0 / .3); transition: left 700ms cubic-bezier(.45, .05, .25, 1), width 700ms cubic-bezier(.45, .05, .25, 1); pointer-events: none; }
.book.is-open .book__shadow { left: 0; width: 100%; }
.book.is-end .book__shadow { left: 0; width: 50%; }
.book.is-single .book__shadow { left: 0; width: 100%; }
/* Closed cover sits centred; the book slides over as it opens (like picking up a magazine) */
.book:not(.is-open):not(.is-end):not(.is-single) .book__inner { translate: -25% 0; }
.book.is-end .book__inner { translate: 25% 0; }
.book .book__inner, .book .book__shadow { transition-property: transform, translate, left, width; }

.leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transform: perspective(2600px) rotateY(0deg); transition: transform 900ms cubic-bezier(.45, .05, .25, 1); cursor: pointer; }
.is-single .leaf { left: 0; width: 100%; }
.leaf.is-flipped { transform: perspective(2600px) rotateY(-180deg); }
.leaf__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #fff; }
.leaf__face img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.leaf__face--back { transform: rotateY(180deg); }
.is-single .leaf__face--back { display: none; }
/* Light and shade sweep across the turning sheet, as on paper */
.leaf__face::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.leaf__face--front::after { background: linear-gradient(to left, rgb(0 0 0 / .32), rgb(0 0 0 / 0) 60%); }
.leaf__face--back::after { background: linear-gradient(to right, rgb(255 255 255 / .28), rgb(0 0 0 / .18) 70%); }
.leaf.is-turning .leaf__face::after { animation: leaf-shade 900ms ease-in-out; }
@keyframes leaf-shade { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
.leaf.is-loading .leaf__face { background: #f2f2f2; }

.reader__nav { width: 48px; height: 48px; display: grid; place-items: center; justify-self: center; border: 0; background: rgb(255 255 255 / .12); color: #fff; cursor: pointer; font-size: 26px; transition: background-color var(--m-out) var(--ease); }
.reader__nav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.reader__nav:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .reader__nav:not(:disabled):hover { background: rgb(255 255 255 / .25); } }
.reader__thumbs { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.reader__thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.reader__thumbs button[aria-current="true"] { border-color: var(--ink); }
.reader__thumbs img { width: 64px; height: auto; }
.reader__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: center; margin: 32px 0 0; font-family: var(--serif); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label, .label { font-size: 14px; color: var(--ink); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius); transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(0 0 0 / .1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field__err { color: var(--danger); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.check a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; }
.nlform__msg { margin: 10px 0 0; font-size: 14px; min-height: 1em; }
.nlform__msg.is-ok { color: var(--ok); } .nlform__msg.is-err { color: var(--danger); }
.nlform--compact .btn { width: 100%; }
.notice { padding: 14px 16px; margin-bottom: 20px; border-left: 3px solid var(--ink); background: var(--tint); }
.notice--ok { border-color: var(--ok); } .notice--err { border-color: var(--danger); }

/* ---------- Popup ---------- */
.popup { border: 0; padding: 32px; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.popup::backdrop { background: rgb(0 0 0 / .5); }
.popup[open] { animation: pop 200ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.popup__close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; font-size: 26px; background: none; border: 0; cursor: pointer; }
.popup h2 { font-size: 24px; font-weight: 400; margin-bottom: 8px; }
.popup p { font-family: var(--serif); color: var(--mute); margin: 0 0 16px; }

/* ---------- Shop ---------- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--gut); }
.product-card { border: 1px solid var(--line); padding: 24px; display: grid; gap: 12px; align-content: start; transition: transform 180ms var(--ease), border-color 180ms var(--ease); }
@media (hover: hover) { .product-card:hover { transform: translateY(-2px); border-color: var(--line-strong); } }
.product-card h2 { font-size: 22px; font-weight: 500; }
.price { font-size: 24px; font-weight: 700; color: var(--ink); }
.price del { font-weight: 400; color: var(--soft); font-size: 18px; margin-right: 8px; }
.cart { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart th, .cart td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.cart td.num, .cart th.num { text-align: right; }
.cart input[type=number] { width: 72px; padding: 8px; font: inherit; border: 1px solid var(--line-strong); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.summary { background: var(--tint); padding: 24px; align-self: start; }
.summary h2 { font-size: 18px; margin-bottom: 12px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 16px; }
.summary dd { margin: 0; text-align: right; }
.summary .total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line-strong); padding-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 12px; padding: 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.badge { display: inline-block; padding: 2px 8px; font-size: 12px; background: var(--tint); border: 1px solid var(--line); }
.badge--ok { background: #e7f4ea; border-color: #b9dfc2; color: var(--ok); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--mute); margin: 0 var(--edge); padding: 32px 0 24px; font-size: 14px; }
.site-footer__cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.site-footer__brand img { width: 200px; margin-bottom: 12px; }
.site-footer__brand p { margin: 0; color: var(--mute); line-height: 1.8; }
.site-footer__brand a:hover, .site-footer__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer__nav h2 { font-size: 14px; text-transform: uppercase; color: var(--mute); font-weight: 500; margin-bottom: 8px; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); }
.site-footer__pay { display: grid; gap: 16px; justify-items: start; align-content: start; }
.site-footer__copy { color: var(--soft); font-size: 13px; margin: 24px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  :root { --edge: 24px; }
  .layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
  .feature { height: 360px; }
  .card--slide .card__title { font-size: 30px; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar__inner { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mainnav a { padding: 0 12px; }
  .checkout, .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --edge: 16px; }
  body { font-size: 16px; }
  .site-header { margin-top: 0; padding-top: 8px; position: sticky; top: 0; z-index: 20; background: #fff; }
  .masthead { grid-template-columns: auto 1fr auto; border-bottom: 0; padding-bottom: 8px; }
  .masthead__menu span, .masthead__tools .tool:not(:first-child) { display: none; }
  .masthead__logo { justify-self: center; }
  .masthead__logo img { width: 170px; }
  .masthead__tools { flex-direction: row; }
  .masthead__tools .tool { min-width: 44px; min-height: 44px; justify-content: center; }
  .masthead__tools .tool span { display: none; }
  .mainnav { display: none; }
  .layout { padding-top: 20px; gap: 32px; }
  .grid3, .grid4, .cols, .products { grid-template-columns: minmax(0, 1fr); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .feature .card:first-child { grid-row: auto; }
  .feature .card .card__media { aspect-ratio: 3 / 2; }
  .feature .card:first-child .card__title { font-size: 22px; }
  .slider { aspect-ratio: 4 / 3; }
  .card--slide .card__body { padding: 60px 16px 40px; }
  .card--slide .card__title { font-size: 22px; }
  .slider__nav { display: none; }
  .card--list .card__link { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .card--list .card__title { font-size: 17px; }
  .card--list .card__excerpt { display: none; }
  .post__title { font-size: 28px; }
  .archive__title { font-size: 26px; }
  .sidebar__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .prose .alignleft, .prose .alignright { float: none; max-width: 100%; margin: 1em auto; }
  .reader__stage { grid-template-columns: 40px 1fr 40px; }
  .btn { min-height: 48px; }
  .searchform, .post__share { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .sidebar, .site-footer, .ad, .topad, .post__share, .post__newsletter, .popup { display: none !important; }
  .layout { display: block; padding: 0; }
  body, .wrapper { background: #fff; }
}
