@font-face {
  font-family: Vazirmatn;
  src: url("/assets/vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #fff;
  --soft: #eef1f9;
  --text: #0b1428;
  --muted: #526079;
  --line: #dce1ed;
  --accent: #2146d6;
  --tint: #e9eeff;
  --hero: #050b18;
  --onhero: #f5f7ff;
  --radius: 16px;
  /* Design system v2: semantic + elevation + motion tokens. */
  --ok: #1e9e6a;
  --ok-tint: #e2f5ec;
  --warn: #b7791f;
  --warn-tint: #fdf3e0;
  --danger: #d64545;
  --danger-tint: #fdeaea;
  --shadow-1: 0 1px 2px #0b142814;
  --shadow-2: 0 8px 28px #0b14281a;
  --shadow-3: 0 18px 52px #0b14282e;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 130ms;
  --dur-2: 260ms;
  --dur-3: 480ms;
  /* Shared vertical rhythm: card gaps 20–28px, section gaps 32–48px. */
  --space-card-gap: clamp(20px, 2vw, 28px);
  --space-section-gap: clamp(32px, 3.5vw, 48px);
  --shadow: 0 8px 28px #0b142809;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050b18;
  --surface: #0d1628;
  --soft: #142039;
  --text: #f4f6ff;
  --muted: #b5c0d8;
  --line: #2c3c59;
  --accent: #9cb5ff;
  --tint: #172b54;
  --hero: #0b1428;
  --onhero: #f5f7ff;
  --shadow: none;
  --ok: #58d7a3;
  --ok-tint: #123528;
  --warn: #f2c265;
  --warn-tint: #332711;
  --danger: #ff8080;
  --danger-tint: #3a1a1a;
  --shadow-1: none;
  --shadow-2: 0 8px 28px #00000066;
  --shadow-3: 0 18px 52px #000000aa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #050b18;
    --surface: #0d1628;
    --soft: #142039;
    --text: #f4f6ff;
    --muted: #b5c0d8;
    --line: #2c3c59;
    --accent: #9cb5ff;
    --tint: #172b54;
    --hero: #0b1428;
    --onhero: #f5f7ff;
    --shadow: none;
    --ok: #58d7a3;
    --ok-tint: #123528;
    --warn: #f2c265;
    --warn-tint: #332711;
    --danger: #ff8080;
    --danger-tint: #3a1a1a;
    --shadow-1: none;
    --shadow-2: 0 8px 28px #00000066;
    --shadow-3: 0 18px 52px #000000aa;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.85 Vazirmatn,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Tahoma,
    sans-serif;
}
button,
input,
summary {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
a:hover {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
img {
  max-width: 100%;
  display: block;
}
svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.5;
}
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -1.5px;
  font-weight: 800;
}
h2 {
  font-size: 30px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 20px;
}
button {
  color: inherit;
}
.wrap {
  width: min(1120px, calc(100% - 64px));
  margin: auto;
}
.skip {
  position: fixed;
  top: -100px;
  right: 24px;
  background: var(--surface);
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}
.header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
@supports not (backdrop-filter: blur(1px)) {
  .header {
    background: var(--bg);
  }
}
.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--tint);
}
.brand b {
  font-size: 20px;
}
.brand small {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 2px;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}
@media (min-width: 681px) {
  /* True-center header: logo | centered nav | actions. The grid keeps the nav
     exactly in the middle regardless of side widths, in both RTL and LTR. */
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 20px;
    align-items: center;
  }
  .header .brand {
    justify-self: start;
  }
  .header #navigation {
    justify-self: center;
    margin-inline-start: 0;
  }
  .header .header-actions {
    justify-self: end;
  }
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
}
.icon-btn:hover {
  background: var(--tint);
  color: var(--accent);
}
.nav-toggle {
  display: none;
}
.hero {
  padding: 64px 0 56px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow:before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
}
.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero h1 span {
  color: var(--accent);
}
.hero-copy > p {
  margin-top: 20px;
  max-width: 490px;
  color: var(--muted);
  font-size: 17px;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn:hover {
  filter: brightness(0.96);
}
.hero-panel {
  background: var(--hero);
  color: var(--onhero);
  padding: 32px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff30;
  padding-bottom: 24px;
  margin-bottom: 4px;
}
.panel-heading [lang="en"] {
  font-size: 12px;
  letter-spacing: 2.5px;
}
.panel-heading svg {
  width: 32px;
  height: 32px;
  color: #99b5ff;
}
.service-line {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #ffffff24;
}
.service-line:last-of-type {
  border: 0;
}
.service-line > span {
  font:
    14px/1.4 ui-monospace,
    monospace;
  color: #c0cceb;
}
.service-line strong {
  display: block;
  font-size: 19px;
}
.service-line small {
  display: block;
  font-size: 13px;
  color: #c1cbe0;
  margin-top: 4px;
}
.panel-note {
  margin-top: 16px;
  font-size: 12px;
  color: #c1cbe0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.intro-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
}
.intro-strip b {
  color: var(--text);
  font-weight: 600;
}
.section {
  padding: 64px 0 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.section-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.section-head > a {
  font-size: 14px;
  color: var(--accent);
  display: flex;
  gap: 8px;
  align-items: center;
}
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.service-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 20px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 24px 0 12px;
}
.search {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  position: relative;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text);
  min-height: 48px;
  font-size: 14px;
}
.search button {
  width: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  display: grid;
  place-items: center;
}
.filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 44px;
  padding: 6px 14px;
  font-size: 14px;
}
.filter[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--line);
  color: var(--accent);
  font-weight: 700;
}
.scope {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.journal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.post-content {
  padding: 24px;
}
.post-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
/* v8.25.3: card meta never clips — chips row wraps freely, facts row sits under it */
.meta-chips,
.meta-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
}
/* A tag wider than the card wraps inside its chip instead of being cut off. */
.post-meta .tag {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.post .meta-facts,
.post .meta-facts > * {
  font-size: 12px;
}
.meta-facts > * + *::before {
  content: "·";
  margin-inline-end: 8px;
  opacity: 0.7;
}
.tag {
  background: var(--tint);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 5px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.post-tags .tag {
  font-size: 12px;
  direction: ltr;
}
.post h3 {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.post .excerpt {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 16px;
}
.post-cover {
  aspect-ratio: 16/8.4;
  width: 100%;
  object-fit: contain;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.image-button {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  width: 100%;
  cursor: zoom-in;
}
.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.post-foot a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.share {
  border: 0;
  background: none;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.full-body {
  font-size: 16px;
  line-height: 2.1;
  overflow-wrap: anywhere;
  white-space: normal;
}
.full-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.full-body pre {
  direction: ltr;
  text-align: left;
  overflow: auto;
  padding: 16px;
  background: var(--soft);
  border-radius: 8px;
  white-space: pre-wrap;
}
.full-body code {
  font:
    14px/1.8 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.full-body blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-inline-start: 3px solid var(--accent);
  background: var(--soft);
  border-radius: 8px;
}
.post-detail {
  max-width: 760px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: 20px;
}
.post-detail h1 {
  font-size: 32px;
  letter-spacing: -0.5px;
  line-height: 1.8;
  margin: 16px 0 24px;
}
.gallery {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.gallery img {
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--soft);
}
video {
  width: 100%;
  max-height: 640px;
  border-radius: 10px;
  background: #050b18;
  margin: 12px 0;
}
.notice {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 16px 20px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  margin: 20px 0;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 8px;
}
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft);
}
.about p {
  color: var(--muted);
  font-size: 15px;
}
.faq {
  margin-top: 24px;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.faq summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 0;
}
.faq p {
  font-size: 14px;
  padding: 8px 0 16px;
}
.contact {
  margin-top: 64px;
  background: var(--hero);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  color: var(--onhero);
}
.contact h2 {
  font-size: 28px;
}
.contact p {
  color: #c1cbe0;
  font-size: 14px;
  margin-top: 12px;
}
.contact .icon-btn {
  background: transparent;
  border-color: #ffffff50;
  color: #fff;
  width: 52px;
  height: 52px;
}
.socials {
  display: flex;
  gap: 12px;
  align-items: center;
}
.contact .btn {
  background: #e9eeff;
  color: #16317d;
  border-color: #e9eeff;
}
.footer {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 12px;
  z-index: 80;
  max-width: calc(100% - 32px);
  font-size: 14px;
}
.toast:empty {
  display: none;
}
.empty {
  text-align: center;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  grid-column: 1/-1;
}
.center-page {
  max-width: 620px;
  margin: 64px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
}
.center-page h1 {
  font-size: 30px;
  margin: 16px 0;
}
.center-page p {
  color: var(--muted);
}
.destination {
  display: block;
  direction: ltr;
  text-align: left;
  word-break: break-all;
  background: var(--soft);
  padding: 16px;
  margin: 20px 0;
  border-radius: 8px;
  font-size: 14px;
}
.breadcrumb {
  margin: 28px 0;
  font-size: 14px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  max-width: 94vw;
  max-height: 94vh;
  max-height: 94dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #030714dd;
}
/* Old iOS Safari (< 15.4) lacks <dialog> UA styles: closed dialogs must stay hidden
   and the polyfill needs fixed positioning to act like a modal. */
dialog:not([open]) {
  display: none;
}
.dialog-fallback {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 60;
  background: var(--surface);
  box-shadow: 0 20px 60px #03071466;
}
dialog img {
  max-height: 78vh;
  max-height: 78dvh;
  max-width: 85vw;
  object-fit: contain;
  margin: auto;
}
dialog button {
  margin: 0 0 12px;
  display: flex;
}
.privacy-list {
  padding-inline-start: 24px;
}
.privacy-list li {
  margin: 12px 0;
}
.only-js {
  display: none;
}
.js .only-js {
  display: flex;
}
.js .nav-toggle {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .hero-layout {
    gap: 32px;
  }
  .hero {
    padding-top: 40px;
  }
  .header-inner {
    gap: 20px;
  }
  nav {
    gap: 16px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .instagram-top {
    display: none;
  }
  .hero-panel {
    padding: 24px;
  }
  .services {
    gap: 12px;
  }
  .service-card {
    padding: 24px;
  }
  .about {
    gap: 32px;
    padding: 32px;
  }
  .hero h1 {
    font-size: 44px;
  }
}
@media (max-width: 680px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .header-inner {
    min-height: 76px;
    gap: 12px;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
  .brand b {
    font-size: 18px;
  }
  .brand small {
    font-size: 10px;
  }
  .header-actions {
    order: 2;
    margin-inline-start: auto;
  }
  .header-actions .telegram-top {
    display: none;
  }
  .nav-toggle,
  .js .nav-toggle {
    display: inline-flex;
  }
  .header #navigation {
    order: 3;
    display: flex;
    font-size: 13px;
    gap: 20px;
    position: static;
    margin: 0;
    width: 100%;
    padding: 0 0 12px;
  }
  .header-inner {
    flex-wrap: wrap;
    padding-top: 12px;
  }
  .js .header #navigation {
    display: none;
  }
  .js .header #navigation.open {
    display: flex;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero {
    padding: 40px 0 32px;
  }
  .hero h1 {
    font-size: 42px;
    line-height: 1.5;
  }
  .hero-copy > p {
    font-size: 16px;
  }
  .eyebrow {
    margin-bottom: 16px;
    font-size: 12px;
  }
  .hero-panel {
    padding: 24px;
  }
  .service-line {
    padding: 16px 0;
  }
  .hero .actions {
    margin-top: 24px;
  }
  .intro-strip {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 12px;
  }
  .section {
    padding-top: 40px;
  }
  .section-head {
    align-items: start;
  }
  .section-head h2 {
    font-size: 26px;
  }
  .services {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .service-card {
    padding: 24px;
  }
  .service-icon {
    margin-bottom: 16px;
  }
  .service-card p {
    margin: 8px 0 12px;
  }
  .journal-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    gap: 12px;
  }
  .search {
    flex-basis: 100%;
    min-width: 0;
  }
  .filters {
    gap: 4px;
  }
  .filter {
    padding: 6px 12px;
  }
  .post-content {
    padding: 20px;
  }
  .about {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 20px;
  }
  .contact {
    margin-top: 40px;
    padding: 28px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .contact h2 {
    font-size: 25px;
  }
  .footer {
    margin-top: 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-links {
    gap: 20px;
  }
  .post-detail {
    padding: 24px 20px;
  }
  .post-detail h1 {
    font-size: 25px;
  }
  .center-page {
    margin: 32px auto;
    padding: 24px;
  }
  .center-page h1 {
    font-size: 26px;
  }
  .actions .btn {
    padding: 10px 16px;
  }
  .scope {
    line-height: 1.9;
  }
  .panel-note {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
/* v3 — deferred content, scoped empty/error states, no layout-blocking API */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.source-tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  max-width: 100%;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 20px;
  padding-bottom: 8px;
}
.source-tabs button {
  flex-shrink: 0;
  min-height: 48px;
  padding: 8px 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.source-tabs [aria-selected="true"] {
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
}
.load-badge {
  font-size: 14px;
  color: var(--accent);
  background: var(--tint);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.feed-search {
  max-width: 560px;
  margin-bottom: 16px;
}
.feed-status {
  font-size: 14px;
  color: var(--muted);
  min-height: 32px;
  margin-bottom: 16px;
}
.feed-status.warning {
  padding: 12px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lazy-invite,
.source-empty {
  grid-column: 1/-1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 240px;
  padding: 36px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.lazy-invite h3,
.source-empty h3 {
  color: var(--text);
}
.lazy-invite p,
.source-empty p {
  max-width: 580px;
  font-size: 14px;
}
.lazy-invite .service-icon {
  margin: 0;
}
.skeleton {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 24px;
}
.skeleton:before,
.skeleton:after {
  content: "";
  display: block;
  border-radius: 8px;
  background: var(--soft);
  height: 18px;
  margin-bottom: 24px;
}
.skeleton:before {
  width: 40%;
}
.skeleton:after {
  height: 100px;
}
.video-cover {
  aspect-ratio: 16/9;
  background: var(--hero);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: white;
}
.video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.play-symbol {
  position: relative;
  display: grid;
  place-items: center;
  background: #0b1428d9;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  color: white;
  font-size: 20px;
}
.kind-label {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 4px 12px;
  background: #0b1428e6;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
}
.post-meta,
.scope,
.footer {
  font-size: 14px;
}
.post .excerpt {
  white-space: pre-line;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 24px;
}
.story-button {
  border: 0;
  background: none;
  color: var(--text);
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.story-thumb {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  padding: 5px;
  border-radius: 50%;
  background: var(--surface);
}
.story-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.story-button small {
  color: var(--muted);
  font-size: 14px;
}
.story-button span.story-title {
  max-width: 160px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-detail .post-media {
  margin: 24px 0;
  display: grid;
  gap: 16px;
}
.detail-video {
  position: relative;
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hero);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
}
.detail-video img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-video .play-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0b1428d9;
  padding: 12px 20px;
  border-radius: 10px;
}
.full-body.plain {
  white-space: pre-wrap;
}
#media-viewer {
  width: min(540px, 94vw);
  max-height: 95vh;
  max-height: 95dvh;
  padding: 16px;
}
#media-viewer.wide {
  width: min(1000px, 94vw);
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.viewer-top h2 {
  font-size: 18px;
  line-height: 1.6;
}
.viewer-top span {
  font-size: 14px;
  color: var(--muted);
}
#viewer-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: #0b1428;
  border-radius: 10px;
  overflow: hidden;
}
#viewer-stage img,
#viewer-stage video {
  max-height: 65vh;
  max-height: 65dvh;
  max-width: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
}
#viewer-stage video {
  width: 100%;
}
#viewer-caption {
  font-size: 14px;
  margin: 12px 0;
  max-height: 100px;
  overflow: auto;
  white-space: pre-wrap;
}
.viewer-controls {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.viewer-controls button {
  margin: 0;
}
.detail-error {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.media-error {
  aspect-ratio: 16/9;
  width: 100%;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.feed-note {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0;
}
.source-empty .status-code {
  font:
    12px/1.6 ui-monospace,
    monospace;
  color: var(--muted);
  direction: ltr;
}
@media (max-width: 680px) {
  .section-head {
    flex-wrap: wrap;
  }
  .load-badge {
    font-size: 12px;
  }
  .source-tabs {
    margin-top: 20px;
  }
  .source-tabs button {
    padding: 8px 14px;
  }
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .post-meta {
    font-size: 13px;
  }
  .post-detail {
    padding: 24px 20px;
  }
  .viewer-top h2 {
    font-size: 16px;
  }
  .feed-search {
    min-width: 0;
  }
  .header #navigation {
    gap: 16px;
  }
  .scope {
    font-size: 14px;
  }
}
/* Shield Pack v4 — restrained editorial system; brand evergreen, warm paper, quiet depth. */
.journal-contact {
  font-size: 14px;
  color: var(--accent, #2146d6);
  text-underline-offset: 5px;
}
.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.content-toolbar .feed-tabs {
  border: 0;
  margin: 0;
  padding-bottom: 12px;
  gap: 8px;
}
.journal-signature {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.moments-shelf {
  padding: 24px 0 28px;
  margin-bottom: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.moments-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.moments-heading h3 {
  font-size: 18px;
  margin: 0;
}
.moments-heading > span {
  font-size: 14px;
  color: var(--muted);
}
.moments-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
}
.moment {
  flex: 0 0 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  scroll-snap-align: start;
  border: 0;
  background: none;
  color: var(--text);
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.moment strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  max-width: 108px;
  overflow-wrap: anywhere;
}
.moment small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.moment-ring {
  padding: 3px;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #c81f47 4%, #e8365f 32%, #3a6dff 67%, #2146d6);
  transition:
    transform 0.18s,
    background 0.18s;
  box-shadow: 0 2px 5px #0b142810;
}
.moment-picture {
  width: 86px;
  height: 86px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  display: block;
  overflow: hidden;
  background: var(--surface);
}
.moment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.moment.is-seen .moment-ring {
  background: var(--line);
  box-shadow: none;
}
.moment.is-seen small {
  color: var(--muted);
}
.moment:hover .moment-ring {
  transform: translateY(-2px);
}
.moment:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 8px;
}
.viewer-progress {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
}
.viewer-progress > span {
  height: 3px;
  border-radius: 3px;
  flex: 1;
  background: var(--line);
  overflow: hidden;
}
.viewer-progress > span.complete {
  background: var(--accent);
}
.viewer-progress > span.current:after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: right;
  animation: moment-progress 5s linear both;
}
.is-paused .viewer-progress > span.current:after {
  animation-play-state: paused;
}
.viewer-controls #viewer-pause {
  order: 2;
}
.hero-panel {
  box-shadow:
    inset 0 1px 0 #ffffff24,
    0 1px 2px #0b142810,
    0 12px 32px #0b142807;
  position: relative;
}
.post:hover {
  box-shadow: 0 3px 12px #0b142807;
}
.post h3 {
  letter-spacing: -0.02em;
}
.post-cover {
  object-fit: cover;
}
.feed-status:empty {
  display: none;
}
.feed-search {
  margin-bottom: 24px;
}
.source-empty {
  border-radius: 12px;
}
.viewer-top h2 {
  font-size: 18px;
}
#viewer-stage {
  max-height: 65vh;
}
#viewer-stage img,
#viewer-stage video {
  max-height: 65vh;
  object-fit: contain;
}
#viewer-caption {
  max-height: 15vh;
  overflow: auto;
  font-size: 14px;
  line-height: 1.8;
}
.full-body {
  overflow-wrap: anywhere;
}
#detail-content video {
  max-height: 75vh;
  object-fit: contain;
}
@keyframes moment-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 600px) {
  .moments-heading {
    gap: 8px;
    flex-direction: column;
  }
  .moments-track {
    gap: 12px;
  }
  .moment {
    flex-basis: 92px;
  }
  .moment-ring {
    width: 84px;
    height: 84px;
  }
  .moment-picture {
    width: 78px;
    height: 78px;
  }
  .journal-contact {
    display: inline-block;
    margin-top: 8px;
  }
  .journal-signature {
    display: none;
  }
  .moments-shelf {
    padding-top: 20px;
  }
  .viewer-top h2 {
    font-size: 16px;
  }
  .viewer-progress {
    padding-inline: 12px;
  }
  .moment strong {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .moment-ring,
  .post {
    transition: none;
  }
  .viewer-progress > span.current:after {
    animation: none;
    transform: none;
  }
}
.is-video .viewer-progress > span.current:after {
  animation: none;
  transform: none;
}
.moment strong,
.moment small,
.journal-signature {
  font-size: 14px;
}
.moment strong {
  line-height: 1.65;
}
.moment {
  min-height: 136px;
}
.moment-picture {
  background: var(--surface) url("/assets/brand.jpg") center/cover no-repeat;
}
/* v5: ShieldPack's blue/wine identity. Green is reserved for availability cues. */
:root {
  --wine: #a8183b;
  --brand-rose: #e8365f;
  --royal: #2f5bf0;
  --radius: 14px;
  --shadow: 0 8px 28px #0b142809;
}
:root[data-theme="dark"] {
  --wine: #ff92ab;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wine: #ff92ab;
  }
}
.brand small {
  letter-spacing: 2px;
}
.brand small span {
  color: var(--wine);
  font-weight: 700;
}
.brand > img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.kicker {
  color: var(--wine);
}
.hero h1 {
  letter-spacing: -1.8px;
  line-height: 1.55;
}
.hero-copy > p {
  font-size: 17px;
  line-height: 2;
}
.hero .eyebrow {
  color: var(--muted);
}
.hero .eyebrow:before {
  background: var(--wine);
}
.brand-panel {
  background: #050b18;
  background-image: radial-gradient(ellipse at 15% 0%, #243f8530, transparent 65%);
  border: 1px solid #243252;
  box-shadow:
    inset 0 1px 0 #ffffff14,
    0 16px 40px #0b142810;
  color: #f5f7ff;
  padding: 28px 32px 24px;
}
.brand-panel .panel-heading {
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
}
.brand-panel .panel-heading img {
  width: 188px;
  height: auto;
  max-width: 58%;
}
.brand-caption {
  font-size: 13px;
  color: #bdc9e2;
  white-space: nowrap;
}
.brand-panel-heading {
  font-size: 26px;
  line-height: 1.8;
  font-weight: 700;
  margin: 16px 0 20px;
}
.brand-service-list {
  display: grid;
}
.brand-service-list a {
  display: grid;
  grid-template-columns: 26px 1fr 20px;
  align-items: center;
  gap: 12px;
  min-height: 61px;
  border-top: 1px solid #ffffff1c;
  color: #f5f7ff;
}
.brand-service-list a:hover {
  color: #aec1ff;
}
.brand-service-list strong {
  font-size: 16px;
  font-weight: 500;
}
.brand-service-list .mono {
  font:
    13px/1.5 ui-monospace,
    monospace;
  color: #8fa6db;
}
.brand-service-list a > span:last-child {
  font-size: 18px;
  color: #b9c9ff;
}
.brand-panel .panel-note {
  margin-top: 12px;
  font-size: 13px;
  color: #bdc9e2;
  gap: 12px;
  flex-wrap: wrap;
}
.brand-panel .panel-note a {
  color: #c6d4ff;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.support-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #73dba2;
  border-radius: 50%;
  margin-left: 5px;
  box-shadow: none;
}
.services-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.service-card {
  padding: 32px;
}
.service-index {
  font:
    14px/1.5 ui-monospace,
    monospace;
  color: var(--wine);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.service-card h3 {
  font-size: 23px;
  line-height: 1.7;
  letter-spacing: -0.5px;
}
.service-card p {
  font-size: 16px;
  line-height: 2;
  max-width: 55ch;
  margin: 12px 0 24px;
}
.service-card .text-link {
  margin-top: auto;
  gap: 12px;
}
.apple-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.apple-strip strong {
  font-size: 18px;
}
.apple-strip p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 70ch;
}
.apple-strip .btn {
  flex-shrink: 0;
}
.about > div > p + p {
  margin-top: 18px;
}
.about .text-link {
  margin-top: 24px;
}
.reseller-note {
  margin-top: 24px;
  padding: 20px 24px;
  border-right: 3px solid var(--wine);
  background: var(--surface);
  border-radius: 8px;
}
.reseller-note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin-top: 0;
}
.faq summary {
  min-height: 64px;
  font-size: 16px;
  line-height: 1.9;
}
.faq p {
  font-size: 15px;
  line-height: 2;
}
.contact {
  background: #050b18;
  border: 1px solid #243252;
}
.contact .btn {
  background: #edf2ff;
  color: #17348f;
  border-color: #edf2ff;
}
.footer {
  align-items: flex-start;
}
.footer-links {
  flex-wrap: wrap;
  row-gap: 12px;
}
.moment-picture {
  background-image: url("/assets/brand/profile.png");
}
.service-page {
  padding-top: 32px;
}
.service-page-head {
  max-width: 860px;
  padding: 32px 0 48px;
}
.service-page-head h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.65;
  margin: 16px 0;
}
.service-page-head > p {
  font-size: 18px;
  color: var(--muted);
  line-height: 2;
  max-width: 75ch;
}
.service-highlights {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.service-highlights span {
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}
.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.service-copy {
  min-width: 0;
  max-width: 760px;
}
.service-copy section {
  margin-bottom: 48px;
}
.service-copy h2 {
  font-size: 26px;
  line-height: 1.8;
  margin-bottom: 20px;
  letter-spacing: -0.4px;
}
.service-copy p {
  line-height: 2.15;
  color: var(--muted);
  margin-bottom: 16px;
}
.service-copy .faq {
  margin-top: 0;
}
.service-aside {
  position: sticky;
  top: 120px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
}
.service-aside h2 {
  font-size: 23px;
  line-height: 1.8;
  margin-top: 12px;
}
.service-aside p {
  font-size: 15px;
  color: var(--muted);
  line-height: 2;
  margin-top: 12px;
}
.service-aside .btn {
  width: 100%;
  margin-top: 24px;
  padding-inline: 12px;
}
.service-aside > .text-link {
  font-size: 14px;
  margin-top: 12px;
}
.aside-related {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.aside-related strong {
  font-size: 14px;
}
.aside-related a {
  font-size: 14px;
  color: var(--muted);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.service-end {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
}
.service-end h2 {
  font-size: 28px;
}
.service-end p {
  color: var(--muted);
  margin: 12px 0 24px;
}
.breadcrumb {
  font-size: 14px;
  line-height: 2;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .hero-layout {
    gap: 32px;
  }
  .brand-panel {
    padding: 24px;
  }
  .brand-caption {
    font-size: 12px;
  }
  .brand-panel .panel-heading img {
    width: 160px;
  }
  .service-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 32px;
  }
  .service-aside {
    padding: 20px;
  }
}
@media (max-width: 700px) {
  .services-four {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    padding: 24px;
  }
  .service-card h3 {
    font-size: 22px;
  }
  .service-card p {
    font-size: 16px;
  }
  .apple-strip {
    padding: 24px;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .brand-panel .panel-heading img {
    width: 180px;
  }
  .brand-panel-heading {
    font-size: 25px;
  }
  .brand-caption {
    font-size: 13px;
  }
  .brand-service-list strong {
    font-size: 15px;
  }
  .brand-panel .panel-note {
    font-size: 13px;
  }
  .service-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
  }
  .service-aside {
    position: static;
    padding: 24px;
  }
  .service-page-head {
    padding: 24px 0 32px;
  }
  .service-page-head > p {
    font-size: 16px;
  }
  .service-copy h2 {
    font-size: 23px;
  }
  .service-copy section {
    margin-bottom: 32px;
  }
  .service-highlights {
    gap: 8px;
  }
  .service-highlights span {
    font-size: 14px;
  }
  .service-page {
    padding-top: 24px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero-copy > p {
    font-size: 16px;
  }
  .intro-strip {
    gap: 16px;
    align-items: flex-start;
    flex-direction: column;
  }
  .reseller-note {
    padding: 20px;
  }
  .contact h2 {
    font-size: 26px;
  }
  .brand-panel .panel-note {
    gap: 0;
  }
  .brand-panel .panel-note > span {
    min-height: 36px;
    display: flex;
    align-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-service-list a,
  .service-card {
    transition: none;
  }
}
.service-lead-actions {
  margin-top: 24px;
}
.brand-caption,
.brand-panel .panel-note {
  font-size: 14px;
}
.brand-service-list .mono {
  font-size: 14px;
}

/* v5.1 — shared utility pages, same brand tokens in light/dark */
.utility-main {
  min-height: 55vh;
}
.utility-main .center-page {
  max-width: 720px;
}
.utility-lead {
  font-size: 16px;
  line-height: 2.05;
}
.utility-note {
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 24px 0;
}
.utility-main .actions {
  margin-top: 24px;
}
.hero h1 {
  font-size: clamp(34px, 4.2vw, 58px);
}
@media (max-width: 600px) {
  .utility-main .center-page {
    margin: 32px 0;
  }
  .utility-main .actions {
    align-items: stretch;
  }
  .utility-main .btn {
    white-space: normal;
    text-align: center;
  }
  .hero h1 {
    font-size: 36px;
  }
}

/* v5.2 — international services in the first homepage section */
.international-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 0 0 32px;
}
.international-callout > div {
  max-width: 760px;
}
.international-callout h2 {
  font-size: 24px;
  line-height: 1.7;
  margin: 8px 0 12px;
}
.international-callout p {
  font-size: 16px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.international-callout .btn {
  flex-shrink: 0;
}
.center-page h1 {
  text-wrap: balance;
}
@media (max-width: 800px) {
  .international-callout {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 24px;
  }
  .international-callout h2 {
    font-size: 23px;
  }
  .international-callout .btn {
    white-space: normal;
    text-align: center;
    align-self: flex-start;
  }
}

/* v5.2.3: Persian brand caption must not inherit English tracking. */
.brand-panel .panel-heading {
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 8px;
}
.brand-panel .panel-heading .brand-caption {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: normal;
  word-spacing: normal;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  line-height: 1.8;
  white-space: nowrap;
  flex: 0 0 auto;
  text-transform: none;
}
@media (max-width: 600px) {
  .brand-panel .panel-heading img {
    width: 148px;
    max-width: 100%;
    height: auto;
  }
}

/* v5.3 — a dimensional blue/wine interface. No canvas or third-party runtime. */
.hero-layout {
  perspective: 1400px;
}
.hero h1 {
  text-wrap: balance;
}
.hero h1 > span {
  color: var(--accent);
}
.hero-copy > p {
  text-wrap: pretty;
}
.brand-panel {
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
}
.brand-panel::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  inset: -230px auto auto -100px;
  border-radius: 50%;
  border: 1px solid #8ba9ff38;
  box-shadow:
    0 0 0 38px #3864ee09,
    0 0 0 39px #8ba9ff14,
    0 0 0 78px #3864ee08,
    0 0 0 79px #8ba9ff0c;
  pointer-events: none;
  z-index: -1;
}
.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #355ff618, transparent 40%, #c81f470b);
  z-index: -1;
}
.service-card,
.post,
.international-callout,
.center-page {
  position: relative;
  box-shadow:
    0 2px 3px #050b1803,
    0 16px 42px #050b1806;
}
.service-card::after,
.post::after,
.center-page::after,
.international-callout::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    500px circle at var(--glow-x, 50%) var(--glow-y, 0%),
    #3a6dff12,
    transparent 65%
  );
  transition: opacity 220ms ease;
}
.service-card:focus-within,
.post:focus-within {
  border-color: var(--accent);
}
.service-index {
  box-shadow:
    2px 3px 0 var(--line),
    inset 0 1px 0 #ffffff40;
  transition:
    transform 250ms ease,
    box-shadow 250ms ease;
}
.brand-service-list a {
  transition:
    color 180ms,
    background 180ms,
    padding 180ms;
}
.post {
  overflow: hidden;
  border-radius: 20px;
}
.post-cover {
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.post h3 {
  text-wrap: pretty;
}
.post-foot {
  position: relative;
  z-index: 1;
}
.video-cover {
  overflow: hidden;
}
.play-symbol {
  box-shadow:
    0 8px 24px #050b1850,
    inset 0 1px 0 #ffffff50;
  transition: transform 220ms ease;
}
.btn {
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}
.btn.primary {
  box-shadow:
    0 6px 16px #2146d61a,
    inset 0 1px 0 #ffffff24;
}
.btn:active {
  transform: translateY(1px);
}
.icon-btn {
  transition:
    background 180ms ease,
    transform 180ms ease;
}
.moment-ring {
  transition:
    transform 250ms ease,
    filter 250ms ease;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .depth-card {
    transition:
      transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1),
      box-shadow 300ms ease,
      border-color 250ms ease;
    transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }
  .depth-card.is-tilting {
    transition:
      box-shadow 250ms ease,
      border-color 250ms ease;
  }
  .service-card:hover,
  .post:hover {
    border-color: var(--accent);
    box-shadow:
      0 10px 18px #050b1808,
      0 26px 55px #050b1812;
  }
  .service-card:hover::after,
  .post:hover::after,
  .center-page:hover::after,
  .international-callout:hover::after {
    opacity: 1;
  }
  .service-card:hover .service-index {
    transform: translateY(-3px) rotate(-4deg);
    box-shadow: 3px 6px 0 var(--line);
  }
  .post:hover .post-cover {
    transform: scale(1.035);
  }
  .video-cover:hover .play-symbol {
    transform: scale(1.1);
  }
  .brand-service-list a:hover {
    padding-inline: 6px;
    background: #9cb5ff08;
  }
  .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px #2146d62b;
  }
  .icon-btn:hover {
    transform: translateY(-2px);
  }
  .moment:hover .moment-ring {
    transform: translateY(-4px);
    filter: drop-shadow(0 8px 7px #2146d624);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .depth-card.is-revealed {
    animation: card-arrive 650ms cubic-bezier(0.18, 0.7, 0.2, 1) both;
  }
  /* Separate translate from tilt transform; no layout shifts, no hidden default state. */
  @keyframes card-arrive {
    from {
      opacity: 0.45;
      translate: 0 18px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .depth-card,
  .service-index,
  .post-cover,
  .play-symbol,
  .moment-ring,
  .btn,
  .icon-btn,
  .brand-service-list a {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    translate: none !important;
  }
}
@media (max-width: 600px) {
  .brand-panel {
    border-radius: 22px;
  }
  .hero h1 {
    letter-spacing: -0.7px;
  }
  .hero h1 > span {
    display: inline-block;
    margin-top: 8px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > .eyebrow {
    animation: copy-arrive 500ms ease both;
  }
  .hero-copy h1 {
    animation: copy-arrive 650ms 60ms ease both;
  }
  .hero-copy > p {
    animation: copy-arrive 650ms 120ms ease both;
  }
  .hero-copy > .actions {
    animation: copy-arrive 650ms 180ms ease both;
  }
  @keyframes copy-arrive {
    from {
      opacity: 0.55;
      translate: 0 12px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}

/* Apple ID: one-year backing, retail/reseller options and a read-only API reference. */
.apple-spotlight {
  background: linear-gradient(120deg, var(--surface), var(--tint));
  border-radius: 20px;
  padding: 32px;
}
.apple-spotlight .kicker {
  margin-bottom: 8px;
}
.apple-spotlight strong {
  font-size: clamp(21px, 2.4vw, 28px);
}
.apple-warranty {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--tint), var(--surface));
  padding: 40px;
  margin-bottom: 56px;
}
.apple-year {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 4px 6px 0 var(--line);
}
.apple-year b {
  display: block;
  color: var(--wine);
  font-size: 100px;
  line-height: 1.2;
}
.apple-year span {
  display: block;
  font-size: 14px;
  margin-top: 10px;
}
.apple-warranty h2,
.apple-api-panel h2 {
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.7;
  margin: 8px 0 16px;
}
.apple-warranty p,
.apple-type-card p {
  color: var(--muted);
  line-height: 2;
  margin-bottom: 20px;
}
.apple-options {
  margin-bottom: 56px;
}
.apple-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.apple-type-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.apple-type-card h3 {
  font-size: 22px;
  margin-bottom: 14px;
}
.apple-type-card .text-link {
  margin-top: auto;
}
.apple-api-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  padding: 36px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 28px;
}
.apple-api-copy {
  min-width: 0;
}
.apple-api-copy > p,
.apple-api-copy ul {
  color: var(--muted);
  line-height: 2;
}
.apple-api-copy ul {
  padding-inline-start: 22px;
  margin: 16px 0 24px;
}
.apple-api-note {
  font-size: 13px;
  margin-top: 20px;
}
.apple-api-console {
  align-self: center;
  border: 1px solid #2c3c59;
  padding: 24px;
  background: #050b18;
  color: #bdc9e2;
  border-radius: 18px;
  box-shadow: 5px 7px 0 var(--line);
  min-width: 0;
}
.console-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font: 11px/1.7 monospace;
  border-bottom: 1px solid #2c3c59;
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.console-heading > span:first-child {
  color: #e8365f;
  letter-spacing: 2px;
}
.apple-api-console code {
  display: block;
  font: clamp(12px, 1.4vw, 16px) / 1.8 monospace;
  color: #f4f6ff;
  overflow-wrap: anywhere;
}
.apple-api-console code b {
  color: #9cb5ff;
}
.console-caption {
  display: block;
  font-size: 13px;
  margin: 6px 0 24px;
}
.console-footer {
  border-top: 1px solid #2c3c59;
  padding-top: 18px;
  font: 10px/1.8 monospace;
}
.apple-help-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
  margin-bottom: 48px;
  max-width: 85ch;
}
.apple-help-note a {
  color: var(--accent);
}
@media (min-width: 800px) {
  .services-four > .service-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 850px) {
  .apple-types {
    grid-template-columns: 1fr;
  }
  .apple-api-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .apple-warranty {
    grid-template-columns: 140px minmax(0, 1fr);
    padding: 28px;
    gap: 24px;
  }
  .apple-year b {
    font-size: 75px;
  }
}
@media (max-width: 520px) {
  .apple-warranty {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .apple-year {
    max-width: 185px;
    width: 100%;
    justify-self: start;
  }
  .apple-api-panel,
  .apple-spotlight {
    padding: 24px;
  }
  .apple-api-console {
    padding: 18px;
  }
  .console-heading {
    font-size: 9px;
  }
}

/* v5.5: illustrated, readable service guides with native, accessible tables. */
.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 28px 0 36px;
}
.service-hero .service-page-head {
  min-width: 0;
  padding: 0;
}
.service-hero .service-page-head h1 {
  font-size: clamp(30px, 3.3vw, 44px);
}
.service-figure {
  min-width: 0;
  margin: 0;
}
.service-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 8px 10px 0 var(--tint);
}
.service-figure figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.9;
}
.service-summary {
  background: linear-gradient(120deg, var(--tint), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 28px;
  margin-bottom: 20px;
}
.service-summary p {
  font-size: 17px;
  line-height: 2;
  margin: 6px 0 0;
}
.service-toc {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px 24px;
  margin-bottom: 40px;
}
.service-toc summary {
  cursor: pointer;
  font-weight: 650;
}
.service-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  margin: 22px 0 4px;
  padding-inline-start: 24px;
}
.service-toc a {
  color: var(--accent);
}
.service-toc a:focus-visible,
.guide-table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.service-card-art {
  display: block;
  width: 100%;
  height: 164px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}
