/* ============================================================
   XeOrbital · 氙云计算 — styles.css
   Pure static · no build · CSS custom-property theming
   Themes: Lab Light (default) / Orbital Dark
   Typography in rem (OS text-scale friendly); breakpoints in em.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --bg: #f7f8f9;
  --bg-card: #ffffff;
  --bg-inset: #f0f1f3;
  --text: #14171c;
  --text-2: #55606e;
  --text-3: #8b95a3;
  --border: #e4e7eb;
  --border-2: #c9cfda;
  --accent: #2456c4;
  --accent-soft: rgba(36, 86, 196, 0.08);
  --ok: #1f9d55;
  --deco: rgba(20, 23, 28, 0.22);
  --deco-soft: rgba(20, 23, 28, 0.11);
  --wf-pos-fill: rgba(36, 86, 196, 0.045);
  --wf-neg-fill: rgba(20, 23, 28, 0.02);
  --grid-line: rgba(20, 23, 28, 0.035);
  --header-bg: rgba(247, 248, 249, 0.86);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.06);
  --scrollbar-thumb: #b6bec9;

  --radius: 12px;
  --header-h: 64px;
  color-scheme: light;
  scrollbar-color: var(--scrollbar-thumb) var(--bg);
}

html[data-theme="dark"] {
  --bg: #0b0e13;
  --bg-card: #12161d;
  --bg-inset: #161b23;
  --text: #e7eaf0;
  --text-2: #9aa4b2;
  --text-3: #626e7e;
  --border: #242b36;
  --border-2: #3a4351;
  --accent: #8fb2ff;
  --accent-soft: rgba(143, 178, 255, 0.12);
  --ok: #3fb950;
  --deco: rgba(231, 234, 240, 0.34);
  --deco-soft: rgba(231, 234, 240, 0.14);
  --wf-pos-fill: rgba(143, 178, 255, 0.06);
  --wf-neg-fill: rgba(231, 234, 240, 0.025);
  --grid-line: rgba(231, 234, 240, 0.04);
  --header-bg: rgba(11, 14, 19, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  --scrollbar-thumb: #46536a;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
}

/* Hairline blueprint grid behind the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
}

h1, h2, h3, p, dl, dd, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

svg {
  display: block;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  text-wrap: balance;
}

.hero-sub,
.section-sub,
.about-copy p,
.infra-copy > p,
.col-card p,
.wf-list li,
.about-list li {
  text-wrap: pretty;
}

/* ---------- 3. Utilities ---------- */
.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.band {
  border-top: 1px solid var(--border);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.875rem;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo {
  color: var(--text);
  flex: none;
}

.logo-lobe-accent {
  fill: var(--accent);
}

.logo-lobe-ink {
  fill: var(--text);
}

.brand-sep,
.brand-cn {
  color: var(--text-2);
  font-weight: 600;
}

.site-nav {
  margin-left: auto;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-idx {
  font-size: 0.6875rem;
  color: var(--text-3);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.site-nav a.is-active .nav-idx {
  color: var(--accent);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--bg-card);
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--text-3);
  transition: color 0.16s ease, background-color 0.16s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  background: var(--text);
  color: var(--bg);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--text-2);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

/* ---------- 5. Hero ---------- */
.hero {
  padding: clamp(44px, 6vw, 76px) 0 clamp(40px, 5vw, 64px);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.kicker {
  font-size: 0.8125rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.kicker::before {
  content: "// ";
  color: var(--accent);
}

.hero-title {
  margin-top: 18px;
  font-size: clamp(1.55rem, 1.05rem + 2.05vw, 2.6875rem);
  line-height: 1.22;
  letter-spacing: -0.022em;
  font-weight: 680;
}

.hero-title-line {
  display: block;
}

.hero-sub {
  margin-top: 20px;
  max-width: 36em;
  color: var(--text-2);
  font-size: 1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  border-color: var(--border-2);
  color: var(--text);
  background: var(--bg-card);
}

.btn-ghost:hover {
  border-color: var(--text-3);
  transform: translateY(-1px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0.5;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Hero analytical ψ(4d_xy) wavefunction artwork */
.hero-art {
  justify-self: end;
  width: 100%;
  max-width: 420px;
  color: var(--deco);
}

.orbital-svg {
  width: 100%;
  height: auto;
}

.o-axis {
  stroke: var(--deco-soft);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.o-ticks line {
  stroke: var(--deco);
  stroke-width: 1;
}

.wf-reticle {
  fill: none;
  stroke: var(--deco-soft);
  stroke-width: 1;
  stroke-dasharray: 2 8;
  transform-origin: 230px 230px;
  animation: spin 120s linear infinite;
}

.wf-node-ring {
  fill: none;
  stroke: var(--deco);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.wf-pos {
  --wf-stroke: var(--accent);
  --wf-fill: var(--wf-pos-fill);
  --wf-dash: none;
  --wf-width: 1.25;
}

.wf-neg {
  --wf-stroke: var(--deco);
  --wf-fill: var(--wf-neg-fill);
  --wf-dash: 4 3;
  --wf-width: 1.1;
}

.wf-c1,
.wf-c2,
.wf-c3,
.wf-c4,
.wf-ci1,
.wf-ci2 {
  fill: none;
  stroke: var(--wf-stroke);
  stroke-width: var(--wf-width);
  stroke-dasharray: var(--wf-dash);
}

.wf-c1 { opacity: 0.42; }
.wf-c2 { opacity: 0.65; fill: var(--wf-fill); }
.wf-c3 { opacity: 0.85; fill: var(--wf-fill); }
.wf-c4 { opacity: 1; fill: var(--wf-fill); stroke-dasharray: none; }
.wf-ci1 { opacity: 0.65; }
.wf-ci2 { opacity: 0.92; fill: var(--wf-fill); }

.o-nucleus-ring {
  fill: var(--bg);
  stroke: var(--border-2);
  stroke-width: 1;
}

.o-nucleus {
  fill: var(--accent);
}

.wf-sign {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.wf-sign-pos {
  fill: var(--accent);
}

.wf-sign-neg {
  fill: var(--text-3);
}

.o-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  fill: var(--text-3);
}

/* ---------- 6. Section headings ---------- */
.section-sub {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.9375rem;
  max-width: 60ch;
}

.module-detail {
  padding: clamp(56px, 7.5vw, 90px) 0;
}

.detail-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.detail-num {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex: none;
}

.detail-title {
  font-size: clamp(1.3125rem, 1rem + 1.4vw, 1.7rem);
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.detail-anchor {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ---------- 7. Compact 4-Column Index Strip ---------- */
.modules {
  padding: clamp(28px, 3.5vw, 42px) 0;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.module-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-num {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-3);
  transition: color 0.18s ease;
}

.card-num::after {
  content: "——";
  margin-left: 8px;
  letter-spacing: -0.08em;
  color: var(--border-2);
}

.module-card:hover .card-num {
  color: var(--accent);
}

.card-title {
  margin-top: 4px;
  font-size: 0.96875rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-2);
}

.card-more {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-3);
  transition: color 0.18s ease;
}

.card-more .arrow {
  transition: transform 0.18s ease;
}

.module-card:hover .card-more {
  color: var(--accent);
}

.module-card:hover .card-more .arrow {
  transform: translateX(4px);
}

.card-ghost {
  position: absolute;
  right: 10px;
  bottom: -12px;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--border);
  pointer-events: none;
  user-select: none;
}

@supports (-webkit-text-stroke: 1px black) {
  .card-ghost {
    color: transparent;
    -webkit-text-stroke: 1px var(--border);
  }
}

/* ---------- 8. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.about-copy p {
  color: var(--text-2);
  font-size: 1.03125rem;
}

.about-copy p + p {
  margin-top: 18px;
}

.about-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

.about-list {
  margin-top: 12px;
  counter-reset: pt;
}

.about-list li {
  counter-increment: pt;
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  font-size: 0.90625rem;
  line-height: 1.7;
  border-top: 1px dashed var(--border);
}

.about-list li:first-child {
  border-top: none;
}

.about-list li::before {
  content: "0" counter(pt);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  flex: none;
}

/* ---------- 9. Workflows ---------- */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.wf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wf-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}

.wf-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-inset);
  color: var(--accent);
}

.wf-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wf-icon .icon-dot {
  fill: currentColor;
  stroke: none;
}

.wf-icon .icon-node {
  fill: var(--bg-card);
  stroke: currentColor;
}

.wf-title {
  margin-top: 16px;
  font-size: 1.03125rem;
  font-weight: 680;
  line-height: 1.45;
}

.wf-list {
  margin-top: 12px;
}

.wf-list li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  border-top: 1px dashed var(--border);
}

.wf-list li:first-child {
  border-top: none;
}

.wf-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ---------- 10. Infrastructure ---------- */
.infra-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
}

.infra-copy > p {
  color: var(--text-2);
  font-size: 1.03125rem;
}

.spec-list {
  margin-top: 28px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.spec-row:first-child {
  border-top: 1px dashed var(--border);
}

.spec-row dt {
  font-size: 0.78125rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  flex: none;
}

.spec-row dd {
  font-size: 0.875rem;
  color: var(--text);
  text-align: right;
}

.tools-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.tools-title {
  font-size: 1.0625rem;
  font-weight: 680;
}

.tools-sub {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--text-2);
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tool-chips li {
  padding: 8px 14px;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-inset);
  color: var(--text-2);
  transition: border-color 0.16s ease, color 0.16s ease;
}

.tool-chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tools-extra {
  margin-top: 18px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

/* ---------- 11. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 32px;
}

.col-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.col-card {
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-2);
  border-radius: 10px;
  transition: border-color 0.18s ease;
}

.col-card:hover {
  border-left-color: var(--accent);
}

.col-card h3 {
  font-size: 0.96875rem;
  font-weight: 680;
}

.col-card p {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

.contact-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.email-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

/* Unified 13px right inset (email-line 12px padding + 1px border) so all 3 copy buttons align strictly */
.email-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.email {
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.email:hover {
  color: var(--accent);
}

.copy-btn {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--text-2);
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-rows {
  margin-top: 18px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px 12px 0;
  border-top: 1px dashed var(--border);
}

.link-row:first-child {
  border-top: 1px dashed var(--border);
}

.link-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 8px;
  margin-left: -8px;
  border-radius: 9px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.link-main:hover {
  background: var(--bg-inset);
}

.link-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.90625rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.16s ease;
}

.link-name svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-3);
  transition: color 0.16s ease;
}

