@font-face {
  font-family: "Instrument Serif";
  src: url("./instrument-serif-5eb09b5ac0e28b67.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC Display";
  src: url("./noto-serif-sc-headings-v010-600-8140e52897dad003.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fefdfb;
  --surface: #fff;
  --ink: #161514;
  --muted: #625a55;
  --rule: #e3ddd7;
  --control-line: #91847b;
  --action: #a52c24;
  --action-hover: #8a211c;
  --action-text: #fff;
  --wash: #f5f1ed;
  --error-wash: #fae4dc;
  --error-ink: #782d20;
  --heading: "Instrument Serif", "Noto Serif SC Display", "Songti SC", SimSun, Georgia, serif;
  --ui: "Aptos", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-family: var(--ui);
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.62; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
input, select, button { font: inherit; }
.language-control:has(#pl-language-picker) > .language-option { display: none; }
#pl-language-picker {
  inline-size: clamp(77px, 12vw, 128px);
  min-height: 44px;
  padding-inline: 8px 20px;
  color: var(--ink);
  background: var(--paper, #fffdfa);
  border: 1px solid var(--rule, #eaded7);
  border-radius: 8px;
  font-size: .78rem;
}
button { cursor: pointer; }
:where(a, button, select, input, summary) { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
::selection { background: #ead0c3; color: var(--ink); }
.site-width { width: min(1192px, calc(100% - 88px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { width: fit-content; min-height: 48px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-names { display: grid; align-content: center; line-height: 1.15; }
.brand-names strong { font-size: 1rem; letter-spacing: .07em; }
.brand-names span { margin-top: .17rem; color: var(--muted); font-size: .82rem; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3.5vw, 44px); font-size: .95rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; text-underline-offset: 5px; }
.site-nav a:hover { color: var(--action); text-decoration: underline; }
.language-control { justify-self: end; display: inline-flex; align-items: center; gap: 1px; border: 1px solid var(--rule); border-radius: 4px; padding: 2px; }
.language-option { min-width: 44px; min-height: 44px; padding: 5px 8px; color: var(--muted); background: none; border: 0; border-radius: 2px; font-size: .83rem; }
.language-option[aria-pressed="true"] { color: var(--ink); background: var(--wash); font-weight: 750; }

.hero { padding-block: clamp(43px, 4vw, 58px) clamp(38px, 5.9vw, 82px); }
.hero-story { min-width: 0; text-align: center; margin-inline: auto; }
.hero h1 {
  font: 600 clamp(2.4rem, 5.5vw, 4.95rem) / 1.13 var(--heading);
  letter-spacing: -.045em;
  text-wrap: balance;
}
:root[lang="en"] .hero h1 {
  font-size: clamp(2.65rem, 6vw, 5.45rem);
  font-weight: 400;
  letter-spacing: -.025em;
}
.hero-intro { max-width: 43em; margin: 18px auto 24px; color: var(--muted); font-size: clamp(.98rem, 1.53vw, 1.2rem); text-wrap: pretty; }
.hero-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 9px 14px; }
.text-action { min-height: 48px; display: inline-flex; align-items: center; padding: 7px 17px; border: 1px solid var(--rule); border-radius: 26px; text-decoration: none; font-weight: 680; }
.text-action:hover { background: var(--wash); }
.hero-figure { margin: clamp(24px, 3.6vw, 49px) 0 0; }
.palace-stage { position: relative; overflow: hidden; border-radius: 15px; background: #f4ebe1; }
.hero-art { display: block; inline-size: 100%; block-size: auto; }
.hero-figure figcaption { margin-top: 8px; color: var(--muted); font-size: .86rem; text-align: center; }
.palace-labels { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.palace-labels li {
  position: absolute;
  top: 34%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 3px;
  min-inline-size: clamp(30px, 5vw, 70px);
  padding: clamp(3px, .52vw, 7px) 3px;
  border: 1px solid #f9dfa99c;
  border-radius: 3px;
  background: #481b17e8;
  color: #fff8e9;
  text-shadow: 0 1px 1px #34120d;
  box-shadow: 0 1px 4px #28181573;
}
.palace-labels li:nth-child(1) { left: 14.24%; }
.palace-labels li:nth-child(2) { left: 37.29%; }
.palace-labels li:nth-child(3) { left: 62.47%; }
.palace-labels li:nth-child(4) { left: 85.62%; }
.palace-labels span { font-size: clamp(.65rem, 1.16vw, .98rem); line-height: 1.15; text-align: center; }
.palace-labels strong { writing-mode: vertical-rl; letter-spacing: .12em; font: 600 clamp(.86rem, 2.25vw, 1.87rem) / 1.05 var(--heading); }
.primary {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--action);
  border-radius: 3px;
  background: var(--action);
  color: var(--action-text);
  font-weight: 700;
}
.primary:hover { border-color: var(--action-hover); background: var(--action-hover); }
.hero-action { display: inline-flex; align-items: center; gap: 22px; text-decoration: none; padding-inline: 20px; border-radius: 26px; }
.hero-action span:last-child { font-size: 1.18rem; line-height: 1; }

.pillar-demo { margin-top: 24px; }
.demo-meta { display: flex; align-items: end; justify-content: space-between; gap: 10px 16px; margin-bottom: 13px; }
.demo-meta h2 { font-size: clamp(1rem, 2vw, 1.32rem); line-height: 1.2; }
.demo-meta p { margin-top: 4px; color: var(--muted); font-size: .88rem; }
.demo-run { flex-shrink: 0; }
.demo-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.demo-tabs button { min-width: 0; min-height: 124px; padding: 12px 5px; border: 1px solid var(--rule); border-radius: 11px; background: linear-gradient(110deg, #fefdfb, #efebe6); color: var(--ink); display: grid; place-content: center; text-align: center; }
.demo-tabs button:hover { background: var(--wash); }
.demo-tabs button[aria-selected="true"] { background: #f8eeea; border-color: #d8b4ab; box-shadow: inset 0 -3px var(--action); }
.demo-tabs button:focus-visible { outline-offset: -4px; }
.demo-tabs button > span { color: var(--action); font-size: .87rem; font-weight: 690; line-height: 1.2; }
.demo-tabs strong { display: grid; justify-items: center; margin-top: 6px; font: 600 clamp(1.38rem, 2.5vw, 1.95rem) / 1.13 var(--heading); }
.demo-tabs strong span + span { border-top: 1px solid var(--rule); padding-top: 2px; margin-top: 2px; }
.demo-tabs button[aria-selected="true"] strong { color: var(--action); }
.demo-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px 24px; align-items: center; min-height: 96px; margin-top: 9px; padding: 13px 19px; background: #f8f2ee; border: 1px solid #eadad2; border-radius: 9px; }
.demo-pair { display: flex; margin: 0; align-items: stretch; border-inline-end: 1px solid var(--rule); padding-inline-end: 20px; gap: 10px; }
.demo-pair div { min-width: 54px; display: grid; justify-items: center; }
.demo-pair dt { max-width: 90px; font-size: .77rem; color: var(--muted); text-align: center; }
.demo-pair dd { color: var(--action); margin: 0; font: 600 1.35rem var(--heading); }
.demo-detail h3 { font-size: 1rem; }
.demo-detail p { color: var(--muted); font-size: .92rem; margin-top: 3px; }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; color: var(--ink); }
.panel h2, .section-heading h2, .rules-panel h2 {
  color: var(--ink);
  font: 600 clamp(1.6rem, 3.05vw, 2.9rem) / 1.16 var(--heading);
  letter-spacing: -.035em;
}
:root[lang="en"] :is(.panel, .topics, .guide, .rules-panel) h2 { font-size: clamp(2.1rem, 3.8vw, 3.3rem); font-weight: 400; }
.chart-panel {
  display: grid;
  grid-template-columns: minmax(200px, .7fr) minmax(0, 1.5fr);
  align-items: start;
  column-gap: clamp(25px, 6vw, 96px);
  padding: clamp(24px, 4vw, 57px);
  background: #f9f7f4;
  scroll-margin-top: 18px;
}
.form-top { min-width: 0; }
.form-note { max-width: 30ch; margin-block: 11px 19px; }
.quiet {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--control-line);
  border-radius: 3px;
  color: var(--action);
  background: transparent;
  font-size: .86rem;
  font-weight: 650;
}
.quiet:hover { background: var(--wash); }
.inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 12px 0; }
.inputs:first-child { margin-top: 0; }
.inputs.one-column { grid-template-columns: minmax(0, 1fr); }
.calendar-choice { grid-template-columns: minmax(0, 235px); }
.lunar-fields { min-inline-size: 0; margin: 16px 0 13px; padding: 12px; border: 1px solid var(--rule); border-radius: 9px; }
.lunar-fields legend { padding-inline: 5px; font-size: .88rem; font-weight: 700; }
.lunar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.lunar-preview { margin-block: 7px 0; color: var(--action); }
.full-width { grid-column: 1 / -1; }
.inputs label { display: grid; grid-template-rows: 1fr auto; gap: 5px; min-width: 0; font-size: .88rem; font-weight: 700; }
.inputs input, .inputs select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 8px 10px;
  border: 1px solid var(--control-line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--surface);
  font-size: 1rem;
  font-weight: 480;
}
.chart-panel form .primary { width: 100%; }
.love-entry { margin-bottom: 18px; padding: clamp(20px, 3vw, 40px); }
.love-entry-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .68fr); align-items: end; gap: 12px 28px; }
.love-entry-head h2 { margin: 0; }
.love-entry-head label { display: grid; min-width: 0; gap: 5px; font-size: .88rem; font-weight: 700; }
#love-entry-stage { width: 100%; min-width: 0; min-height: 46px; padding-inline: 10px; border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); border-radius: 3px; contain: paint; }
#love-entry-choices { margin-top: 18px; }
#love-entry-question { margin: 0 0 9px; }
#love-entry-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
#love-entry-events button { min-height: 46px; padding: 12px; text-align: start; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 5px; line-height: 1.5; overflow-wrap: anywhere; }
#love-entry-events button:hover, #love-entry-events button[aria-pressed="true"] { background: var(--wash); border-color: var(--action); }
#love-entry-clear { min-height: 42px; margin-top: 6px; padding-inline: 0; color: var(--muted); border: 0; border-radius: 0; background: transparent; text-decoration: underline; font-size: .9rem; }
#love-entry-pending { margin-top: 12px; }
#pair-consent-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--rule); margin-top: 20px; padding-top: 14px; }
#pair-consent-note { flex: 1 1 19rem; margin: 0; }
@media (max-width: 640px) {
  .love-entry-head, #love-entry-events { grid-template-columns: minmax(0, 1fr); }
}
.note { color: var(--muted); font-size: .86rem; }
.input-note { margin-top: 6px; }
.solar-settings { margin-block: 8px 14px; }
.solar-switch { display: flex; align-items: center; min-height: 44px; gap: 9px; width: fit-content; cursor: pointer; font-size: .9rem; font-weight: 650; }
.solar-switch input { inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--action); }
.error { color: var(--error-ink); background: var(--error-wash); padding: 9px 11px; margin-top: 12px; font-size: .93rem; border-inline-start: 3px solid var(--error-ink); }

.result-panel { padding: clamp(23px, 4vw, 49px); margin-block: 19px 0; }
#window { margin-block: 10px 23px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--paper); }
.pillar { min-width: 0; display: grid; justify-items: center; align-content: center; min-height: 122px; padding: 9px 6px; text-align: center; }
.pillar:not(:last-child) { border-inline-end: 1px solid var(--rule); }
.pillar span, .pillar small { color: var(--muted); font-size: .84rem; }
.pillar strong { color: var(--ink); font: 600 clamp(1.1rem, 3vw, 2rem) / 1.5 var(--heading); overflow-wrap: anywhere; }
.pillar small { font-size: .75rem; overflow-wrap: anywhere; }
#candidate-section { margin-top: 23px; }
#occurrence-choice { min-inline-size: 0; margin: 14px 0; padding: 12px 15px 15px; border: 1px solid var(--rule); border-radius: 9px; }
#occurrence-title { max-width: 100%; padding-inline: 4px; font-weight: 700; }
.occurrence-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.occurrence-options label { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 5px; cursor: pointer; }
.occurrence-options label:has(input:checked) { border-color: var(--action); background: var(--wash); }
.occurrence-options input { flex: none; margin: 0; accent-color: var(--action); }
.occurrence-options small { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .occurrence-options { display: grid; } }
#candidate-title { font-size: 1.05rem; }
#candidate-note { margin: 4px 0 11px; }
.candidate-list { display: grid; gap: 7px; margin: 0; padding-inline-start: 1.55rem; }
.candidate-list li { background: var(--surface); border-top: 1px solid var(--rule); padding: 8px 0 9px 8px; }
.candidate-list li::marker { color: var(--action); font-size: .82rem; font-weight: 700; }
.candidate-time { display: block; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.candidate-pillars { display: flex; flex-wrap: wrap; column-gap: 19px; row-gap: 2px; margin-top: 4px; }
.candidate-pillars strong { white-space: nowrap; }
.result-topics { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; padding-top: 17px; margin-top: 20px; border-top: 1px solid var(--rule); }
.result-topics h3 { font-size: 1.08rem; }
.result-topics p { margin-top: 5px; color: var(--muted); }
.timing-reading { margin-top: 19px; border: 1px solid var(--rule); border-radius: 9px; padding: 12px clamp(13px, 2vw, 22px); }
.timing-reading summary { min-height: 32px; font-weight: 700; cursor: pointer; line-height: 32px; }
.timing-reading .note { margin-block: 6px; }
.timing-header { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 7px 17px; margin-top: 11px; }
.timing-header label { display: grid; gap: 4px; }
.timing-header select { min-height: 44px; min-width: 7rem; padding-inline: 10px; border: 1px solid var(--rule); border-radius: 7px; color: var(--ink); background: var(--surface); }
.timing-header strong { font-size: 1.45rem; color: var(--action); padding-block: 4px; }
.timing-points { margin-block: 13px 2px; }
.timing-points div + div { padding-top: 7px; margin-top: 7px; border-top: 1px solid var(--rule); }
.timing-points dt { font-weight: 700; }
.timing-points dd { margin-inline-start: 0; overflow-wrap: anywhere; }
.month-reading { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--rule); }
.month-reading h3 { font-size: 1.14rem; }
.month-reading h4 { margin: 16px 0 4px; color: var(--action); }
.month-reading .timing-header label, .month-reading select { min-width: 0; max-width: 100%; }
.month-reading .timing-header select { contain: paint; }
.report-builder { margin-top: 26px; border-top: 1px solid var(--rule); padding-top: 16px; scroll-margin-top: 20px; }
.report-builder h3 { font-size: 1.14rem; }
#period-assessment { margin-block: 18px; padding: clamp(12px, 2vw, 23px); border: 1px solid var(--rule); border-radius: 9px; min-width: 0; }
#period-assessment [hidden] { display: none; }
#period-experiences, #period-status, #period-report { margin-top: 12px; }
#period-month-latest, #period-month-coverage { display: block; }
#period-answers { margin: 5px 0; padding-inline-start: 1.4em; }
#period-edit { display: inline-flex; align-items: center; min-height: 44px; }
#period-document { white-space: pre-wrap; overflow-wrap: anywhere; }
#period-report-id { overflow-wrap: anywhere; }
#period-months { width: 100%; margin: 14px 0; border-collapse: collapse; table-layout: fixed; font-size: .93rem; }
#period-months caption { margin-bottom: 6px; text-align: start; font-weight: 700; }
#period-months th, #period-months td { padding: 7px 5px; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: start; overflow-wrap: anywhere; }
#period-months thead th:first-child { width: 17%; }
#period-months thead th:nth-child(2) { width: 54%; }
#period-months time { display: inline-block; max-width: 100%; font-variant-numeric: tabular-nums; }
#birth-window-assessment { min-width: 0; }
#birth-window-assessment[hidden], #birth-window-assessment [hidden] { display: none; }
#chart + #birth-window-assessment { padding: clamp(18px, 3vw, 35px); border: 1px solid var(--rule); border-radius: 12px; }
#birth-window-status, #birth-window-evidence > *, #birth-window-report { margin-top: 12px; }
#birth-window-groups, #birth-window-unresolved, .birth-window-periods { padding-inline-start: 1.35em; margin-block: 8px; }
#birth-window-groups > li, #birth-window-unresolved > li { margin-block: 7px; }
.birth-window-periods { font-size: .92rem; color: var(--muted); }
#birth-window-report summary { cursor: pointer; font-weight: 700; }
#birth-window-evidence, #birth-window-report { overflow-wrap: anywhere; }
#birth-window-document { white-space: pre-wrap; }
#hourly-assessment { min-width: 0; }
#hourly-assessment [hidden] { display: none; }
#hourly-chart, #hourly-report { margin-top: 18px; }
#hourly-status, #hourly-extremes { margin-top: 10px; }
#hourly-rows { padding: 0; margin: 10px 0; list-style: decimal inside; font-variant-numeric: tabular-nums; }
#hourly-rows li { display: grid; grid-template-columns: minmax(0, 9em) minmax(2em, 1fr) 3em; align-items: center; gap: 8px; padding-block: 4px; }
#hourly-rows small { display: block; color: var(--muted); }
.hourly-track { position: relative; height: 9px; background: var(--wash); border-radius: 2px; }
.hourly-track::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: 50%; border-left: 1px solid var(--ink); }
.hourly-track span { position: absolute; top: 0; height: 100%; background: var(--action); }
.hourly-track .hourly-negative { background: #685e58; }
.hourly-score { text-align: end; }
#hourly-document, #hourly-report-id { overflow-wrap: anywhere; }
#hourly-document { white-space: pre-wrap; }
.report-builder > p, #report-intro { margin-top: 5px; color: var(--muted); }
.report-builder form { margin-top: 13px; }
/* Keep long native option labels inside the closed control in WebKit. */
#report-form select, #clock-basis, #zone { contain: paint; }
.product-action { margin-top: 13px; }
#report-output { margin-top: 17px; }
.report-sections { display: grid; gap: 10px; margin-block: 13px; }
.report-sections > section { border: 1px solid var(--rule); background: var(--quiet, #faf7f3); padding: clamp(12px, 2vw, 21px); border-radius: 8px; overflow-wrap: anywhere; }
.report-sections > .report-source-excerpt { border: 1px solid var(--rule); background: var(--quiet, #faf7f3); padding: clamp(12px, 2vw, 21px); border-radius: 8px; overflow-wrap: anywhere; }
.report-source-excerpt summary { cursor: pointer; font-weight: 650; }
.report-sections h4 { margin: 0 0 6px; color: var(--action); }
.report-sections dl { margin: 0; }
.report-sections dt { margin-top: 9px; font-weight: 720; }
.report-sections dd { margin-inline-start: 0; }
.report-methods { margin-block: 20px; padding-block-start: 12px; border-block-start: 1px solid var(--rule); overflow-wrap: anywhere; }
.report-methods ul { list-style: none; padding: 0; margin: 0; }
.report-methods li { margin-block: 12px; }
.report-methods li p { margin: 2px 0; }
.report-methods a, .classical-source a { color: var(--action); text-underline-offset: 3px; }
.classical-source { margin-top: 8px; overflow-wrap: anywhere; line-height: 1.55; }
.classical-source span { color: var(--muted); font-size: .88rem; margin-inline-end: .35em; }
#report-copy-text, #month-copy-text { width: 100%; padding: 9px; font: inherit; color: var(--ink); }
#report-save-status, #month-save-status { margin-top: 7px; }
.account-panel { margin-block: 25px 41px; padding: clamp(17px, 3vw, 35px); scroll-margin-top: 20px; }
.account-panel > p { margin-top: 7px; }
.account-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-block: 10px; }
.account-links a { display: inline-flex; align-items: center; text-decoration: none; }
#account-reports > details { margin-top: 7px; }
.saved-report-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.topics, .guide { margin-top: clamp(54px, 7vw, 93px); padding-top: clamp(25px, 4vw, 51px); border-top: 1px solid var(--rule); scroll-margin-top: 19px; }
.topics .section-heading { grid-template-columns: minmax(0, 1fr); gap: 11px; }
.topics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 22px); }
.topic-card { min-width: 0; padding: clamp(17px, 2.1vw, 28px); border: 1px solid var(--rule); border-radius: 12px; background: #fbf8f5; }
.topic-label { color: var(--action); font-size: .85rem; font-weight: 720; }
.topic-card h3 { margin: 7px 0; font-size: clamp(1.04rem, 1.55vw, 1.28rem); line-height: 1.4; }
.topic-card h3 + p { color: var(--muted); }
.topic-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.topic-choices a, .topic-exercise { display: inline-flex; align-items: center; text-decoration: none; }
.topic-exercise { margin: 15px 0 9px; }
.topic-tradition summary, .reflection-method summary { color: var(--muted); font-size: .9rem; }
.reflection-panel { margin-top: 17px; padding: clamp(18px, 3vw, 35px); scroll-margin-top: 18px; }
.reflection-panel h3 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); scroll-margin-top: 18px; }
.reflection-panel > p { margin-top: 5px; color: var(--muted); }
.reflection-topics { margin: 14px 0; }
.reflection-topics button[aria-pressed="true"] { background: #f8eeea; border-color: var(--action); }
.reflection-panel fieldset { margin: 0; padding: 0; min-inline-size: 0; border: 0; }
.reflection-panel legend { padding: 0; font-weight: 690; }
.reflection-options { display: grid; gap: 6px; margin-top: 9px; }
.reflection-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; }
.reflection-option:has(input:checked) { border-color: var(--action); background: #fbf3ef; }
.reflection-option input { inline-size: 17px; block-size: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--action); }
#reflection-submit { margin-top: 11px; }
#reflection-submit:disabled { border-color: var(--rule); color: var(--muted); background: var(--wash); cursor: default; }
.reflection-feedback { margin-top: 14px; padding: 12px 15px; border-inline-start: 3px solid var(--action); background: #f8eeea; }
.reflection-feedback h4 { margin: 0 0 3px; }
.reflection-method { margin-top: 14px; }
.reflection-method ul { margin: 0 0 12px; padding-inline-start: 21px; }
.reflection-method a { color: var(--action); text-underline-offset: 3px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0,.75fr); align-items: end; gap: 14px clamp(20px, 5vw, 75px); margin-bottom: 24px; }
.section-heading p { max-width: 43ch; color: var(--muted); }
.reading-key { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; margin-bottom: 24px; padding: 17px 21px; background: var(--wash); border-radius: 9px; }
.reading-key h3 { font-size: 1rem; }
.reading-key p { color: var(--muted); margin-top: 3px; }
.reading-glyphs { display: grid; justify-items: center; min-width: 43px; font: 600 1.25rem / 1.35 var(--heading); }
.reading-glyphs b:first-child { color: var(--action); }
.reading-glyphs span { width: 28px; height: 1px; background: var(--rule); }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); gap: clamp(23px, 5vw, 75px); align-items: start; }
.guide-media { min-width: 0; }
.guide-media h3 { font-size: 1rem; margin-bottom: 9px; }
.guide-media video, .video-preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 3px; background: var(--wash); }
.video-preview { position: relative; overflow: hidden; padding: 0; }
.video-preview img { display: block; width: 100%; height: auto; }
.play-icon { position: absolute; inset: 50% auto auto 50%; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--action); border-radius: 50%; background: var(--action); transform: translate(-50%, -50%); }
.play-icon::after { content: ""; width: 0; height: 0; margin-left: 3px; border: solid transparent; border-width: 7px 0 7px 11px; border-left-color: var(--action-text); }
.video-preview:hover .play-icon { background: var(--action-hover); }
.video-duration { position: absolute; right: 9px; bottom: 9px; color: white; background: var(--ink); padding: 2px 6px; border-radius: 3px; font-size: .78rem; }
#video-error { margin-top: 10px; }
details { border-top: 1px solid var(--rule); }
summary { min-height: 44px; padding-block: 13px; font-weight: 660; cursor: pointer; color: var(--ink); }
summary::marker { color: var(--action); }
details p { max-width: 68ch; color: var(--muted); padding-bottom: 15px; }
.guide-media details { margin-top: 12px; }
.guide-media summary { font-size: .91rem; }
.pillar-guide { min-width: 0; margin: 0; border-top: 1px solid var(--rule); }
.pillar-guide div { display: grid; grid-template-columns: minmax(58px, .29fr) minmax(0, 1fr); align-items: baseline; gap: 12px; padding-block: 15px; border-bottom: 1px solid var(--rule); }
.pillar-guide dt { color: var(--action); font-weight: 730; }
.pillar-guide dd { color: var(--muted); margin: 0; }
.rules-panel { max-width: 805px; margin: clamp(49px, 7.4vw, 86px) auto; scroll-margin-top: 18px; }
.rules-panel h2 { margin-bottom: 16px; }
.rules-panel details:last-child { border-bottom: 1px solid var(--rule); }
.site-footer { display: flex; justify-content: space-between; gap: 12px 25px; border-top: 1px solid var(--rule); padding-block: 23px; font-size: .86rem; color: var(--muted); }
.site-footer strong { color: var(--ink); font-family: var(--heading); font-size: 1.18rem; }

@media (max-width: 960px) {
  .site-width { width: calc(100% - 54px); }
  .site-nav { gap: 22px; }
  .chart-panel { column-gap: 30px; }
}
@media (max-width: 820px) {
  .header-inner { grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 0; padding-top: 8px; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; gap: 0 14px; font-size: .83rem; }
  .language-control { grid-column: 2; grid-row: 1; }
}
@media (max-width: 720px) {
  .site-width { width: calc(100% - 38px); }
  .hero { padding-block: 36px 30px; }
  .hero h1 { font-size: clamp(2rem, 7.4vw, 3.4rem); letter-spacing: -.04em; }
  :root[lang="en"] .hero h1 { font-size: clamp(2.3rem, 9vw, 4rem); }
  .hero-intro { margin-block: 12px 16px; }
  .palace-stage { border-radius: 11px; }
  .demo-meta { align-items: start; }
  .demo-detail { padding: 12px; gap: 13px; }
  .demo-pair { gap: 5px; padding-inline-end: 10px; }
  .demo-pair div { min-width: 39px; }
  .demo-pair dt { max-width: 55px; }
  .chart-panel, .guide-grid, .section-heading { grid-template-columns: minmax(0, 1fr); }
  .chart-panel { row-gap: 19px; }
  .form-note { max-width: none; margin-block: 7px 11px; }
}
@media (max-width: 600px) {
  #report-form .inputs { grid-template-columns: minmax(0, 1fr); }
  .demo-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .demo-tabs button { min-height: 99px; }
  .topics-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .site-width { width: calc(100% - 32px); }
  .chart-panel { padding-inline: 15px; }
  .demo-tabs button > span { font-size: .77rem; overflow-wrap: anywhere; }
  .demo-meta p { font-size: .76rem; }
  .demo-detail { grid-template-columns: minmax(0, 1fr); }
  .demo-pair { justify-content: start; gap: 18px; padding: 0 0 9px; border-inline-end: 0; border-bottom: 1px solid var(--rule); }
  .demo-pair dt { max-width: none; }
  .pillars { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pillar { min-height: 104px; }
  .pillar:nth-child(2) { border-inline-end: 0; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .site-footer { flex-direction: column; }
}
@media (max-width: 355px) {
  .inputs { grid-template-columns: minmax(0, 1fr); }
  .lunar-grid { gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.research {
  padding-block: clamp(4.25rem, 8vw, 7.5rem);
  border-block-start: 1px solid var(--rule);
}

.research .research-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-block-end: 2.25rem;
}

.research :is(h2, h3, h4, p) {
  margin: 0;
}

.research h2 {
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.research .research-heading p {
  max-width: 44ch;
  color: var(--muted);
}

.research .research-example {
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 1.375rem;
}

.research .research-example-heading {
  display: grid;
  gap: 0.5rem;
  margin-block-end: 1.5rem;
}

.research .research-case-type {
  color: var(--action);
  font-size: 0.8125rem;
  font-weight: 700;
}

.research h3 {
  font-size: clamp(1.375rem, 3.05vw, 2.375rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.24;
}

.research .research-sample-table {
  inline-size: 100%;
  border-spacing: 0;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.research .research-sample-table caption {
  margin-block-end: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: start;
}

.research :is(th, td) {
  min-width: 0;
  padding: 0.8rem 0.25rem;
  border-block-start: 1px solid var(--rule);
  text-align: center;
}

.research tr > :first-child {
  inline-size: 26%;
  text-align: start;
}

.research thead {
  color: var(--muted);
  font-size: 0.8125rem;
}

.research tbody th {
  font-weight: 500;
}

.research tbody td {
  white-space: nowrap;
  font-size: clamp(1rem, 2.45vw, 1.6875rem);
  font-weight: 650;
}

.research tbody th small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.research .research-pillar-changed {
  color: var(--action);
  background: rgba(165, 44, 36, 0.055);
}

.research .research-example-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: center;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--rule);
}

.research .research-example-details p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.875rem;
}

.research a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--action);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  font-size: 0.875rem;
  font-weight: 650;
}

.research .research-action {
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--action);
  border-radius: 999px;
  background: var(--action);
  color: white;
  text-align: center;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}

.research .research-action:hover {
  background: var(--action-hover, var(--action));
}

.research :is(button, a):focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
}

.research .research-sources {
  margin-block-start: clamp(2.25rem, 5vw, 4.5rem);
}

.research .research-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.25rem, 5vw, 4.5rem);
  margin: 1.125rem 0 0;
  padding: 0;
  list-style: none;
}