.guide-section {
  scroll-margin-top: 120px;
}
.guide-bullets {
  color: var(--muted);
  padding-inline-start: 24px;
  line-height: 2.1;
}
.guide-bullets li {
  margin-bottom: 12px;
}
.guide-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0 16px;
  background: var(--surface);
  scrollbar-color: var(--accent) var(--soft);
}
.guide-table-scroll table {
  border-collapse: collapse;
  width: 100%;
  min-width: 660px;
  font-size: 14px;
  line-height: 1.95;
}
.guide-table-scroll caption {
  text-align: start;
  padding: 18px;
  font-weight: 650;
  color: var(--text);
  background: var(--soft);
}
.guide-table-scroll th,
.guide-table-scroll td {
  padding: 16px 18px;
  text-align: start;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.guide-table-scroll thead th {
  color: var(--text);
  background: var(--tint);
  font-weight: 650;
}
.guide-table-scroll tbody th {
  min-width: 135px;
  color: var(--text);
  font-weight: 550;
}
.guide-table-scroll td {
  color: var(--muted);
}
.guide-table-scroll tr:nth-child(even) {
  background: var(--soft);
}
.guide-table-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
}
.service-copy p.guide-table-note {
  font-size: 13px;
  color: var(--muted);
  border-inline-start: 2px solid var(--wine);
  padding-inline-start: 14px;
}
.guide-callout {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin: 24px 0;
  background: var(--tint);
}
.guide-callout h3 {
  font-size: 19px;
  margin-bottom: 12px;
}
.guide-callout p:last-child {
  margin-bottom: 0;
}
.guide-steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  margin: 28px 0;
}
.guide-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.guide-steps li > span {
  color: var(--wine);
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  height: 38px;
  display: grid;
  place-items: center;
}
.guide-steps h3 {
  font-size: 19px;
  margin: 0 0 8px;
}
.guide-steps p {
  font-size: 15px;
  margin-bottom: 0;
}
.service-copy p.guide-sources {
  font-size: 12px;
  margin-top: 20px;
  color: var(--muted);
}
.guide-sources a {
  color: var(--accent);
  padding: 4px;
}
.guide-sources span {
  opacity: 0.85;
}
@media (max-width: 950px) {
  .service-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .service-figure {
    max-width: 620px;
    width: 100%;
  }
  .service-card-art {
    height: 150px;
  }
}
@media (max-width: 600px) {
  .service-hero {
    margin: 20px 0 28px;
  }
  .service-figure img {
    border-radius: 20px;
    box-shadow: 5px 6px 0 var(--tint);
  }
  .service-toc ol {
    grid-template-columns: 1fr;
  }
  .service-summary,
  .service-toc {
    padding: 20px;
  }
  .guide-steps li {
    padding: 18px;
    gap: 12px;
  }
  .guide-table-scroll th,
  .guide-table-scroll td {
    padding: 14px;
  }
}

