/* Hoàng Quốc Hoa – Mực và Ấn (ink and seal). Quiet, editorial, one red accent. */
:root {
  --ink: #0b0b0c;         /* page */
  --ink-2: #121213;       /* raised surfaces */
  --ivory: #ece4d3;       /* main text */
  --ivory-soft: #a69e8f;  /* secondary text */
  --hair: rgba(236, 228, 211, 0.14);
  --hair-strong: rgba(236, 228, 211, 0.32);
  --gold: #c2a46a;        /* hairline accent, labels */
  --seal: #a3242b;        /* cinnabar: the only strong color */

  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", "Noto Serif", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --han: "Noto Serif TC", "Songti TC", "PMingLiU", "SimSun", serif;

  --wide: 76rem;
  --narrow: 44rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--ivory);
  font-family: var(--serif); font-size: 1.1875rem; line-height: 1.8;
  -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums;
}
a { color: var(--ivory); text-decoration-color: var(--hair-strong); text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.005em; font-variant-numeric: lining-nums; }
em { font-style: italic; }
p { margin: 0 0 1em; }
.han { font-family: var(--han); font-weight: 600; line-height: 1; }

.label {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 1.1rem;
}

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 30; background: var(--ivory); color: var(--ink); padding: 0.6rem 1rem; font-family: var(--sans); }
.skip:focus { top: 1rem; }

/* ---------- seal ---------- */
.sl-bg { fill: var(--seal); }
.sl-line { fill: none; stroke: #f1d9b5; stroke-width: 1.6; opacity: 0.85; }
.sl-char { font-family: var(--han); font-weight: 700; font-size: 30px; fill: #f6e6c8; text-anchor: middle; dominant-baseline: central; }

/* ---------- header ---------- */
.masthead { position: relative; z-index: 20; border-bottom: 1px solid var(--hair); }
.masthead-inner { max-width: var(--wide); margin: 0 auto; padding: 1.1rem 1.5rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand:hover { color: inherit; }
.brand-seal { width: 2.6rem; height: 2.6rem; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--display); font-weight: 500; font-size: 1.5rem; line-height: 1.1; letter-spacing: 0.01em; }
.brand-tag { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-soft); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.5rem; }
.nav-item { position: relative; }
.nav-link, .menu summary {
  display: block; font-family: var(--sans); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ivory); text-decoration: none; padding: 0.4rem 0; cursor: pointer; line-height: 1.4;
}
.menu summary { list-style: none; display: flex; align-items: center; gap: 0.45rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.35rem; height: 0.35rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.6; }
.nav-link:hover, .menu summary:hover, .nav-link[aria-current="page"], .menu.is-active > summary { color: var(--gold); }
.menu-panel {
  position: absolute; top: calc(100% + 1rem); left: -1.25rem; min-width: 16rem;
  background: var(--ink-2); border: 1px solid var(--hair); padding: 1rem 1.25rem; display: grid; gap: 0.25rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.menu-group { padding: 0.35rem 0; }
.menu-group + .menu-group { border-top: 1px solid var(--hair); padding-top: 0.75rem; }
.menu-title { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.35rem; }
.menu-panel a { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--ivory); text-decoration: none; padding: 0.15rem 0; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { color: var(--gold); }

.call, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ivory); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--hair-strong); padding: 0.85rem 1.4rem; background: transparent; cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.call:hover, .btn:hover { border-color: var(--gold); color: var(--gold); }
.btn[disabled] { opacity: 0.5; cursor: wait; }

.nav-toggle { display: none; font: 500 0.76rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ivory); background: none; border: 1px solid var(--hair-strong); padding: 0.6rem 1rem; cursor: pointer; }

@media (max-width: 60rem) {
  .js .nav-toggle { display: block; }
  .nav { flex-direction: column; align-items: stretch; gap: 1rem; width: 100%; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 1px solid var(--hair); padding: 1rem 1.5rem 1.75rem; }
  .js .masthead.is-open .nav { display: flex; }
  .masthead-inner { flex-wrap: wrap; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .menu-panel { position: static; box-shadow: none; border: 0; background: none; padding: 0.25rem 0 0.5rem 0.9rem; min-width: 0; }
  .call { width: 100%; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 4.5rem 1.5rem 5rem; overflow: hidden; }
.hero::before {
  /* a faint wash of ink mist behind the compass */
  content: ""; position: absolute; right: -10%; top: -10%; width: 70%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(236, 228, 211, 0.06), transparent 70%);
}
.hero-side {
  position: absolute; left: 1.4rem; top: 4.5rem; margin: 0;
  writing-mode: vertical-rl; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-soft);
}
.hero-side span { font-family: var(--han); font-size: 1rem; letter-spacing: 0.4em; color: var(--ivory); margin-bottom: 1.25rem; display: inline-block; }
@media (max-width: 60rem) { .hero-side { display: none; } }
.hero-inner { position: relative; max-width: var(--wide); margin: 0 auto; display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 60rem) { .hero-inner { grid-template-columns: 5fr 7fr; gap: 3rem; padding-left: 2.5rem; } }
.hero h1 { font-size: clamp(3rem, 6.4vw, 5.6rem); line-height: 1.02; margin-bottom: 1.75rem; }
.hero h1 em { color: var(--gold); }
.lede { font-size: 1.15rem; color: var(--ivory-soft); max-width: 30rem; margin-bottom: 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.link-arrow { font-family: var(--display); font-size: 1.45rem; font-style: italic; text-decoration: none; border-bottom: 1px solid var(--hair-strong); padding-bottom: 0.15rem; }
.link-arrow:hover { border-color: var(--gold); }
.link-arrow span { display: inline-block; transition: transform 0.3s ease; }
.link-arrow:hover span { transform: translateX(4px); }
.hero-compass { width: 100%; max-width: 42rem; justify-self: center; }
.compass-note { text-align: center; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-soft); margin: 1.25rem 0 0; }

