@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanX-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanX-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanX-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanX-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #122830;
  --ink-soft: #3d5560;
  --muted: #5e7480;
  --line: #d7e4ea;
  --bg: #f4f8fa;
  --surface: #ffffff;
  --teal: #2b7a8e;
  --teal-dark: #185468;
  --teal-deep: #0e3644;
  --teal-soft: #e5f3f7;
  --gold: #c2783a;
  --danger: #b45309;
  --danger-soft: #fff7ed;
  --shadow: 0 10px 30px rgba(14, 54, 68, 0.08);
  --shadow-lg: 0 18px 50px rgba(14, 54, 68, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --header: 64px;
  --dock: 58px;
  --wrap: 1120px;
  --font: "IRANYekanX", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--dock) + 12px + env(safe-area-inset-bottom));
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; color: var(--ink); font-weight: 700; }
p { margin: 0 0 1em; text-align: justify; text-align-last: start; text-justify: inter-word; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}
.skip {
  position: absolute;
  right: -999px;
  background: var(--teal-deep);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip:focus { right: 12px; top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(215, 228, 234, .8);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo img {
  height: 38px;
  width: auto;
  max-width: min(52vw, 200px);
  object-fit: contain;
}
.logo-text { display: none; }
.nav-desktop { display: none; }
.btn.header-cta {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 9px;
  font-size: 11px;
  border-radius: 10px;
  white-space: nowrap;
  gap: 5px;
}
.wa-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: 78svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .85s ease, transform 5.5s ease-out;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 54, 68, .32) 0%, rgba(14, 54, 68, .72) 52%, rgba(10, 36, 46, .92) 100%);
  z-index: -1;
}
.hero-inner { padding: 28px 0 36px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 6.4vw, 2.6rem);
  margin-bottom: .35em;
}
.hero .lead {
  color: rgba(255,255,255,.88);
  font-size: 1.02rem;
  max-width: 36ch;
  margin-bottom: 1.2rem;
  text-align: start;
}
.hero-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.btn-outline {
  background: #fff;
  color: var(--teal-dark);
  border: 1px solid var(--line);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-whatsapp { background: #0f7d71; color: #fff; }
.btn-block { width: 100%; }

/* Sections */
section { padding: 52px 0; }
.section-head { margin-bottom: 22px; }
.section-head p { color: var(--muted); margin: 0; }
.kicker {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 6px;
  text-align: start;
}

/* About */
.about-card {
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-photo {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  background: var(--teal-soft);
}
.about-body { padding: 22px 20px 24px; }
.about-list { display: grid; gap: 10px; margin: 16px 0 18px; }
.about-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  text-align: justify;
  text-justify: inter-word;
}
.icon-dot {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
}
.icon-dot svg { width: 15px; height: 15px; }

/* Warning */
.warning {
  background: var(--danger-soft);
  border: 1px solid #f6d7b0;
  border-radius: var(--radius);
  padding: 20px;
}
.warning h2 { font-size: 1.15rem; color: #9a3412; }
.media {
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.media video { width: 100%; max-height: 62vh; }

/* Services */
.services { background: #fff; }
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
a.service-card { color: inherit; text-decoration: none; }
.section-lead { margin-top: 10px; color: var(--ink-soft); font-size: 15px; max-width: 42rem; }
.service-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 12px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card strong { font-size: 13.5px; line-height: 1.5; text-align: start; }
.service-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
}
.service-ico svg {
  width: 24px;
  height: 24px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stats */
.stats {
  background:
    linear-gradient(180deg, rgba(14,54,68,.82), rgba(14,54,68,.9)),
    url("../images/clinic.webp") center / cover no-repeat;
  color: #fff;
}
.stats h2 { color: #fff; text-align: center; }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}
.stat {
  text-align: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 18px 10px;
}
.stat b {
  display: block;
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
}
.stat span { color: rgba(255,255,255,.82); font-size: 14px; }

/* Tabs */
.tabs {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tablist {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--line);
}
.tablist button {
  flex: 1 0 auto;
  min-height: 50px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 0 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tablist button[aria-selected="true"] {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}
.tabpanel { padding: 20px 18px 22px; display: none; }
.tabpanel.is-open { display: block; }
.tabpanel ul { display: grid; gap: 8px; margin-top: 10px; }
.tabpanel li {
  text-align: justify;
  text-justify: inter-word;
}
.tabpanel li::before { content: "• "; color: var(--teal); }

/* Fellowship */
.fellowship-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.fellowship-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  object-fit: cover;
  object-position: center 18%;
}
.check-list { display: grid; gap: 12px; }
.check-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  text-align: justify;
  text-justify: inter-word;
}
.check { color: var(--teal); margin-top: 4px; }

/* Care cards */
.care-grid { display: grid; gap: 10px; }
.care-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.care-card h3 { font-size: 1rem; margin-bottom: .3em; color: var(--teal-dark); }

/* Accordion */
.accordion { display: grid; gap: 10px; }
.acc-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.acc-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: "+";
  color: var(--teal);
  font-size: 1.3rem;
  line-height: 1;
  flex: 0 0 auto;
}
.acc-item[open] summary::after { content: "–"; }
.acc-item .acc-body { padding: 0 18px 16px; color: var(--ink-soft); text-align: justify; text-justify: inter-word; }

/* Contact / Footer */
.site-footer {
  background: var(--teal-deep);
  color: #e8f3f6;
  padding: 48px 0 28px;
  margin-bottom: 0;
}
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer .footer-title { font-size: 1.17em; }
.site-footer a { color: #cfe8ef; }
.footer-grid { display: grid; gap: 28px; }
.contact-list { display: grid; gap: 10px; }
.contact-list li { text-align: justify; text-justify: inter-word; }
.contact-list a, .contact-list span { color: inherit; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: auto;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.site-footer img { max-width: 200px; height: auto; filter: brightness(1.05); }
.acc-item summary { font-size: 15px; }
.credit {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
  color: rgba(255,255,255,.7);
  text-align: center;
}
.credit a {
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.35);
}
.credit a:hover { border-bottom-color: #fff; }

/* Mobile dock */
.dock {
  position: fixed;
  inset-inline: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(215, 228, 234, .9);
  border-radius: 16px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  box-shadow: 0 8px 22px rgba(14, 54, 68, .12);
}
.dock a, .dock button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 10px;
  font-weight: 700;
  min-height: 46px;
  justify-content: center;
  cursor: pointer;
  border-radius: 13px;
  line-height: 1.2;
}
.dock svg { width: 18px; height: 18px; }
.dock-menu { color: var(--teal-deep); }
.dock-map { color: var(--teal-dark); }
.dock-tel { color: var(--teal-dark); }
.dock .is-accent {
  background: #0f7d71;
  color: #fff;
}
.dock .is-accent svg { width: 18px; height: 18px; }

/* Sheets */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .4s;
}
.sheet.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 38, .48);
  opacity: 0;
  transition: opacity .32s ease;
}
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 82svh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(110%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet-handle {
  width: 42px;
  height: 4px;
  background: #d5dee3;
  border-radius: 99px;
  margin: 0 auto 14px;
}
.sheet-nav a {
  display: block;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
}
.sheet-nav .nav-drop { border-bottom: 1px solid var(--line); }
.sheet-nav .nav-drop-toggle {
  border-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sheet-nav .nav-drop-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: var(--ink-soft);
  margin-top: 4px;
  transition: transform .15s ease;
}
.sheet-nav .nav-drop.is-open .nav-drop-toggle::after {
  transform: rotate(180deg);
  margin-top: -2px;
}
.sheet-nav .nav-drop-menu {
  display: none;
  padding: 0 8px 8px 8px;
}
.sheet-nav .nav-drop.is-open .nav-drop-menu { display: grid; gap: 2px; }
.sheet-nav .nav-drop-menu a {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: 0;
  border-radius: 10px;
}
.map-link {
  display: block;
  margin-top: 12px;
}

.page-hero {
  padding: 28px 0 8px;
  background: linear-gradient(180deg, #e8f3f7, var(--bg));
}
.page-hero h1 { font-size: clamp(1.5rem, 5.5vw, 2.1rem); }

.download-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--teal-soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
}
.download-card a { font-weight: 800; }

.not-found { min-height: 70svh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }

/* Light page motion */
.hero-inner > * {
  animation: rise .42s ease both;
}
.hero-inner > :nth-child(2) { animation-delay: .05s; }
.hero-inner > :nth-child(3) { animation-delay: .1s; }
.hero-inner > :nth-child(4) { animation-delay: .15s; }
.hero-inner > :nth-child(5) { animation-delay: .2s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .4s ease;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
.service-grid .reveal:nth-child(2) { transition-delay: .04s; }
.service-grid .reveal:nth-child(3) { transition-delay: .08s; }
.service-grid .reveal:nth-child(4) { transition-delay: .12s; }
.service-grid .reveal:nth-child(5) { transition-delay: .04s; }
.service-grid .reveal:nth-child(6) { transition-delay: .08s; }
.service-grid .reveal:nth-child(7) { transition-delay: .12s; }
.service-grid .reveal:nth-child(8) { transition-delay: .04s; }
.service-grid .reveal:nth-child(9) { transition-delay: .08s; }
.service-grid .reveal:nth-child(10) { transition-delay: .12s; }
.service-grid .reveal:nth-child(11) { transition-delay: .04s; }
.service-grid .reveal:nth-child(12) { transition-delay: .08s; }
.stats-grid .reveal:nth-child(2) { transition-delay: .06s; }
.stats-grid .reveal:nth-child(3) { transition-delay: .12s; }
.care-grid .reveal:nth-child(2) { transition-delay: .05s; }
.care-grid .reveal:nth-child(3) { transition-delay: .1s; }
.care-grid .reveal:nth-child(4) { transition-delay: .05s; }
.care-grid .reveal:nth-child(5) { transition-delay: .1s; }
@media (hover: hover) {
  .service-card:hover,
  .care-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #c5dbe3;
  }
  .js .service-card.reveal.is-in:hover,
  .js .care-card.reveal.is-in:hover {
    transform: translateY(-3px);
  }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .nav-desktop {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .nav-desktop a {
    padding: 6px 8px;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 12px;
    border-radius: 8px;
  }
  .nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--teal-dark); background: var(--teal-soft); }
  .nav-drop { position: relative; }
  .nav-drop-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    min-width: 260px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 40;
  }
  .nav-drop:hover .nav-drop-menu,
  .nav-drop:focus-within .nav-drop-menu { display: grid; gap: 2px; }
  .nav-desktop .nav-drop-menu a {
    display: block;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .btn.header-cta { min-height: 34px; padding: 0 10px; font-size: 11px; border-radius: 10px; }
  .logo img { height: 48px; max-width: 260px; }
  .hero { min-height: 86vh; align-items: center; }
  .hero-slides { display: none; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(14, 54, 68, .28) 0%, rgba(14, 54, 68, .72) 55%, rgba(10, 36, 46, .92) 100%),
      url("../images/clinic.webp") center / cover no-repeat;
  }
  .hero-actions { grid-template-columns: max-content max-content; width: max-content; }
  .about-card, .fellowship-split {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    align-items: start;
  }
  .about-photo { height: 100%; aspect-ratio: auto; }
  .fellowship-card img {
    height: auto;
    max-height: 360px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .care-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1.3fr 1fr; align-items: start; }
  .sheet-panel {
    inset-inline: auto;
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(480px, 92vw);
    border-radius: 20px;
    max-height: 80vh;
    transform: translate(-50%, calc(-50% + 24px)) scale(.96);
    opacity: 0;
    transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
  }
  .sheet.is-open .sheet-panel {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  .split-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-slide { transform: none; opacity: 0; }
  .hero-slide.is-active { opacity: 1; }
}

/* Articles */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 4px; color: #9fb3bd; }
.breadcrumb li[aria-current] { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--teal-dark); }
.article-hero { padding-bottom: 18px; }
.article-hero .lead { color: var(--ink-soft); font-size: 1.02rem; max-width: 62ch; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--muted);
}
.article-meta strong { color: var(--ink-soft); font-weight: 700; }
.article-section { padding-top: 18px; }
.article-layout { display: grid; gap: 22px; }
.article-main { min-width: 0; }
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}
.toc summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; float: left; color: var(--teal); font-weight: 800; }
.toc[open] summary::after { content: "-"; }
.toc ol { margin: 0; padding: 0 16px 14px; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; padding: 5px 0; border-top: 1px solid var(--line); }
.toc li::before { content: counter(toc, persian) ". "; color: var(--teal); font-weight: 700; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--teal-dark); }
.summary-box {
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.summary-box h2 { font-size: 1.05rem; margin-bottom: .5em; }
.summary-box ul { list-style: disc; padding-inline-start: 1.2em; }
.summary-box li { margin-bottom: 4px; }
.prose { font-size: 1.02rem; color: var(--ink); }
.prose h2 { font-size: 1.32rem; margin-top: 1.8em; scroll-margin-top: calc(var(--header) + 12px); }
.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1em; }
.prose ul { list-style: disc; }
.prose ol { list-style: persian; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--teal); }
.prose img { border-radius: var(--radius-sm); height: auto; }
.prose figure { margin: 1.4em 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 16px;
  background: var(--danger-soft);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius-sm);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