/* Shared ordering choices on all pages. */
.footer {
  flex-wrap: wrap;
}
.order-options {
  flex: 0 0 100%;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.order-options strong {
  font-size: 20px;
  color: var(--text);
}
.order-options p,
.order-hint {
  font-size: 14px;
  line-height: 2.1;
  color: var(--muted);
}
.order-options .actions {
  align-content: center;
}
.order-hint {
  padding: 16px 20px;
  border-inline-start: 3px solid var(--accent);
  background: var(--tint);
  border-radius: 12px;
}
.order-hint a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.premium-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(125deg, var(--tint), var(--surface));
}
.premium-strip h3 {
  margin: 12px 0;
  font-size: 24px;
}
.premium-strip p {
  color: var(--muted);
  line-height: 2.1;
  max-width: 680px;
}
.premium-strip .btn {
  flex-shrink: 0;
}
@media (max-width: 800px) {
  .order-options {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }
  .premium-strip {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }
}

/* Featured core service and editorial cover. */
.premium-strip {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.premium-strip > .actions {
  grid-column: 2;
}
.premium-cover {
  grid-row: 1 / span 2;
  display: block;
}
.premium-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 6px 8px 0 var(--tint);
}
@media (max-width: 800px) {
  .premium-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .premium-cover {
    grid-row: auto;
    max-width: 420px;
  }
  .premium-strip > .actions {
    grid-column: auto;
  }
}

