/* ==========================================================================
   君临国际 · 共享站级样式 /assets/site.css
   分屏基座 / 墨蓝翻页导航 / 铜金编号 / 朱砂红只给检索与关键动作
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #0B1A2B;
  --ink-700: #13304E;
  --ink-500: #2C5580;
  --cream: #F6EFE2;
  --sand: #E8DCC6;
  --copper: #B0842F;
  --copper-light: #D8A94C;
  --cinnabar: #C23A2B;
  --silver: #9DA9B6;
  --graphite: #39434F;

  --font-head: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Songti SC", "SimSun", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --font-mono: "Space Grotesk", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;

  --line: 2px;
  --shadow-hard: 6px 6px 0 var(--ink-900);
  --shadow-lift: 10px 10px 0 var(--ink-900);
  --t: 160ms;
  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 56px);
  --header-h: 76px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--ink-900);
}

h1 { font-size: clamp(34px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 44px); }
h3 { font-size: clamp(21px, 2.2vw, 30px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }

img, picture, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cinnabar); }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--copper-light); color: var(--ink-900); }

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* ---------- 3. 可访问性工具 ---------- */
.u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--cinnabar);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 0;
  z-index: 300;
  padding: 12px 22px;
  background: var(--cinnabar);
  color: #FFF8F4;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  text-decoration: none;
  border: var(--line) solid var(--ink-900);
  transition: top var(--t) ease;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4. 版心与分区 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--ink { background: var(--ink-900); color: var(--cream); }
.section--ink h2, .section--ink h3, .section--ink h4 { color: var(--cream); }
.section--ink p { color: rgba(246, 239, 226, .84); }
.section--sand { background: var(--sand); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 58fr 42fr; }
  .split--flip { grid-template-columns: 42fr 58fr; }
}

.prose { max-width: 38em; }
.prose > p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--copper);
  transform: skewY(-18deg);
}

.index-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--copper);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-700);
  border: 1px solid var(--silver);
}

.rule-diagonal {
  height: 2px;
  border: 0;
  margin: clamp(24px, 4vw, 48px) 0;
  background: linear-gradient(90deg,
    var(--copper) 0%, var(--copper) 34%,
    rgba(176, 132, 47, .22) 34%, rgba(176, 132, 47, .22) 100%);
}

.diagonal-band {
  height: 10px;
  background: repeating-linear-gradient(108deg,
    var(--copper) 0 2px,
    transparent 2px 14px);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: var(--line) solid var(--ink-900);
  background: var(--cream);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink-900);
  transition: transform var(--t) ease, box-shadow var(--t) ease,
              background var(--t) ease, color var(--t) ease;
}
.btn:hover {
  color: var(--ink-900);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink-900);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink-900);
}
.btn--primary {
  background: var(--cinnabar);
  color: #FFF8F4;
}
.btn--primary:hover { color: #FFF8F4; }
.btn--ghost { background: transparent; }
.btn--on-dark {
  background: var(--copper);
  color: var(--ink-900);
  box-shadow: 4px 4px 0 rgba(246, 239, 226, .88);
}
.btn--on-dark:hover { box-shadow: 6px 6px 0 rgba(246, 239, 226, .88); }
.btn--block { display: flex; width: 100%; }

/* ---------- 6. 面板 / 媒体 / 表格 / 面包屑 ---------- */
.panel {
  padding: clamp(20px, 3vw, 32px);
  background: var(--cream);
  border: var(--line) solid var(--ink-900);
  box-shadow: var(--shadow-hard);
}
.panel--sand { background: var(--sand); }
.panel--ink {
  background: var(--ink-900);
  color: var(--cream);
  border-color: var(--copper);
}
.panel--ink h2, .panel--ink h3, .panel--ink h4 { color: var(--cream); }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-700);
  border: var(--line) solid var(--ink-900);
  box-shadow: var(--shadow-hard);
}
.media > img,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t) ease;
}
.media:hover > img { transform: scale(1.02); }
.media--tall { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-500);
}

@media (max-width: 760px) {
  .media { box-shadow: 4px 4px 0 var(--ink-900); }
}

.table-base {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--cream);
  border: var(--line) solid var(--ink-900);
}
.table-base th {
  height: 44px;
  padding: 0 14px;
  background: var(--ink-900);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}
.table-base td {
  height: 44px;
  padding: 0 14px;
  border-top: 1px solid rgba(11, 26, 43, .12);
  color: var(--graphite);
  vertical-align: middle;
}
.table-base tbody tr:nth-child(even) { background: var(--sand); }
.table-base tbody tr:hover { background: rgba(44, 85, 128, .10); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--sand);
  color: var(--ink-900);
  border: var(--line) solid var(--ink-900);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.badge--copper { background: var(--copper); }
