/* ==========================================================================
   Ecosphere — glasshouse cabinet
   The palette is named for the material, not the mood: bed, pane, glass,
   glass-highlight, amber, moss, and four named substrate strata. Corner radii
   are asymmetric (blown-glass corner) and never a uniform pill.
   ========================================================================== */

:root {
  --bed: #0e1a14;
  --pane: #13241c;
  --pane-raised: #182e24;
  --pane-sunk: #0a1410;
  --hairline: rgba(191, 227, 208, 0.14);
  --hairline-strong: rgba(191, 227, 208, 0.28);

  --glass: #bfe3d0;
  --glass-highlight: #e7f7ef;
  --amber: #d9a441;
  --amber-deep: #a87c25;
  --moss: #6f9e58;
  --moss-deep: #45703a;

  --chalk: #dcece3;
  --mist: #8fae9d;
  --mist-dim: #6d8a7b;

  --stratum-drain: #8d9a8f;
  --stratum-char: #1d1a17;
  --stratum-loam: #4a3928;
  --stratum-moss: #6f9e58;

  --blow: 3px 22px 3px 22px;
  --blow-sm: 2px 13px 2px 13px;
  --blow-flip: 22px 3px 22px 3px;

  --rail-gap: 22px;
  --shell: 1160px;
  --round: ui-rounded, "Hiragino Maru Gothic ProN", "Quicksand", "Varela Round",
           "Nunito", "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--round);
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--chalk);
  background-color: var(--bed);
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(217, 164, 65, 0.10), transparent 62%),
    radial-gradient(920px 620px at 96% 4%, rgba(191, 227, 208, 0.09), transparent 58%),
    radial-gradient(760px 480px at 50% 108%, rgba(111, 158, 88, 0.12), transparent 60%);
  background-attachment: fixed;
  letter-spacing: 0.004em;
}

body.locale-zh {
  font-family: var(--round);
  font-size: 16.5px;
  line-height: 1.86;
  letter-spacing: 0.012em;
}

a { color: var(--glass); text-decoration: none; }
a:hover { color: var(--glass-highlight); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.22; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.72rem); }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1.05em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 40;
  background: var(--amber); color: #23180a; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- the sill (header) ---------- */