/* v6.1.2 — shared spacing rhythm, independent of paragraph margin resets.
   Borders are separated by card gaps; larger transitions use section gaps.
   Scoped selectors avoid changing the upstream social-post typography. */
.service-page > .order-hint {
  margin-block: 0 var(--space-card-gap);
}
.service-page > .service-summary {
  margin-block: 0 var(--space-card-gap);
}
.service-page > .service-toc {
  margin-block: 0 var(--space-section-gap);
}
.service-page > .service-hero {
  margin-block-end: var(--space-section-gap);
}
.service-page > .apple-warranty,
.service-page > .apple-options,
.service-page > .apple-help-note {
  margin-block-end: var(--space-section-gap);
}
.service-page > .apple-api-panel {
  margin-block-end: var(--space-card-gap);
}
.service-layout {
  row-gap: var(--space-section-gap);
  padding-block-start: var(--space-section-gap);
}
.service-copy > section {
  margin-block-end: var(--space-section-gap);
}
.service-copy > section:last-child {
  margin-block-end: 0;
}
.service-page > .service-end {
  margin-block-start: var(--space-section-gap);
  padding-block-start: var(--space-section-gap);
}
.services-four,
.journal-grid,
.apple-types {
  gap: var(--space-card-gap);
}
.apple-strip,
.premium-strip {
  margin-block-start: var(--space-card-gap);
}
.guide-callout,
.guide-steps {
  margin-block: var(--space-card-gap);
}
.footer {
  row-gap: var(--space-card-gap);
}
.footer > .order-options {
  margin-block: 0;
  /* A flex-column footer must not interpret 100% as a height basis. */
  flex-basis: auto;
}
/* Match the hero's tablet breakpoint: keep long guides comfortably readable. */
@media (max-width: 950px) {
  .service-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .service-aside {
    position: static;
  }
}
/* v6: native mobile navigation, tactile surfaces and self-contained media. */
html.menu-is-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}
.mobile-menu {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  overflow: hidden;
}
.mobile-menu::backdrop {
  background: #030916ad;
  backdrop-filter: blur(9px);
}
.mobile-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(92vw, 440px);
  height: 100%;
  padding: max(22px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(155deg, var(--surface), var(--bg));
  border-inline-end: 1px solid var(--line);
  box-shadow: -30px 0 100px #0005;
  overflow: auto;
  overscroll-behavior: contain;
  animation: drawer-in 0.26s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.mobile-menu.is-closing .mobile-panel {
  animation: drawer-out 0.18s ease-in forwards;
}
.mobile-menu-top,
.mobile-wordmark {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.mobile-wordmark {
  justify-content: flex-start;
  font-size: 22px;
}
.mobile-menu-top {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-intro {
  margin: 24px 0;
}
.mobile-menu-intro h2 {
  font-size: 28px;
  margin: 8px 0;
}
.mobile-menu-intro p,
.mobile-menu-bottom p {
  font-size: 13px;
  color: var(--muted);
}
.mobile-links {
  display: grid;
  gap: 12px;
}
.mobile-links > a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--tint);
}
.mobile-links > a > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--accent);
  font-size: 26px;
}
.mobile-links strong,
.mobile-links small {
  display: block;
}
.mobile-links small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.mobile-links i {
  margin-inline-start: auto;
  color: var(--accent);
  font-style: normal;
}
.mobile-links a[aria-current] {
  border-color: var(--accent);
  background: var(--tint);
}
.mobile-services {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  background: var(--surface);
}
.mobile-services summary {
  cursor: pointer;
  font-weight: 650;
}
.mobile-services summary span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
.mobile-service-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.mobile-service-links a {
  font-size: 13px;
  min-height: 48px;
  display: flex;
  align-items: center;
  background: var(--soft);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.mobile-menu-bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.mobile-menu-bottom > .btn {
  width: 100%;
}
.mobile-menu-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.mobile-menu-quick a,
.mobile-menu-quick button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  min-height: 44px;
  font-size: 12px;
}
.menu-bars {
  width: 21px;
  display: grid;
  gap: 5px;
}
.menu-bars span {
  height: 1.5px;
  background: currentColor;
  border-radius: 5px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .menu-bars span:first-child {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .menu-bars span:last-child {
  transform: translateY(-6.5px) rotate(-45deg);
}
.back-to-top {
  position: fixed;
  inset-inline-end: 20px;
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 6px 20px #0002;
  z-index: 25;
  font-size: 24px;
}
.back-to-top[hidden] {
  display: none;
}
@keyframes drawer-in {
  from {
    transform: translateX(105%);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes drawer-out {
  to {
    transform: translateX(105%);
    opacity: 0;
  }
}
@media (max-width: 800px) {
  html.js #navigation {
    display: none !important;
  }
  .header-inner {
    min-height: 76px;
  }
  .js .nav-toggle {
    display: inline-flex;
  }
  .service-card:active,
  .post:active,
  .moment:active,
  .mobile-links a:active,
  .mobile-service-links a:active {
    transform: translateY(2px) scale(0.99);
    transition: transform 0.12s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-panel,
  .mobile-menu.is-closing .mobile-panel {
    animation: none;
  }
  .menu-bars span {
    transition: none;
  }
}
/* v6 native story/reel viewer and reading controls. */
html.media-is-open {
  overflow: hidden;
}
.quick-preview,
.save-post {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
  color: var(--accent);
  font: inherit;
  font-size: 12px;
}
.save-post[aria-pressed="true"],
.saved-filter[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
}
.post-foot {
  flex-wrap: wrap;
  gap: 10px;
}
.album-count {
  font-size: 11px;
  color: var(--muted);
}
/* v8.1.0: reading-time chip on cards and post pages */
.read-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.readable-news .read-time {
  font-size: 13px;
  margin-block: 0.4rem;
}
/* v8.1.0: related posts at the end of article pages */
.related-posts {
  margin-block-start: 2.5rem;
  border-block-start: 1px solid var(--line);
  padding-block-start: 1.5rem;
}
.related-posts h2 {
  font-size: 1.1rem;
  margin-block: 0 1rem;
}
/* Related cards share the article column: clamp titles and excerpts so long text
   never breaks the box layout. */
.news-grid .post h3 {
  margin-block: 0.4rem 0.6rem;
}
.news-grid .post h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.news-grid .post .excerpt {
  height: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.news-grid .post .post-meta {
  gap: 6px;
}
.saved-filter {
  font-size: 13px;
}
.content-toolbar {
  flex-wrap: wrap;
}
.moments-shelf {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(130deg, var(--surface), var(--tint));
  box-shadow: 0 8px 0 var(--soft);
  margin-bottom: var(--space-section-gap);
}
.moments-track {
  scroll-snap-type: x proximity;
  padding-bottom: 14px;
}
.moment {
  scroll-snap-align: start;
}
.moment-ring {
  box-shadow:
    0 8px 16px #07132c26,
    0 3px 0 var(--line);
}
.moment:active .moment-ring {
  transform: scale(0.94);
}
#media-viewer {
  border: 1px solid #314361;
  box-shadow: 0 40px 120px #0009;
}
.story-mode,
.reel-mode {
  background: #071020 !important;
  color: #f4f6ff !important;
}
#media-viewer.story-mode,
#media-viewer.reel-mode {
  width: min(480px, 100vw);
  height: min(920px, 96dvh);
  max-height: 100dvh;
  padding: 16px;
  overflow: auto;
  border-radius: 26px;
}
.story-mode #viewer-stage,
.reel-mode #viewer-stage {
  height: calc(100dvh - 280px);
  max-height: 640px;
  min-height: 180px;
  border-radius: 18px;
  touch-action: pinch-zoom;
}
.story-mode #viewer-stage img,
.story-mode #viewer-stage video,
.reel-mode #viewer-stage video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}
.story-mode .viewer-top span,
.reel-mode .viewer-top span {
  color: #b5c0d8;
}
.story-mode .viewer-controls .btn,
.reel-mode .viewer-controls .btn {
  background: #142039;
  color: #f4f6ff;
  border-color: #2c3c59;
}
.viewer-action {
  margin: 10px 0;
  width: 100%;
}
.viewer-action[hidden] {
  display: none;
}
@media (max-width: 600px) {
  #media-viewer.story-mode,
  #media-viewer.reel-mode {
    height: 100dvh;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
    border-radius: 0;
  }
  .moments-shelf {
    padding: 20px 16px;
  }
  .moments-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .post-foot > a {
    flex-basis: 100%;
  }
  .quick-preview,
  .save-post {
    flex: 1;
  }
}

/* The drawer is nested in the shared header, not its inline nav. */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  border-radius: 0;
}
.header .mobile-links {
  display: grid;
  width: 100%;
}

