/* ==========================================================================
   open3dai — design system
   The visual language follows the reference industry portal (南极熊): a light,
   information-first canvas, one coral accent that carries the whole brand, clear
   separators instead of heavy shadows, near-square corners, and a dense
   thumbnail + headline + metadata rhythm. Coral identity follows the reference; surface and text contrast are adapted
   for interactive tools.
   System fonts only — no webfont download.
   ========================================================================== */

/* Component display rules must preserve the native hidden state. */
[hidden] { display: none !important; }

:root {
  /* brand — the reference portal's coral */
  --accent: #fe6948;
  --accent-hover: #f45f3e;
  --accent-dim: #ff8a70;
  --accent-soft: #fff2ee;
  --accent-ink: #ffffff;
  /* column/category label sits a shade hotter than the accent */
  --accent-cat: #fd4811;

  /* surfaces — light and layered, the way a news portal stacks modules */
  --bg: #ffffff;
  --bg-1: #ffffff;
  --bg-2: #edf1f5;
  --bg-3: #f2f2f2;
  --bg-4: #ebebeb;
  --line: #dce2e8;
  --line-strong: #c6cfd9;
  --line-mid: #b3beca;

  /* text */
  --text-1: #202933;
  --text-2: #475364;
  --text-3: #586575;
  --text-4: #667382;
  /* the muted grey the reference uses for thumbnail metadata */
  --text-meta: #667382;

  /* semantic */
  --success: #22a45d;
  --warning: #d9930b;
  --danger: #e04b4b;
  --info: #2b7fd4;
  --purple: #6d4cff;

  /* footer — the portal's two-tier dark base */
  --footer-bg: #333333;
  --footer-bg-2: #262627;
  --footer-text: #cccccc;
  --footer-muted: #aaaaaa;

  /* geometry — near-square; the portal barely rounds anything */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 4px;
  --radius-pill: 3px;
  --maxw: 1440px;
  --gutter: 24px;
  --page-bg: #f3f5f7;
  --action: #b83e25;
  --action-hover: #96301b;
  --maxw-wide: var(--maxw);

  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Helvetica, Arial,
          sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* Shadows are almost absent in the reference; panels are separated by
     hairlines instead. Kept very shallow for the few places that need lift. */
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; color: var(--text-2); }

code, pre, kbd { font-family: var(--mono); font-size: .875em; }
code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .12em .42em;
  color: var(--accent-dim);
}
pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; color: var(--text-2); }

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

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

/* ---------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gutter); }
.wrap.section, .wrap.section-tight, .wrap.section-sm { padding-inline:var(--gutter); }

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.section-tight { padding: 40px 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .7rem;
}
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.05rem; }
.lead { font-size: 1.12rem; color: var(--text-2); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  color: var(--text-1);
  flex: 0 0 auto;
}
.brand:hover { color: var(--text-1); }
.brand-mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: .82rem;
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg-2); color: var(--text-1); }
.nav-link[aria-current="page"] { color: var(--accent); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* mega menu */
.mega { position: relative; }
.mega-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(680px, 88vw);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  z-index: 70;
}
.mega:hover .mega-panel,
.mega:focus-within .mega-panel { display: grid; }
.mega-item {
  display: block;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
}
.mega-item:hover { background: var(--bg-2); }
.mega-item b { display: block; font-size: .9rem; font-weight: 600; color: var(--text-1); }
.mega-item span { display: block; font-size: .79rem; color: var(--text-3); line-height: 1.4; }
.mega-foot {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 10px 11px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  color: var(--accent);
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  vertical-align: middle;
  margin-left: 6px;
}
.badge-muted { background: var(--bg-4); color: var(--text-3); }
.badge-warn { background: rgba(250, 202, 21, .16); color: var(--warning); }
.badge-info { background: rgba(0, 212, 255, .14); color: var(--info); }
.badge-ok { background: rgba(74, 222, 128, .14); color: var(--success); }

/* language switch */
.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-size: .8rem;
}
.lang-switch a {
  padding: 5px 11px;
  color: var(--text-3);
  font-weight: 600;
}
.lang-switch a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.lang-switch a:hover { color: var(--text-1); }
.lang-switch a[aria-current="true"]:hover { color: var(--accent-ink); }

/* mobile nav */
.btn.nav-toggle { display: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-1);
  font-family: inherit;
  font-size: .93rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-4); border-color: var(--text-4); color: var(--text-1); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--accent-ink); }

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