.link-name svg path[fill="currentColor"] {
  fill: currentColor;
  stroke: none;
}

.link-main:hover .link-name,
.link-main:hover .link-name svg {
  color: var(--accent);
}

.chip-link {
  font-size: 0.71875rem;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--bg-inset);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.link-main:hover .chip-link {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 12. Footer ---------- */
.site-footer {
  padding: 40px 0 44px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-2);
}

.footer-domain {
  font-size: 0.8125rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.footer-domain:hover {
  color: var(--accent);
}

.footer-status {
  display: inline-flex;
  gap: 10px;
}

.chip-status {
  font-size: 0.71875rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  background: var(--bg-card);
}

.chip-status span:last-child,
.chip-status #status-lang,
.chip-status #status-theme {
  color: var(--text);
}

.footer-note {
  margin-top: 26px;
  font-size: 0.71875rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

/* ---------- 13. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 10px);
  opacity: 0;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 14. Responsive (em-based breakpoints) ---------- */
@media (min-width: 38em) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60em) {
  .module-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 58.6875em) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }

  .about-grid,
  .infra-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 53.6875em) {
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px 0 0;
  }

  .header-controls {
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 8px 0 10px;
    border-top: 1px dashed var(--border);
    justify-content: space-between;
    gap: 10px;
  }

  .site-nav a {
    font-size: 0.8125rem;
  }

  section[id] {
    scroll-margin-top: 112px;
  }
}

@media (max-width: 47.9375em) {
  .container {
    width: min(1120px, 100% - 40px);
  }

  .header-inner {
    gap: 14px;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-title {
    font-size: 1.52rem;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .card-ghost {
    font-size: 2.8rem;
  }

  .detail-anchor {
    display: none;
  }

  .spec-row {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .spec-row dd {
    text-align: left;
  }

  .contact-panel {
    padding: 20px;
  }

  .email {
    font-size: 0.875rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .status-dot::after {
    animation: none;
    opacity: 0.3;
  }
}