.mobile-menu [data-menu-close] {
  font-family: Arial, sans-serif;
  font-size: 25px;
  flex-shrink: 0;
  margin: 0;
}
/* Fit portrait controls within the viewport instead of scrolling them off-screen. */
#media-viewer[open].story-mode,
#media-viewer[open].reel-mode {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.story-mode .viewer-top,
.reel-mode .viewer-top,
.story-mode .viewer-progress,
.reel-mode .viewer-progress,
.story-mode .viewer-controls,
.reel-mode .viewer-controls,
.story-mode .viewer-action,
.reel-mode .viewer-action {
  flex: 0 0 auto;
}
.story-mode #viewer-stage,
.reel-mode #viewer-stage {
  flex: 1 1 auto;
  min-height: 90px;
  height: auto;
  max-height: none;
}
.story-mode #viewer-caption,
.reel-mode #viewer-caption {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 13dvh;
}

/* Real page collections lead; owned service guides are a compact optional tail. */
.guide-moments {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}
.guide-moments summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.guide-moments[open] summary {
  margin-bottom: 18px;
}
.guide-moments .moment-picture {
  filter: saturate(0.8);
}
.feed-tabs {
  flex-wrap: wrap;
}
.page-filter {
  min-height: 44px;
}

.readable-news {
  max-width: 800px;
  margin-inline: auto;
  padding-block: 2rem;
}
.readable-news h1 {
  margin-block: 1.5rem;
}
.readable-news time {
  color: var(--muted);
}
.readable-news-media {
  display: grid;
  gap: 1.5rem;
  margin-block: 2rem;
}
/* v8.1.0: media interleaved between text lines on post pages (SSR and SPA share it). */
.readable-news-body {
  margin-block: 1.5rem;
}
.text-block {
  line-height: 2.2;
  overflow-wrap: anywhere;
  margin-block: 0.9rem;
}
.text-block a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-block blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1.2rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--soft);
}
.inline-media {
  margin: 1.5rem 0;
}
.inline-media img,
.inline-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
#detail-content .inline-media {
  margin: 1.5rem 0;
}
#detail-content .inline-media img {
  border-radius: 12px;
  background: var(--soft);
}
.readable-news-text {
  line-height: 2.2;
  overflow-wrap: anywhere;
}
.readable-news .actions {
  margin-block-start: 2rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-card-gap);
  margin-block: 2rem;
}
.news-grid article {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Equal, predictable journal cards. Full text and full-resolution media stay in the article. */
.journal-grid {
  align-items: stretch;
}
.journal-grid > .post {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.journal-grid > .post > a {
  display: flex;
  flex: 0 0 210px;
  height: 210px;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--soft);
}
.journal-grid .post-cover,
.journal-grid .video-cover img {
  width: 100%;
  height: 210px;
  aspect-ratio: auto;
  object-fit: contain;
}
.journal-grid .post-placeholder {
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  background: radial-gradient(ellipse at 20% 0%, var(--tint), var(--surface));
}
.journal-grid .post-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
/* v8.25.3: fixed 32px height + nowrap clipped meta chips — meta now wraps and the
   card grows (min-height keeps the equal-card look for short metas). */
.journal-grid .post-meta {
  gap: 8px;
  margin-bottom: 8px;
}
.journal-grid .post h3 {
  font-size: 20px;
  line-height: 1.8;
  height: 72px;
  flex: 0 0 72px;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-grid .post .excerpt {
  font-size: 14px;
  line-height: 2;
  margin: 0;
  height: 84px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-grid .post .feed-note {
  display: none;
}
.journal-grid .post-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 44px);
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}
.journal-grid .post-foot > a {
  font-size: 12px;
  padding: 0;
  min-width: 0;
}
.journal-grid .post-foot button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 10px;
}
@media (max-width: 420px) {
  .journal-grid .post-content {
    padding: 16px;
  }
  .journal-grid .post-meta {
    font-size: 11px;
  }
  .journal-grid .post-foot {
    gap: 4px;
  }
}

