/*
Theme Name: JapanPro v2
Theme URI: https://thejapanpro.com
Description: The journal redesign — the client's homepage header and footer. Installed beside the current JapanPro theme; the Japan Pro Journal plugin uses it for the new pages only, until it is activated for the whole blog.
Version: 1.3.0
Author: JapanPro Team
Author URI: https://thejapanpro.com
Text Domain: japanpro
*/

/* ── Design tokens ──────────────────────────────────────────────────────────── */

:root {
  --primary:       #ca3617;
  --primary-dark:  #b02e13;
  --primary-light: #ffe9e4;
  --dark:          #121212;
  --muted:         #747474;
  --border:        #d9d9d9;
  --surface:       #f2f2f2;
  --white:         #ffffff;

  --max-width:     1440px;
  --content-width: 780px;
  --px:            50px;
  --py:            50px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  font-family: 'Acumin Pro', sans-serif;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page { display: flex; flex-direction: column; flex: 1; }
#content { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: 'Acumin Pro', sans-serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.15;
}
h4, h5, h6 {
  font-family: 'Acumin Pro', sans-serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}
p { line-height: 1.7; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--px);
  padding-right: var(--px);
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-surface  { background: var(--surface);       color: var(--muted);   }

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  height: 40px;
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary  { background: var(--primary);  color: var(--white); border: none; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline  { background: var(--white); color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface); }

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════════════════════ */

/* From the client's homepage design (prototype hub.css). Sticky: masthead and
   section rail stay on screen while the page scrolls. */

.wrap { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--px); }

/* In-page links (#subscribe, #sections) stop below the sticky header;
   site.js keeps --header-h equal to its height. */
#content [id] { scroll-margin-top: var(--header-h, 0px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Every dropdown draws the same chevron, inset from the edge. Dark surfaces
   swap the stroke colour only (see .legal select). */
.site-header select, .site-footer select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border); background: var(--white);
}
/* WordPress's admin bar sits above the page for logged-in users. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
/* The open mobile menu can be taller than the screen; let it scroll. */
.site-header.is-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; }

/* Buttons in the bar size themselves: the theme-wide .btn has a fixed
   height, which would clip a longer translated label. */
.site-header .btn, .site-footer .btn {
  height: auto; padding: 15px 20px; font-size: 15px; line-height: 1;
  border: 0; transition: background .2s, border-color .2s, color .2s;
}
.site-header .btn-ghost { border: 1px solid var(--border); background: var(--white); color: var(--dark); }
.site-header .btn-ghost:hover { border-color: var(--dark); }

.masthead { display: flex; align-items: center; gap: 24px; padding-block: 18px; }

/* Logo and tagline as one lockup; the logo never shrinks. The SVG starts 4
   units into its box and its artwork ends 20% above its bottom edge, so both
   are pulled back to sit the torii flush with the tagline and page edge. */
.masthead .brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; flex-shrink: 0; }
.masthead .brand img { width: 200px; height: auto; margin-left: -6px; margin-bottom: -9px; }
.masthead .tagline {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); white-space: nowrap; line-height: 1;
}
/* Centred in the room between the logo and the actions. */
.masthead nav { margin-inline: auto; display: flex; align-items: center; gap: 22px; }
/* Header labels are Title Case as written, not capitals (Arun, 11 Oct). */
.masthead nav a {
  font-size: 15px; font-weight: 700;
  color: var(--dark); white-space: nowrap;
}
.masthead nav a:hover { color: var(--primary); }

/* Logo row: logo and Ask AI on the left, search filling the middle, the
   other tools on the right; the links are all in the rail below. */
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-search { flex: 1; max-width: 400px; margin-inline: auto; }
.header-search input { width: 100%; }
/* Wide screens: exactly in the middle of the bar, whatever sits either side. */
@media (min-width: 1360px) {
  .masthead { position: relative; }
  .header-search { position: absolute; left: 50%; transform: translateX(-50%); width: 400px; }
  .header-actions { margin-left: auto; }
}
/* Every control in the bar is exactly 36px tall, border included. All are
   single-line labels that never wrap, so the fixed height cannot clip. */
.masthead .btn,
.header-search input,
.header-currency { box-sizing: border-box; height: 36px; padding-block: 0; }
.header-actions .btn-ghost { padding-inline: 14px; font-size: 14px; }
.masthead .btn-ai { flex-shrink: 0; border: 1px solid var(--primary); padding-inline: 16px; font-size: 14px; white-space: nowrap; }
.btn-ai svg { width: 16px; height: 16px; }
.header-search input {
  border: 1px solid var(--border); border-radius: 999px;
  padding-inline: 16px; font: inherit; font-size: 14px; line-height: 1; background: var(--white); color: var(--dark); outline: none;
  -webkit-appearance: none; appearance: none;
}
.header-search input:focus { border-color: var(--primary); }
.header-currency {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0 32px 0 14px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  color: var(--dark); background-color: var(--white);
}
.header-currency:hover { border-color: var(--dark); }
.header-currency:focus { outline: none; border-color: var(--primary); }

