:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #262626;
  background: #f5f5f5;
  font-synthesis: none;
  --ink: #262626;
  --muted: #6b6b6b;
  --border: #dedede;
  --soft: #fafafa;
  --purple: #d95721;
  --purple-dark: #b8471d;
  --purple-soft: #fff3ed;
  --blue: #ea580c;
  --blue-soft: #fff5ed;
  --green: #1f9d68;
  --green-soft: #e9f8f1;
  --red: #cc3b51;
  --red-soft: #fff0f2;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f5f5f5;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 54px;
}

.consent-check { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; margin-top: 16px; color: #595959; font-size: 0.76rem; line-height: 1.5; }
.consent-check input { margin-top: 3px; accent-color: var(--purple); }
.training-consent { border: 1px solid #e4e4e4; border-radius: 10px; padding: 13px 14px; background: #fafafa; }
.gate-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px !important; font-size: 0.72rem; }
.gate-links a, .footnote a { color: #8a431f; }

.beta-banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 18px; border: 1px solid #f1d2bf; border-radius: 10px; padding: 10px 14px; background: #fff9f5; color: #6e625d; font-size: 0.73rem; }
.beta-banner > div { display: flex; gap: 4px; }

.legal-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
.legal-shell article { margin-top: 34px; border: 1px solid var(--border); border-radius: 14px; padding: clamp(24px, 6vw, 48px); background: white; }
.legal-shell article p { color: #555; line-height: 1.7; }
.legal-shell h2 { margin: 28px 0 6px; font-size: 1.05rem; }

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.topnav {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-left: auto;
  margin-right: 14px;
}

.topnav > a, .nav-cluster > summary {
  border-radius: 7px;
  padding: 9px 10px;
  color: #666;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.topnav > a:hover, .nav-cluster > summary:hover, .nav-cluster[open] > summary { background: #ececec; color: #111; }

.nav-cluster { position: relative; }
.nav-cluster > summary { display: flex; gap: 6px; align-items: center; cursor: pointer; list-style: none; }
.nav-cluster > summary::-webkit-details-marker { display: none; }
.nav-cluster > summary::after { color: #999; content: "⌄"; font-size: .78rem; transform: translateY(-1px); }
.nav-popover { position: absolute; z-index: 20; top: calc(100% + 9px); left: 0; display: grid; width: 260px; overflow: hidden; border: 1px solid #d9d9d9; border-radius: 11px; padding: 6px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .12); }
.nav-popover-wide { width: 280px; }
.nav-popover a { display: grid; gap: 2px; border-radius: 7px; padding: 10px 11px; color: #222; text-decoration: none; }
.nav-popover a:hover { background: #f2f2f2; }
.nav-popover strong { font-size: .76rem; }
.nav-popover span { color: #777; font-size: .67rem; font-weight: 500; }
.topnav .nav-primary { padding: 9px 13px; background: var(--purple); color: #fff; }
.topnav .nav-primary:hover { background: var(--purple-dark); color: #fff; }
.topnav a[aria-current="page"] { color: #111; }
.nav-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.055em;
  font-family: "Avenir Next", "Century Gothic", "Trebuchet MS", sans-serif;
  font-size: 1.04rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 34px;
  background: transparent;
  color: #111;
  font-family: "Arial Black", "Avenir Next", sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.16em;
}

.brand strong { color: #111; font-weight: 500; }

.product-badge, .state-badge, .step-pill, .library-count {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.76);
  color: #616274;
  font-size: 0.74rem;
  font-weight: 750;
}

.product-badge i, .state-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero {
  max-width: 720px;
  margin: 0;
  padding: 38px 0 16px;
  text-align: left;
}

.eyebrow, .section-kicker {
  margin: 0 0 9px;
  color: var(--purple);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h1 span {
  color: inherit;
}

.lede {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.utility-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 17px 0 0;
  padding: 0;
  color: #5f5f5f;
  font-size: 0.72rem;
  font-weight: 700;
  list-style: none;
}

.utility-facts li::before {
  margin-right: 7px;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

code {
  border: 1px solid #e0e1ec;
  border-radius: 5px;
  padding: 1px 5px;
  background: white;
  color: #b7440d;
}

.workspace, .active-trainings, .active-job, .library {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(205, 208, 221, 0.9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.active-trainings, .active-job { border-color: #d7d7d7; }
.active-trainings[hidden], .active-job[hidden], .ready-panel[hidden], .failure-panel[hidden], .storage-meter[hidden], .epoch-progress[hidden], .checkpoint-panel[hidden], .activity-log[hidden] { display: none; }

.panel-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e8ef;
  padding: 18px clamp(18px, 3vw, 28px);
}

.panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

.active-heading {
  background: #fafafa;
}

.state-badge.active {
  border-color: #bce9d5;
  background: var(--green-soft);
  color: #14764d;
}

.state-badge.active i { animation: pulse 1.8s ease-in-out infinite; }
.state-badge.completed { border-color: #d7d9e1; background: #f1f2f5; color: #5e606d; }
.state-badge.completed i { background: #858895; }
.state-badge.failed { border-color: #facbd2; background: var(--red-soft); color: #ac2d41; }
.state-badge.failed i { background: var(--red); }

.capacity-note {
  margin: 0;
  border-bottom: 1px solid #eee6e0;
  padding: 13px clamp(20px, 4vw, 34px);
  background: #fffdfb;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.active-training-list { display: grid; gap: 12px; padding: 18px clamp(20px, 4vw, 34px) 24px; }
.training-card { border: 1px solid #e7ded8; border-radius: 16px; padding: 16px; background: #fff; }
.training-card.selected { border-color: #f4ae80; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08); }
.training-card-head, .training-card-progress > div:first-child, .epoch-progress > div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.training-card-title { display: flex; min-width: 0; gap: 10px; align-items: center; }
.training-card-title > div { min-width: 0; }
.training-card-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.training-card-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.training-card-actions { display: flex; flex: 0 0 auto; gap: 7px; align-items: center; }
.training-card-progress { margin-top: 14px; }
.training-card-progress strong, .epoch-progress strong { color: #43342b; font-size: 0.75rem; }
.training-card-progress span, .epoch-progress span { color: var(--muted); font-size: 0.7rem; }
.training-card-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; color: var(--muted); font-size: 0.68rem; }
.training-card-foot a { color: var(--purple-dark); font-weight: 800; text-decoration: none; }

.progress-track { overflow: hidden; height: 8px; margin-top: 8px; border-radius: 999px; background: #eee8e3; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--purple-dark)); transition: width 350ms ease; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 157, 104, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(31, 157, 104, 0); }
}

.job-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1px;
  border-bottom: 1px solid #e7e8ef;
  background: #e7e8ef;
}

.job-summary > div {
  display: grid;
  gap: 5px;
  padding: 18px clamp(20px, 4vw, 34px);
  background: white;
}

.job-summary span { color: #7c7d8d; font-size: 0.7rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.job-summary strong { overflow-wrap: anywhere; font-size: 0.93rem; }

.stage-heading {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 25px clamp(20px, 4vw, 34px) 12px;
}

.stage-heading > div { display: grid; gap: 4px; }
.stage-heading span { color: var(--purple); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.stage-heading strong { font-size: 1.04rem; }
.stage-heading p { max-width: 520px; margin: 0; color: var(--muted); text-align: right; font-size: 0.8rem; line-height: 1.45; }

.epoch-progress { margin: 4px clamp(20px, 4vw, 34px) 8px; border: 1px solid #f1d3c0; border-radius: 13px; padding: 13px 15px; background: #fffaf6; }
.epoch-progress p { margin: 7px 0 0; color: var(--muted); font-size: 0.68rem; }

.stage-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 0;
  padding: 18px clamp(20px, 4vw, 34px) 30px;
  list-style: none;
}

.stage-list li {
  position: relative;
  display: grid;
  justify-items: center;
  color: #9a9ba7;
  text-align: center;
}

.stage-list li::before {
  position: absolute;
  z-index: 0;
  top: 15px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: #e0e2ea;
  content: "";
}

.stage-list li:first-child::before { display: none; }
.stage-list li.done::before, .stage-list li.current::before { background: #f4a26e; }

.stage-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #dfe1e9;
  border-radius: 50%;
  background: white;
  color: #9698a5;
  font-size: 0.7rem;
  font-weight: 850;
}

.stage-list li > div { display: grid; gap: 4px; margin-top: 10px; }
.stage-list strong { font-size: 0.72rem; }
.stage-list small { max-width: 120px; color: #9b9ca8; font-size: 0.63rem; line-height: 1.35; }
.stage-list li.done { color: #676978; }
.stage-list li.done .stage-dot { border-color: #f4b58e; background: var(--purple-soft); color: var(--purple-dark); }
.stage-list li.current { color: #14764d; }
.stage-list li.current .stage-dot { border-color: var(--green); background: var(--green-soft); color: var(--green); box-shadow: 0 0 0 5px rgba(31, 157, 104, 0.1); }
.stage-list li.failed { color: var(--red); }
.stage-list li.failed .stage-dot { border-color: var(--red); background: var(--red-soft); color: var(--red); }

.ready-panel, .failure-panel, .checkpoint-panel {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 0 clamp(20px, 4vw, 34px) 30px;
  border: 1px solid #c5ead7;
  border-radius: 15px;
  padding: 17px;
  background: var(--green-soft);
}

.download-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.download-actions [hidden] { display: none; }

.ready-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.ready-panel > div:nth-child(2) { flex: 1; }
.ready-panel p, .failure-panel p { margin: 3px 0 0; color: #527262; font-size: 0.78rem; }
.failure-panel { display: block; border-color: #facbd2; background: var(--red-soft); color: #a7283c; }
.failure-panel p { color: #8b5560; }
.failure-panel .secondary-action { display: inline-block; margin-top: 12px; }
.failure-panel .secondary-action[hidden] { display: none; }
.checkpoint-panel { border-color: #f1c39f; background: #fff7f0; }
.checkpoint-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--purple-soft); color: var(--purple-dark); font-size: 0.64rem; font-weight: 900; }
.checkpoint-panel > div:nth-child(2) { flex: 1; }
.checkpoint-panel p { margin: 3px 0 0; color: #805e49; font-size: 0.75rem; line-height: 1.45; }
.activity-panel { margin: -10px clamp(20px, 4vw, 34px) 22px; }
.watch-action { border: 0; padding: 7px 0; background: transparent; color: var(--purple-dark); cursor: pointer; font-size: 0.73rem; font-weight: 850; }
.watch-action::after { margin-left: 6px; content: "↓"; }
.watch-action[aria-expanded="true"]::after { content: "↑"; }
.activity-log { max-height: 220px; overflow: auto; margin: 7px 0 0; border: 1px solid #e8e1dc; border-radius: 12px; padding: 10px 12px; background: #2c231e; color: #f8e9df; list-style: none; }
.activity-log li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 5px 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.66rem; line-height: 1.45; }
.activity-log time { color: #dca984; }
.active-controls { display: flex; justify-content: flex-end; margin-top: 14px; }
.active-controls[hidden] { display: none; }
.danger-action { color: var(--red); }
.danger-action:hover { border-color: #efc7cd; background: var(--red-soft); }

form { padding: clamp(20px, 4vw, 34px); }

.dropzone {
  display: flex;
  min-height: 180px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #bec2d1;
  border-radius: 9px;
  background: #fafafa;
  text-align: center;
  transition: 160ms ease;
}

.dropzone:hover, .dropzone.dragging { border-color: var(--purple); background: #fff8f2; }
.dropzone.has-file { border-style: solid; border-color: #fb9a5e; background: #fffaf6; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { margin: 14px 14px 6px; font-size: 1.05rem; }
.dropzone > span:last-child { max-width: 440px; padding: 0 18px; color: #818392; font-size: 0.82rem; }

.upload-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 1.45rem;
  font-weight: 700;
}

.settings-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 14px;
  margin-top: 16px;
}

.setting-card {
  border: 1px solid #e0e2eb;
  border-radius: 9px;
  padding: 18px;
  background: white;
}

.setting-card label { display: block; color: #29273d; font-size: 0.86rem; font-weight: 800; }
.setting-card > p { margin: 9px 0 0; color: #868795; font-size: 0.72rem; line-height: 1.45; }

.model-name-input {
  display: flex;
  overflow: hidden;
  align-items: center;
  margin-top: 11px;
  border: 1px solid #c8cadd;
  border-radius: 11px;
  background: #fbfbfd;
}

.model-name-input:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12); }
.model-name-input input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 12px 13px; background: transparent; color: var(--ink); }
.model-name-input span { align-self: stretch; display: flex; align-items: center; border-left: 1px solid #dfe1e9; padding: 0 12px; color: #b64a16; font-size: 0.78rem; font-weight: 800; }

.training-setting { background: #fffaf7; }
.setting-heading { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.setting-heading > div { display: grid; gap: 4px; }
.setting-heading span { color: #858695; font-size: 0.72rem; }
.setting-heading output { flex: 0 0 auto; border: 1px solid #f3c2a3; border-radius: 999px; padding: 6px 9px; background: var(--purple-soft); color: #b7440d; font-size: 0.72rem; font-weight: 850; }

#epoch-dial { width: 100%; margin: 20px 0 5px; accent-color: var(--purple); cursor: pointer; }
.dial-labels { display: flex; justify-content: space-between; color: #9596a2; font-size: 0.65rem; }
.setting-card .recommendation { color: #80553d; }

.quality-note { display: flex; gap: 11px; align-items: flex-start; margin: 18px 0; color: #7e7f8d; font-size: 0.77rem; line-height: 1.5; }
.quality-note > span { color: var(--purple); }
.quality-note p { margin: 0; }
.quality-note strong { color: #515263; }

.primary-action {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 15px 20px;
  background: var(--purple);
  color: white;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-weight: 850;
}

.primary-action:hover:not(:disabled) { background: var(--purple-dark); }
.primary-action:disabled { cursor: not-allowed; box-shadow: none; opacity: 0.38; }
.primary-action.compact { width: auto; flex: 0 0 auto; padding: 11px 15px; font-size: 0.78rem; }
.form-status { min-height: 1.3em; margin: 13px 0 0; color: #747584; text-align: center; font-size: 0.79rem; }
.form-status.error { color: var(--red); }

.library { margin-top: 30px; }
.library-heading { background: #fafbfe; }
.library-count { background: white; }

.retention-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 22px clamp(20px, 4vw, 34px);
  border: 1px solid #f0d4c2;
  border-radius: 15px;
  padding: 16px;
  background: #fff8f3;
}

.storage-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 1.1rem; }
.retention-note strong { font-size: 0.84rem; }
.retention-note p { max-width: 700px; margin: 4px 0 0; color: #737688; font-size: 0.72rem; line-height: 1.5; }

.storage-meter { width: 130px; color: #707281; text-align: right; font-size: 0.67rem; }
.storage-meter > div { overflow: hidden; height: 5px; margin-top: 7px; border-radius: 10px; background: #dde2ec; }
.storage-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 300ms ease; }

.model-list { border-top: 1px solid #e7e8ef; }
.model-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px clamp(20px, 4vw, 34px); border-bottom: 1px solid #ebecf1; }
.model-card:last-child { border-bottom: 0; }
.model-card:hover { background: #fcfcfe; }
.model-main { display: flex; min-width: 0; gap: 13px; align-items: center; }
.file-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--purple-soft); color: #b7440d; font-size: 0.68rem; font-weight: 900; }
.model-copy { min-width: 0; }
.model-title-line { display: flex; gap: 9px; align-items: center; }
.model-title-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.mini-state { flex: 0 0 auto; border-radius: 999px; padding: 4px 7px; background: #eff0f3; color: #696b78; font-size: 0.62rem; font-weight: 850; text-transform: capitalize; }
.mini-state.active { background: var(--green-soft); color: #15784e; }
.mini-state.failed { background: var(--red-soft); color: #af3044; }
.model-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; color: #858694; font-size: 0.69rem; }
.model-meta span + span::before { margin-right: 12px; color: #c1c2cc; content: "•"; }
.model-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: flex-end; }
.secondary-action, .text-action { border-radius: 9px; padding: 9px 12px; cursor: pointer; font-size: 0.72rem; font-weight: 800; }
.secondary-action { border: 1px solid #f3bd9b; background: var(--purple-soft); color: #ac410e; text-decoration: none; }
.model-package-action { border-color: var(--purple); background: var(--purple); color: white; }
.model-package-action:hover { background: var(--purple-dark); }
.secondary-action:hover { background: #ffe4d2; }
.text-action { border: 1px solid transparent; background: transparent; color: #8a8b96; }
.text-action:hover { border-color: #efc7cd; background: var(--red-soft); color: var(--red); }
.view-action:hover { border-color: #f3bd9b; background: var(--blue-soft); color: var(--blue); }

.empty-state { display: grid; justify-items: center; padding: 44px 24px 50px; color: #898a98; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #f0f1f5; color: #8a8c99; font-size: 1.3rem; }
.empty-state strong { margin-top: 12px; color: #5f606f; font-size: 0.88rem; }
.empty-state p { margin: 5px 0 0; font-size: 0.73rem; }

.footnote { margin: 20px auto 0; color: #898a96; text-align: center; font-size: 0.7rem; }

.content-panel,
.guide-section,
.faq-section {
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(24px, 4vw, 36px);
  background: white;
}

.content-heading { max-width: 680px; }
.content-heading h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); letter-spacing: -0.04em; }
.content-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.65; }
.compact-heading { margin-bottom: 20px; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.process-grid li {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 18px;
  background: #fcfcfc;
}

.process-grid li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 13px;
  border-radius: 7px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.process-grid strong { font-size: 0.84rem; }
.process-grid p { margin: 7px 0 0; color: var(--muted); font-size: 0.73rem; line-height: 1.55; }

.guide-section { padding-bottom: clamp(24px, 4vw, 34px); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-card {
  display: grid;
  gap: 6px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}
.guide-card:hover { border-color: #efb692; background: #fffaf7; }
.guide-card > span { color: var(--purple-dark); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.guide-card strong { font-size: 0.88rem; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }

.faq-list { border-top: 1px solid #e7e7e7; }
.faq-list details { border-bottom: 1px solid #e7e7e7; }
.faq-list summary { padding: 16px 4px; cursor: pointer; color: #383838; font-size: 0.82rem; font-weight: 800; }
.faq-list details p { max-width: 760px; margin: -4px 4px 17px; color: var(--muted); font-size: 0.76rem; line-height: 1.65; }

.ecosystem-footer { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; margin-top: 34px; border-top: 1px solid var(--border); padding: 30px 0 8px; color: #777; font-size: .7rem; }
.footer-intro p { max-width: 220px; margin: 10px 0 0; line-height: 1.55; }
.footer-brand { width: max-content; }
.footer-group { display: grid; align-content: start; gap: 8px; }
.footer-group > strong { margin-bottom: 3px; color: #292929; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.footer-group a { color: #666; text-decoration: none; }
.footer-group a:hover { color: #111; text-decoration: underline; }

.legacy-panel { max-width: 660px; }
.legacy-panel .primary-action { display: inline-block; width: auto; margin-top: 8px; }
.legacy-note { margin-top: 22px; border-top: 1px solid #e8e8e8; padding-top: 18px; color: #777 !important; font-size: .76rem !important; }

.guide-shell { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 64px; }
.guide-shell .topbar { margin-bottom: 34px; }
.guide-article {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(24px, 6vw, 52px);
  background: white;
}
.guide-article .guide-intro { max-width: 690px; margin: 0 0 28px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.guide-article h1 { max-width: 720px; }
.guide-primary-cta { display: flex; gap: 13px; align-items: center; margin: 17px 0 22px; }
.guide-primary-cta .primary-action { display: inline-block; width: auto; }
.guide-primary-cta span { color: #74706d; font-size: .76rem; line-height: 1.45; }
.guide-article code { border-radius: 4px; padding: 1px 4px; background: #f4f4f4; color: #9d3c10; font-size: .92em; }
.guide-article h2 { margin: 34px 0 9px; font-size: 1.18rem; letter-spacing: -0.025em; }
.guide-article h3 { margin: 24px 0 7px; font-size: 0.96rem; }
.guide-article p, .guide-article li { color: #555; font-size: 0.85rem; line-height: 1.75; }
.guide-article ul, .guide-article ol { padding-left: 22px; }
.guide-article table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 0.78rem; }
.guide-article th, .guide-article td { border-bottom: 1px solid #e5e5e5; padding: 11px 9px; text-align: left; vertical-align: top; }
.guide-article th { color: #333; background: #fafafa; }
.guide-note { margin: 22px 0; border-left: 3px solid var(--purple); padding: 14px 16px; background: #fff8f3; }
.guide-note p { margin: 0; color: #6e5447; }
.guide-cta { margin-top: 36px; border: 1px solid #efcfbc; border-radius: 11px; padding: 20px; background: #fffaf7; }
.guide-cta strong { display: block; margin-bottom: 5px; }
.guide-cta p { margin: 0 0 14px; }
.guide-cta .primary-action { display: inline-block; width: auto; padding: 11px 16px; font-size: 0.78rem; }
.guide-footer { margin-top: 18px; color: #8a8a8a; font-size: 0.7rem; }
.guide-footer a { color: #745344; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; margin-bottom: 28px; color: #999; font-size: .68rem; }
.breadcrumbs a { color: #745344; text-decoration: none; }
.answer-box { margin: 18px 0 24px; border: 1px solid #efcfbc; border-radius: 11px; padding: 18px 20px; background: #fffaf7; }
.answer-box strong { display: block; color: var(--purple-dark); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.answer-box p { margin: 7px 0 0; color: #4f4945; font-size: .9rem; line-height: 1.7; }
.related-links, .source-list { display: grid; gap: 7px; }
.related-links a, .source-list a, .source-note a { color: #9d3c10; }
.source-note { border-top: 1px solid #ece7e3; padding-top: 16px; font-size: .74rem !important; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; border: 1px solid #d8d8d8; border-radius: 8px; padding: 0; background: #fff; cursor: pointer; }
  .nav-toggle > span:first-child, .nav-toggle > span:first-child::before, .nav-toggle > span:first-child::after { display: block; width: 16px; height: 2px; background: #222; content: ""; }
  .nav-toggle > span:first-child { position: relative; }
  .nav-toggle > span:first-child::before { position: absolute; top: -5px; }
  .nav-toggle > span:first-child::after { position: absolute; top: 5px; }
  .topnav { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; left: 0; display: none; gap: 4px; align-items: stretch; margin: 0; border: 1px solid #d9d9d9; border-radius: 12px; padding: 8px; background: #fff; box-shadow: 0 18px 42px rgba(0,0,0,.13); }
  .topnav.is-open { display: grid; }
  .topnav > a, .nav-cluster > summary { justify-content: space-between; padding: 11px 12px; }
  .nav-popover, .nav-popover-wide { position: static; width: auto; margin: 2px 5px 6px; border: 0; border-radius: 8px; padding: 3px; background: #f5f5f5; box-shadow: none; }
  .nav-popover a { padding: 9px; }
  .topnav .nav-primary { margin-top: 3px; text-align: center; }
  .ecosystem-footer { grid-template-columns: 1fr 1fr; }
  .footer-intro { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .stage-list { grid-template-columns: 1fr; gap: 0; padding-top: 8px; }
  .stage-list li { min-height: 55px; grid-template-columns: 32px 1fr; justify-items: start; text-align: left; }
  .stage-list li::before { top: -26px; bottom: auto; left: 15px; width: 2px; height: 26px; }
  .stage-list li > div { margin: 4px 0 0 10px; }
  .stage-list small { max-width: none; }
  .job-summary { grid-template-columns: 1fr; }
  .stage-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .stage-heading p { text-align: left; }
  .ready-panel { align-items: flex-start; flex-wrap: wrap; }
  .download-actions { width: 100%; justify-content: flex-start; }
  .download-actions .primary-action { width: 100%; }
  .checkpoint-panel { align-items: flex-start; flex-wrap: wrap; }
  .checkpoint-panel .secondary-action { width: 100%; text-align: center; }
  .retention-note { grid-template-columns: auto 1fr; }
  .storage-meter { grid-column: 2; width: 100%; text-align: left; }
}

@media (max-width: 560px) {
  .product-badge { display: none; }
  .hero { padding-top: 28px; }
  .dropzone { min-height: 190px; }
  .panel-heading { align-items: flex-start; }
  .model-card { grid-template-columns: 1fr; }
  .model-actions { padding-left: 55px; }
  .model-actions { justify-content: flex-start; }
  .model-actions .secondary-action { text-align: center; }
  .guide-article table { display: block; overflow-x: auto; }
  .guide-primary-cta { align-items: stretch; flex-direction: column; }
  .guide-primary-cta .primary-action { width: 100%; }
  .training-card-head { align-items: flex-start; }
  .training-card-actions { flex-direction: column; align-items: stretch; }
  .retention-note { align-items: flex-start; }
  .beta-banner { align-items: flex-start; flex-direction: column; }
  .ecosystem-footer { grid-template-columns: 1fr; gap: 24px; }
  .footer-intro { grid-column: auto; }
}

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