/* SZ-ETHNOTRADE — platform web interface. Thin-line elegant, theme-aware, self-contained.
   No external assets; system font stacks with CJK fallbacks so it runs offline / from file://. */

:root {
  --bg: #fbfaf8;
  --panel: #ffffff;
  --ink: #1c1a17;
  --muted: #6f6a62;
  --line: #e5e0d7;
  --line-strong: #d3ccbf;
  --accent: #a63d2f;          /* muted cinnabar — a restrained nod to a seal, not a flag */
  --accent-soft: #f3e7e3;
  --ok: #3d6b4f;
  --radius: 2px;
  --maxw: 64rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Songti SC", "Noto Serif SC", "Times New Roman", serif;
}
:root[data-theme="dark"], :root:not([data-theme="light"]) {
  /* default keeps light; dark only under explicit toggle or system preference below */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17151230; --bg: #171512; --panel: #201d19; --ink: #efe9df; --muted: #a49c8f;
    --line: #322d26; --line-strong: #443d34; --accent: #d98b76; --accent-soft: #2a211d;
    --ok: #7fb090;
  }
}
:root[data-theme="dark"] {
  --bg: #171512; --panel: #201d19; --ink: #efe9df; --muted: #a49c8f;
  --line: #322d26; --line-strong: #443d34; --accent: #d98b76; --accent-soft: #2a211d; --ok: #7fb090;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:lang(zh), [lang="zh"] { line-height: 1.85; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.4em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .3em; }
p { margin: .6em 0 1em; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }
.muted { color: var(--muted); }
.label { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--muted); font-family: var(--sans); }

/* top bar */
header.top {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 1rem; height: 58px; }
.brand { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .5px; border: 0; color: var(--ink); }
.brand .dot { color: var(--accent); }
.top nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; }
.top nav a { color: var(--muted); border: 0; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }

/* controls: language + theme */
.ctl { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.ctl button { background: transparent; border: 0; color: var(--muted); padding: .3rem .6rem; font: inherit; font-size: .85rem; cursor: pointer; }
.ctl button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.iconbtn { background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--muted); cursor: pointer; padding: .3rem .5rem; font-size: .9rem; }

/* hero */
.hero { padding: 4.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.hero .kicker { color: var(--accent); }
.hero p.lead { font-size: 1.2rem; max-width: 46ch; color: var(--muted); }
.cta { display: inline-block; margin-top: 1rem; background: var(--accent); color: #fff; border: 0;
  padding: .7rem 1.3rem; border-radius: var(--radius); font-size: 1rem; }
.cta:hover { border: 0; filter: brightness(1.05); }
.cta.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* pillars grid */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.grid .cell { background: var(--panel); padding: 1.4rem; }
.grid .cell h3 { margin-top: 0; }
.grid .cell .n { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; }

/* steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps li { position: relative; padding: .6rem 0 .6rem 3rem; border-bottom: 1px solid var(--line); }
ol.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: .6rem;
  width: 2rem; height: 2rem; border: 1px solid var(--accent); color: var(--accent); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); }

/* cameos */
.cameos { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cameo { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; color: var(--ink); transition: border-color .15s, transform .15s; }
.cameo:hover { border-color: var(--accent); transform: translateY(-2px); }
.cameo .tag { color: var(--accent); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.cameo h3 { margin: .3rem 0; }
.cameo .by { color: var(--muted); font-size: .9rem; }
.cameo .tested { display: inline-block; margin-top: .8rem; font-size: .75rem; color: var(--ok);
  border: 1px solid var(--ok); border-radius: 999px; padding: .1rem .6rem; }

/* fees strip */
.fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); }
.fees div { background: var(--panel); padding: 1.2rem; }
.fees .price { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); }

/* forms */
form.q { margin-top: 1.5rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 1.4rem 0; padding: 1.2rem 1.4rem; }
legend { font-family: var(--serif); font-size: 1.15rem; padding: 0 .5rem; color: var(--accent); }
.field { margin: 1rem 0; }
.field > label { display: block; margin-bottom: .35rem; font-weight: 500; }
.field .hint { color: var(--muted); font-size: .88rem; margin-bottom: .4rem; }
input[type=text], input[type=email], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .55rem .7rem;
}
textarea { min-height: 4.5rem; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.note { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: .9rem 1.1rem; border-radius: var(--radius); margin: 1.2rem 0; }
.out { white-space: pre-wrap; background: var(--panel); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 1rem; margin-top: 1rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; }

/* participant space */
.p-hero { padding: 3rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.products { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.fill { color: var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 0 .3rem; }

footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; }

/* language: show only the active language's text where both are inline */
[data-i18n] { }
.hide { display: none !important; }