.prose th { background: var(--teal-soft); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.review-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 28px 0;
}
.review-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--teal-soft); }
.review-box p { margin: 0; font-size: 14px; color: var(--ink-soft); text-align: start; }
.review-box .name { font-weight: 800; color: var(--ink); font-size: 15px; }
.faq-block { margin-top: 32px; }
.faq-block h2 { font-size: 1.32rem; }
.cta-box {
  background: var(--teal-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  margin: 32px 0;
  text-align: center;
}
.cta-box h2 { color: #fff; font-size: 1.2rem; }
.cta-box p { color: rgba(255,255,255,.85); text-align: center; text-align-last: center; }
.cta-box .btn { margin: 4px; }
.disclaimer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.related h2 { font-size: 1.2rem; }
.card-list { display: grid; gap: 12px; }
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.article-card:hover { border-color: #c5dbe3; box-shadow: var(--shadow); }
.article-card strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.article-card span { font-size: 13.5px; color: var(--muted); }
.hub-group { margin-bottom: 34px; }
.hub-group h2 { font-size: 1.25rem; }
.hub-group h2 a { color: inherit; }

.blog-count { font-size: 14px; color: var(--muted); margin-top: 8px; }
.blog-hub { padding-top: 8px; }
.blog-toolbar { margin-bottom: 16px; }
.blog-search-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.blog-search {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.blog-search:focus { outline: 2px solid var(--teal); border-color: transparent; }
.blog-status { font-size: 13px; color: var(--muted); min-height: 1.4em; margin: 8px 0 0; }
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.blog-filter {
  font: inherit;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.blog-filter:hover { border-color: #c5dbe3; }
.blog-filter.is-active {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 700;
}
.blog-grid {
  display: grid;
  gap: 18px;
  transition: opacity .2s ease;
}
.blog-grid[data-loading="true"] { opacity: .55; pointer-events: none; }
.blog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.blog-card:hover { border-color: #c5dbe3; box-shadow: var(--shadow); }
.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.blog-card-media {
  aspect-ratio: 16 / 9;
  background: #e8f2f5;
  overflow: hidden;
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.blog-card-title { font-size: 1.08rem; line-height: 1.45; margin: 0; }
.blog-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta { font-size: 12.5px; color: var(--muted); margin: 0; }
.blog-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
@media (min-width: 768px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

/* Scientific publications (Scholar) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.is-publications .pub-hero .lead { max-width: 40rem; }
.pub-intro {
  margin-top: 12px;
  max-width: 42rem;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  text-align: justify;
  text-justify: inter-word;
}
.pub-intro a { font-weight: 700; }
.pub-list-heading {
  font-size: 1.25rem;
  margin: 0 0 6px;
  scroll-margin-top: calc(var(--header) + 12px);
}
.pub-stats {
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-dark);
  margin-top: 14px;
  line-height: 1.6;
}
.pub-meta { font-size: 13px; color: var(--muted); margin-top: 10px; }
.pub-meta-sep { opacity: .6; }
.pub-hub { padding-top: 4px; }
.pub-hub > .wrap > .pub-count { margin-bottom: 10px; }
.pub-toolbar {
  position: sticky;
  top: var(--header);
  z-index: 20;
  background: var(--bg);
  padding: 12px 0 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 767px) {
  .pub-toolbar--desktop { display: none; }
  body.is-publications {
    padding-bottom: calc(var(--dock) + 72px + env(safe-area-inset-bottom));
  }
}
.pub-search,
.pub-select {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  color: var(--ink);
  background-color: var(--surface);
}
.pub-search {
  margin-bottom: 12px;
}
.pub-search:focus,
.pub-select:focus { outline: 2px solid var(--teal); border-color: transparent; }
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.pub-select {
  flex: 1 1 140px;
  min-width: 0;
  padding-inline-end: 12px;
  padding-inline-start: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235e7480' d='M1 1.2 6 6.2 11 1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  appearance: none;
  -webkit-appearance: none;
}
.pub-select::-ms-expand { display: none; }
.pub-count { font-size: 13px; color: var(--muted); margin: 4px 0 0; min-height: 1.4em; }
.pub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.pub-grid[data-loading="true"] { opacity: .55; pointer-events: none; }
.pub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pub-card:focus-within {
  border-color: #c5dbe3;
  box-shadow: var(--shadow);
}
.pub-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pub-card__topic {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.pub-card__year {
  margin-inline-start: auto;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pub-card__title {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0;
  text-align: left;
  direction: ltr;
}
.pub-card__authors,
.pub-card__journal {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
  direction: ltr;
}
.pub-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.pub-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.pub-card__cta:hover { background: var(--teal-dark); color: #fff; }
.pub-empty,
.pub-error {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
.pub-card--skeleton { pointer-events: none; min-height: 160px; }
.pub-skel {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef4f6 25%, #e2ecef 50%, #eef4f6 75%);
  background-size: 200% 100%;
  animation: pub-shimmer 1.2s ease infinite;
}
.pub-skel-topic { width: 72px; height: 22px; margin-bottom: 8px; }
.pub-skel-title { width: 92%; height: 16px; margin-bottom: 10px; }
.pub-skel-line { width: 80%; margin-bottom: 6px; }
.pub-skel-line.short { width: 55%; }
@keyframes pub-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.stat-pub-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.stat-pub-link:hover b { color: #fff; text-decoration: underline; }
.pub-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.pub-page-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.pub-page-btn:hover:not(:disabled) { border-color: #c5dbe3; color: var(--teal-dark); }
.pub-page-btn.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.pub-page-btn:disabled { opacity: .45; cursor: not-allowed; }
.pub-fab {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--dock) + 16px + env(safe-area-inset-bottom));
  z-index: 55;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--teal-deep);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(14, 54, 68, .32);
  cursor: pointer;
}
@media (min-width: 768px) {
  .pub-fab { display: none !important; }
}
body.pub-modal-open .pub-fab { display: none !important; }
.pub-modal[hidden] { display: none !important; }
.pub-modal {
  position: fixed;
  inset: 0 0 calc(var(--dock) + 10px + env(safe-area-inset-bottom)) 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pub-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 40, 48, .45);
}
.pub-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: 100%;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -6px 32px rgba(0, 0, 0, .14);
}
.pub-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.pub-modal__title { font-size: 0.85rem; margin: 0; }
.pub-modal__close {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--muted);
}
.pub-modal__body {
  padding: 8px 14px 6px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}
.pub-modal__body .pub-search,
.pub-modal__body .pub-select {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  font-size: 14px;
  margin-bottom: 0;
}
.pub-modal__body .pub-search { padding: 0 12px; }
.pub-modal__body .pub-select { padding: 0 12px 0 30px; }
.pub-modal__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
}
.pub-modal__foot {
  flex: 0 0 auto;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.pub-modal__apply {
  width: 100%;
  min-height: 40px !important;
  height: 40px;
  font-size: 13px;
  padding: 0 12px;
  border-radius: 10px;
  position: relative;
  z-index: 2;
}
body.pub-modal-open { overflow: hidden; }
@media (min-width: 640px) {
  .pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 1024px) {
  .pub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

/* Draft review */
.draft-banner {
  position: sticky;
  top: var(--header);
  z-index: 30;
  background: var(--gold);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  padding: 8px 12px;
}
.draft-banner a { color: #fff; text-decoration: underline; }
.review-panel {
  background: var(--surface);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin: 32px 0;
  scroll-margin-top: calc(var(--header) + 50px);
}
.review-panel h2 { font-size: 1.2rem; }
.review-panel p { color: var(--ink-soft); }
.review-actions { display: grid; gap: 10px; }
.review-panel textarea {
  width: 100%;
  min-height: 140px;
  font: inherit;
  font-size: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
  margin: 10px 0;
}
.review-panel textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.review-panel .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.review-panel [hidden] { display: none !important; }
.review-status { font-weight: 700; margin-top: 12px; }
.review-status.is-ok { color: #0f7d71; }
.review-status.is-err { color: var(--danger); }
.review-done { text-align: center; padding: 10px 0; }
.review-done svg { width: 54px; height: 54px; margin: 0 auto 8px; color: #0f7d71; }

@media (min-width: 768px) {
  .review-actions { grid-template-columns: 1fr 1fr; }
  .card-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; align-items: start; }
  .article-aside { position: sticky; top: calc(var(--header) + 20px); order: 2; }
  .article-main { order: 1; max-width: 740px; }
  .is-draft .article-aside { top: calc(var(--header) + 56px); }
}

/* Article media, modal, comments */
.article-figure { margin: 0 0 22px; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; background: var(--teal-soft); }
.prose img.infographic { max-width: 560px; width: 100%; margin-inline: auto; border: 1px solid var(--line); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; margin-top: 10px; }
.review-box .btn-sm { border-color: var(--teal); color: var(--teal-dark); }
.review-box .btn-sm:hover { background: var(--teal-soft); }
.review-box { align-items: flex-start; }
.review-teaser {
  background: var(--teal-soft);
  border: 2px dashed var(--teal);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin: 32px 0;
  text-align: center;
}
.review-teaser h2 { font-size: 1.15rem; }
.review-teaser p { text-align: center; text-align-last: center; color: var(--ink-soft); }
.modal {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  overflow: auto;
}
.modal::backdrop { background: rgba(14, 54, 68, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal .review-panel { border: 0; margin: 0; position: relative; padding: 26px 20px 20px; }
.modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--teal-soft); }
.modal h2 { padding-inline-end: 40px; }
.modal .review-done h2 { padding-inline: 0; }
.modal .review-done p { text-align: center; text-align-last: center; }
.wa-lead .review-panel { padding: 18px 16px 14px; }
.wa-lead h2 { font-size: 1.05rem; margin: 0 0 8px; }
.wa-form { display: grid; gap: 2px; }
.wa-form label,
.wa-form legend {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.wa-form input[type="text"],
.wa-form input[type="tel"],
.wa-form select,
.wa-form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  margin: 1px 0 6px;
  min-height: 36px;
}
.wa-form textarea { min-height: 52px; resize: vertical; }
#wa-phone {
  font-family: "Segoe UI", Tahoma, sans-serif;
  letter-spacing: .03em;
}
.wa-form input:focus,
.wa-form select:focus,
.wa-form textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.wa-gender {
  border: 0;
  margin: 0 0 6px;
  padding: 0;
}
.wa-gender div { display: flex; gap: 18px; margin-top: 4px; }
.wa-gender label { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.wa-gender input { width: 16px; height: 16px; margin: 0; }
.wa-count {
  justify-self: end;
  margin: -6px 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.wa-form .btn { margin-top: 2px; }
.wa-form .review-status { margin-top: 8px; }
.wa-form .review-status:empty { display: none; }
.wa-lead .review-done { display: grid; justify-items: center; gap: 8px; }
.wa-lead .review-done .btn { min-width: 168px; }
.wa-lead .review-done[hidden],
.wa-lead [data-wa-form][hidden] { display: none; }
.comments { padding: 0; margin: 34px 0 24px; }
.comments h2 { font-size: 1.25rem; }
.comments-hint { font-size: 14px; color: var(--muted); }
.comment-list { display: grid; gap: 10px; margin-bottom: 16px; }
.comment-list:empty { display: none; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; font-size: 14px; }
.comment-head time { color: var(--muted); font-size: 12.5px; }
.comment .badge { background: var(--danger-soft); color: var(--danger); border: 1px solid #f1c9a5; border-radius: 99px; padding: 1px 10px; font-size: 12px; font-weight: 700; }
.comment p { margin: 0; color: var(--ink-soft); white-space: pre-line; }
.comment-reply { margin-top: 10px; padding: 10px 12px; background: var(--teal-soft); border-radius: var(--radius-sm); }
.comment-reply strong { display: block; margin-bottom: 4px; font-size: 13px; color: var(--teal-dark); }
.comment-reply p { margin: 0; }
.comment-form {
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  position: relative;
}
.comment-form label { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.comment-form input, .comment-form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #fff;
}
.comment-form textarea { min-height: 110px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.comment-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.comment-form .review-status:empty { display: none; }
@media (min-width: 768px) {
  .comment-form .btn { justify-self: start; min-width: 180px; }
}
.prose mark.ask { background: #fff3c4; color: #6b4b00; border: 1px dashed #d9a400; border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.prose mark.ask b { font-weight: 800; }

body.has-instr-dl {
  padding-bottom: calc(var(--dock) + 78px + env(safe-area-inset-bottom));
}
.instr-fab {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--dock) + 14px + env(safe-area-inset-bottom));
  z-index: 55;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #d4893f, var(--gold));
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(194, 120, 58, .48), 0 0 0 4px rgba(194, 120, 58, .22);
  cursor: pointer;
  animation: instr-fab-pulse 1.8s ease-in-out infinite;
}
.instr-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
@keyframes instr-fab-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 10px 28px rgba(194, 120, 58, .48), 0 0 0 4px rgba(194, 120, 58, .18); }
  50% { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(194, 120, 58, .58), 0 0 0 8px rgba(194, 120, 58, .1); }
}
@media (prefers-reduced-motion: reduce) {
  .instr-fab { animation: none; }
}
@media (min-width: 768px) {
  .instr-fab {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: max-content;
    min-width: 280px;
    padding: 0 22px;
  }
  body.has-instr-dl { padding-bottom: 28px; }
}
body.instr-dl-open { overflow: hidden; }
body.instr-dl-open .instr-fab { display: none; }
.instr-dl-modal[hidden] { display: none !important; }
.instr-dl-modal {
  position: fixed;
  inset: 0 0 calc(var(--dock) + 10px + env(safe-area-inset-bottom)) 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.instr-dl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 54, 68, .55);
  backdrop-filter: blur(3px);
}
.instr-dl-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(78vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 22px 22px 16px 16px;
  padding: 16px 16px 20px;
  box-shadow: var(--shadow-lg);
}
.instr-dl-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.instr-dl-modal__title { font-size: 1.05rem; margin: 0; color: var(--teal-deep); }
.instr-dl-modal__close {
  appearance: none;
  border: 0;
  background: var(--teal-soft);
  color: var(--teal-deep);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.instr-dl-modal__acc { margin: 0; }
@media (min-width: 768px) {
  .instr-dl-modal {
    inset: 0;
    align-items: center;
  }
  .instr-dl-modal__panel { border-radius: 22px; }
}

/* Video grid */
body.vg-lock { overflow: hidden; }
.vg-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); max-width: 24ch; }
.vg-hero .lead { max-width: 48ch; }
.vg-stage { padding: 8px 0 28px; }
.vg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.vg-count { margin: 0; color: var(--muted); font-weight: 700; }
.vg-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.vg-filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.vg-filters button.is-active {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.vg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.vg-tile {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: var(--teal-deep);
  color: #fff;
  box-shadow: var(--shadow);
}
.vg-tile[hidden] { display: none !important; }
.vg-tile-media,
.vg-tile-media img,
.vg-tile-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.vg-tile-media video { opacity: 0; }
.vg-tile.is-playing .vg-tile-media video { opacity: 1; }
.vg-tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(14, 54, 68, .88));
  pointer-events: none;
}
.vg-tile-play {
  position: absolute;
  top: 50%;
  right: 50%;
  width: 44px;
  height: 44px;
  margin: -22px -22px 0 0;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
  z-index: 1;
}
.vg-tile-play::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  border: 8px solid transparent;
  border-right: 0;
  border-left: 12px solid #fff;
}
.vg-tile-time {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  background: rgba(14, 54, 68, .55);
  padding: 2px 7px;
  border-radius: 999px;
}
.vg-tile-cap {
  position: absolute;
  right: 10px;
  left: 10px;
  bottom: 10px;
  z-index: 1;
}
.vg-tile-cap b {
  display: block;
  font-size: 11px;
  color: #f0d2aa;
  margin-bottom: 2px;
}
.vg-tile-cap strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}
.vg-watch {
  display: grid;
  gap: 22px;
  padding: 8px 0 12px;
}
.vg-watch-player {
  background: #111;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 720px);
  margin-inline: auto;
  width: min(100%, 420px);
  box-shadow: var(--shadow);
}
.vg-watch-player video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.vg-watch-copy .kicker { margin-bottom: 8px; }
.vg-watch-body h2 { font-size: 1.15rem; color: var(--teal-deep); }
.vg-watch-body p, .vg-modal-body p { text-align: start; }
.vg-guide { padding: 8px 0 56px; }
.vg-guide h2 { color: var(--teal-deep); }
.vg-guide .lead { max-width: 62ch; }
.vg-watch-links, .vg-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.vg-watch-links a, .vg-modal-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
}
.vg-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  background: var(--teal-soft);
  border: 1px solid #cfe3ea;
}
.vg-share-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal-deep);
  padding: 0 8px 0 4px;
}
.vg-share-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.vg-share-btn svg { width: 18px; height: 18px; display: block; }
.vg-share-btn.is-copied { background: var(--teal); color: #fff; }
.vg-modal[hidden] { display: none !important; }
.vg-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
}
.vg-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 40, 48, .45);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.vg-modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
}
.vg-modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 26px;
  cursor: pointer;
}
.vg-modal-layout { display: grid; }
.vg-modal-player { background: #111; }
.vg-modal-player video {
  width: 100%;
  max-height: 54vh;
  object-fit: contain;
  margin: 0 auto;
}
.vg-modal-copy { padding: 18px 18px 28px; color: var(--ink); }
.vg-modal-kicker { margin: 0 0 6px; color: var(--gold); font-size: 12px; font-weight: 800; }
.vg-modal-copy h2 { font-size: 1.15rem; color: var(--teal-deep); }
.vg-modal-body { font-size: .95rem; }
.vg-modal-body h2 { font-size: 1.05rem; }
@media (min-width: 768px) {
  .vg-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .vg-tile { border-radius: 18px; }
  .vg-watch {
    grid-template-columns: minmax(280px, 380px) 1fr;
    align-items: start;
    gap: 36px;
  }
  .vg-watch-player { width: 100%; max-height: none; }
  .vg-modal { place-items: center; padding: 24px; }
  .vg-modal-panel { border-radius: 24px; }
  .vg-modal-layout { grid-template-columns: minmax(300px, 42%) 1fr; }
  .vg-modal-player video { max-height: min(80vh, 860px); }
  .vg-modal-copy { padding: 28px 28px 32px 20px; overflow: auto; }
}