.btn-sm { padding: 6px 13px; font-size: .84rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-danger { border-color: rgba(255, 107, 107, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 107, 107, .12); border-color: var(--danger); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.card-pad-sm { padding: 16px; }
.card-hover { transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.card-hover:hover { border-color: var(--line-strong); background: var(--bg-2); transform: translateY(-2px); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.grid > *, .hero-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.icon-tile {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------- hero */

.hero {
  padding: 76px 0 60px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 12% -10%, rgba(254, 105, 72, .10), transparent 62%),
    radial-gradient(700px 320px at 88% 4%, rgba(109, 76, 255, .12), transparent 60%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: .5em; white-space: pre-line; }
.hero .lead { max-width: 560px; }
.hero-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}
.hero-quote {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-1);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 460px;
}
.hero-quote p { font-style: italic; color: var(--text-1); margin-bottom: .5em; }
.hero-quote cite { font-style: normal; font-size: .85rem; color: var(--text-3); }

.stat-row { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 34px; }
.stat { min-width: 110px; }
.stat b { display: block; font-size: 1.55rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.stat span { font-size: .84rem; color: var(--text-3); }

/* ---------------------------------------------------------------- steps */

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}
.step h3 { margin-bottom: .3em; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); color: var(--text-1); font-weight: 700; font-size: .86rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-1); }
td { color: var(--text-2); }

/* ---------------------------------------------------------------- faq */

details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  margin-bottom: 10px;
  overflow: hidden;
}
details.faq > summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  color: var(--text-1);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  flex: 0 0 auto;
}
details.faq[open] > summary::after { content: "−"; }
details.faq[open] > summary { border-bottom: 1px solid var(--line); }
details.faq .faq-body { padding: 15px 18px; color: var(--text-2); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

.faq-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: 18px;
  margin-bottom: 12px;
}
.faq-card h3 { font-size: 1rem; margin-bottom: .45em; }
.faq-card p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-size: .86rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="search"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: inherit;
  font-size: .94rem;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input::placeholder, textarea::placeholder { color: var(--text-4); }
textarea { min-height: 120px; resize: vertical; }

input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }

.field { margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.hint { font-size: .8rem; color: var(--text-3); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--text-2); font-weight: 500; margin-bottom: 9px; }
.check label { margin: 0; font-weight: 500; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px; gap: 3px; }
.seg button, .seg a {
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.seg button[aria-pressed="true"], .seg a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- dropzone */

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  padding: 34px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--bg-2); }
.dropzone strong { display: block; font-size: 1.02rem; color: var(--text-1); margin-bottom: 5px; }
.dropzone span { font-size: .85rem; color: var(--text-3); }
.dropzone input[type="file"] { display: none; }

/* ---------------------------------------------------------------- alerts */

.alert {
  border-radius: var(--radius);
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  font-size: .92rem;
  margin-bottom: 14px;
}
.alert-info { border-color: rgba(0, 212, 255, .3); background: rgba(0, 212, 255, .06); }
.alert-warn { border-color: rgba(250, 202, 21, .32); background: rgba(250, 202, 21, .07); }
.alert-err { border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .07); }
.alert-ok { border-color: rgba(74, 222, 128, .32); background: rgba(74, 222, 128, .07); }
.alert strong { color: var(--text-1); }
.alert p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- viewport */

.viewport {
  position: relative;
  background: #e2e8ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
}
.viewport canvas { width: 100%; height: 100%; display: block; }
.viewport-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 26px;
  color: var(--text-3);
  pointer-events: none;
}
.viewport-empty strong { display: block; color: var(--text-2); font-size: 1.05rem; margin-bottom: 6px; }
.viewport-toolbar {
  position: absolute;
  top: 10px; right: 10px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 20px);
  z-index: 5;
}
.viewport-toolbar button {
  padding: 5px 9px;
  font-size: .76rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.viewport-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.viewport-toolbar button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.viewport-status {
  position: absolute;
  left: 10px; bottom: 10px;
  font-size: .76rem;
  color: var(--text-3);
  background: rgba(255, 255, 255, .94);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  z-index: 5;
}

/* ---------------------------------------------------------------- studio */

.studio-layout {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
  padding: 14px 0 40px;
}
.studio-layout > * { min-width: 0; }
.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
}
.panel + .panel { margin-top: 12px; }
.panel-title {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 11px;
}
.panel-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.panel-title-row .panel-title { margin-bottom: 0; }