.journal-grid .post-foot .save-post {
  grid-column: 4;
}

#journal[data-enhanced="true"] .archive-pages {
  display: none;
}

.language-toggle {
  font-size: 0.8rem;
  white-space: nowrap;
  padding: 0.45rem 0.65rem;
  min-height: 36px;
}
.language-pending {
  padding: 0.65rem 1rem;
  border: 1px solid currentColor;
  border-radius: 0.7rem;
  margin: 1rem 0;
  font-size: 0.85rem;
}
.language-pending[hidden] {
  display: none;
}
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid currentColor;
}
.comments-form form {
  display: grid;
  gap: 0.75rem;
  max-width: 38rem;
  margin: 1rem 0;
}
.comments-form label {
  display: grid;
  gap: 0.35rem;
}
.comments-form input,
.comments-form textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 0.6rem;
  padding: 0.7rem;
}
.comments-form textarea {
  resize: vertical;
}
.comments-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
.comment {
  padding: 1rem;
  border: 1px solid currentColor;
  border-radius: 0.7rem;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Account, sign-in and community: aligned with ShieldPack surfaces. */
.account-main {
  padding-block: clamp(32px, 6vw, 76px) 72px;
}
.account-loading {
  color: var(--muted);
  padding: 40px;
}
.account-shell.comments-section {
  margin: 0;
  padding: 0;
  border: 0;
}
.account-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.88fr) minmax(0, 1fr);
  max-width: 1080px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 70px #08143214;
}
.account-story {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 4vw, 50px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, #4b6fd266, transparent 43%),
    linear-gradient(145deg, #0b1936, #070e20 72%);
  color: #f6f8ff;
  min-height: 560px;
}
.account-story::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: auto -100px -150px auto;
  width: 300px;
  height: 300px;
  border: 1px solid #9ab6ff28;
  border-radius: 50%;
  box-shadow:
    0 0 0 40px #9ab6ff08,
    0 0 0 80px #9ab6ff08;
}
.account-kicker,
.comments-overline,
.profile-eyebrow {
  font:
    700 11px/1.4 system-ui,
    sans-serif;
  letter-spacing: 0.15em;
  color: #bccdfd;
}
.account-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 54px 8px 38px;
  border: 1px solid #d6e1ff55;
  border-radius: 38px;
  background: linear-gradient(145deg, #86aaff44, #243d7740);
  box-shadow:
    inset 1px 1px 0 #ffffff40,
    0 20px 45px #02071880;
  transform: rotate(-8deg);
}
.account-art::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid #afc6ff3b;
  border-radius: 46px;
  transform: rotate(13deg);
}
.account-art img {
  position: relative;
  filter: drop-shadow(0 7px 12px #0007);
  transform: rotate(8deg);
}
.account-story h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.35;
  color: #fff;
}
.account-story p {
  position: relative;
  z-index: 1;
  max-width: 34ch;
  margin: 0;
  color: #c8d4ed;
  font-size: 15px;
}
.account-benefits {
  position: relative;
  z-index: 1;
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  color: #e1eaff;
  font-size: 14px;
}
.account-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-benefits li span:first-child {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid #ffffff35;
  border-radius: 8px;
  color: #bcd2ff;
}
.account-grid > .comments-form {
  min-width: 0;
  padding: clamp(24px, 4.5vw, 52px);
}
.auth-card {
  max-width: 440px;
  margin-inline: auto;
}
.auth-heading h2,
.auth-heading h3 {
  margin: 0 0 6px;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.4;
  color: var(--text);
}
.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.auth-tab {
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}
.auth-tab[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 2px 7px #08143216;
}
.auth-google {
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}
.auth-google-error {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.comments-form .auth-form,
.comments-form .auth-code-form,
.comments-form .comment-form {
  display: grid;
  gap: 16px;
  margin: 0;
  max-width: none;
}
.comments-form [hidden] {
  display: none !important;
}
.auth-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.comments-form .auth-field input,
.comments-form .auth-field textarea {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.comments-form .auth-field input::placeholder,
.comments-form .auth-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.comments-form .auth-field input:focus,
.comments-form .auth-field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.auth-password {
  display: flex;
  align-items: stretch;
  position: relative;
}
.comments-form .auth-password input {
  padding-inline-end: 110px;
}
.auth-show {
  position: absolute;
  inset-inline-end: 6px;
  top: 5px;
  bottom: 5px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.auth-hint,
.auth-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.auth-security-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.auth-challenge {
  min-height: 65px;
  max-width: 100%;
  overflow-x: auto;
}
.auth-submit {
  width: 100%;
  min-height: 52px;
}
.auth-code-form h3 {
  margin: 0;
  font-size: 21px;
}
.auth-code-form input {
  letter-spacing: 0.2em;
  text-align: center;
}
.auth-back,
.auth-forgot,
.comment-delete,
.comment-signout,
.comment-account {
  width: fit-content;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.auth-privacy {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.auth-privacy-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.comments-feedback {
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.comments-feedback:empty {
  display: none;
}
.comments-feedback:not(:empty) {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.comments-feedback[data-state="error"] {
  border-color: #df8989;
}
.account-shell > .comments-feedback {
  max-width: 1080px;
  margin: 16px auto 0;
}
.profile {
  display: grid;
  gap: 18px;
  max-width: 500px;
  margin: auto;
}
.profile-welcome {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.profile-avatar,
.comment-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--accent);
  font-weight: 800;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 25px;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 15%, transparent);
}
.profile-eyebrow {
  color: var(--muted);
  font-family: inherit;
  letter-spacing: 0;
}
.profile-welcome h2 {
  margin: 4px 0 0;
  line-height: 1.4;
  font-size: 24px;
  overflow-wrap: anywhere;
}
.profile-welcome p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.profile-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
}
/* v8.1.0: synced bookmarks list in the account panel */
.bookmarks-list {
  display: grid;
  gap: 8px;
}
.bookmark-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.bookmark-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.bookmark-link {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.bookmark-link:hover {
  color: var(--accent);
}
.bookmark-meta {
  font-size: 12px;
  color: var(--muted);
}
.bookmark-remove {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}
.bookmark-remove:hover {
  color: var(--text);
  border-color: var(--accent);
}
.profile-box h3 {
  margin: 0 0 16px;
  font-size: 16px;
}
.profile-details {
  display: grid;
  gap: 0;
  margin: 0;
}
.profile-details > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.profile-details dt {
  color: var(--muted);
  font-size: 13px;
}
.profile-details dd {
  margin: 0;
  text-align: end;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.profile-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-box-head h3 {
  margin: 0;
}
.profile-box p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}
.telegram-future {
  background: var(--soft);
}
.status-pill {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-actions .btn {
  min-height: 44px;
  padding: 8px 14px;
}
.profile-logout {
  color: var(--muted);
}
.comments-section:not(.account-shell) {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}
.comments-heading {
  margin-bottom: 24px;
}
.comments-heading .comments-overline {
  color: var(--accent);
}
.comments-heading h2 {
  margin: 8px 0 2px;
  font-size: clamp(24px, 3vw, 32px);
}
.comments-heading p {
  margin: 0;
  color: var(--muted);
}
.comments-section:not(.account-shell) .auth-card,
.comment-compose {
  max-width: 650px;
  margin: 20px 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.comments-section:not(.account-shell) .auth-heading h3 {
  font-size: 22px;
}
.comment-compose-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 18px;
}
.comment-compose-bar p {
  margin: 0;
  flex: 1 1 160px;
  color: var(--muted);
  font-size: 14px;
}
.comment-form .auth-field textarea {
  min-height: 120px;
  resize: vertical;
}
.comment-form > .btn {
  justify-self: start;
}
.comments-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.comment {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.comment-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}
.comment-head time {
  color: var(--muted);
  font-size: 12px;
}
.comment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 16px 0 6px;
  line-height: 1.9;
}
.comments-empty {
  color: var(--muted);
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.comment-action,
.comment-replying .comment-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.comment-action:hover {
  color: var(--text);
}
.comment-replies {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  margin-inline-start: 18px;
  padding-inline-start: 14px;
  border-inline-start: 2px solid var(--line);
}
.comment-reply {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--soft);
}
.comment-reply .comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.comment-reply p {
  margin: 12px 0 4px;
}
.comment-replying {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 760px) {
  .account-main {
    padding-block: 24px 48px;
  }
  .account-grid {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }
  .account-story {
    min-height: 0;
    padding: 24px;
  }
  .account-art {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    margin: 22px 5px;
  }
  .account-art::before {
    inset: -7px;
    border-radius: 27px;
  }
  .account-art img {
    width: 42px;
    height: 42px;
  }
  .account-story h1 {
    font-size: 23px;
  }
  .account-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
  }
  .account-grid > .comments-form {
    padding: 24px 20px 30px;
  }
  .profile-actions > .btn {
    flex: 1 1 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .comments-form .auth-field input,
  .comments-form .auth-field textarea {
    transition: none;
  }
}
:dir(rtl) .comments-form .auth-password input {
  padding-left: 110px;
  padding-right: 14px;
}
:dir(ltr) .comments-form .auth-password input {
  padding-right: 110px;
  padding-left: 14px;
}
.auth-card > .comments-feedback:not(:empty),
.profile + .comments-feedback:not(:empty) {
  margin: 16px 0 0;
}

/* Reserve the official Google button's space even on a slow connection. */
.auth-google {
  min-height: 44px;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-google-target {
  width: min(100%, 400px);
  min-height: 40px;
  display: flex;
  justify-content: center;
}
.auth-google-target svg {
  max-width: 20px;
  max-height: 20px;
}
.auth-google-loading {
  color: var(--muted);
  font-size: 14px;
}
.auth-google-retry {
  min-height: 44px;
  padding: 4px 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}
.auth-caps {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.comment-counter {
  color: var(--muted);
  font-size: 13px;
  margin: -8px 0 0;
  text-align: end;
}

/* Clear account identity and breathing room around verification feedback. */
.account-story {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.account-art {
  margin: 0 0 38px;
}
.account-story h1 {
  margin: 0 0 8px;
}
.account-story .account-brand p {
  font-family: system-ui, sans-serif;
  color: #c8d4ed;
  font-size: 14px;
}
.auth-card > .comments-feedback:not(:empty) {
  margin: 16px 0 24px;
}
.auth-destination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.auth-destination bdi {
  color: var(--text);
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}
.auth-back {
  min-height: 44px;
  text-align: start;
}
@media (max-width: 760px) {
  .account-story {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: start;
    gap: 20px;
    padding: 20px 24px;
  }
  .account-art {
    flex: none;
    width: 60px;
    height: 60px;
    margin: 4px;
    border-radius: 18px;
  }
  .account-art::before {
    inset: -6px;
    border-radius: 22px;
  }
  .account-art img {
    width: 36px;
    height: 36px;
  }
  .account-story h1 {
    margin: 0 0 2px;
    font-size: 20px;
  }
}

.account-page .footer > .order-options {
  display: none;
}

/* Confine the official Google-rendered button and its hover layer to its own
   slot; keep a separate focus ring outside the clipped area for keyboard use. */
.auth-google {
  overflow: visible;
}
.auth-google-target {
  width: min(100%, 400px);
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 5px;
}
.auth-google-target:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* One consistent icon language: crisp SVGs, subtle depth and purposeful states. */
.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}
.icon-bookmark-fill {
  fill: currentColor;
  opacity: 0;
  stroke: none;
}
[aria-pressed="true"] > .ui-icon .icon-bookmark-fill {
  opacity: 0.85;
}
.post-foot .share,
.post-foot .save-post,
.post-foot .quick-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--surface), var(--soft));
  box-shadow:
    inset 0 1px 0 #ffffff24,
    0 2px 5px #09152e0d;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.post-foot .save-post[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
}
.saved-filter {
  gap: 9px;
}
.saved-filter .ui-icon {
  width: 19px;
  height: 19px;
}
.journal-grid .post-foot .save-post,
.journal-grid .post-foot .quick-preview {
  font-size: inherit;
}
.journal-grid .save-post::before,
.journal-grid .quick-preview::before {
  content: none;
}
.journal-grid .post-foot .ui-icon-label {
  display: none;
}
.play-symbol .ui-icon {
  width: 24px;
  height: 24px;
  margin-inline-start: 2px;
}
.mobile-links > a > .menu-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface), var(--tint));
  box-shadow:
    inset 0 1px 0 #ffffff33,
    0 3px 7px #06153612;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.mobile-links .menu-icon .ui-icon {
  width: 21px;
  height: 21px;
}
.mobile-links .menu-arrow .ui-icon {
  width: 17px;
  height: 17px;
}
[dir="rtl"] .mobile-links .menu-arrow .ui-icon {
  transform: rotate(180deg);
}
.mobile-menu-quick button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.mobile-menu-quick button .ui-icon {
  width: 17px;
  height: 17px;
}
.back-to-top:not([hidden]) {
  display: grid;
  place-items: center;
}
.back-to-top .ui-icon {
  width: 20px;
  height: 20px;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .post-foot button:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 5px 12px #0b1c4224;
  }
  .mobile-links > a:hover .menu-icon {
    transform: translateY(-2px) rotate(-4deg);
    box-shadow: 0 5px 12px #0b1c4224;
  }
  .saved-filter:hover .ui-icon {
    transform: translateY(-2px);
  }
  .saved-filter .ui-icon {
    transition: transform 0.2s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-foot button,
  .mobile-links > a > .menu-icon,
  .saved-filter .ui-icon {
    transition: none;
  }
}

/* v8.3.0: source filter chips in the journal toolbar */
.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 10px;
}
.source-chip {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.source-chip[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--accent);
}
.comments-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
/* v8.3.0: article extras — reading progress, copyable code, zoomable figures */
#read-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #c81f47);
  z-index: 80;
  pointer-events: none;
}
.code-wrap {
  position: relative;
}
.code-wrap pre {
  padding-inline-end: 60px;
}
.copy-code {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.copy-code:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.readable-news .inline-media.zoomable,
#detail-content .inline-media.zoomable {
  cursor: zoom-in;
}
/* v8.3.0: live service status strip on the home page */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-block: 8px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.status-chip[data-state="ok"] .status-dot {
  background: #1d9a5b;
}
.status-chip[data-state="issue"] .status-dot {
  background: #d64545;
}
.status-chip small {
  color: var(--muted);
}