.research .research-source-grid li {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding-block: 1.25rem;
  border-block-start: 1px solid var(--rule);
}

.research .research-source-grid h4 {
  font-size: 1rem;
  font-weight: 700;
}

.research .research-source-grid p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.research .research-source-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.125rem;
}

@media (max-width: 700px) {
  .research .research-heading,
  .research .research-example-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
  }

  .research .research-action {
    justify-self: start;
  }
}

@media (max-width: 465px) {
  .research .research-source-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .research th,
  .research td {
    padding: 0.65rem 0.125rem;
  }

  .research tr > :first-child {
    inline-size: 29%;
  }
}
.site-header .header-account {
  justify-content: center;
  padding-inline: 13px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--action);
}

.site-header .header-account:hover { background: var(--wash); }

.hero {
  padding-block: clamp(24px, 4.45vw, 62px) clamp(22px, 3.5vw, 46px);
}

.hero-feature {
  display: grid;
  grid-template-columns: minmax(0, .89fr) minmax(0, 1.11fr);
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
}

.hero-story {
  margin-inline: 0;
  text-align: start;
}

@media (min-width: 841px) {
  :root[lang="zh-CN"] .hero h1 { max-width: 10em; font-size: clamp(2.6rem, 4.55vw, 4.15rem); }
  :root[lang="en"] .hero h1 { max-width: 14ch; font-size: clamp(3.4rem, 5.2vw, 5.15rem); }
}

