:root {
  --ink: #151a1f;
  --muted: #64727d;
  --line: rgba(18, 26, 32, 0.14);
  --paper: #f4f6f4;
  --surface: #ffffff;
  --basalt: #20272d;
  --water: #1f8a9c;
  --copper: #b86534;
  --moss: #4f7f5f;
  --gold: #d8a642;
  --shadow: 0 22px 80px rgba(32, 39, 45, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(32, 39, 45, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fafbf8 0%, var(--paper) 52%, #e9efec 100%);
  background-size: 44px 44px, auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(250, 251, 248, 0.9);
  border-bottom: 1px solid rgba(21, 26, 31, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--basalt);
  border-radius: 8px;
  font-size: 0.86rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.3vw, 28px);
  color: #39444d;
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a {
  transition: color 180ms ease;
}

.nav-link-button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.nav a:hover,
.nav button:hover {
  color: var(--copper);
}

.nav-cta {
  padding: 10px 14px;
  color: #fff;
  background: var(--basalt);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.nav .nav-cta:hover {
  color: #fff;
}

.visual-header {
  padding: clamp(12px, 2vw, 22px) clamp(18px, 4vw, 56px) 0;
}

.top-login-panel {
  position: absolute;
  top: 320px;
  right: clamp(18px, 4vw, 56px);
  z-index: 5;
  width: min(420px, calc(100vw - 36px));
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 70px rgba(32, 39, 45, 0.18);
  backdrop-filter: blur(14px);
}

.top-login-panel h2 {
  margin-bottom: 14px;
  font-size: 1.42rem;
  line-height: 1.15;
}

.top-login-panel .eyebrow {
  margin-bottom: 6px;
}

.header-model {
  height: 160px;
  min-height: 160px;
}

.header-model canvas {
  height: 160px;
  min-height: 160px;
}

.hero {
  display: block;
  align-items: center;
  min-height: 0;
  padding: clamp(22px, 3vw, 34px) clamp(18px, 4vw, 56px);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  max-width: 820px;
  font-size: clamp(2.85rem, 5.2vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.lede {
  max-width: 620px;
  margin-bottom: 30px;
  color: #34414b;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--basalt);
  border-color: var(--basalt);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.66);
}

.model-panel {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: #10161a;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.model-panel.header-model {
  height: 160px;
  min-height: 160px;
}

.panel-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(12, 18, 22, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.window-dot {
  width: 10px;
  height: 10px;
  background: #d8a642;
  border-radius: 50%;
}

.window-dot:nth-child(2) {
  background: #4f7f5f;
}

.window-dot:nth-child(3) {
  background: #1f8a9c;
}

.panel-title {
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.model-readout {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.model-readout span {
  padding: 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(5, 9, 11, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: 0.84rem;
}

.model-readout strong {
  display: block;
  color: #fff;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section {
  padding: clamp(24px, 3vw, 40px) clamp(18px, 4vw, 56px);
}

.two-column {
  display: block;
}

.two-column > div:first-child {
  margin-bottom: 22px;
}

.two-column h2 {
  max-width: 620px;
}

.feature-grid,
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.app-grid article {
  min-height: 230px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-grid p,
.app-grid p,
.workflow-copy p,
.resources p {
  color: var(--muted);
  line-height: 1.7;
}

.icon {
  display: inline-grid;
  width: 38px;
  height: 30px;
  place-items: center;
  margin-bottom: 28px;
  color: #fff;
  background: var(--water);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
}

.feature-grid article:nth-child(2) .icon {
  background: var(--moss);
}

.feature-grid article:nth-child(3) .icon {
  background: var(--copper);
}

.feature-grid article:nth-child(4) .icon {
  background: var(--gold);
}

.applications {
  background: #172024;
  color: #fff;
}

.applications .eyebrow,
.applications p {
  color: rgba(255, 255, 255, 0.72);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}

.app-grid article {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.13);
}

.workflow-hub {
  background: #eef3f0;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workflow-card {
  padding: clamp(24px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-tag {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 10px;
  color: #fff;
  background: var(--basalt);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-card h3 {
  max-width: 520px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.workflow-card p {
  color: var(--muted);
  line-height: 1.7;
}

.workflow-card ol {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  margin: 22px 0 0;
  color: #35424a;
  line-height: 1.62;
}

.workspace-section {
  display: grid;
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
  gap: 24px;
  align-items: start;
}

.workspace-private[hidden] {
  display: none;
}

.workspace-copy p,
.resources p {
  max-width: 680px;
  margin-top: 22px;
  font-size: 1.04rem;
}

.workspace-copy p {
  color: var(--muted);
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.workspace-title {
  max-width: 720px;
  font-size: clamp(2.25rem, 4vw, 4rem);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.workspace-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 920px);
  justify-self: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workspace-status {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #172024;
  border-radius: 8px;
  color: #fff;
}

.workspace-status span {
  color: rgba(255, 255, 255, 0.72);
}

.workspace-task {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.workflow-select {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workflow-choice {
  display: grid;
  gap: 7px;
  min-height: 152px;
  padding: 16px;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(18, 26, 32, 0.16);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.workflow-choice span {
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-choice strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.workflow-choice small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.workflow-choice.is-selected {
  border-color: var(--water);
  box-shadow: 0 0 0 3px rgba(31, 138, 156, 0.14);
}

.workflow-detail {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: #172024;
  border-radius: 8px;
  color: #fff;
}

.workflow-detail span {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.codex-message {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #10161a;
  border-radius: 8px;
  color: #fff;
}

.codex-message pre {
  overflow: auto;
  max-height: 300px;
  margin: 0;
  padding: 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font: 0.84rem/1.55 "Consolas", "SFMono-Regular", monospace;
  white-space: pre-wrap;
}

.task-downloads {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.task-downloads a {
  width: fit-content;
  color: #f5c867;
  font-weight: 800;
  text-decoration: none;
}

.task-downloads a:hover {
  text-decoration: underline;
}

.task-progress {
  display: grid;
  gap: 10px;
  margin-top: 0.25rem;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.task-progress-meter {
  overflow: hidden;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.task-progress-meter span {
  display: block;
  height: 100%;
  background: #f5c867;
  border-radius: inherit;
  transition: width 240ms ease;
}

.task-progress ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-progress-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
}

.task-progress-step span {
  overflow-wrap: anywhere;
}

.task-progress-step small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.76rem;
}

.task-progress-step.is-active {
  color: #fff;
  font-weight: 800;
}

.task-progress-step.is-complete::before,
.task-progress-step.is-active::before,
.task-progress-step.is-error::before {
  display: inline-grid;
  place-items: center;
  grid-row: 1;
  grid-column: 1;
  width: 1rem;
  height: 1rem;
  margin-right: 0.45rem;
}

.task-progress-step.is-complete span::before {
  content: "+";
  margin-right: 0.45rem;
  color: #9bd9aa;
}

.task-progress-step.is-active span::before {
  content: ">";
  margin-right: 0.45rem;
  color: #f5c867;
}

.task-progress-step.is-error span::before {
  content: "!";
  margin-right: 0.45rem;
  color: #ff9f9f;
}

.diagnostics-options,
.compilation-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: rgba(31, 138, 156, 0.08);
  border: 1px solid rgba(31, 138, 156, 0.22);
  border-radius: 8px;
}

.source-package-note {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(18, 26, 32, 0.12);
  border-radius: 8px;
}

.source-package-note span {
  color: var(--muted);
  line-height: 1.5;
}

.diagnostics-time-note,
.diagnostics-co2tab-note {
  padding: 12px 13px;
  color: #4f3b00;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
  background: #fff4cf;
  border: 1px solid rgba(184, 133, 18, 0.32);
  border-radius: 8px;
}

.workspace-login {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

.login-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.login-mode label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 26, 32, 0.14);
  border-radius: 8px;
  cursor: pointer;
}

.login-mode input {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.login-mode span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-mode small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workspace-login label,
.diagnostics-options label,
.compilation-options label,
.workspace-task label {
  display: grid;
  gap: 7px;
  color: #2c373f;
  font-size: 0.82rem;
  font-weight: 800;
}

.workspace-task label small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.workspace-login input,
.diagnostics-options select,
.compilation-options select,
.workspace-task input,
.workspace-task select,
.workspace-task textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  background: #fff;
  border: 1px solid rgba(18, 26, 32, 0.18);
  border-radius: 8px;
  outline: none;
}

.diagnostics-options option:disabled {
  color: rgba(44, 55, 63, 0.42);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  color: #5f6d76;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--ink);
  background: rgba(18, 26, 32, 0.07);
  outline: none;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-login .button {
  width: 100%;
}

.workspace-login .form-note {
  grid-column: auto;
}

.timeline {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--basalt);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.resources {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  background: #e0e8e2;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  align-items: center;
}

.contact-popup-button {
  justify-self: end;
  min-width: 220px;
}

.contact-form {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: #2c373f;
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  background: #fff;
  border: 1px solid rgba(18, 26, 32, 0.18);
  border-radius: 8px;
  outline: none;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--water);
  box-shadow: 0 0 0 3px rgba(31, 138, 156, 0.16);
}

.contact-form .button {
  width: 100%;
  cursor: pointer;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.contact-modal.is-open {
  display: flex;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 20, 0.66);
  backdrop-filter: blur(8px);
}

.contact-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: clamp(24px, 4vw, 34px);
  background: #f7f4ed;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.36);
}

.contact-dialog h2 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 5vw, 3.7rem);
}

.account-section {
  display: grid;
  gap: 24px;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: clamp(38px, 7vw, 82px);
}

.account-page-header {
  max-width: 680px;
}

.account-page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.95;
}

.account-page-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.account-page-panel {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.account-summary {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-stat span,
.account-task span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.account-task-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.account-task {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-task strong {
  display: block;
  margin: 4px 0;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.account-admin-link {
  justify-self: start;
  width: auto;
}

.admin-section {
  width: min(1120px, calc(100% - 36px));
}

.admin-task-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.admin-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-task strong,
.admin-task small {
  display: block;
  overflow-wrap: anywhere;
}

.admin-task strong {
  margin: 5px 0;
  font-size: 1rem;
}

.admin-task small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-task-meta {
  display: block;
  color: #5f6d76;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-task .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-email-panel {
  gap: 16px;
}

.admin-email-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.admin-email-header strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.admin-email-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-email-meta div {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-email-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-email-meta dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.admin-email-body {
  max-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  color: #17232a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 0.9rem/1.55 Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.danger-zone {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: #fff7f5;
  border: 1px solid rgba(141, 47, 36, 0.32);
  border-radius: 8px;
}

.danger-zone strong {
  display: block;
  margin-bottom: 6px;
}

.danger-zone p {
  max-width: 640px;
  margin: 0;
  color: #6f3a33;
  font-size: 0.9rem;
  line-height: 1.55;
}

.danger-button {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 11px;
  color: #fff;
  background: #8d2f24;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--basalt);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.76);
  background: var(--basalt);
  font-size: 0.92rem;
}

.footer a {
  color: #fff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .top-login-panel {
    position: static;
    width: auto;
    margin: 16px clamp(18px, 4vw, 56px) 0;
  }

  .hero,
  .two-column,
  .workspace-section {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-login {
    grid-template-columns: 1fr;
  }

  .workflow-select {
    grid-template-columns: 1fr;
  }

  .diagnostics-options,
  .compilation-options {
    grid-template-columns: 1fr;
  }

  .admin-email-meta {
    grid-template-columns: 1fr;
  }

  .workspace-login .button {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  .model-panel {
    min-height: 260px;
  }

  .resources,
  .contact-section {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .contact-popup-button {
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .nav button {
    flex: 0 0 auto;
  }

  .account-stat-grid {
    grid-template-columns: 1fr;
  }

  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-task {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-email-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-task .button,
  .admin-email-header .danger-button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 5.4rem);
  }

  .hero {
    padding-top: 38px;
  }

  .feature-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .model-readout {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