/* ---------- la bàn ---------- */
.compass { display: block; width: 100%; height: auto; overflow: visible; }
.c-ring { fill: none; stroke: var(--hair-strong); stroke-width: 1; }
.c-ring--outer { stroke: var(--gold); stroke-opacity: 0.7; }
.c-ticks line { stroke: var(--ivory); stroke-opacity: 0.25; stroke-width: 1; }
.c-ticks line.major { stroke: var(--gold); stroke-opacity: 0.8; }
.seg-fill { fill: transparent; stroke: var(--hair); stroke-width: 1; transition: fill 0.4s ease; }
.seg text { pointer-events: none; transition: fill 0.4s ease, opacity 0.4s ease; }
.c-han { font-family: var(--han); font-weight: 600; font-size: 25px; fill: var(--ivory); text-anchor: middle; dominant-baseline: central; }
.c-name { font-family: var(--sans); font-weight: 500; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; fill: var(--ivory-soft); text-anchor: middle; }
.c-sec { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase; fill: var(--ivory); text-anchor: middle; }
a.seg { outline: none; cursor: pointer; }
a.seg:hover .seg-fill, a.seg:focus-visible .seg-fill { fill: rgba(236, 228, 211, 0.07); }
a.seg:hover text, a.seg:focus-visible text { fill: var(--gold); }
a.seg:focus-visible .seg-fill { stroke: var(--gold); }
.seg.is-empty text { opacity: 0.3; }
.c-gua rect { fill: var(--ivory); opacity: 0.55; }
.c-marks path { fill: var(--seal); }
.core-fill { fill: var(--ink); stroke: var(--gold); stroke-opacity: 0.7; stroke-width: 1; transition: fill 0.4s ease; }
.c-core text { text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
a.c-core { outline: none; }
a.c-core:hover .core-fill, a.c-core:focus-visible .core-fill { fill: #161617; }
a.c-core:focus-visible .core-fill { stroke-width: 2.5; }
.c-core-label { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; fill: var(--gold); }
.c-core-date { font-family: var(--display); font-weight: 400; font-size: 58px; fill: var(--ivory); font-variant-numeric: lining-nums; }
.c-core-year { font-family: var(--sans); font-size: 12px; letter-spacing: 0.24em; fill: var(--ivory-soft); }
.c-core-go { font-family: var(--display); font-style: italic; font-size: 18px; fill: var(--ivory); text-decoration: underline; }

/* click: the chosen piece fills with cinnabar, then the page dissolves like ink */
.compass.is-casting .seg:not(.is-chosen) text { opacity: 0.25; }
.compass .is-chosen .seg-fill { fill: var(--seal); transition: fill 0.25s ease; }
.compass .is-chosen text { fill: #f6e6c8 !important; }
body.is-leaving main { opacity: 0; filter: blur(4px); transition: opacity 0.45s ease, filter 0.45s ease; }

/* ---------- sections ---------- */
.sec { max-width: var(--wide); margin: 0 auto; padding: 5.5rem 1.5rem; border-top: 1px solid var(--hair); }
.sec-head { margin-bottom: 2.5rem; }
.sec-head h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: 0; }

.ix { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.ix-row {
  display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 1.5rem; align-items: baseline;
  padding: 1.6rem 0; border-bottom: 1px solid var(--hair); text-decoration: none; color: var(--ivory);
  transition: padding-left 0.35s ease;
}
a.ix-row:hover { padding-left: 0.75rem; color: var(--ivory); }
a.ix-row:hover .ix-title, a.ix-row:hover .ix-go { color: var(--gold); }
.ix-n { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--ivory-soft); }
.ix-body { display: flex; flex-direction: column; gap: 0.25rem; }
@media (min-width: 48rem) { .ix-body { flex-direction: row; align-items: baseline; gap: 2rem; } .ix-title { min-width: 20rem; } }
.ix-title { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; transition: color 0.3s ease; }
.ix-text { color: var(--ivory-soft); font-size: 1rem; }
.ix-go { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); transition: color 0.3s ease; }
.ix-go span { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0; text-transform: none; }
.ix-row.is-empty { opacity: 0.45; }

.cols { display: grid; gap: 0; border-top: 1px solid var(--hair); }
@media (min-width: 48rem) { .cols { grid-template-columns: repeat(3, 1fr); } }
.col { display: flex; flex-direction: column; gap: 0.6rem; padding: 2rem 1.75rem 2rem 0; text-decoration: none; color: var(--ivory); border-bottom: 1px solid var(--hair); }
@media (min-width: 48rem) { .col { border-bottom: 0; padding: 2rem 2rem 0 2rem; border-left: 1px solid var(--hair); } .col:first-child { border-left: 0; padding-left: 0; } }
.col .label { margin: 0; }
.col-title { font-family: var(--display); font-size: 1.75rem; line-height: 1.15; transition: color 0.3s ease; }
.col:hover .col-title { color: var(--gold); }
.col-text { color: var(--ivory-soft); font-size: 1rem; line-height: 1.7; }

.about-inner { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 52rem) { .about-inner { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.portrait {
  aspect-ratio: 4 / 5; border: 1px solid var(--hair-strong); display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(236, 228, 211, 0.05), transparent 70%);
  max-width: 26rem; width: 100%;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) contrast(1.05); }
.portrait-name { display: flex; flex-direction: column; align-items: center; gap: 0.35em; font-family: var(--han); font-weight: 600; font-size: clamp(3rem, 7vw, 4.75rem); line-height: 1; color: var(--ivory); opacity: 0.85; }
.about-text h2 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.about-text > p { color: var(--ivory-soft); max-width: 36rem; }
.facts { display: flex; flex-wrap: wrap; gap: 3rem; margin: 2.25rem 0 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--hair); }
.facts dt { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.facts dd { margin: 0.3rem 0 0; font-family: var(--display); font-size: 2rem; line-height: 1.1; font-variant-numeric: lining-nums; }

/* ---------- contact ---------- */
.lienlac { padding: 5.5rem 1.5rem; border-top: 1px solid var(--hair); }
.lienlac-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 3rem; }
@media (min-width: 56rem) { .lienlac-inner { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.lienlac h2 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.lienlac-info > p { color: var(--ivory-soft); }
.info-list { margin: 2rem 0 0; }
.info-list div { margin-bottom: 1.4rem; }
.info-list dt { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.info-list dd { margin: 0.2rem 0 0; font-family: var(--display); font-size: 1.6rem; }
.info-list a { text-decoration: none; }

.form label { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); margin-bottom: 1.75rem; }
.form-row { display: grid; gap: 0 2rem; }
@media (min-width: 36rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 0.4rem;
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0; text-transform: none;
  padding: 0.55rem 0; background: transparent; color: var(--ivory);
  border: 0; border-bottom: 1px solid var(--hair-strong); border-radius: 0;
}
.form textarea { resize: vertical; min-height: 7rem; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--gold); }
.form-hint { font-family: var(--sans); font-size: 0.85rem; color: var(--ivory-soft); }
.form-status { font-family: var(--sans); font-size: 0.95rem; margin: 1rem 0 0; min-height: 1.5em; }
.form-status--ok { color: #b9d8b0; }
.form-status--err { color: #f0a8a8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- reading pages ---------- */
.wrap { max-width: var(--narrow); margin: 0 auto; padding: 4rem 1.5rem 5rem; }
.page-head { margin-bottom: 3rem; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.page-sub { color: var(--ivory-soft); }
.page-head .date { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.page-head .intro { font-size: 1.2rem; color: var(--ivory-soft); margin-top: 1.5rem; }

.crumbs { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.crumbs [aria-current] { color: var(--gold); }
.crumbs .sep { opacity: 0.4; }

.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.entry a { display: block; padding: 1.75rem 0; border-bottom: 1px solid var(--hair); text-decoration: none; color: var(--ivory); }
.entry time { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.entry h2 { font-size: 2rem; margin: 0.35rem 0 0.4rem; transition: color 0.3s ease; }
.entry a:hover h2 { color: var(--gold); }
.entry p { margin: 0; color: var(--ivory-soft); font-size: 1rem; }

.nhay { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding: 1.25rem 0; margin: 0 0 1rem; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.nhay a { display: inline-flex; align-items: baseline; gap: 0.4rem; text-decoration: none; color: var(--ivory-soft); font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.2rem 0; }
.nhay .han { font-size: 1.15rem; color: var(--ivory); }
.nhay a:hover, .nhay a:hover .han { color: var(--gold); }

.tuoi { padding-top: 2.5rem; margin-top: 2.5rem; border-top: 1px solid var(--hair); scroll-margin-top: 1.5rem; }
.tuoi:first-of-type { border-top: 0; }
.tuoi h2 { display: flex; align-items: baseline; gap: 1rem; font-size: 2.3rem; }
.seal { font-family: var(--han); font-weight: 600; color: var(--seal); font-size: 2rem; line-height: 1; }
.seal--lg { font-size: 4.5rem; }
.mang h3 { font-family: var(--sans); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 1.4rem 0 0.4rem; }
.len { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 1rem; }
.len a { color: var(--ivory-soft); }
.prose { font-size: 1.2rem; }
.prose p { margin-bottom: 1.3em; }
.prose > p:first-child::first-letter { font-family: var(--display); float: left; font-size: 4.2rem; line-height: 0.85; padding: 0.35rem 0.6rem 0 0; color: var(--gold); }

.sign-head { display: flex; gap: 1.75rem; align-items: center; }
.sign-head h1 { margin-bottom: 0.15em; }
.sign-head .page-sub { margin: 0; }
.tuoi--latest { margin-top: 0; }
.tuoi--latest + .tuoi--latest { margin-top: 2.5rem; border-top: 1px solid var(--hair); }

.older { margin-top: 4rem; }
.older h2 { font-size: 1.9rem; }
.older ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.older a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--hair); text-decoration: none; color: var(--ivory); }
.older time { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.older span { color: var(--ivory-soft); font-size: 1rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }
.pager a { text-decoration: none; }
.empty { font-family: var(--sans); color: var(--ivory-soft); padding: 2rem 0; }
.preview-bar { margin: 0; padding: 0.75rem 1rem; text-align: center; background: var(--seal); color: #f6e6c8; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hair); font-family: var(--sans); font-size: 0.9rem; }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 3rem 1.5rem 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer p { margin: 0; }
.footer .footer-fine { margin: 0 auto; }
.footer-name { font-family: var(--display); font-size: 1.6rem; }
.footer-tag { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-soft); margin-top: 0.3rem !important; }
.footer-links { display: flex; flex-direction: column; gap: 0.35rem; text-align: right; }
.footer a { color: var(--ivory-soft); text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer-fine { max-width: var(--wide); margin: 0 auto; padding: 1.25rem 1.5rem 2rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); }
@media (max-width: 40rem) { .footer-links { text-align: left; } }

/* ---------- ink reveal: content settles in like ink on paper ---------- */
.js .ink { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1), filter 1.1s ease; }
.js .ink.is-in { opacity: 1; transform: none; filter: none; }
.js .ink--late { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .ink { opacity: 1; transform: none; filter: none; }
}
@media (max-width: 40rem) { .hero { padding: 3rem 1.25rem 4rem; } .hero-compass { padding: 0 0.4rem; } .c-name { font-size: 12px; } .c-sec { font-size: 16px; } }

/* ---------- services, steps, faq ---------- */
.wrap--wide { max-width: var(--wide); }
.ix-row--static { cursor: default; }
.steps-sec { margin-top: 5rem; padding-top: 4rem; border-top: 1px solid var(--hair); }
.steps-sec h2 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin-bottom: 2.5rem; }
.steps { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; } }
.steps li { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hair-strong); }
.step-n { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--gold); }
.step-t { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; }
.step-d { color: var(--ivory-soft); font-size: 1rem; }
.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.5rem 2.5rem 1.5rem 0; position: relative;
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.25; transition: color 0.3s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1.3rem; font-family: var(--display); font-size: 1.8rem; color: var(--gold); transition: transform 0.3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--gold); }
.faq details p { color: var(--ivory-soft); margin: 0 0 1.75rem; max-width: 38rem; }
.faq-more { margin-top: 2.5rem; color: var(--ivory-soft); }
.nav-list { gap: 1.25rem; }