/* Language switcher — the languages published in TranslatePress. */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  box-sizing: border-box; height: 36px; padding-inline: 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--white);
  font-size: 14px; font-weight: 700; line-height: 1; color: var(--dark);
  white-space: nowrap; cursor: pointer; transition: border-color .2s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--dark); }
.lang-switch summary:focus-visible { outline: none; border-color: var(--primary); }
.lang-switch summary svg { width: 12px; height: 12px; transition: transform .2s; }
.lang-switch[open] summary svg { transform: rotate(180deg); }
.lang-switch ul {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 220px; max-height: min(420px, 70vh); overflow: auto;
  list-style: none; padding: 6px; background: var(--white);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.lang-switch li a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 1.2; color: var(--dark);
}
.lang-switch li a:hover { background: var(--surface); }
.lang-switch li a[aria-current] { color: var(--primary); font-weight: 700; }
.lang-code { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.lang-switch li a[aria-current] .lang-code { color: var(--primary); }
.lang-switch ul::before { content: none; }

/* Phones and small tablets: the list opens as a sheet from the bottom of the
   screen over a dimmed page, instead of a dropdown the menu panel would clip.
   A tap on the dimmed page or Esc closes it (site.js). */
@media (max-width: 768px) {
  .lang-switch[open] ul {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 1000;
    min-width: 0; max-height: 75vh; max-height: 75dvh; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0; border-radius: 20px 20px 0 0;
    box-shadow: 0 0 0 100vmax rgba(18,18,18,.5); /* the dimmed page behind */
    animation: lang-sheet-in .25s ease-out;
  }
  .lang-switch ul::before {
    content: attr(data-title); display: block; padding: 14px 12px 10px;
    font-size: 17px; font-weight: 700; color: var(--dark);
    border-bottom: 1px solid var(--border); margin-bottom: 6px;
  }
  .lang-switch li a { padding: 14px 12px; font-size: 16px; }
  html:has(.lang-switch[open]) { overflow: hidden; }
}
@keyframes lang-sheet-in { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .lang-switch[open] ul { animation: none; } }
.header-login {
  font-size: 15px; font-weight: 700;
  color: var(--dark); white-space: nowrap;
}
.header-login:hover { color: var(--primary); }

/* Menu button: below 1024px only. */
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  height: 36px; padding-inline: 8px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 999px;
}
.menu-toggle:hover { border-color: var(--dark); }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .i-close,
.site-header.is-open .menu-toggle .i-open { display: none; }
.site-header.is-open .menu-toggle .i-close { display: block; }

/* Section rail under the masthead. It scrolls; Subscribe stays pinned right. */
.section-nav { border-top: 1px solid var(--border); }
.section-nav .wrap { display: flex; align-items: center; gap: 20px; }
.section-nav ul {
  display: flex; gap: 26px; list-style: none; flex: 1; min-width: 0;
  padding-block: 14px; overflow-x: auto; scrollbar-width: none;
  /* Longer (translated) rails scroll sideways; the faded edge says so. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.section-nav ul::-webkit-scrollbar { display: none; }
/* Room past the last link (22px + the 26px gap = the 48px fade), so scrolled
   to the end it sits clear of the faded edge instead of under it. */
.section-nav ul::after { content: ""; flex: 0 0 22px; }
.section-nav a {
  font-size: 15px; font-weight: 700; color: var(--dark);
  white-space: nowrap; padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.section-nav a:hover { color: var(--primary); }
.section-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
/* Subscribe: a red pill in the logo row, the same 36px as the other tools
   (filled red per client review 14 Oct). */
.subscribe-link {
  flex-shrink: 0; box-sizing: border-box; height: 36px; padding: 0 16px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--primary); border-radius: 999px; background: var(--primary);
  color: var(--white); font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
  text-transform: none; letter-spacing: 0; transition: background .2s, border-color .2s;
}
.subscribe-link:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER — MEGA FOOTER
═══════════════════════════════════════════════════════════════════════════════ */

.site-footer { background: var(--dark); color: rgba(255,255,255,.72); margin-top: 72px; }
.site-footer a { transition: color .15s; }
.site-footer a:hover { color: var(--white); }

/* Closing call to action, full width in brand red, heading and buttons on one row. */
.footer-cta { background: var(--primary); color: var(--white); padding-block: 32px; }
.footer-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.footer-cta h2 { color: var(--white); font-size: clamp(24px, 2.6vw, 30px); }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer .btn-light { background: var(--white); color: var(--dark); }
.site-footer .btn-light:hover { background: var(--primary-light); color: var(--dark); }
.site-footer .btn-outline-light { border: 1px solid var(--white); color: var(--white); background: none; }
.site-footer .btn-outline-light:hover { background: var(--white); color: var(--primary); }

/* Brand and five link columns. */
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-block: 56px; }
.footer-grid.is-wide { grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px; }
.site-footer .brand { display: inline-block; margin-bottom: 12px; }
.site-footer .brand img { width: 178px; height: auto; }
.site-footer .about { font-size: 14px; max-width: 34ch; }
.site-footer h3 { color: var(--white); font-family: 'Acumin Pro', sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; font-size: 14px; }