/* v8.3.0: account panel — name edit, history, deletion danger zone */
.profile-details > div {
  align-items: center;
}
.profile-details .bookmark-remove {
  min-width: 28px;
  width: 28px;
  height: 28px;
}
.delete-box {
  border-color: #d6454566;
}
.delete-box .btn.primary {
  background: #d64545;
  border-color: #d64545;
}
.delete-box .btn.primary:hover {
  background: #b93a3a;
}

/* v8.3.3: admin panel */
.admin-row {
  flex-wrap: wrap;
}
.admin-select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.admin-note {
  flex: 1;
  min-width: 140px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.bookmark-row.is-hidden {
  opacity: 0.45;
}
.bookmark-row .btn {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 12px;
}

/* v8.4.0: admin CMS — announcements CRUD, page editor, post editor */
.admin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 8px;
}
.admin-grid .admin-note,
.admin-grid .admin-select {
  flex: 1;
  min-width: 120px;
}
.admin-html {
  width: 100%;
  min-height: 140px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.admin-post-edit {
  display: grid;
  gap: 6px;
  width: 100%;
  padding-block: 6px;
}
.admin-post-edit .admin-html {
  min-height: 90px;
}
.admin-media {
  display: grid;
  gap: 8px;
  padding-block: 4px;
}
.admin-media-grid,
.admin-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.admin-media-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft);
}
.admin-media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-media-video {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
}
.admin-media-tools {
  position: absolute;
  inset-inline-end: 4px;
  inset-block-start: 4px;
  display: flex;
  gap: 3px;
}
.admin-media-tools .admin-tool {
  background: rgba(0, 0, 0, 0.55);
  border-color: transparent;
  color: #fff;
  padding: 2px 5px;
  font-size: 11px;
}
.content-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.content-cols > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.content-spacer {
  height: 48px;
}
.content-steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.content-steps > li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--surface);
}
/* v8.8.0: content manager tabs/search and the visual page builder */
.admin-mode-row {
  gap: 8px;
  flex-wrap: wrap;
}
.admin-mode {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}
.admin-mode.is-active {
  background: var(--tint);
  color: var(--accent);
}
.admin-search {
  width: 100%;
  margin-block: 8px 4px;
}
.admin-post {
  align-items: flex-start;
}
.admin-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.admin-post-head .is-muted {
  color: var(--muted);
}
.admin-badge {
  background: var(--tint);
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.admin-badge.is-pin {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.admin-post-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-post-actions .btn,
.admin-mode {
  white-space: nowrap;
}
.admin-tags {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-tag {
  background: var(--soft);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11px;
  text-decoration: none;
}
.admin-builder {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.admin-builder-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.4fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 860px) {
  .admin-builder-grid {
    grid-template-columns: 1fr;
  }
}
.admin-builder-side,
.admin-builder-editor {
  display: grid;
  gap: 10px;
  align-content: start;
}
.admin-side-title {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.admin-block-list {
  display: grid;
  gap: 6px;
  max-height: 380px;
  overflow: auto;
}
.admin-block-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.admin-block-card.is-selected {
  border-color: var(--accent);
}
.admin-block-label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  font-size: 12px;
  overflow: hidden;
}
.admin-block-label b {
  color: var(--accent);
  font-size: 11px;
  flex-shrink: 0;
}
.admin-block-label span {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-block-tools {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}
.admin-tool,
.admin-addbtn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 3px 7px;
  cursor: pointer;
}
.admin-tool:hover,
.admin-addbtn:hover {
  color: var(--text);
  border-color: var(--accent);
}
.admin-addbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-preview-wrap {
  display: grid;
  gap: 10px;
}
.admin-preview-frame {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: width 0.25s ease;
}
.admin-preview-frame.is-mobile {
  width: 390px;
  margin-inline: auto;
  display: block;
}

/* v8.5.0: iOS safe area + input zoom prevention */
.header {
  padding-top: env(safe-area-inset-top, 0);
}
#feed-search input[type="search"],
.auth-form input,
.comment-form textarea,
.admin-note,
.admin-select,
.admin-html {
  font-size: 16px;
}
@supports (padding: env(safe-area-inset-top)) {
  .wrap {
    padding-inline-start: max(var(--pad, 16px), env(safe-area-inset-left, 0px));
    padding-inline-end: max(var(--pad, 16px), env(safe-area-inset-right, 0px));
  }
}

/* v8.5.0: trust counter strip on home */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding-block: 14px;
  margin-block-end: 12px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}
.trust-item b {
  font-size: 20px;
  color: var(--accent);
}
.trust-item small {
  font-size: 12px;
  color: var(--muted);
}

/* v8.5.0: admin panel page editor with split view */
.admin-editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 400px;
}
.admin-editor-split .admin-html {
  min-height: 400px;
  height: 100%;
  resize: vertical;
}
.admin-editor-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.admin-editor-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 800px) {
  .admin-editor-split {
    grid-template-columns: 1fr;
  }
  .admin-editor-preview {
    min-height: 300px;
  }
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 8px;
}
.admin-toolbar .btn {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
}
.admin-editor-tabs {
  display: flex;
  gap: 4px;
  margin-block: 8px;
}
.admin-editor-tabs .btn.active {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--accent);
}