/* ---------- stronger header ---------- */
.topbar { border-bottom: 1px solid var(--hair); font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-soft); }
.topbar-inner { max-width: var(--wide); margin: 0 auto; padding: 0.55rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; }
.topbar-right { display: flex; gap: 1.75rem; }
.topbar a { color: var(--gold); text-decoration: none; }
.topbar a:hover { color: var(--ivory); }
@media (max-width: 40rem) { .topbar-inner > span:first-child, .topbar-area { display: none; } .topbar-inner { justify-content: center; } }

.masthead { border-bottom: 0; }
.masthead::after { content: ""; display: block; height: 4px; border-top: 1px solid var(--gold); border-bottom: 1px solid rgba(194, 164, 106, 0.4); opacity: 0.7; }
.masthead-inner { padding-top: 1.4rem; padding-bottom: 1.4rem; }
.brand { gap: 1.1rem; }
.brand-seal {
  width: 3.75rem; height: 3.75rem; padding: 3px;
  border: 1px solid var(--gold); box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px rgba(194, 164, 106, 0.45);
  background: var(--ink);
}
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 1.85rem; line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory);
}
.brand-tag {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 0.45rem;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.32em; color: var(--gold);
}
.brand-tag .rule { flex: 1; height: 1px; background: rgba(194, 164, 106, 0.55); min-width: 1rem; }