.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mode-tab {
  text-align: left;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.mode-tab b { display: block; font-size: .84rem; font-weight: 600; }
.mode-tab span { display: block; font-size: .7rem; color: var(--text-4); line-height: 1.35; margin-top: 2px; }
.mode-tab[aria-pressed="true"] { border-color: var(--accent); background: rgba(254, 105, 72, .07); }
.mode-tab[aria-pressed="true"] b { color: var(--accent); }

.engine-list { display: grid; gap: 6px; }
.engine-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: .88rem;
}
.engine-opt:hover { border-color: var(--line-strong); }
.engine-opt[aria-pressed="true"] { border-color: var(--accent); background: rgba(254, 105, 72, .07); }
.engine-opt.is-disabled { opacity: .5; cursor: not-allowed; }
.engine-opt .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.engine-opt.is-disabled .dot { background: var(--text-4); }
.engine-opt .meta { margin-left: auto; font-size: .72rem; color: var(--text-3); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-2);
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip:hover { border-color: var(--line-strong); }

.shading-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.shading-grid button {
  padding: 4px 8px;
  font-size: .72rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
}
.shading-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.progress-track { height: 6px; background: var(--bg-4); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: var(--radius-pill); transition: width .3s ease; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .84rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text-1); text-align: right; font-variant-numeric: tabular-nums; }

.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.compare-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-1); }
.compare-card.is-kept { border-color: var(--accent); }
.compare-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: .84rem; font-weight: 600; }
.compare-body { aspect-ratio: 1 / 1; position: relative; background: var(--bg); }
.compare-foot { padding: 9px 11px; display: flex; gap: 6px; align-items: center; justify-content: space-between; }

.asset-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.asset-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.asset-row img, .asset-thumb { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; background: var(--bg-3); flex: 0 0 auto; }
.asset-row .info { min-width: 0; flex: 1; }
.asset-row .info b { display: block; font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row .info span { font-size: .74rem; color: var(--text-3); }

/* ---------------------------------------------------------------- pricing */

.price-toggle { display: flex; justify-content: center; margin-bottom: 32px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 18px; align-items: start; }
.price-card { position: relative; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.price-card.is-popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.price-card .tag { position: absolute; top: -11px; left: 24px; }
.price-card .amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-1); line-height: 1.1; }
.price-card .amount small { font-size: .9rem; font-weight: 600; color: var(--text-3); }
.price-card .was { font-size: .84rem; color: var(--text-3); margin-bottom: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 9px; }
.price-card li { position: relative; padding-left: 24px; font-size: .9rem; color: var(--text-2); }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.price-card .btn { margin-top: auto; }

/* ---------------------------------------------------------------- prose */

.prose { max-width: 780px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { color: var(--text-2); padding-left: 1.3em; margin-bottom: 1.1em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--accent); color: var(--text-1); }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose-wide { max-width: none; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); padding: 16px 18px; margin-bottom: 28px; }
.toc b { display: block; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 9px; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.toc a { font-size: .88rem; color: var(--text-2); }
.toc a:hover { color: var(--accent); }

.note {
  border-left: 3px solid var(--info);
  background: rgba(0, 212, 255, .05);
  padding: 13px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.3em 0;
  color: var(--text-2);
}
.note p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- article cards */

.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .post-body { padding: 17px 18px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.04rem; margin-bottom: .45em; }
.post-card p { font-size: .89rem; color: var(--text-3); margin-bottom: 12px; }
.post-meta { display: flex; gap: 10px; align-items: center; font-size: .76rem; color: var(--text-4); margin-bottom: 10px; }
.post-meta .pill { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 9px; color: var(--text-3); font-weight: 600; }
.post-hero { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); display: grid; place-items: center; font-size: 2rem; color: var(--text-4); border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: 52px 0 30px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 30px; }
.footer-brand p { font-size: .88rem; color: var(--text-3); max-width: 330px; }
.footer-col h4 { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 13px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { font-size: .87rem; color: var(--text-2); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-4);
}
.social { display: flex; gap: 14px; }
.social a { color: var(--text-3); }
.social a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- breadcrumb */

.crumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: .82rem; color: var(--text-3); margin-bottom: 18px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--text-4); }