/* Header nav: animated underline + active page indicator. */
#navigation a {
  position: relative;
  padding-block: 6px;
}
#navigation a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-2) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #navigation a:hover::after {
    transform: scaleX(1);
  }
}
#navigation a[aria-current="page"] {
  color: var(--accent);
}
#navigation a[aria-current="page"]::after {
  transform: scaleX(1);
}
/* ===== Design system v2: motion, elevation, focus, reveal ===== */
/* Buttons: gentle lift on hover, spring press on activate (fine pointers only). */
.btn {
  transition:
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) var(--ease-out),
    filter var(--dur-1) var(--ease-out),
    background var(--dur-1) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
  }
}
.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: var(--dur-1);
}
/* Cards elevate on hover (desktop) and press down (touch). */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .post,
  .profile-box,
  .service-card,
  .admin-block-card {
    transition:
      transform var(--dur-2) var(--ease-out),
      box-shadow var(--dur-2) var(--ease-out);
  }
  .post:hover,
  .profile-box:hover,
  .service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
  }
}
@media (hover: none) {
  .post:active,
  .service-card:active {
    transform: scale(0.985);
    transition: transform var(--dur-1) var(--ease-out);
  }
}
/* One consistent keyboard focus ring everywhere, both themes. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--tint);
  color: var(--text);
}
/* Skeleton cards get a shimmer sweep. */
.skeleton {
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--text) 7%, transparent),
    transparent
  );
  transform: translateX(-100%);
  animation: sk-sweep 1.5s var(--ease-out) infinite;
}
@keyframes sk-sweep {
  to {
    transform: translateX(100%);
  }
}
.page-tags a.tag {
  text-decoration: none;
  transition:
    background var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}
.page-tags a.tag:hover,
.page-tags a.tag.is-active {
  background: var(--accent);
  color: #fff;
}
.article-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 18px;
  margin: 16px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.article-toc .toc-title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.article-toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color var(--dur-1) var(--ease-out);
}
.article-toc a b {
  flex: none;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--tint);
  color: var(--accent);
  font-size: 11px;
}
.article-toc a span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.article-toc a:hover span,
.article-toc a[aria-current] span {
  color: var(--accent);
}
.article-toc a:hover {
  color: var(--text);
}
.article-toc a[aria-current] {
  background: var(--tint);
  color: var(--accent);
  border-color: var(--accent);
}

/* Generic scroll reveal: sections and wrappers tagged with data-reveal fade up.
   The html.js guard keeps everything visible without JavaScript. */
html.js [data-reveal] {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity var(--dur-3) var(--ease-out),
    translate var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  translate: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    translate: none;
    transition: none;
  }
}
/* Hero ambient: slow aurora drift behind the brand panel (transform-only). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) and (min-width: 761px) {
  .hero-panel::after {
    content: "";
    position: absolute;
    inset: -40%;
    background:
      radial-gradient(560px 300px at 72% 18%, #2146d62e, transparent 70%),
      radial-gradient(480px 280px at 18% 82%, #a8183b1f, transparent 70%);
    animation: hero-aurora 16s var(--ease-out) infinite alternate;
    pointer-events: none;
  }
  @keyframes hero-aurora {
    from {
      transform: translate3d(-3%, -2%, 0);
    }
    to {
      transform: translate3d(3%, 2%, 0);
    }
  }
}
/* Mobile: the media viewer becomes a bottom sheet that slides up. */
@media (max-width: 760px) {
  dialog#viewer[open] {
    align-items: stretch;
    padding: 0;
    border: none;
    border-radius: 20px 20px 0 0;
    inset-block-end: 0;
    inset-inline: 0;
    max-height: 92dvh;
    animation: sheet-up var(--dur-3) var(--ease-spring);
  }
  @keyframes sheet-up {
    from {
      translate: 0 6%;
      opacity: 0.6;
    }
  }
}
/* Theme switch crossfade (View Transitions where supported). */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: var(--ease-out);
}