@media (max-width: 40rem) {
  .brand-seal { width: 3rem; height: 3rem; }
  .brand-name { font-size: 1.25rem; letter-spacing: 0.1em; }
  .brand-tag { font-size: 0.58rem; letter-spacing: 0.24em; }
  .masthead-inner { padding-top: 1rem; padding-bottom: 1rem; }
}

/* header fit fixes */
.brand-name { white-space: nowrap; font-size: 1.6rem; letter-spacing: 0.12em; }
.brand-tag { white-space: nowrap; justify-content: center; }
.brand-tag .rule { flex: none; width: 1.4rem; }
.nav-link, .menu summary { white-space: nowrap; }
.nav-list { gap: 1.4rem; }
@media (max-width: 78rem) and (min-width: 68.01rem) { .nav-list { gap: 1rem; } .nav-link, .menu summary { letter-spacing: 0.1em; font-size: 0.74rem; } .brand-name { font-size: 1.4rem; } }
/* switch to the phone menu earlier, since the menu has more items now */
@media (max-width: 68rem) {
  .js .nav-toggle { display: block; }
  .nav { flex-direction: column; align-items: stretch; gap: 1rem; width: 100%; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 1px solid var(--hair); padding: 1rem 1.5rem 1.75rem; }
  .js .masthead.is-open .nav { display: flex; }
  .masthead-inner { flex-wrap: wrap; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .menu-panel { position: static; box-shadow: none; border: 0; background: none; padding: 0.25rem 0 0.5rem 0.9rem; min-width: 0; }
  .call { width: 100%; }
}
@media (max-width: 40rem) {
  .masthead-inner { flex-wrap: nowrap; gap: 0.75rem; padding-left: 1rem; padding-right: 1rem; }
  .js .masthead.is-open .masthead-inner { flex-wrap: wrap; }
  .brand { gap: 0.7rem; min-width: 0; }
  .brand-seal { width: 2.7rem; height: 2.7rem; padding: 2px; }
  .brand-name { font-size: 1.05rem; letter-spacing: 0.08em; }
  .brand-tag { font-size: 0.52rem; letter-spacing: 0.2em; gap: 0.4rem; }
  .brand-tag .rule { width: 0.8rem; }
  .nav-toggle { padding: 0.5rem 0.75rem; font-size: 0.68rem; flex: none; }
}

/* ---------- tìm tuổi ---------- */
.finder-inner { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 56rem) { .finder-inner { grid-template-columns: 6fr 6fr; gap: 5rem; } }
.finder h2 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: 0 0 0.75rem; }
.finder-note { color: var(--ivory-soft); margin: 0; }
.finder-form label { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); }
.finder-row { display: flex; gap: 1rem; align-items: flex-end; margin-top: 0.4rem; }
.finder-row input {
  flex: 1; min-width: 0; font-family: var(--display); font-size: 2.6rem; line-height: 1.1; color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--hair-strong); padding: 0.2rem 0; border-radius: 0;
  -moz-appearance: textfield;
}
.finder-row input::-webkit-outer-spin-button, .finder-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.finder-row input::placeholder { color: rgba(236, 228, 211, 0.2); }
.finder-row input:focus { outline: none; border-bottom-color: var(--gold); }
.finder-result { min-height: 1rem; margin-top: 1.75rem; }
.finder-cc { font-family: var(--display); font-size: 2.4rem; line-height: 1.1; margin: 0; color: var(--gold); }
.finder-menh { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); margin: 0.4rem 0 1.25rem; }
.finder-err { color: #f0a8a8; font-family: var(--sans); font-size: 0.95rem; }
.compass .is-mine .seg-fill { fill: rgba(163, 36, 43, 0.55); }
.compass .is-mine text { fill: #f6e6c8; }

/* ---------- 12 con giáp ---------- */
.zgrid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
@media (min-width: 40rem) { .zgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .zgrid { grid-template-columns: repeat(4, 1fr); } }
.zg {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 2rem 1.5rem 1.75rem;
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); text-decoration: none; color: var(--ivory);
  transition: background-color 0.4s ease;
}
.zg:hover { background: rgba(236, 228, 211, 0.04); color: var(--ivory); }
.zg-han { font-size: 3rem; margin-bottom: 0.75rem; transition: color 0.3s ease; }
.zg:hover .zg-han { color: var(--seal); }
.zg-name { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.zg-animal { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.zg-years { font-family: var(--sans); font-size: 0.8rem; color: var(--ivory-soft); margin-top: 0.5rem; letter-spacing: 0.04em; }

.mine { border: 1px solid var(--hair-strong); border-left: 3px solid var(--seal); padding: 1rem 1.25rem; margin: 0 0 2.5rem; color: var(--ivory-soft); }
.mine strong { color: var(--ivory); font-weight: 600; }
.years-list { display: grid; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .years-list { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.years-list li { display: grid; grid-template-columns: 3.5rem 1fr; padding: 0.7rem 0; border-bottom: 1px solid var(--hair); }
.years-list .y { font-family: var(--display); font-size: 1.3rem; grid-row: span 2; }
.years-list .cc { font-size: 1rem; }
.years-list .mn { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivory-soft); }
.years-list li.is-mine .y, .years-list li.is-mine .cc { color: var(--gold); }

/* ---------- footer columns ---------- */
.footer-cols { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 52rem) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 52rem) { .footer-brand { grid-column: auto; } }
.footer-seal { width: 3rem; height: 3rem; display: block; margin-bottom: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-h { font-size: 0.68rem !important; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem !important; }
.footer-col span { color: var(--ivory-soft); }
.footer-tag { text-transform: none !important; letter-spacing: 0.02em !important; font-size: 0.9rem !important; max-width: 18rem; }

/* =========================================================
   v10: matching double rules, section tones, new headers
   ========================================================= */

/* one double gold rule, used under the header and between every section */
:root { --rule-top: rgba(194, 164, 106, 0.7); --rule-bottom: rgba(194, 164, 106, 0.3); }
.masthead::after, .sec::before, .lienlac::before, .footer::before {
  content: ""; display: block; height: 4px;
  border-top: 1px solid var(--rule-top); border-bottom: 1px solid var(--rule-bottom); opacity: 1;
}
.sec::before, .lienlac::before, .footer::before { position: absolute; top: 0; left: 0; right: 0; }

/* sections become full-width bands so the rules and tones run edge to edge */
.sec, .lienlac {
  position: relative; max-width: none; margin: 0; border-top: 0;
  padding: 6rem max(1.5rem, calc((100% - var(--wide)) / 2));
}
.footer { position: relative; border-top: 0; background: #080808; }
.footer-inner { padding-top: 3.5rem; }

/* quiet tonal gradients, a different mood for each band */
.hero { background: radial-gradient(60rem 40rem at 78% 30%, rgba(236, 228, 211, 0.055), transparent 70%), linear-gradient(180deg, #0b0b0c 0%, #0d0c0b 100%); }
.hero::before { display: none; }
.finder { background: radial-gradient(45rem 22rem at 8% 60%, rgba(163, 36, 43, 0.14), transparent 70%), linear-gradient(180deg, #100d0c 0%, #0b0b0c 100%); }
.index { background: linear-gradient(180deg, #0b0b0c 0%, #0f0e0c 100%); }
.moi { background: radial-gradient(50rem 25rem at 90% 10%, rgba(194, 164, 106, 0.06), transparent 70%), #0c0c0c; }
.about { background: radial-gradient(48rem 32rem at 18% 45%, rgba(194, 164, 106, 0.09), transparent 70%), linear-gradient(180deg, #0e0d0b 0%, #0b0b0c 100%); }
.lienlac { background: radial-gradient(40rem 24rem at 85% 70%, rgba(163, 36, 43, 0.10), transparent 70%), linear-gradient(180deg, #0b0b0c 0%, #110f0d 100%); }

/* ---------- header A: centered, like an old house of learning ---------- */
.masthead--center { border-bottom: 0; background: linear-gradient(180deg, #0f0e0c 0%, #0b0b0c 100%); }
.mh-top {
  max-width: var(--wide); margin: 0 auto; padding: 2rem 1.5rem 1.5rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
}
.mh-meta { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ivory-soft); text-decoration: none; }
.mh-phone { justify-self: end; color: var(--gold); }
.mh-phone:hover { color: var(--ivory); }
.masthead--center .brand { flex-direction: column; gap: 0.9rem; margin: 0; text-align: center; }
.masthead--center .brand-seal {
  width: 4.25rem; height: 4.25rem; padding: 0; border: 0; box-shadow: none; background: none;
  filter: drop-shadow(0 6px 18px rgba(163, 36, 43, 0.35));
}
.masthead--center .brand-text { align-items: center; }
.masthead--center .brand-name { font-family: var(--display); font-weight: 600; font-size: 2.5rem; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1; margin-right: -0.2em; }
.masthead--center .brand-tag { margin-top: 0.7rem; font-size: 0.66rem; letter-spacing: 0.34em; color: var(--gold); }
.masthead--center .brand-tag .rule { width: 2.5rem; }
.mh-navrow { border-top: 1px solid var(--hair); }
.masthead--center .nav { max-width: var(--wide); margin: 0 auto; padding: 0.9rem 1.5rem; justify-content: center; gap: 2.5rem; }
.masthead--center .nav-list { gap: 2.25rem; }
.masthead--center .call { padding: 0.6rem 1.1rem; }
.masthead--center .menu-panel { left: 50%; transform: translateX(-50%); }
.masthead--center .nav-toggle { display: none; }

@media (max-width: 68rem) {
  .mh-top { grid-template-columns: 1fr auto; padding: 1rem 1.25rem; }
  .mh-meta { display: none; }
  .masthead--center .brand { flex-direction: row; gap: 0.8rem; text-align: left; }
  .masthead--center .brand-seal { width: 3rem; height: 3rem; }
  .masthead--center .brand-text { align-items: flex-start; }
  .masthead--center .brand-name { font-size: 1.35rem; letter-spacing: 0.12em; margin-right: 0; }
  .masthead--center .brand-tag { margin-top: 0.4rem; font-size: 0.55rem; letter-spacing: 0.2em; }
  .masthead--center .brand-tag .rule { display: none; }
  .js .masthead--center .nav-toggle { display: block; justify-self: end; }
  .mh-navrow { border-top: 0; }
  .masthead--center .nav { justify-content: flex-start; }
  .masthead--center .menu-panel { left: auto; transform: none; }
}
@media (max-width: 26rem) { .masthead--center .brand-name { font-size: 1.1rem; } }

/* ---------- header B: refined left ---------- */
.masthead--left .brand-seal { width: 3.6rem; height: 3.6rem; padding: 0; border: 0; box-shadow: none; background: none; filter: drop-shadow(0 6px 16px rgba(163, 36, 43, 0.3)); }
.masthead--left .brand-name { font-weight: 600; font-size: 2rem; letter-spacing: 0.01em; text-transform: none; }
.masthead--left .brand-tag { display: block; margin-top: 0.35rem; font-family: var(--display); font-style: italic; font-size: 1rem; letter-spacing: 0.01em; text-transform: none; color: var(--gold); }
@media (max-width: 40rem) { .masthead--left .brand-name { font-size: 1.35rem; } .masthead--left .brand-tag { font-size: 0.8rem; } .masthead--left .brand-seal { width: 2.8rem; height: 2.8rem; } }

/* ---------- v11: seal portrait, lighter section rules, stronger tones ---------- */
.portrait:has(.portrait-seal) { border: 0; background: none; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 80px rgba(163, 36, 43, 0.18); }
.portrait-seal { display: block; width: 100%; height: 100%; }
.ps-bg { fill: var(--seal); }
.ps-line { fill: none; stroke: #f6ead2; stroke-width: 1.1; }
.ps-line--thin { stroke-width: 0.5; opacity: 0.75; }
.ps-char { font-family: var(--han); font-weight: 700; font-size: 34px; fill: #f6ead2; text-anchor: middle; dominant-baseline: central; }

/* section dividers: a whisper, not a border. The tones carry the change. */
.sec::before, .lienlac::before, .footer::before {
  height: 3px; border-top: 1px solid rgba(194, 164, 106, 0.16); border-bottom: 1px solid rgba(194, 164, 106, 0.06);
}

.finder { background: radial-gradient(55rem 28rem at 6% 55%, rgba(163, 36, 43, 0.24), transparent 70%), linear-gradient(180deg, #130f0d 0%, #0b0b0c 100%); }
.index { background: radial-gradient(60rem 30rem at 100% 0%, rgba(194, 164, 106, 0.07), transparent 70%), linear-gradient(180deg, #0b0b0c 0%, #12100d 100%); }
.moi { background: radial-gradient(55rem 28rem at 88% 15%, rgba(194, 164, 106, 0.1), transparent 70%), #0c0c0c; }
.about { background: radial-gradient(52rem 34rem at 20% 45%, rgba(163, 36, 43, 0.16), transparent 70%), linear-gradient(180deg, #110e0c 0%, #0b0b0c 100%); }
.lienlac { background: radial-gradient(46rem 26rem at 88% 75%, rgba(194, 164, 106, 0.1), transparent 70%), linear-gradient(180deg, #0b0b0c 0%, #14110e 100%); }
.footer { background: linear-gradient(180deg, #0a0909 0%, #060606 100%); }

/* ---------- v12: seal beside the name; header line matches section lines ---------- */
.masthead--center .brand { flex-direction: row; align-items: center; gap: 1.1rem; text-align: left; }
.masthead--center .brand-text { align-items: flex-start; }
.masthead--center .brand-seal { width: 3.6rem; height: 3.6rem; }
.masthead--center .brand-tag { justify-content: flex-start; }
.masthead--center .brand-tag .rule:first-child { display: none; }
.mh-top { padding: 1.6rem 1.5rem 1.4rem; }
.masthead::after { height: 3px; border-top: 1px solid rgba(194, 164, 106, 0.16); border-bottom: 1px solid rgba(194, 164, 106, 0.06); }
@media (max-width: 68rem) { .masthead--center .brand-seal { width: 3rem; height: 3rem; } }
.masthead--center .brand-tag .rule { display: none; }

/* ---------- v13: centered tagline and tabs, serif capitals, discreet login ---------- */
.masthead--center .brand-text { align-items: center; }
.masthead--center .brand-tag { justify-content: center; align-self: stretch; }
.mh-right { justify-self: end; display: flex; align-items: center; gap: 1.5rem; }
.mh-login { color: var(--ivory-soft); opacity: 0.7; }
.mh-login:hover { color: var(--gold); opacity: 1; }

.masthead--center .nav { justify-content: center; }
.masthead--center .nav-list { gap: 2.6rem; }
.masthead--center .nav-link, .masthead--center .menu summary {
  font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.masthead--center .menu summary::after { width: 0.3rem; height: 0.3rem; }
.masthead--center .call--mobile { display: none; }
@media (max-width: 68rem) {
  .masthead--center .brand-text { align-items: flex-start; }
  .masthead--center .brand-tag { justify-content: flex-start; }
  .masthead--center .nav-link, .masthead--center .menu summary { font-size: 1.15rem; }
  .masthead--center .call--mobile { display: inline-flex; width: 100%; margin-top: 0.5rem; }
}

/* ---------- v14: login far right, smaller tabs ---------- */
.masthead--center { position: relative; }
.mh-right { gap: 3.5rem; }
@media (min-width: 82rem) {
  .mh-login { position: absolute; right: 1.75rem; top: 50%; }
  .mh-top { position: static; }
  .masthead--center .mh-login { top: 2.85rem; }
}
.masthead--center .nav-link, .masthead--center .menu summary { font-size: 0.8rem; letter-spacing: 0.24em; font-weight: 600; }
.masthead--center .nav-list { gap: 2.4rem; }
.masthead--center .nav { padding-top: 0.8rem; padding-bottom: 0.8rem; }
@media (max-width: 68rem) { .masthead--center .nav-link, .masthead--center .menu summary { font-size: 1rem; letter-spacing: 0.14em; } }
@media (min-width: 68.01rem) {
  .mh-login { position: absolute; right: 1.25rem; top: 0.85rem !important; font-size: 0.6rem; }
}

/* ---------- v15: lighter, slightly smaller tabs ---------- */
.masthead--center .nav-link, .masthead--center .menu summary { font-weight: 400; font-size: 0.76rem; letter-spacing: 0.24em; color: rgba(236, 228, 211, 0.88); }
.masthead--center .nav-link:hover, .masthead--center .menu summary:hover,
.masthead--center .nav-link[aria-current="page"], .masthead--center .menu.is-active > summary { color: var(--gold); }
@media (max-width: 68rem) { .masthead--center .nav-link, .masthead--center .menu summary { font-size: 1rem; } }

/* ---------- v16: login on the same line as the phone ---------- */
@media (min-width: 68.01rem) {
  .mh-top { position: relative; max-width: none; padding-left: max(1.5rem, calc((100% - var(--wide)) / 2 + 1.5rem)); padding-right: max(1.5rem, calc((100% - var(--wide)) / 2 + 1.5rem)); }
  .mh-login { position: absolute; top: 50% !important; transform: translateY(-50%); right: 3.25rem; font-size: 0.6rem; }
}
@media (min-width: 68.01rem) { .mh-login { right: 2rem; transform: translateY(-38%); } }

/* ---------- v17: tabs match "San Jose, California" exactly ---------- */
.masthead--center .nav-link, .masthead--center .menu summary {
  font-family: var(--sans); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ivory-soft);
}
.masthead--center .nav-link:hover, .masthead--center .menu summary:hover,
.masthead--center .nav-link[aria-current="page"], .masthead--center .menu.is-active > summary { color: var(--gold); }
@media (max-width: 68rem) { .masthead--center .nav-link, .masthead--center .menu summary { font-size: 0.85rem; } }

/* ---------- v18: dropdown items match the group title style ---------- */
.menu-panel a {
  font-family: var(--sans); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ivory); padding: 0.45rem 0;
}
.menu-panel a:hover, .menu-panel a[aria-current="page"] { color: var(--gold); }
.menu-title { margin-bottom: 0.2rem; }
.menu-panel { gap: 0.15rem; }
@media (max-width: 68rem) { .menu-panel a { font-size: 0.8rem; } }

/* ---------- v29: tabs centered under the name (not under seal + name) ---------- */
@media (min-width: 68.01rem) {
  .masthead--center .nav-list { transform: translateX(calc((3.6rem + 1.1rem) / 2 + 0.25rem)); }
}
#lien-lac { scroll-margin-top: 1rem; }

/* =========================================================
   iPad + iPhone header: San Jose left, phone right, logo and
   name centered, all menu tabs visible (no "Menu" button).
   ========================================================= */
@media (max-width: 68rem) {
  .masthead--center .mh-top {
    display: grid; grid-template-columns: 1fr 1fr; align-items: center;
    row-gap: 1rem; padding: 0.9rem 1.25rem 1.1rem; max-width: none;
  }
  .masthead--center .mh-meta { display: inline; }
  .masthead--center .mh-top > .mh-meta:first-child { grid-row: 1; grid-column: 1; justify-self: start; }
  .masthead--center .mh-right { grid-row: 1; grid-column: 2; justify-self: end; display: flex; gap: 1.25rem; }
  .masthead--center .mh-login { position: static !important; transform: none !important; font-size: 0.6rem; }
  .masthead--center .brand { grid-row: 2; grid-column: 1 / -1; justify-self: center; flex-direction: row; gap: 0.85rem; }
  .masthead--center .brand-text { align-items: center; }
  .masthead--center .brand-tag { justify-content: center; margin-top: 0.45rem; }
  .masthead--center .brand-seal { width: 3.2rem; height: 3.2rem; }
  .masthead--center .brand-name { font-size: 1.7rem; letter-spacing: 0.16em; margin-right: -0.16em; }
  .js .masthead--center .nav-toggle, .masthead--center .nav-toggle { display: none !important; }

  .js .masthead--center .nav, .masthead--center .nav {
    display: flex !important; position: static; background: none; border: 0; box-shadow: none;
    flex-direction: row; justify-content: center; padding: 0.7rem 1rem; width: 100%;
  }
  .masthead--center .mh-navrow { border-top: 1px solid var(--hair); }
  .masthead--center .nav-list { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.2rem 1.6rem; transform: none !important; }
  .masthead--center .nav-link, .masthead--center .menu summary { font-size: 0.68rem !important; letter-spacing: 0.2em; padding: 0.45rem 0; }
  .masthead--center .call--mobile { display: none !important; }

  /* dropdowns float under their tab again */
  .masthead--center .menu { position: relative; }
  .masthead--center .menu-panel {
    position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%);
    min-width: 15rem; background: var(--ink-2); border: 1px solid var(--hair); padding: 1rem 1.25rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); z-index: 30;
  }
}

@media (max-width: 40rem) {
  .masthead--center .mh-top { padding: 0.7rem 1rem 0.9rem; row-gap: 0.8rem; }
  .masthead--center .mh-meta { font-size: 0.58rem; letter-spacing: 0.16em; }
  .masthead--center .mh-login { display: none; }
  .masthead--center .brand-seal { width: 2.7rem; height: 2.7rem; }
  .masthead--center .brand-name { font-size: 1.2rem; letter-spacing: 0.12em; margin-right: -0.12em; }
  .masthead--center .brand-tag { font-size: 0.52rem; letter-spacing: 0.22em; }
  .masthead--center .nav-list { gap: 0.1rem 1.1rem; }
  .masthead--center .nav-link, .masthead--center .menu summary { font-size: 0.62rem !important; letter-spacing: 0.16em; }
  /* keep first and last dropdowns on screen */
  .masthead--center .nav-item:first-child .menu-panel { left: 0; transform: none; }
}

/* ---------- contact form: card, boxed fields, inline errors ---------- */
[hidden] { display: none !important; }
.form-card { background: linear-gradient(180deg, rgba(236, 228, 211, 0.035), rgba(236, 228, 211, 0.015)); border: 1px solid var(--hair-strong); padding: 2rem 2rem 1.75rem; }
@media (max-width: 40rem) { .form-card { padding: 1.5rem 1.25rem; } }
.cform-head { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--hair); }
.cform-title { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; margin: 0; color: var(--ivory); }
.cform-sub { margin: 0.35rem 0 0; color: var(--ivory-soft); font-size: 1rem; }
.cf-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 36rem) { .cf-row { grid-template-columns: 1fr 1fr; } }
.cf { display: block; margin-bottom: 1.15rem; }
.cf-l { display: block; font-family: var(--sans); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-soft); margin-bottom: 0.45rem; }
.req { color: var(--seal); }
.cf input, .cf select, .cf textarea {
  display: block; width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ivory);
  background: rgba(11, 11, 12, 0.7); border: 1px solid var(--hair-strong); border-radius: 2px;
  padding: 0.8rem 0.9rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cf select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ivory-soft) 50%), linear-gradient(135deg, var(--ivory-soft) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 1.25rem, calc(100% - 0.85rem) 1.25rem; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; padding-right: 2.25rem; }
.cf select option { background: #141414; color: var(--ivory); }
.cf textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.cf input::placeholder, .cf textarea::placeholder { color: rgba(236, 228, 211, 0.28); }
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194, 164, 106, 0.15); }
.cf.is-bad input, .cf.is-bad textarea { border-color: #c45a5a; }
.cf-err { display: block; min-height: 0; font-family: var(--sans); font-size: 0.85rem; color: #f0a8a8; margin-top: 0.35rem; }
.cf-err:empty { display: none; }
.cf-note { font-family: var(--sans); font-size: 0.85rem; color: var(--ivory-soft); margin: -0.4rem 0 1.15rem; }
.cf-note strong { color: var(--ivory); font-weight: 500; }
.cf-turnstile { margin: 0 0 1rem; }
.cform-foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; padding-top: 1.25rem; border-top: 1px solid var(--hair); }
.cf-privacy { margin: 0; font-family: var(--sans); font-size: 0.8rem; color: var(--ivory-soft); max-width: 22rem; }
.btn--solid { background: var(--seal); border-color: var(--seal); color: #f6e6c8; }
.btn--solid:hover { background: #b92a32; border-color: #b92a32; color: #fff; }
.cform-done { text-align: center; padding: 2rem 1rem; outline: none; }
.cform-seal { width: 4rem; height: 4rem; display: block; margin: 0 auto 1.25rem; filter: drop-shadow(0 8px 20px rgba(163, 36, 43, 0.4)); }
.cform-done p { color: var(--ivory-soft); }
.cform-done .cform-title { color: var(--ivory); margin-bottom: 0.75rem; }

/* =========================================================
   Section tones by importance (home page)
   Hero ........ strongest (main message + la bàn)
   Tìm tuổi .... quiet utility: neutral, no red
   Mục lục ..... key navigation: soft gold light
   Mới nhất .... reading: plain, calm
   Về Thầy ..... trust: warm gold, red glow from the seal
   Liên hệ ..... action: gentle cinnabar warmth
   ========================================================= */
.hero { background: radial-gradient(70rem 45rem at 75% 35%, rgba(236, 228, 211, 0.07), transparent 65%), linear-gradient(180deg, #0d0c0b 0%, #0b0b0c 100%); }
.finder { background: linear-gradient(180deg, #0e0e0f 0%, #0c0c0d 100%); }
.finder .finder-inner { padding: 0.5rem 0; }
.index { background: radial-gradient(60rem 26rem at 50% 0%, rgba(194, 164, 106, 0.10), transparent 70%), linear-gradient(180deg, #100f0d 0%, #0c0b0b 100%); }
.moi { background: linear-gradient(180deg, #0b0b0c 0%, #0e0e0e 100%); }
.about { background: radial-gradient(44rem 30rem at 22% 50%, rgba(163, 36, 43, 0.13), transparent 70%), radial-gradient(60rem 30rem at 85% 30%, rgba(194, 164, 106, 0.07), transparent 70%), linear-gradient(180deg, #110e0c 0%, #0c0b0b 100%); }
.lienlac { background: radial-gradient(50rem 28rem at 80% 60%, rgba(163, 36, 43, 0.12), transparent 70%), linear-gradient(180deg, #0c0b0b 0%, #120f0d 100%); }
.footer { background: linear-gradient(180deg, #090909 0%, #050505 100%); }
/* the finder is a small tool: tighter spacing so it reads as secondary */
.sec.finder { padding-top: 4rem; padding-bottom: 4rem; }
.finder h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.compass-note { font-size: 0.6rem; letter-spacing: 0.22em; margin-top: 2.25rem !important; opacity: 0.85; }

/* ---------- tighter spacing between home sections ---------- */
.sec, .lienlac { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.sec.finder { padding-top: 3rem; padding-bottom: 3rem; }
.finder-result { margin-top: 1.25rem; }
.finder-result:empty { display: none; }
.sec.index { padding-top: 3.75rem; padding-bottom: 3.5rem; }
.sec-head { margin-bottom: 2rem; }
.sec.about { padding-top: 4rem; padding-bottom: 4.5rem; }
.hero { padding-bottom: 3.5rem; }
@media (max-width: 40rem) {
  .sec, .lienlac { padding-top: 3.25rem; padding-bottom: 3.25rem; }
  .sec.finder { padding-top: 2.25rem; padding-bottom: 2.25rem; }
  .sec.index { padding-top: 2.75rem; padding-bottom: 2.5rem; }
  .hero { padding-bottom: 2.5rem; }
}

/* ---------- this lunar year's animal on the la bàn ---------- */
.compass .is-year .seg-fill { fill: rgba(194, 164, 106, 0.16); stroke: rgba(194, 164, 106, 0.55); }
.compass .is-year .c-han { fill: #f3dfae; }
.compass .is-year .c-name { fill: var(--gold); letter-spacing: 0.14em; }
.compass a.is-year:hover .seg-fill, .compass a.is-year:focus-visible .seg-fill { fill: rgba(194, 164, 106, 0.26); }
/* clicking still turns it cinnabar like every other box */
.compass .is-year.is-chosen .seg-fill { fill: var(--seal); }