.sill {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(14, 26, 20, 0.94), rgba(14, 26, 20, 0.80));
  backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--hairline);
}
.sill::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber) 14%, transparent 14.4%, transparent 100%);
}
.sill-inner {
  max-width: var(--shell); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.mark { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto;
  column-gap: 11px; align-items: center; color: var(--glass); }
.mark-glyph { grid-row: 1 / span 2; color: var(--glass); }
.mark-word { font-weight: 900; font-size: 1.16rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mark-line { grid-column: 2; font-size: 0.71rem; color: var(--mist-dim); letter-spacing: 0.05em; }
.sill-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.sill-nav a {
  padding: 7px 13px; font-size: 0.9rem; font-weight: 700; color: var(--mist);
  border-radius: var(--blow-sm); border: 1px solid transparent;
}
.sill-nav a:hover { color: var(--glass-highlight); border-color: var(--hairline-strong); background: rgba(191, 227, 208, 0.05); }
.lang-cock {
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 6px 12px; color: var(--amber);
  border: 1px solid rgba(217, 164, 65, 0.42); border-radius: var(--blow-sm);
}
.lang-cock:hover { background: rgba(217, 164, 65, 0.11); color: var(--amber); }

/* ---------- vitrine (hero) ---------- */
.vitrine { max-width: var(--shell); margin: 0 auto; padding: 54px 22px 12px; }
.vitrine-kicker {
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 14px;
}
.vitrine h1 { max-width: 20ch; }
.vitrine h1 em { font-style: normal; color: var(--moss); }
.vitrine-lede { max-width: 62ch; color: var(--mist); font-size: 1.04rem; }
.vitrine-census {
  display: flex; flex-wrap: wrap; gap: 26px; margin: 26px 0 0; padding: 18px 0 0;
  border-top: 1px solid var(--hairline); list-style: none;
}
.vitrine-census li { font-size: 0.82rem; color: var(--mist-dim); letter-spacing: 0.04em; }
.vitrine-census b { display: block; font-size: 1.55rem; color: var(--glass); letter-spacing: -0.02em; }

/* ---------- the rail: scroll-snap cabinet ---------- */
.bore-rail {
  display: flex; gap: var(--rail-gap); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 30px 22px 34px; margin: 0 auto; max-width: var(--shell);
  scrollbar-color: var(--moss-deep) transparent; scrollbar-width: thin;
  scroll-padding-left: 22px;
}
.bore-rail::-webkit-scrollbar { height: 7px; }
.bore-rail::-webkit-scrollbar-thumb { background: var(--moss-deep); border-radius: 0; }
.bore-rail::-webkit-scrollbar-track { background: rgba(191, 227, 208, 0.07); }

.vessel-plate {
  scroll-snap-align: start; flex: 0 0 clamp(268px, 31vw, 352px);
  background: linear-gradient(168deg, var(--pane-raised), var(--pane) 62%);
  border: 1px solid var(--hairline); border-radius: var(--blow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 220ms cubic-bezier(.22,.7,.3,1), border-color 220ms ease;
}
.vessel-plate:hover, .vessel-plate:focus-within {
  transform: scale(1.022); border-color: rgba(217, 164, 65, 0.46);
}
.plate-bore { display: block; background: var(--pane-sunk); padding: 12px 10px 4px; }
.plate-bore img { width: 100%; height: auto; }
.plate-body { padding: 14px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.plate-tag {
  font-size: 0.68rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 7px;
}
.plate-title { font-size: 1.08rem; margin: 0 0 8px; }
.plate-title a { color: var(--chalk); }
.plate-title a:hover { color: var(--glass-highlight); }
.plate-intro { font-size: 0.88rem; color: var(--mist); margin: 0 0 14px; }
.plate-intro, .plate-title { overflow-wrap: anywhere; }
.plate-more { margin: auto 0 0; font-size: 0.85rem; font-weight: 800; }
.plate-more a { color: var(--moss); }
.plate-more a:hover { color: var(--amber); }

/* the stratum strip — this site's recurring motif */
.stratum-strip { display: flex; height: 11px; margin: 0 0 13px; border-top: 1px solid rgba(217, 164, 65, 0.4); }
.stratum-cell {
  display: block; flex: var(--weight, 1) 1 0; background: var(--band);
  position: relative; min-width: 6px;
}
.stratum-cell + .stratum-cell { border-left: 1px solid rgba(14, 26, 20, 0.55); }
.stratum-cell b {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- rail controls ---------- */
.rail-cockpit {
  max-width: var(--shell); margin: 0 auto; padding: 0 22px 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cock {
  font-family: inherit; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em;
  background: transparent; color: var(--mist); cursor: pointer;
  border: 1px solid var(--hairline-strong); border-radius: var(--blow-sm); padding: 7px 13px;
}
.cock:hover { color: var(--amber); border-color: rgba(217, 164, 65, 0.5); }
.form-switch { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.form-switch a {
  font-size: 0.8rem; font-weight: 800; padding: 7px 13px; color: var(--mist);
  border: 1px solid var(--hairline); border-radius: var(--blow-sm);
}
.form-switch a:hover { color: var(--glass-highlight); }
.form-switch a[aria-current="true"] {
  color: #241a09; background: var(--amber); border-color: var(--amber);
}

/* ---------- ledger ---------- */
.ledger-wrap { max-width: var(--shell); margin: 0 auto; padding: 40px 22px 20px; }
.ledger-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.ledger-head h2 { margin: 0; }
.ledger-head p { margin: 0; color: var(--mist-dim); font-size: 0.88rem; max-width: 60ch; }
.ledger-scroll { overflow-x: auto; margin-top: 18px; border-top: 2px solid var(--amber); }
table.ledger { width: 100%; border-collapse: collapse; min-width: 720px; }
table.ledger thead th {
  text-align: left; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mist-dim); font-weight: 800; padding: 13px 14px 9px; border-bottom: 1px solid var(--hairline);
}
table.ledger td { padding: 13px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; font-size: 0.92rem; }
table.ledger tbody tr:hover { background: rgba(191, 227, 208, 0.045); }
table.ledger td.vessel-name a { font-weight: 800; color: var(--chalk); }
table.ledger td.vessel-name a:hover { color: var(--glass-highlight); }
table.ledger td.vessel-name small { display: block; color: var(--mist-dim); font-weight: 500; font-size: 0.78rem; margin-top: 2px; }
.chip {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 3px 8px; border-radius: var(--blow-sm);
  border: 1px solid var(--hairline-strong); color: var(--mist);
}
.chip[data-form="closed"] { color: var(--glass); border-color: rgba(191, 227, 208, 0.42); }
.chip[data-form="open"] { color: var(--amber); border-color: rgba(217, 164, 65, 0.45); }
.chip[data-form="jar"] { color: var(--moss); border-color: rgba(111, 158, 88, 0.5); }
.ledger-strip { width: 74px; }
.ledger-strip .stratum-strip { margin: 0; }

/* ---------- dossier (detail page) ---------- */
.crumbbar { max-width: var(--shell); margin: 0 auto; padding: 20px 22px 0; }
.crumbbar ol { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0;
  font-size: 0.78rem; color: var(--mist-dim); }
.crumbbar a { color: var(--mist-dim); }
.crumbbar a:hover { color: var(--amber); }
.crumb-sep { color: var(--moss-deep); }
.crumb-here { color: var(--chalk); }

.dossier { max-width: var(--shell); margin: 0 auto; padding: 22px 22px 10px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 42px; align-items: start; }
.dossier-lede { grid-column: 1 / -1; }
.dossier-lede h1 { max-width: 26ch; }
.dossier-lede .standfirst { font-size: 1.06rem; color: var(--mist); max-width: 74ch; }
.dossier-kicker { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin: 0 0 12px; }

.bore-plate {
  background: var(--pane-sunk); border: 1px solid var(--hairline);
  border-radius: var(--blow-flip); padding: 14px; margin: 0;
}
.bore-plate img { width: 100%; }
.bore-plate figcaption { font-size: 0.78rem; color: var(--mist-dim); padding: 10px 4px 2px; border-top: 1px solid var(--hairline); margin-top: 10px; }

.docket { margin: 0; border-top: 2px solid var(--amber); }
.docket div { display: grid; grid-template-columns: 1fr auto; gap: 14px;
  padding: 11px 2px; border-bottom: 1px dotted var(--hairline-strong); }
.docket dt { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist-dim); }
.docket dd { margin: 0; font-weight: 800; color: var(--glass); text-align: right; }
.docket dd small { display: block; font-weight: 500; color: var(--mist); font-size: 0.76rem; letter-spacing: 0.02em; }

/* the strata ladder */
.ladder { list-style: none; margin: 0; padding: 0; counter-reset: rung; }
.ladder > li {
  counter-increment: rung; position: relative; padding: 0 0 22px 26px;
  border-left: 3px solid var(--rung, var(--moss));
}
.ladder > li::before {
  content: counter(rung, decimal-leading-zero);
  position: absolute; left: -14px; top: 0; width: 26px; height: 26px;
  display: grid; place-items: center; font-size: 0.68rem; font-weight: 900;
  background: var(--pane); color: var(--chalk); border: 2px solid var(--rung, var(--moss));
  border-radius: var(--blow-sm);
}
.ladder > li:last-child { padding-bottom: 4px; }
.ladder h3 { margin: 0 0 5px; padding-left: 20px; font-size: 1rem; }
.ladder p { margin: 0; padding-left: 20px; color: var(--mist); font-size: 0.93rem; }

.sheet { max-width: var(--shell); margin: 0 auto; padding: 40px 22px; display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 44px; align-items: start; }
.panel { background: linear-gradient(170deg, var(--pane-raised), var(--pane) 70%);
  border: 1px solid var(--hairline); border-radius: var(--blow); padding: 26px 28px; margin-bottom: 22px; }
.panel h2 { font-size: 1.18rem; }
.panel h2::before { content: ""; display: inline-block; width: 15px; height: 3px;
  background: var(--amber); vertical-align: middle; margin-right: 10px; }
.prose { color: var(--chalk); }
.prose p:last-child { margin-bottom: 0; }
.rail-side { position: sticky; top: 84px; }
.flora, .toolroll { list-style: none; margin: 0; padding: 0; }
.flora li, .toolroll li {
  padding: 9px 0 9px 22px; border-bottom: 1px dotted var(--hairline-strong);
  font-size: 0.93rem; position: relative;
}
.flora li::before {
  content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px;
  background: var(--moss); border-radius: 40% 60% 55% 45%;
}
.toolroll li::before {
  content: ""; position: absolute; left: 2px; top: 16px; width: 10px; height: 3px;
  background: var(--amber-deep);
}
.toolroll li:last-child, .flora li:last-child { border-bottom: 0; }
.stratum-key { list-style: none; margin: 0 0 18px; padding: 0; }
.stratum-key li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: center;
  font-size: 0.82rem; color: var(--mist); padding: 4px 0; }
.stratum-key i { display: block; height: 11px; border-radius: 1px; }
.next-plate { display: block; border: 1px solid var(--hairline-strong); border-radius: var(--blow);
  padding: 17px 19px; }
.next-plate:hover { border-color: var(--amber); }
.next-plate small { display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 6px; }
.next-plate b { color: var(--chalk); font-size: 0.98rem; }

/* ---------- shards (legal / about / contact) ---------- */
.shard { max-width: 830px; margin: 0 auto; padding: 34px 22px 56px; }
.shard-head { border-bottom: 2px solid var(--amber); padding-bottom: 20px; margin-bottom: 30px; }
.shard-head h1 { margin-bottom: 10px; }
.shard-head .standfirst { color: var(--mist); margin: 0 0 12px; }
.shard-head .stamp { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber-deep); margin: 0; }
.shard section { margin-bottom: 30px; }
.shard section h2 { font-size: 1.1rem; }
.shard section h2::before { content: ""; display: inline-block; width: 15px; height: 3px;
  background: var(--moss); vertical-align: middle; margin-right: 10px; }
.shard ul { padding-left: 0; list-style: none; }
.shard ul li { position: relative; padding: 7px 0 7px 24px; border-bottom: 1px dotted var(--hairline-strong); }
.shard ul li::before { content: ""; position: absolute; left: 3px; top: 16px; width: 8px; height: 8px;
  background: var(--moss); border-radius: 40% 60% 55% 45%; }
.mail-loud { display: inline-block; font-weight: 900; font-size: 1.16rem; color: var(--amber);
  border-bottom: 2px solid rgba(217, 164, 65, 0.4); padding-bottom: 2px; }
.mail-loud:hover { color: var(--glass-highlight); border-color: var(--glass); }
.notice { border-left: 3px solid var(--amber); background: rgba(217, 164, 65, 0.07);
  padding: 15px 18px; border-radius: 0 var(--blow-sm) var(--blow-sm) 0; font-size: 0.9rem; color: var(--mist); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- floor (footer) ---------- */
.floor { border-top: 1px solid var(--hairline); margin-top: 40px; background: rgba(10, 20, 16, 0.6); }
.floor::before { content: ""; display: block; height: 3px;
  background: repeating-linear-gradient(90deg, var(--stratum-drain) 0 40px, var(--stratum-char) 40px 80px,
    var(--stratum-loam) 80px 120px, var(--stratum-moss) 120px 160px); opacity: 0.65; }
.floor-inner { max-width: var(--shell); margin: 0 auto; padding: 30px 22px 40px; }
.floor-brand { font-weight: 800; color: var(--glass); margin: 0 0 5px; }
.floor-note { color: var(--mist-dim); font-size: 0.86rem; margin: 0 0 16px; }
.floor-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.floor-nav a { font-size: 0.86rem; color: var(--mist); }
.floor-nav a:hover { color: var(--amber); }
.floor-fine { font-size: 0.76rem; color: var(--mist-dim); max-width: 82ch; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .dossier, .sheet { grid-template-columns: 1fr; gap: 30px; }
  .rail-side { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .sill-inner { padding: 10px 16px; gap: 12px; }
  .mark-line { display: none; }
  .vitrine { padding-top: 34px; }
  .bore-rail { padding: 22px 16px 26px; scroll-padding-left: 16px; }
  .vessel-plate { flex: 0 0 82vw; }
  .vitrine-census { gap: 18px; }
  .ledger-wrap, .sheet, .dossier, .shard, .rail-cockpit, .crumbbar { padding-left: 16px; padding-right: 16px; }
  .panel { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vessel-plate { transition: none; }
  .vessel-plate:hover { transform: none; }
}