.badge--ink { background: var(--ink-900); color: var(--cream); }

.breadcrumb {
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-500);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--silver);
}
.breadcrumb a {
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumb a:hover {
  color: var(--ink-900);
  border-bottom-color: var(--copper);
}

/* ==========================================================================
   7. 共享头部
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  --hdr-fg: var(--cream);
  --hdr-muted: rgba(246, 239, 226, .70);
  --hdr-line: rgba(246, 239, 226, .26);
  --hdr-accent: var(--copper-light);
  background: rgba(11, 26, 43, .94);
  color: var(--hdr-fg);
  border-bottom: var(--line) solid transparent;
  transition: background var(--t) ease, border-color var(--t) ease,
              color var(--t) ease, box-shadow var(--t) ease;
}

.site-header[data-scrolled] {
  --hdr-fg: var(--ink-900);
  --hdr-muted: var(--graphite);
  --hdr-line: rgba(11, 26, 43, .24);
  --hdr-accent: var(--copper);
  background: rgba(246, 239, 226, .97);
  border-bottom-color: var(--ink-900);
  box-shadow: 0 6px 0 rgba(11, 26, 43, .06);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  width: 100%;
  max-width: 1440px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  background: linear-gradient(108deg, var(--copper) 0 62%, var(--copper-light) 62% 100%);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
  border: var(--line) solid var(--ink-900);
  box-shadow: 3px 3px 0 rgba(216, 169, 76, .9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.12;
}
.brand-word {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.02em;
  color: inherit;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--hdr-muted, rgba(246, 239, 226, .70));
  white-space: nowrap;
}

/* 主导航 */
.primary-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(4px, 1vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item { margin: 0; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 3px 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--hdr-fg);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t) ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--hdr-accent);
  transition: width var(--t) ease;
}
.nav-link:hover { color: var(--hdr-fg); }
.nav-link:hover::after,
.nav-link:focus-visible::after { width: 100%; }
.nav-link[aria-current="page"] {
  font-weight: 900;
  color: var(--hdr-fg);
}
.nav-link[aria-current="page"]::after { width: 100%; }

/* 常驻检索 */
.header-search {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 1 auto;
}

.search-input {
  flex: 1 1 auto;
  width: clamp(150px, 15vw, 230px);
  min-height: 42px;
  padding: 0 14px;
  background: rgba(246, 239, 226, .09);
  border: var(--line) solid var(--hdr-line);
  border-radius: 0;
  color: var(--hdr-fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 42px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--t) ease, background var(--t) ease, box-shadow var(--t) ease;
}
.search-input::placeholder {
  color: var(--hdr-muted);
  font-size: 13px;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search-input:focus {
  outline: none;
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 2px var(--cinnabar);
}
.site-header[data-scrolled] .search-input {
  background: #FFFDF8;
  color: var(--ink-900);
}
.site-header[data-scrolled] .search-input::placeholder { color: var(--ink-500); }

.search-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  background: var(--cinnabar);
  color: #FFF8F4;
  border: var(--line) solid var(--cinnabar);
  border-radius: 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--t) ease, box-shadow var(--t) ease, background var(--t) ease;
}
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(11, 26, 43, .38);
}
.search-btn:active { transform: translateY(0); box-shadow: none; }
.search-btn[aria-expanded="true"] { background: var(--ink-900); border-color: var(--ink-900); }

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 130;
  width: min(340px, calc(100vw - 36px));
  padding: 16px;
  background: var(--cream);
  color: var(--ink-900);
  border: var(--line) solid var(--ink-900);
  box-shadow: 6px 6px 0 var(--copper);
}
.search-panel[hidden] { display: none; }

.search-panel-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper);
}

.search-scope-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.search-scope {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  color: var(--ink-900);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--t) ease, border-color var(--t) ease, transform var(--t) ease;
}
.search-scope:hover,
.search-scope:focus-visible {
  background: var(--sand);
  border-left-color: var(--copper);
  transform: translateX(2px);
  color: var(--ink-900);
}
.search-scope-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
}
.search-scope-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-500);
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: var(--line) solid var(--hdr-line);
  border-radius: 0;
  color: var(--hdr-fg);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--t) ease, opacity var(--t) ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle-label { pointer-events: none; }

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ==========================================================================
   8. 共享页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(24px, 3vw, 40px);
  background: var(--ink-900);
  color: var(--cream);
  --hdr-muted: rgba(246, 239, 226, .70);
}