.hero .hero-intro {
  margin: 16px 0 20px;
  max-width: 40ch;
  font-size: clamp(1rem, 1.5vw, 1.17rem);
}

.hero .hero-actions { justify-content: flex-start; }

.hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-inline: 18px;
  border-radius: 26px;
  text-decoration: none;
}

.hero-access {
  margin-block-start: 12px;
  color: var(--muted);
  font-size: .85rem;
}

.relationship-figure {
  overflow: hidden;
  min-inline-size: 0;
  margin: 0;
  border-radius: 12px;
  background: #eee3d7;
}

.relationship-image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  max-block-size: 435px;
  object-fit: cover;
  object-position: center 45%;
}

#love-entry {
  padding: clamp(17px, 3vw, 34px);
  border-radius: 10px;
  background: #faf6f2;
}

.love-entry-head p { margin-top: 5px; color: var(--muted); }
.love-stage-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-block-start: 16px;
}

.love-stage-links a {
  display: grid;
  min-block-size: 46px;
  place-items: center;
  padding: 6px 8px;
  border: 1px solid #e2d8d0;
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.love-stage-links a:hover,
.love-stage-links a[aria-current="true"] {
  border-color: var(--action);
  background: #f7eae5;
  color: var(--action);
}

.topics-jump {
  min-block-size: 44px;
  margin-block-start: 4px;
  gap: 8px;
  padding: 0;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.topics-jump:hover { color: var(--action); }

#topics .topics-grid { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.topics-grid .topic-card-love { background: #f9eee9; border-color: #e6d0c6; }

#pillar-example { margin-block: 24px 30px; }
#pillar-example .demo-tabs button { min-block-size: 80px; }
.palace-disclosure { margin-block-start: 14px; }
.palace-disclosure > summary { min-block-size: 44px; padding-block: 10px; cursor: pointer; }
.palace-disclosure .hero-figure { max-inline-size: 760px; margin: 8px auto 0; }
.palace-disclosure .palace-stage { border: 1px solid #e2d1c4; }

@media (max-width: 840px) {
  .hero-feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero .hero-intro { max-width: 56ch; }
  .relationship-image { aspect-ratio: 16 / 10; }
  .love-stage-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #topics .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topics-grid .topic-card-love { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-header .header-inner { column-gap: 8px; }
  .site-header .brand { min-width: 0; gap: 6px; }
  .site-header .brand-mark { width: 30px; height: 30px; }
  .site-header .brand-names { white-space: nowrap; }
  .site-header .brand-names strong { font-size: .9rem; }
  .site-header .brand-names span { font-size: .7rem; }
  .site-header .header-account { padding-inline: 7px; }
  .site-header .language-option { min-width: 34px; padding-inline: 4px; }
  .site-header .site-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-header .site-nav a { flex: 0 0 auto; }
  .site-header .site-nav a:focus-visible { outline-offset: -2px; }
  .hero { padding-block: 24px 20px; }
  .hero h1 { line-height: 1.08; }
  :root[lang="en"] .hero h1 { font-size: clamp(2.25rem, 8.3vw, 3.75rem); }
  .hero .hero-intro { margin: 10px 0 14px; }
  .hero .hero-feature { gap: 18px; }
  .hero-primary { gap: 12px; padding-inline: 14px; }
  .relationship-image { aspect-ratio: 8 / 5; }
  .love-stage-links a { padding-inline: 4px; font-size: .88rem; }
  #topics .topics-grid { grid-template-columns: minmax(0, 1fr); }
}


.site-nav a[aria-current="page"] { color: var(--action); text-decoration: underline; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-account { display: inline-flex; min-height: 44px; align-items: center; font-size: .85rem; font-weight: 650; text-decoration: none; }
.header-account:hover { color: var(--action); text-decoration: underline; }
.portal-home-group {
  padding-block: clamp(23px, 4vw, 50px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 22px;
}
#home-library { margin-top: clamp(44px, 7vw, 90px); }
.portal-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 21px;
}
.portal-section-head h2, .sample-story h2, .portal-related h2 {
  font: 600 clamp(1.65rem, 3.1vw, 2.9rem) / 1.15 var(--heading);
}
.portal-section-head p, .sample-story > p {
  color: var(--muted);
  margin-top: 7px;
}
.portal-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  gap: 9px;
  color: var(--action);
  text-decoration: none;
  font-size: .91rem;
  font-weight: 700;
  line-height: 1.35;
}
.portal-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.portal-link span { font-size: 1.06rem; }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portal-card {
  position: relative;
  min-inline-size: 0;
  padding: 18px clamp(14px, 2vw, 25px) 22px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--surface);
  transition: border-color .16s, background-color .16s;
}
.portal-card:hover, .portal-card:focus-within { border-color: var(--action); background: #fffcf8; }
.portal-tag { display: block; color: var(--action); font-size: .8rem; font-weight: 720; }
.portal-card h3 { margin-block: 8px 5px; font-size: clamp(1.03rem, 1.7vw, 1.28rem); line-height: 1.35; }
.portal-card h3 a { text-decoration: none; }
.portal-card h3 a::after { position: absolute; content: ""; inset: 0; border-radius: 8px; }
.portal-card p { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }

.portal-sample {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  margin-top: clamp(42px, 7vw, 86px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.sample-graphic {
  padding: clamp(24px, 4vw, 47px);
  display: grid;
  align-content: center;
  gap: 12px;
  background: #762924;
  color: #fff4e7;
}
.sample-graphic > p:first-child { font-size: .88rem; font-weight: 730; }
.sample-pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding-block: 10px;
  border-block: 1px solid #ad6e5e;
}
.sample-pillar-grid div { text-align: center; padding-block: 8px; }
.sample-pillar-grid div + div { border-inline-start: 1px solid #ad6e5e; }
.sample-pillar-grid dt { font-size: clamp(.72rem, 1.3vw, .85rem); }
.sample-pillar-grid dd {
  font: 600 clamp(1.18rem, 2.7vw, 2.3rem) / 1.2 var(--heading);
  margin: 6px 0 0;
  white-space: nowrap;
}
.sample-date { font-size: .76rem; }
.sample-story { padding: clamp(21px, 3.7vw, 42px); }
.sample-notes { margin-block: 13px 5px; }
.sample-notes div {
  display: grid;
  grid-template-columns: minmax(3em, 75px) minmax(0, 1fr);
  gap: 8px;
  padding-block: 7px;
  border-top: 1px solid var(--rule);
}
.sample-notes dt { font-weight: 700; }
.sample-notes dd { margin: 0; color: var(--muted); font-size: .89rem; }

.content-view { padding-block: clamp(25px, 6vw, 80px) clamp(45px, 9vw, 100px); }
.portal-index, .portal-detail { min-block-size: 370px; }
.portal-page-head { padding-bottom: clamp(19px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.portal-trail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; color: var(--muted); font-size: .86rem; }
.portal-trail a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }
.portal-page-head h1 {
  font: 600 clamp(2.22rem, 5.2vw, 4.8rem) / 1.14 var(--heading);
  text-wrap: balance;
  max-width: 24em;
  overflow-wrap: anywhere;
}
.portal-page-head > p { max-width: 66ch; margin-top: 11px; font-size: clamp(1rem, 1.75vw, 1.22rem); color: var(--muted); }
.portal-index > .portal-grid { margin-block: 24px 11px; }
.portal-search { display: inline-grid; margin: 23px 0 0; gap: 6px; font-weight: 700; }
.portal-search input {
  min-height: 44px;
  width: min(18rem, 100%);
  padding: 7px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 6px;
}
.portal-count { margin-block: 10px; color: var(--muted); }
.portal-body {
  max-width: 68ch;
  margin: 0 auto;
  padding-block: clamp(20px, 4vw, 44px);
  font-size: clamp(1rem, 1.7vw, 1.125rem);
  overflow-wrap: anywhere;
}
.portal-body section + section { margin-top: clamp(22px, 5vw, 44px); }
.portal-body h2 { margin-bottom: 9px; font-size: clamp(1.25rem, 2.4vw, 1.62rem); line-height: 1.3; }
.portal-body p + p { margin-top: 12px; }
.portal-references a { color: var(--action); text-underline-offset: 3px; }
.portal-related { border-top: 1px solid var(--rule); padding-top: 22px; }
.portal-related .portal-grid { margin-block: 12px 3px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-report-section { margin-block: 23px; padding-block: 13px; border-block-start: 1px solid var(--rule); }
.portal-report-section dl { margin: 0; }
.portal-report-section dt { margin-top: 12px; font-weight: 720; }
.portal-report-section dd { margin-inline-start: 0; }

.site-footer { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
.site-filing { grid-column: 1 / -1; margin: 0; text-align: center; }
.footer-brand p { max-width: 32ch; margin-top: 5px; }
#footer-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
#footer-directory h2 { font-size: .88rem; color: var(--ink); margin-bottom: 5px; }
#footer-directory a { display: flex; align-items: center; width: fit-content; min-height: 40px; text-decoration: none; }
#footer-directory a:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .portal-sample, .site-footer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 590px) {
  .header-actions { gap: 6px; }
  .header-account { max-width: 4.1rem; text-align: center; font-size: .76rem; line-height: 1.2; }
  .portal-section-head { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 11px; }
  .portal-grid, .portal-related .portal-grid { grid-template-columns: minmax(0, 1fr); }
  .sample-notes div { grid-template-columns: minmax(2.95em, 56px) minmax(0, 1fr); }
  .sample-pillar-grid dd { font-size: clamp(1.4rem, 6.7vw, 2.2rem); }
  #footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/*
Copyright 2022 The Instrument Serif Project Authors (https://github.com/Instrument/instrument-serif)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/

/*
Copyright 2012 Google Inc. All Rights Reserved.

This Font Software is licensed under the SIL Open Font License,
Version 1.1.

This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