/* Second tier: section and booking pills beside the sign-up. */
.footer-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 32px; border-top: 1px solid rgba(255,255,255,.14); padding-block: 36px; }
.site-footer .pill-links { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer .pill-links a {
  font-size: 13px; font-weight: 600; line-height: 1; color: var(--white);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 8px 14px; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.site-footer .pill-links a:hover { background: var(--primary); border-color: var(--primary); }
.footer-signup { display: flex; gap: 10px; }
.footer-signup input {
  flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  padding: 13px 20px; font: inherit; font-size: 15px; background: transparent; color: var(--white); outline: none;
}
.footer-signup input::placeholder { color: rgba(255,255,255,.55); }
.footer-signup input:focus { border-color: var(--white); }
.footer-signup .btn { flex-shrink: 0; }

/* Eat Pro Japan, the sister site. */
.sister-site { display: flex; align-items: center; gap: 24px; border-top: 1px solid rgba(255,255,255,.14); padding-block: 28px; }
/* Eat Pro's own wordmark, from eatpro.jp — red on transparent, so it sits
   on the dark footer as is. */
.sister-logo { flex-shrink: 0; display: block; }
.sister-logo img { width: 175px; height: auto; display: block; }
.sister-site .sister-title { color: var(--white); font-family: 'Acumin Pro', sans-serif; font-size: 20px; font-weight: 700; }
.sister-site p { font-size: 14px; line-height: 1.6; }
.sister-site .more { margin-left: auto; color: var(--primary); font-weight: 700; font-size: 15px; white-space: nowrap; }

/* Legal row. */
.legal {
  border-top: 1px solid rgba(255,255,255,.14); padding-block: 20px; font-size: 13px;
  display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; align-items: center;
}
.legal > span:first-child { margin-right: auto; }
.legal select {
  font: inherit; font-size: 13px; color: var(--white);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 7px 34px 7px 14px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.legal select:hover { border-color: rgba(255,255,255,.6); }
.legal select option { color: var(--dark); }
/* Each icon link is a box of its own, so no text baseline lifts the icon
   above the row's centre line (Sitemap, the language picker). */
.socials { display: flex; align-items: center; gap: 14px; }
.socials a { display: flex; }
.socials svg { display: block; width: 18px; height: 18px; }

/* ── Sign-up pop-up (header Subscribe) ── */

.subscribe-modal {
  width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: 0; border-top: 6px solid var(--primary); border-radius: 20px;
  background: var(--white); color: var(--dark); overflow: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.subscribe-modal[open] { animation: modal-in .2s ease-out; }
.subscribe-modal::backdrop { background: rgba(18,18,18,.55); backdrop-filter: blur(2px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .subscribe-modal[open] { animation: none; } }
html:has(.subscribe-modal[open]) { overflow: hidden; }

.subscribe-modal .modal-form,
.subscribe-modal .modal-done { padding: 40px 40px 34px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--surface); color: var(--dark); }
.modal-close svg { width: 18px; height: 18px; }

.modal-kicker { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.subscribe-modal h2 {
  font-family: 'Acumin Pro', sans-serif; font-size: clamp(26px, 4vw, 32px); line-height: 1.15;
  margin-top: 10px; padding-right: 28px;
}
.modal-intro { color: var(--muted); font-size: 16px; margin-top: 10px; }
.modal-points { list-style: none; display: grid; gap: 10px; margin: 22px 0 26px; }
.modal-points li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.45; }
.modal-points li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ca3617' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.modal-signup { display: flex; gap: 10px; }
.modal-signup input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px;
  padding: 14px 20px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s;
}
.modal-signup input:focus { border-color: var(--dark); }
.subscribe-modal .btn { height: auto; padding: 15px 22px; font-size: 15px; line-height: 1; flex-shrink: 0; }
.subscribe-modal [data-jpj-subscribe-msg] { color: var(--primary); }
.subscribe-modal [data-jpj-subscribe-msg]:empty { display: none; }
.modal-fine { color: var(--muted); font-size: 13px; margin-top: 14px; }

.modal-done { text-align: center; }
.modal-done .done-icon {
  width: 56px; height: 56px; margin: 8px auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-light); color: var(--primary);
}
.modal-done .done-icon svg { width: 26px; height: 26px; }
.subscribe-modal .modal-done h2 { padding-right: 0; }
.modal-done p { color: var(--muted); margin: 10px auto 24px; max-width: 36ch; }

@media (max-width: 480px) {
  .subscribe-modal .modal-form,
  .subscribe-modal .modal-done { padding: 36px 22px 26px; }
  .modal-signup { flex-direction: column; }
  /* Stacked, flex: 1 would stretch the box's height: one 48px pair. */
  .modal-signup input { flex: none; height: 48px; padding-block: 0; }
  .subscribe-modal .modal-signup .btn { height: 48px; padding-block: 0; }
}

/* ── Header and footer, responsive ── */

/* Translated labels run longer than English. When the bar's row no longer
   fits (site.js measures it and adds .is-tight), the main links and search
   fold into the menu exactly as they do below 1024px. */
.site-header.is-tight .masthead { flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
.site-header.is-tight .masthead > .btn-ai { margin-right: auto; }
.site-header.is-tight .header-actions { display: contents; }
.site-header.is-tight .menu-toggle { display: inline-flex; }
.site-header.is-tight .masthead nav,
.site-header.is-tight .header-search { display: none; }
.site-header.is-tight.is-open .masthead { row-gap: 12px; }
.site-header.is-tight.is-open .masthead nav {
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  order: 10; flex-basis: 100%; margin-left: 0; margin-top: 6px; border-top: 1px solid var(--border);
}
.site-header.is-tight.is-open .masthead nav a { padding-block: 13px; border-bottom: 1px solid var(--border); }
.site-header.is-tight.is-open .header-search { display: block; order: 11; flex-basis: 100%; max-width: none; position: static; transform: none; width: auto; }
.site-header.is-tight.is-open .header-search input { width: 100%; }


@media (max-width: 1024px) {
  :root { --px: 30px; }
  .footer-grid.is-wide { grid-template-columns: repeat(3, 1fr); }
  .footer-grid.is-wide > :first-child { grid-column: 1 / -1; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .footer-row > :last-child { grid-column: 1 / -1; }

  /* The actions dissolve into the masthead's own row, so each control can
     stay in the bar or drop into the menu panel (order 10+, full width). */
  .masthead { flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .masthead > .btn-ai { margin-right: auto; }
  .header-actions { display: contents; }
  .menu-toggle { display: inline-flex; }
  .masthead nav, .header-search { display: none; }

  .site-header.is-open .masthead { row-gap: 12px; }
  .site-header.is-open .masthead nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    order: 10; flex-basis: 100%; margin-left: 0; margin-top: 6px; border-top: 1px solid var(--border);
  }
  .site-header.is-open .masthead nav a { padding-block: 13px; border-bottom: 1px solid var(--border); }
  .site-header.is-open .header-search { display: block; order: 11; flex-basis: 100%; max-width: none; }
  .site-header.is-open .header-search input { width: 100%; }
}

/* Currency is the first control to move into the menu. */
@media (max-width: 768px) {
  :root { --px: 20px; }
  .header-currency { display: none; }
  .site-header.is-open .header-currency { display: inline-block; order: 12; }
  .header-search input { font-size: 16px; }
  .footer-grid, .footer-grid.is-wide { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-row { grid-template-columns: 1fr; }
  .footer-signup { flex-direction: column; }
  /* Stacked, flex: 1 would stretch the box's height: box and button are one
     48px pair, as in the journal's sign-up panels. */
  .footer-signup input { flex: none; height: 48px; padding-block: 0; font-size: 16px; }
  .footer-signup .btn { height: 48px; padding-block: 0; }
  .sister-site { flex-wrap: wrap; gap: 16px; }
  .sister-site .more { margin-left: 0; }
}

.btn-ai .ai-label-short { display: none; }

/* Phones: the AI button says just "Ask AI", so logo, AI, Log in and the menu
   still share one row. */
@media (max-width: 640px) {
  .masthead .btn-ai { gap: 6px; padding-inline: 12px; font-size: 13px; }
  .btn-ai .ai-label-long { display: none; }
  .btn-ai .ai-label-short { display: inline; }
}

@media (max-width: 480px) {
  /* Two link columns whenever a phone has the room (most do), one on the
     narrowest; long labels wrap inside their column. */
  .footer-grid, .footer-grid.is-wide { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 28px 24px; }
  /* Phone: logo, the AI icon, Log in and the menu fit one row; EN joins currency in the menu. */
  .masthead { column-gap: 8px; }
  .masthead .brand img { width: 150px; margin-left: -5px; margin-bottom: -7px; }
  .masthead .tagline { font-size: 8px; letter-spacing: .1em; }
  .lang-switch { display: none; }
  .site-header.is-open .lang-switch { display: block; order: 12; }
  .lang-switch summary { padding-inline: 12px; }
  .header-currency { padding: 0 28px 0 12px; background-position: right 10px center; }
}

/* Phones: Subscribe and Log in live in the ☰ menu, beside the other tools. */
@media (max-width: 640px) {
  .header-login, .masthead .subscribe-link { display: none; }
  .site-header.is-open .header-login { display: inline-flex; align-items: center; height: 36px; order: 12; }
  .site-header.is-open .masthead .subscribe-link { display: inline-flex; order: 12; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ARCHIVE — BLOG LISTING
═══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.archive-hero {
  background: var(--white);
  padding: 60px var(--px) 50px;
  text-align: center;
}
.archive-hero-inner {
  max-width: 766px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.archive-hero h1 {
  font-size: 36px;
  color: var(--dark);
  line-height: 40px;
  margin-bottom: 0;
}
.archive-hero p {
  font-size: 18px;
  color: var(--muted);
  line-height: 28px;
  margin: 0;
}

/* Search bar */
.archive-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(217,217,217,0.3);
  border-radius: 20px;
  padding: 16px 24px;
  width: 100%;
  max-width: 478px;
  margin-top: 10px;
  border: none;
}
.archive-search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}
.archive-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  color: var(--dark);
  min-width: 0;
}
.archive-search-input::placeholder { color: var(--muted); }

/* ── Grid ── */
.archive-content { padding: var(--py) 0; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  row-gap: 30px;
  margin-bottom: 50px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--dark);
  background: var(--white);
  transition: all 0.15s;
}
.pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pagination .page-numbers.dots { border: none; background: none; }
.pagination .prev, .pagination .next { font-size: 13px; padding: 0 16px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   POST CARD
═══════════════════════════════════════════════════════════════════════════════ */

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.post-card:hover {
  box-shadow: 0 4px 24px rgba(18,18,18,0.08);
  transform: translateY(-2px);
}

/* Invisible full-card link wrapper */
.post-card-link {
  display: block;
  text-decoration: none;
}

.post-card-image {
  position: relative;
  aspect-ratio: 317 / 250;
  overflow: hidden;
  background: var(--surface);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

/* Photos load as on the Japan Pro site (site.js): a grey shimmer while the
   file arrives, then a 0.3s fade-in — same as the journal blocks. */
@keyframes img-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes img-in { from { opacity: 0; } }
img.img-loading {
  background: linear-gradient(90deg, #ebebeb 25%, #d6d6d6 50%, #ebebeb 75%);
  background-size: 200% 100%;
  animation: img-shimmer 1.6s ease-in-out infinite;
  color: transparent; /* no alt text over the shimmer */
}
img.img-in { animation: img-in .3s cubic-bezier(.4, 0, .2, 1); }
@media (prefers-reduced-motion: reduce) {
  img.img-loading, img.img-in { animation: none; }
}

.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 16px;
}
.post-card-body-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Title: Acumin Pro Bold per Figma (not the serif heading face) */
.post-card-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta: "X min read · Month Year" */
.post-card-meta-simple {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 20px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ── */

.post-hero {
  position: relative;
  height: 477px;
  overflow: hidden;
  background: var(--dark);
  display: flex;
  align-items: flex-end;
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.post-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px var(--px);
  max-width: var(--max-width);
  margin: 0 auto;
}
.post-hero-category { margin-bottom: 14px; }
.post-hero-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 60px;
  font-weight: 700;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 24px;
  line-height: 70px;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
}
.meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.meta-avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta-avatar-initials { font-size: 10px; font-weight: 700; color: var(--primary); }
.post-hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--white);
}
.post-hero-meta .meta-item a { color: var(--white); }
.post-hero-meta .meta-item a:hover { color: rgba(255,255,255,0.8); }
/* Vertical separator between meta items */
.meta-sep { width: 1px; height: 25px; background: rgba(255,255,255,0.4); flex-shrink: 0; }

/* ── Post 2-column layout: content left + TOC sidebar right ── */

.post-body { padding: var(--py) 0; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr 317px;
  gap: 0 138px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
  align-items: start;
}

/* Content column — prevent grid blowout */
.post-body-inner {
  min-width: 0;
}

/* Sticky TOC sidebar */
/* Sits under the sticky header (logo row + section rail), whatever its height. */
.post-toc-sidebar {
  position: sticky;
  top: calc(var(--header-h, 120px) + 24px);
  max-height: calc(100vh - var(--header-h, 120px) - 44px);
  overflow-y: auto;
  scrollbar-width: none;
}
.post-toc-sidebar::-webkit-scrollbar { display: none; }

/* ── TOC sidebar visual design ── */

.toc-sidebar-bar {
  width: 40px;
  height: 3px;
  background: var(--primary);
  margin-top: 8px;
  margin-bottom: 20px;
}
.toc-sidebar-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.2;
}

/* ── Joli TOC sidebar overrides ──
   Force all list/link styles regardless of plugin-generated CSS. */

/* List reset */
.post-toc-sidebar ul,
.post-toc-sidebar ol,
.post-toc-sidebar .joli-toc ul,
.post-toc-sidebar .joli-toc ol,
.post-toc-sidebar .wjt-toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.post-toc-sidebar li,
.post-toc-sidebar .joli-toc li,
.post-toc-sidebar .wjt-toc-item { padding: 0 !important; }

/* All links — default state */
.post-toc-sidebar a,
.post-toc-sidebar li a,
.post-toc-sidebar ul li a,
.post-toc-sidebar .joli-toc a,
.post-toc-sidebar .wjt-toc-link {
  display: block !important;
  font-family: 'Acumin Pro', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--muted) !important;
  padding: 5px 0 5px 14px !important;
  border-left: 2px solid transparent !important;
  text-decoration: none !important;
  background: none !important;
  letter-spacing: 0 !important;
  transition: color 0.15s, border-color 0.15s !important;
}

/* Hover */
.post-toc-sidebar a:hover,
.post-toc-sidebar .joli-toc a:hover,
.post-toc-sidebar .wjt-toc-link:hover {
  color: var(--dark) !important;
  border-left-color: var(--border) !important;
  background: none !important;
}

/* Active / current — override plugin blue with brand red */
.post-toc-sidebar a.active,
.post-toc-sidebar a.wjt-active,
.post-toc-sidebar .joli-toc a.active,
.post-toc-sidebar .joli-toc a.wjt-active,
.post-toc-sidebar .joli-toc li.active > a,
.post-toc-sidebar .joli-toc li.wjt-active > a,
.post-toc-sidebar .wjt-toc-item.active > a,
.post-toc-sidebar .wjt-toc-item.wjt-active > a,
.post-toc-sidebar .wjt-toc-link.active,
.post-toc-sidebar .wjt-toc-link.wjt-active {
  color: var(--primary) !important;
  border-left-color: var(--primary) !important;
  background: none !important;
}

/* Hide Joli TOC's own injected title (we render our own "On This Page") */
.post-toc-sidebar .joli-toc-title,
.post-toc-sidebar .wjt-toc-title,
.post-toc-sidebar [class*="toc-title"],
.post-toc-sidebar [class*="toc_title"] { display: none !important; }

/* Hide Joli TOC's auto-inserted inline version — sidebar TOC only.
   Auto-insert must stay ON in Joli TOC settings so heading IDs are generated.
   Targets every known Joli TOC class pattern anywhere inside the content column. */
.post-body-inner [class*="wjt-"],
.post-body-inner [id*="wjt-"],
.post-body-inner [class*="joli-toc"],
.post-body-inner [class*="joli_toc"],
.post-content [class*="wjt-"],
.post-content [id*="wjt-"],
.post-content [class*="joli-toc"],
.post-content [class*="joli_toc"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Joli TOC Pro's inline TOC with "sticky" on: its script pins the whole list
   with position: fixed; top: 50px, which lands on top of the sticky site header
   and over the article text. Keep it where it sits in the article instead. */
.wpj-jtoc--main.--jtoc-is-sticky {
  position: static !important;
  top: auto !important;
  width: auto !important;
  max-height: none !important;
}
.--jtoc-filler { display: none !important; }
/* Joli gives its box z-index 999 (--jtoc-z-index), which applies inside its
   flex wrapper and paints the list over the sticky header (z-index 50). */
.wpj-jtoc { --jtoc-z-index: auto; }
.wpj-jtoc .wpj-jtoc--toc { z-index: auto !important; }

/* Joli TOC sidebar — fit plugin output to sidebar width */
.post-toc-sidebar .joli-toc,
.post-toc-sidebar .joli-toc-wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* ── Post breadcrumb ── */

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.post-breadcrumb a {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb-sep {
  font-size: 11px;
  color: var(--border);
  user-select: none;
}
.post-breadcrumb-current {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ── Article typography ── */

.post-content { font-size: 20px; line-height: 1.8; color: var(--dark); }
.post-content > * + * { margin-top: 24px; }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  scroll-margin-top: calc(var(--header-h, 120px) + 24px);
  color: var(--dark);
}
.post-content h2 { font-size: 30px; margin-top: 52px; margin-bottom: 8px; }
.post-content h3 { font-size: 24px; margin-top: 40px; margin-bottom: 8px; }
.post-content p  { font-size: 20px; line-height: 1.8; color: var(--dark); }
.post-content ul,
.post-content ol  { padding-left: 24px; }
.post-content li  { font-size: 20px; line-height: 1.8; color: var(--dark); }
.post-content a   { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 8px 28px;
  margin: 36px 0;
}
.post-content blockquote p {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
.post-content img  { width: 100%; border-radius: 10px; }
/* Image blocks fill the column even when the editor resized them (it writes
   an inline width:600px). Emoji, which WordPress swaps for little images,
   stay inline at text size. */
.post-content .wp-block-image img { width: 100% !important; height: auto !important; }
.post-content img.emoji { display: inline; width: 1em; height: 1em; border-radius: 0; vertical-align: -0.1em; }
.post-content figure { margin: 36px 0; }
.post-content figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.post-content hr  { border: none; border-top: 1px solid var(--border); margin: 52px 0; }
.post-content pre {
  background: var(--dark);
  color: var(--white);
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.post-content code {
  background: var(--surface);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.post-content pre code { background: none; color: inherit; padding: 0; }

/* ── Article CTA box ── */

.article-cta {
  background: rgba(202,54,23,0.1);
  border-radius: 10px;
  padding: 40px;
  margin-top: 52px;
}
.article-cta-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 12px;
}
.article-cta-text {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.article-cta .btn {
  height: 48px;
  padding: 0 32px;
  font-size: 16px;
}

/* ── Post tags ── */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.post-tag {
  padding: 4px 14px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.15s;
}
.post-tag:hover { background: var(--primary-light); color: var(--primary); }

/* ── Share bar ── */

.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 40px;
}
.share-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 4px;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.share-button:hover { border-color: var(--primary); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   RELATED POSTS
═══════════════════════════════════════════════════════════════════════════════ */

.related-posts-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}
.section-title { font-size: 36px; }
.section-link  { font-size: 14px; font-weight: 700; color: var(--primary); transition: color 0.15s; }
.section-link:hover { color: var(--primary-dark); }
.related-posts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Related post card (simplified) ── */

.related-post-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-post-card:hover {
  box-shadow: 0 4px 24px rgba(18,18,18,0.08);
  transform: translateY(-2px);
}
.related-post-card-image {
  aspect-ratio: 317 / 250;
  overflow: hidden;
  background: var(--surface);
}
.related-post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.related-post-card:hover .related-post-card-image img { transform: scale(1.05); }
.related-post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.related-post-card-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 28px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-post-card-title a:hover { color: var(--primary); }
.related-post-card-excerpt {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  line-height: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.related-post-card-meta {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AUTHOR BIO
═══════════════════════════════════════════════════════════════════════════════ */

.author-bio-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.author-bio-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
}
.author-bio-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bio-avatar-initials { font-size: 22px; font-weight: 700; color: var(--primary); }
.author-bio-details { flex: 1; }
.author-bio-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 4px;
}
.author-bio-name {
  font-size: 20px;
  font-family: 'Acumin Pro', sans-serif;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.2;
}
.author-bio-name a:hover { color: var(--primary); }
.author-bio-desc { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════════════════════════
   COMMENTS
═══════════════════════════════════════════════════════════════════════════════ */

.comments-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.comments-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
}

#comments-title {
  font-size: 28px;
  margin-bottom: 30px;
}

/* Comment list */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.comment-item { }
.comment-body { display: flex; gap: 16px; }
.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-content-wrap { flex: 1; }
.comment-meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author-name { font-size: 15px; font-weight: 700; color: var(--dark); }
.comment-author-name a { color: var(--dark); }
.comment-author-name a:hover { color: var(--primary); }
.comment-date { font-size: 13px; color: var(--muted); }
.comment-text p { font-size: 15px; color: var(--dark); line-height: 1.65; margin-bottom: 6px; }
.comment-reply-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  transition: color 0.15s;
}
.comment-reply-link:hover { color: var(--primary-dark); }
.children {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Comment form */
#respond { margin-top: 48px; }
.comment-reply-title {
  font-size: 22px;
  font-family: 'Acumin Pro', sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
}
.comment-reply-title small a { font-family: 'Acumin Pro', sans-serif; font-size: 14px; font-weight: 400; color: var(--primary); margin-left: 12px; }
.comment-notes { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comment-form p { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.comment-form label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dark); }
.comment-form .required { color: var(--primary); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit { display: flex; }
.comment-form #submit {
  padding: 0 28px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.comment-form #submit:hover { background: var(--primary-dark); }

/* ═══════════════════════════════════════════════════════════════════════════════
   NO RESULTS / 404
═══════════════════════════════════════════════════════════════════════════════ */

.no-results-wrap {
  padding: 100px var(--px);
  text-align: center;
}
.no-results-wrap h2 { font-size: 28px; margin-bottom: 12px; }
.no-results-wrap p  { font-size: 16px; color: var(--muted); margin-bottom: 24px; }

.error-404-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--py) var(--px);
}
.error-code { font-size: 100px; font-family: 'Acumin Pro', sans-serif; color: var(--primary); line-height: 1; margin-bottom: 16px; }
.error-404-wrap h2 { font-size: 28px; margin-bottom: 12px; }
.error-404-wrap p  { font-size: 16px; color: var(--muted); margin-bottom: 28px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .post-layout        { gap: 0 80px; }
  .footer-explore-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-nav-grid    { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  :root { --px: 30px; }
  .posts-grid             { grid-template-columns: repeat(2, 1fr); }
  .related-posts-grid     { grid-template-columns: repeat(2, 1fr); }
  .post-hero-title        { font-size: 44px; line-height: 52px; }
  .archive-hero h1        { font-size: 30px; line-height: 36px; }
  .footer-cta-banner h2   { font-size: 44px; }
  .post-layout            { grid-template-columns: 1fr 280px; gap: 0 60px; }
  .footer-main .container { grid-template-columns: 180px 1fr; gap: 48px; }
  .footer-explore-grid    { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --px: 20px; --py: 40px; }

  /* Header */
  .site-nav        { display: none; }
  .header-right    { display: none; }
  .site-branding   { flex: unset; }

  /* Archive */
  .posts-grid             { grid-template-columns: 1fr; }
  .archive-hero           { padding: 40px var(--px) 32px; }
  .archive-hero h1        { font-size: 26px; line-height: 32px; }
  .archive-hero p         { font-size: 16px; }
  .archive-search         { max-width: 100%; }

  /* Single — stack content above TOC on mobile */
  .post-layout      { grid-template-columns: 1fr; }
  .post-toc-sidebar { position: static; max-height: none; order: 2; margin-top: 40px; }
  .post-body-inner  { order: 1; }
  .post-hero        { height: 360px; }
  .post-hero-title  { font-size: 32px; line-height: 38px; max-width: 100%; }
  .post-hero-content { padding: 28px var(--px); }
  .post-content     { font-size: 17px; }
  .post-content p,
  .post-content li  { font-size: 17px; }
  .post-content h2  { font-size: 24px; }
  .post-content h3  { font-size: 20px; }
  .post-content blockquote p { font-size: 20px; }
  .article-cta      { padding: 28px 24px; }
  .article-cta-title { font-size: 22px; }

  /* Related */
  .related-posts-grid   { grid-template-columns: repeat(2, 1fr); }
  .section-header       { flex-direction: column; gap: 8px; }
  .section-title        { font-size: 28px; }

  /* Author bio */
  .author-bio-card         { flex-direction: column; gap: 16px; }
  .author-bio-avatar       { width: 64px; height: 64px; }

  /* Comments */
  .comment-form-fields     { grid-template-columns: 1fr; }
  .children                { margin-left: 30px; }

  /* Footer */
  .footer-cta-banner       { padding: 60px var(--px); }
  .footer-cta-banner h2    { font-size: 32px; }
  .footer-cta-banner p     { font-size: 16px; }
  .footer-explore-grid     { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-main .container  { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav-grid         { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-copyright-bar .container { flex-direction: column; text-align: center; gap: 12px; }
  .footer-links            { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .related-posts-grid   { grid-template-columns: 1fr; }
  .footer-explore-grid  { grid-template-columns: 1fr; }
  .footer-nav-grid      { grid-template-columns: 1fr 1fr; }
}