/* ---------------------------------------------------------------- misc */

.pill-list { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0 0 14px; }
.pill-list li { font-size: .8rem; padding: 4px 11px; border-radius: var(--radius-pill); background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.sidebar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; align-items: start; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: .86em; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.nowrap { white-space: nowrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(0, 0, 0, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .studio-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .studio-layout .studio-right { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .studio-layout { grid-template-columns: minmax(0, 1fr); }
  .viewport-toolbar { flex-wrap: wrap; max-width: calc(100% - 24px); }
}

@media (max-width: 1200px) {
  .nav { display: none; }
  .btn.nav-toggle { display: inline-flex; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 2px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .mega-panel { position: static; width: auto; display: grid; box-shadow: none; border: 0; padding: 4px 0 4px 10px; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px; }
  .header-right { flex: 1 0 100%; justify-content: flex-end; flex-wrap: wrap; }
  .lang-switch { white-space: nowrap; flex-shrink: 0; }
  .header-right .btn span { display: inline; }
  body { font-size: 15.5px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 36px; }
  .stat-row { gap: 20px; }
  .wrap { padding: 0 15px; }
  .card { padding: 17px; }
}

/* ==========================================================================
   Portal components — the reference site's signature building blocks
   These are what make the layout read as an industry portal rather than a
   generic SaaS page: a coral tick beside every section title, hairline module
   headers, black square rank badges, and thumbnail + headline + metadata rows.
   ========================================================================== */

/* Section title with the 4px coral bar (reference: .yide-h2-wrap) */
.sec-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  min-height: 20px;
  margin: 0 0 14px;
}
.sec-bar h2,
.sec-bar h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-1);
}
.sec-bar .more {
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-4);
}
.sec-bar .more:hover { color: var(--accent); }

/* Module block: white card, 45px header, one hairline under it */
.module {
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.module-head {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}
.module-head h2,
.module-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-1);
}
.module-head .more { margin-left: auto; font-size: .78rem; color: var(--text-4); }
.module-head .more:hover { color: var(--accent); }
.module-body { padding: 15px; }
.module-body.flush { padding: 0; }

/* Sidebar modules sit on the portal's #fafafa */
.module.aside { background: var(--bg-1); }

/* 90x65 thumbnail, the reference's list-image size */
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 90px;
  height: 65px;
  overflow: hidden;
  background: var(--bg-3);
  display: block;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  display: block;
}
.thumb:hover img { transform: scale(1.1); }
/* bottom gradient so a caption stays legible over a photo */
.thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
  pointer-events: none;
}
.thumb.plain::after { display: none; }

/* Headline + metadata row (reference: .yide-imgnews-list li) */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}
.news-list li:last-child { border-bottom: none; }
.news-list .news-body { min-width: 0; flex: 1 1 auto; }
.news-list .news-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--text-1);
  transition: color .2s ease;
  margin-bottom: 6px;
}
.news-list li:hover .news-title { color: var(--accent); }
.news-list .news-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--text-3);
  margin-bottom: 6px;
}

/* Metadata line: 12px, muted, category in the hotter orange */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: .76rem;
  color: var(--text-meta);
}
.meta .cat { color: var(--accent-cat); }
.meta a { color: var(--text-meta); }
.meta a:hover { color: var(--accent); }
.meta .dot { color: var(--line-mid); }