.footer-edge {
  height: 16px;
  background: repeating-linear-gradient(108deg,
    var(--copper) 0 3px,
    transparent 3px 18px);
  opacity: .9;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) 0;
}
.footer-brand,
.footer-contact { grid-column: 1 / -1; }

@media (min-width: 1040px) {
  .footer-inner {
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(96px, .7fr)) minmax(300px, 380px);
    align-items: start;
  }
  .footer-brand,
  .footer-contact { grid-column: auto; }
}

.footer-brand .brand { margin-bottom: 16px; }
.brand--footer .brand-mark {
  border-color: var(--copper-light);
  box-shadow: 3px 3px 0 rgba(216, 169, 76, .32);
}
.brand--footer .brand-tag { color: rgba(246, 239, 226, .66); }

.footer-desc {
  max-width: 26em;
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(246, 239, 226, .78);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(246, 239, 226, .58);
}

.footer-col-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: var(--line) solid rgba(176, 132, 47, .48);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper-light);
}

.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: rgba(246, 239, 226, .86);
  text-decoration: none;
  transition: color var(--t) ease;
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--copper-light);
  transition: width var(--t) ease;
}
.footer-link:hover,
.footer-link:focus-visible { color: #FFFFFF; }
.footer-link:hover::after,
.footer-link:focus-visible::after { width: 100%; }

.footer-contact {
  padding: clamp(18px, 2.4vw, 24px);
  background: var(--ink-700);
  border: var(--line) solid var(--copper);
  box-shadow: 6px 6px 0 var(--sand);
}
.footer-contact .footer-col-title {
  margin-bottom: 14px;
  border-bottom-color: rgba(216, 169, 76, .5);
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}
.contact-item { display: grid; gap: 3px; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper-light);
}
.contact-value {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cream);
  word-break: break-word;
}
.contact-note {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(246, 239, 226, .70);
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 18px;
  background: var(--cinnabar);
  color: #FFF8F4;
  border: var(--line) solid var(--cinnabar);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--copper-light);
  transition: transform var(--t) ease, box-shadow var(--t) ease;
}
.footer-cta:hover,
.footer-cta:focus-visible {
  color: #FFF8F4;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--copper-light);
}
.footer-cta:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--copper-light);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: var(--wrap);
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding: 16px var(--gutter) 0;
  border-top: 1px solid rgba(246, 239, 226, .18);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(246, 239, 226, .58);
}
.legal-text { margin: 0; }

/* ==========================================================================
   9. 头部响应式
   ========================================================================== */
@media (max-width: 1040px) {
  .site-header { --header-h: auto; }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-block: 10px;
    min-height: 0;
  }

  .brand { margin-right: auto; }
  .nav-toggle { display: inline-flex; order: 2; }

  .header-search {
    order: 3;
    flex: 1 0 100%;
    gap: 6px;
  }
  .header-search .search-input {
    width: auto;
    flex: 1 1 auto;
  }
  .header-search .search-btn { padding: 0 14px; }

  .search-panel {
    left: 0;
    right: 0;
    width: auto;
    box-shadow: 6px 6px 0 var(--copper);
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 120;
    width: min(340px, 88vw);
    display: block;
    justify-content: flex-start;
    padding: calc(28px + env(safe-area-inset-top)) 24px 32px;
    background: var(--ink-900);
    color: var(--cream);
    border-left: var(--line) solid var(--copper);
    overflow-y: auto;
    transform: translateX(101%);
    visibility: hidden;
    transition: transform 200ms ease, visibility 200ms ease;
  }
  .primary-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .primary-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav .nav-item + .nav-item {
    border-top: 1px solid rgba(246, 239, 226, .16);
  }
  .primary-nav .nav-link {
    display: block;
    padding: 15px 4px 15px 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cream);
  }
  .primary-nav .nav-link::after { display: none; }
  .primary-nav .nav-link[aria-current="page"] {
    color: var(--copper-light);
    box-shadow: inset 3px 0 0 var(--copper-light);
  }

  .site-footer { margin-top: clamp(48px, 9vw, 88px); }
}

@media (max-width: 560px) {
  .brand-word { font-size: 17px; }
  .brand-tag { font-size: 10px; letter-spacing: .08em; }
  .brand-mark { width: 36px; height: 36px; font-size: 16px; }

  .search-scope { flex-direction: column; gap: 2px; }
  .search-scope-note { white-space: normal; }

  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-brand,
  .footer-contact { grid-column: 1 / -1; }
  .footer-contact { box-shadow: 4px 4px 0 var(--sand); }
  .footer-legal { font-size: 11px; }
}