/* 28x28 black square rank badge (reference: .yide-hot-recomend-new span) */
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-list li {
  position: relative;
  padding: 10px 15px 10px 52px;
  border-bottom: 1px solid var(--line);
  counter-increment: rank;
  font-size: .86rem;
  line-height: 1.6;
}
.rank-list li:last-child { border-bottom: none; }
.rank-list li::before {
  content: counter(rank);
  position: absolute;
  left: 15px;
  top: 11px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: #23262b;
  color: #fff;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}
/* the first three get the accent, as a ranking cue */
.rank-list li:nth-child(-n+3)::before { background: var(--accent); }
.rank-list a { color: var(--text-1); }
.rank-list a:hover { color: var(--accent); }

/* Lead-in paragraph (reference: 导读) */
.lead-in {
  border-left: 3px solid var(--line-mid);
  padding: 2px 0 2px 12px;
  color: var(--text-3);
  font-size: .88rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.lead-in strong { color: var(--accent-cat); font-weight: 400; }

/* Category chip used in listings */
.chip {
  display: inline-block;
  font-size: .72rem;
  line-height: 1;
  padding: 4px 7px;
  background: var(--accent-soft);
  color: var(--accent-cat);
  border: 1px solid rgba(253, 72, 17, .18);
}
.chip.plain { background: var(--bg-2); color: var(--text-3); border-color: var(--line); }

/* Date stamp, tabular so columns of dates line up */
.datestamp {
  font-size: .76rem;
  color: var(--text-meta);
  font-variant-numeric: tabular-nums;
}

/* Blog cover: generated artwork in the card's 640x256 band */
.post-hero {
  position: relative;
  display: block;
  aspect-ratio: 640 / 256;
  overflow: hidden;
  background: var(--bg-3);
  padding: 0;
  font-size: 0;
  color: transparent;
}
.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.post-card:hover .post-hero img { transform: scale(1.04); }
.post-hero .post-chip {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  color: #fff;
  background: var(--accent-cat);
  border: none;
  padding: 5px 9px;
}
.article-cover {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

/* Testing-mode banner: loud enough to be noticed, calm enough to live with */
.test-banner {
  background: var(--accent-soft);
  border-bottom: 1px solid rgba(253, 72, 17, .18);
  color: var(--text-2);
  font-size: .82rem;
  line-height: 1.6;
}
.test-banner .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
}
.test-banner strong {
  color: var(--accent-cat);
  font-weight: 400;
  white-space: nowrap;
}
/* Persisted public model showcase. */
.showcase-viewport { position: relative; aspect-ratio: 1; overflow: hidden; background: #f4f5f7; border-radius: 4px; margin-bottom: 12px; }
.showcase-viewport > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.showcase-viewport > canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.showcase-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #666; font-size: .8rem; pointer-events: none; }
.showcase-status[hidden] { display: none; }
.model-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; margin-bottom: 6px; }
.model-card .flex-between { gap: 8px; flex-wrap: wrap; font-size: .75rem; }

.showcase-preview-button { position:absolute;z-index:2;bottom:16px;left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--bg-1); }

/* Shared visual hierarchy: coral identity, dark action ink, white modules. */
:focus-visible { outline:3px solid var(--action); outline-offset:3px; }
.site-header { background:var(--bg); border-top:3px solid var(--accent); border-bottom:1px solid var(--line-strong); }
.nav-link[aria-current=page] { color:var(--action); font-weight:700; }
.section-head h2, .panel-title { color:var(--text-1); }
.card, .panel, .price-card { background:var(--bg); }
.panel-title { border-bottom:1px solid var(--line); padding-bottom:10px; letter-spacing:.04em; }
.mode-tab[aria-pressed=true], .engine-opt[aria-pressed=true] { border-color:var(--action); background:var(--accent-soft); box-shadow:inset 3px 0 var(--action); }
.mode-tab[aria-pressed=true] b, .prose a { color:var(--action); }
.seg button[aria-pressed=true], .seg a[aria-current=true], .viewport-toolbar button[aria-pressed=true] { background:var(--action); color:#fff; border-color:var(--action); }
.studio-left > .panel:first-child { border-top:3px solid var(--accent); }
.studio-right .panel { background:#fff; border-top:3px solid #647589; }
.studio-centre > .hint { margin:0 0 12px; }
.studio-centre .viewport { border:1px solid #a8b5c4; box-shadow:0 2px 8px #2233480d; }
.studio-centre .viewport-empty { background-image:linear-gradient(#8a9bad24 1px,transparent 1px),linear-gradient(90deg,#8a9bad24 1px,transparent 1px); background-size:32px 32px; }
.studio-centre .viewport-empty strong, .studio-centre .viewport-empty span { background:#e2e8efed; padding:8px 14px; }
.studio-centre .viewport-empty strong { margin-bottom:0; }
.viewport-toolbar { background:#fff; border-color:#b7c2ce; box-shadow:0 2px 8px #22334812; }
.site-footer { background:var(--footer-bg); --text-1:#fff; --text-2:#e4e7eb; --text-3:#cbd1d8; --text-4:#c0c7d0; --line:#525b65; }
.site-footer .brand { color:#fff; }
@media(max-width:640px) { :root { --gutter:16px; } .wrap { padding-inline:var(--gutter); } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { transition:none !important; animation:none !important; } }
