:root {
  --site-ground: #050608;
  --site-panel: #101216;
  --site-panel-raised: #17191f;
  --site-ink: #f6f7fb;
  --site-muted: #a4a8b2;
  --site-dim: #777c87;
  --site-blue: #527cff;
  --site-blue-hover: #7695ff;
  --site-button-blue: #4668e8;
  --site-button-hover: #405edb;
  --site-line: #292c34;
  --site-danger: #cf4f61;
  --site-content: 1240px;
  --site-gutter: clamp(20px, 5vw, 76px);
  --site-radius: 7px;
}

html { scroll-padding-top: 96px; }
body {
  background: var(--site-ground);
  color: var(--site-ink);
  font-family: Poppins, Arial, sans-serif;
  line-height: 1.55;
  overflow-x: clip;
}
body, main, section, article, aside, footer, header { min-width: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--site-blue-hover); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #91aaff;
  outline-offset: 3px;
}
::selection { background: var(--site-blue); color: #fff; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.sr-only:focus {
  position: fixed !important;
  z-index: 100;
  top: 12px;
  left: 12px;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  overflow: visible !important;
  clip: auto !important;
  color: var(--site-ink);
  background: var(--site-panel-raised);
  border: 1px solid var(--site-blue) !important;
  border-radius: 4px;
  white-space: normal !important;
}

/* A plain, compact frame keeps the content and account actions easy to find. */
.global-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: 78px;
  padding: 12px var(--site-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  background: var(--site-ground);
  border: 0;
  animation: none;
}
.global-brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.global-brand img { display: block; width: 112px; height: auto; }
.global-navigation { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.global-header nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); }
.global-header nav a {
  color: var(--site-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .18s ease;
}
.global-header nav a:hover,
.global-header nav a[aria-current="page"] { color: var(--site-ink); }
.global-header .nav-right { gap: 24px; }
.global-header .nav-accent {
  padding: 10px 17px;
  color: #fff;
  background: var(--site-button-blue);
  border-radius: 5px;
  font-weight: 600;
  transition: background-color .18s ease, transform .18s ease;
}
.global-header .nav-accent:hover { color: #fff; background: var(--site-button-hover); transform: translateY(-1px); }
.site-menu-toggle { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  content: "";
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; inset: -6px 0 auto; }
.menu-icon::after { position: absolute; inset: 6px 0 auto; }

.compact-footer, .home-footer, .legal-footer {
  width: min(var(--site-content), calc(100% - 2 * var(--site-gutter)));
  margin: 0 auto;
  padding: 24px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px 28px;
  color: var(--site-dim);
  font-size: 13px;
  line-height: 1.6;
}
.compact-footer > span:nth-child(2), .home-footer > span:nth-child(2) { max-width: 560px; text-align: center; }
.compact-footer a, .home-footer a, .legal-footer a { color: var(--site-muted); }
.compact-footer a:hover, .home-footer a:hover, .legal-footer a:hover { color: var(--site-ink); }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* Homepage: real ClickGUI first, then distinct product stories rather than a repeated card grid. */
.page-home { background: var(--site-ground); }
.page-home .stage-shape { display: none !important; }
.home-stage {
  width: min(var(--site-content), calc(100% - 2 * var(--site-gutter)));
  min-height: 0;
  margin: 0 auto;
  padding: 28px 0 0;
  display: block;
  overflow: visible;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 0;
  padding: clamp(56px, 8vw, 98px) 0 66px;
}
.home-hero-copy { max-width: 760px; margin: 0 auto; text-align: center; }
.home-hero h1 {
  max-width: none;
  margin: 0 auto 22px;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 600;
}
.home-hero-lead { max-width: 640px; margin: 0 auto; color: var(--site-muted); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; }
.hero-meta { margin: 0 0 18px; color: var(--site-dim); font-size: 12px; letter-spacing: .04em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 28px; }
.site-button, .hero-actions .arrow-link {
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.site-button { color: #fff; background: var(--site-button-blue); }
.site-button:hover { color: #fff; background: var(--site-button-hover); transform: translateY(-1px); }
.site-button-secondary, .hero-actions .arrow-link { color: var(--site-ink); background: transparent; border-color: var(--site-line); }
.site-button-secondary:hover, .hero-actions .arrow-link:hover { color: #fff; background: var(--site-panel); border-color: #454b5a; }
.hero-product { position: relative; width: 100%; min-width: 0; margin: clamp(48px, 7vw, 84px) 0 0; }
.hero-product::before, .hero-product::after { position: absolute; z-index: 1; width: 30px; height: 30px; border-color: #91aaff; border-style: solid; content: ""; pointer-events: none; }
.hero-product::before { top: -8px; left: -8px; border-width: 1px 0 0 1px; }
.hero-product::after { right: -8px; bottom: -8px; border-width: 0 1px 1px 0; }
.home-preview-frame {
  display: block;
  width: 100%;
  height: clamp(440px, 58vw, 680px);
  border: 0;
  background: var(--site-panel);
}
.preview-caption { margin: 10px 0 0; color: var(--site-dim); font-size: 13px; text-align: center; }
.home-story {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(88px, 10vw, 138px) max(var(--site-gutter), calc((100vw - var(--site-content)) / 2));
  background: #10182c;
}
.home-story-heading { display: grid; grid-template-columns: minmax(0, .8fr) minmax(250px, .55fr); align-items: end; gap: 48px; margin-bottom: 52px; }
.home-story h2, .home-final h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 500;
}
.home-story-heading p, .home-feature-copy p, .home-account-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.75;
}
.home-feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 42px; margin: 0; padding: 0; list-style: none; }
.home-feature-list li {
  min-height: 112px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.home-feature-list strong { font-size: clamp(18px, 2vw, 25px); font-weight: 500; letter-spacing: -.03em; }
.home-feature-list span { color: var(--site-muted); font-size: 14px; }
.home-feature-row {
  padding: clamp(64px, 9vw, 112px) 0;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 8vw, 112px);
  align-items: center;
}
.home-feature-row + .home-feature-row { margin-top: 6px; }
.home-feature-copy h2 { max-width: 12ch; margin: 0 0 22px; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.06; letter-spacing: -.055em; font-weight: 500; }
.home-feature-copy .text-link { display: inline-flex; gap: 10px; margin-top: 25px; color: #8fa8ff; font-weight: 600; }
.home-story > .text-link { display: inline-flex; gap: 10px; margin-top: 24px; color: #8fa8ff; font-weight: 600; }
.home-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.home-interface-piece, .home-profile-piece {
  min-height: 260px;
  padding: clamp(22px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  background: var(--site-panel);
  border-radius: var(--site-radius);
}
.home-interface-piece p, .home-profile-piece p { margin: 0; color: var(--site-muted); font-size: 14px; }
.home-interface-piece strong, .home-profile-piece strong { max-width: 12ch; font-size: clamp(27px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.05em; font-weight: 500; }
.home-interface-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.home-interface-categories span { padding: 7px 10px; color: var(--site-muted); background: #1c1f26; border-radius: 4px; font-size: 13px; }
.home-account-section { padding: clamp(76px, 10vw, 128px) 0; background: #0d111b; }
.home-account-inner { width: min(var(--site-content), calc(100% - 2 * var(--site-gutter))); margin: auto; display: grid; grid-template-columns: minmax(0, .8fr) minmax(280px, .7fr); gap: 60px; align-items: center; }
.home-account-copy h2 { max-width: 12ch; margin: 0 0 22px; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -.055em; font-weight: 500; }
.home-account-links { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.home-account-links li { padding: 0; color: var(--site-muted); }
.home-account-links strong { display: block; color: var(--site-ink); font-size: 16px; font-weight: 500; }
.home-final { padding: clamp(92px, 14vw, 176px) 0; display: flex; align-items: end; justify-content: space-between; gap: 42px; }
.home-final h2 { max-width: 9ch; }
.home-final p { max-width: 360px; margin: 0; color: var(--site-muted); }
.home-final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.page-home .home-footer { padding-top: 28px; }

/* Shared public page frame and quiet product surfaces. */
.modules-stage, .changelog-main, .faq-stage, .legal-hub-stage, .legal-layout, .purchase-main {
  width: min(var(--site-content), calc(100% - 2 * var(--site-gutter)));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 100px) 0 96px;
}
.modules-stage, .changelog-main, .faq-stage, .legal-hub-stage { overflow: visible; }
.modules-stage .stage-shape, .changelog-main .stage-shape, .faq-stage .stage-shape, .legal-hub-stage .stage-shape { display: none; }
.modules-copy, .changelog-intro, .faq-heading, .legal-document, .legal-hub-content { animation: none; }
.modules-copy, .changelog-heading, .faq-heading, .legal-hub-content { max-width: 760px; margin: 0 0 54px; }
.modules-copy .back-link, .faq-stage > .back-link, .purchase-back { color: var(--site-muted); font-size: 13px; }
.modules-copy h1, .changelog-intro h1, .faq-heading h1, .legal-document h1, .purchase-heading h1 {
  max-width: 12ch;
  margin: 16px 0 20px;
  color: var(--site-ink);
  font-size: clamp(42px, 6vw, 76px);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 500;
}
.modules-copy p, .changelog-lead, .faq-heading p, .legal-lead, .purchase-lede {
  max-width: 620px;
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.75;
}
.client-preview {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid var(--site-line);
  border-radius: 6px;
  background: #0b0d11;
  box-shadow: none;
  animation: none;
}
.preview-titlebar { min-height: 56px; padding: 9px 18px; background: #0b0d11; border-bottom: 1px solid var(--site-line); }
.preview-brand { font-weight: 600; letter-spacing: -.04em; }
.preview-close, .site-menu-toggle { color: var(--site-muted); }
.preview-columns { min-height: 600px; }
.preview-sidebar { background: #0b0d11; border-right: 1px solid var(--site-line); }
.module-filters button, .preview-tabs button { color: var(--site-muted); transition: color .16s ease, background-color .16s ease; }
.module-filters button:hover, .preview-tabs button:hover { color: var(--site-ink); background: var(--site-panel); }
.module-filters button.active, .preview-tabs button.active { color: var(--site-ink); }
.preview-main-head h2 { font-size: 18px; font-weight: 500; letter-spacing: -.025em; }
.preview-content { background: #0b0d11; }
.module-card, .module-row, .module-inspection, .preview-settings, .preview-profiles, .preview-sessions { box-shadow: none; }
.compact-footer { border: 0; }

/* Feed, help and legal content remain easy to scan and preserve their actual copy. */
.changelog-main { display: block; }
.changelog-intro { margin-bottom: 64px; }
.changelog-heading { max-width: 720px; }
.changelog-star { display: none; }
.changelog-feed { max-width: 940px; margin: 0; }
.changelog-feed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.changelog-feed-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.changelog-feed-head p { color: var(--site-muted); font-size: 13px; }
.changelog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 30px; }
.changelog-filters button { padding: 8px 12px; color: var(--site-muted); border: 1px solid var(--site-line); border-radius: 4px; background: transparent; font-size: 13px; }
.changelog-filters button.active { color: #fff; border-color: var(--site-blue); background: #10182c; }
.changelog-list { padding: 0; list-style: none; }
.changelog-entry { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-top: 1px solid var(--site-line); }
.changelog-time { color: var(--site-dim); font-size: 13px; }
.changelog-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.changelog-card-top { margin-bottom: 10px; }
.changelog-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.changelog-tag { color: #adbcf7; background: #141a2a; border-radius: 3px; font-size: 13px; }
.changelog-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -.03em; }
.changelog-summary, .changelog-changes { color: var(--site-muted); font-size: 14px; line-height: 1.7; }
.changelog-changes { padding-left: 19px; }
.faq-list { max-width: 850px; }
.faq-list details { padding: 22px 0; border-top: 1px solid var(--site-line); animation: none; }
.faq-list summary { color: var(--site-ink); font-size: 18px; font-weight: 500; transition: color .18s ease; }
.faq-list summary:hover { padding-left: 0; color: var(--site-blue-hover); }
.faq-list details p { max-width: 680px; color: var(--site-muted); line-height: 1.75; }
.legal-hub-content { max-width: 840px; }
.legal-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.legal-links a { min-height: 142px; padding: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; background: var(--site-panel); border-radius: var(--site-radius); }
.legal-links strong { display: block; font-size: 19px; font-weight: 500; }
.legal-links small { display: block; margin-top: 10px; color: var(--site-muted); font-size: 13px; line-height: 1.6; }
.legal-hub-contact { color: var(--site-muted); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); align-items: start; gap: clamp(42px, 7vw, 104px); }
.legal-toc { position: sticky; top: 110px; display: grid; gap: 11px; }
.legal-toc p, .legal-eyebrow { margin: 0 0 7px; color: var(--site-dim); font-size: 12px; letter-spacing: .03em; }
.legal-toc a { color: var(--site-muted); font-size: 13px; }
.legal-document h1 { max-width: 15ch; }
.legal-document h2 { margin: 48px 0 10px; font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.legal-document p { color: var(--site-muted); font-size: 14px; line-height: 1.8; }
.legal-document strong { color: var(--site-ink); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 22px 0 42px; color: var(--site-dim); font-size: 12px; }

/* Checkout/auth/account/admin keep their real controls and gain a steadier app frame. */
.purchase-main { padding-top: 28px; }
.purchase-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(340px, .8fr); gap: clamp(38px, 8vw, 112px); align-items: start; padding-top: 40px; }
.purchase-heading { max-width: 520px; }
.purchase-heading > img { width: 132px; height: auto; margin-bottom: 24px; }
.purchase-kicker, .card-kicker { color: var(--site-dim); font-size: 13px; }
.account-panel, .config-panel, .admin-panel, .auth-card {
  color: var(--site-ink);
  background: var(--site-panel);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  box-shadow: none;
}
.account-panel h3 { font-weight: 500; letter-spacing: -.025em; }
.account-page { background: var(--site-ground); color: var(--site-ink); }
.account-header {
  width: min(1440px, calc(100% - 2 * var(--site-gutter)));
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: transparent;
  border: 0;
}
.account-brand img { width: 108px; height: auto; }
.account-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.account-header nav a { color: var(--site-muted); font-size: 13px; }
.account-main, .admin-main { width: min(1440px, calc(100% - 2 * var(--site-gutter))); margin: 0 auto; padding: 55px 0 90px; }
.dashboard-heading h1, .admin-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.055em; font-weight: 500; }
.dashboard-heading p, .admin-heading p, .panel-description, .account-group-heading p { color: var(--site-muted); }
.account-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 54px); margin-top: 28px; }
.account-sidebar, .admin-sidebar { position: sticky; top: 98px; background: transparent; border: 0; }
.account-nav-group, .admin-nav-group { display: grid; gap: 4px; margin-bottom: 22px; }
.account-nav-group > span { padding: 0 8px 7px; color: var(--site-dim); font-size: 11px; }
.account-nav-group a, .admin-nav-group a { padding: 8px; color: var(--site-muted); border-radius: 4px; font-size: 13px; }
.account-nav-group a[aria-current="location"], .admin-nav-group a[aria-current="location"] { color: var(--site-ink); background: var(--site-panel-raised); }
.account-dashboard-content { min-width: 0; }
.account-group { margin-bottom: 54px; animation: none; }
.account-group-heading { margin-bottom: 18px; }
.account-group-heading h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.account-grid { gap: 14px; }
.account-panel { padding: clamp(18px, 2.5vw, 26px); }
.account-panel h3 { margin: 0 0 12px; font-size: 17px; }
.account-form { gap: 16px; }
.account-field label { color: var(--site-muted); font-size: 13px; }
.account-field input, .account-field select, .account-field textarea,
.admin-main input, .admin-main select, .admin-main textarea,
.cloud-config-main input, .cloud-config-main select, .cloud-config-main textarea {
  color: var(--site-ink);
  background: #090b0f;
  border: 1px solid #343843;
  border-radius: 4px;
}
.account-button, .admin-button, .cloud-config-button, .purchase-button {
  min-height: 40px;
  border: 1px solid var(--site-blue);
  border-radius: 4px;
  color: #fff;
  background: var(--site-button-blue);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.account-button:hover, .admin-button:hover, .cloud-config-button:hover, .purchase-button:hover { color: #fff; background: var(--site-button-hover); border-color: var(--site-button-hover); transform: translateY(-1px); }
.account-button.secondary, .admin-button.secondary, .cloud-config-button.secondary { color: var(--site-ink); background: transparent; border-color: #414652; }
.account-button.secondary:hover, .admin-button.secondary:hover, .cloud-config-button.secondary:hover { background: #1b1e25; border-color: #6a7180; }
.account-button.danger, .admin-button.danger { color: #ffd9df; background: #341117; border-color: #742633; }
.account-footer { width: min(1440px, calc(100% - 2 * var(--site-gutter))); margin: 0 auto; padding: 20px 0 28px; color: var(--site-dim); font-size: 12px; }
.admin-page .admin-header { border: 0; }
.admin-main { padding-top: 34px; }
.admin-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-sidebar { padding: 12px 0; }
.admin-content { min-width: 0; }
.admin-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.admin-section-heading h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.admin-group { margin: 0 0 14px; padding: 20px 22px; background: var(--site-panel); border: 1px solid var(--site-line); border-radius: var(--site-radius); }
.admin-group > summary { color: var(--site-ink); font-size: 16px; font-weight: 500; }
.admin-group[open] > summary { margin-bottom: 18px; }
.admin-table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; }
.admin-main table { width: 100%; border-collapse: collapse; }
.admin-main th { color: var(--site-muted); text-align: left; font-size: 12px; font-weight: 500; }
.admin-main th, .admin-main td { padding: 11px 10px; border-bottom: 1px solid var(--site-line); }
.admin-main td { color: var(--site-ink); font-size: 13px; }
.admin-footer { color: var(--site-dim); font-size: 12px; }
.cloud-config-main { padding-top: 54px; }
.cloud-config-header h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); font-weight: 500; letter-spacing: -.055em; }
.cloud-config-toolbar, .cloud-config-tabs { gap: 10px; }
.cloud-config-card, .config-card { background: var(--site-panel); border: 1px solid var(--site-line); border-radius: var(--site-radius); box-shadow: none; }

/* Oshi's actual public module UI can be framed as a live page fragment. */
html.preview-embed, html.preview-embed body { width: 100%; height: 100%; min-height: 100%; margin: 0; overflow: hidden; }
html.preview-embed .global-header, html.preview-embed .modules-copy, html.preview-embed .compact-footer { display: none !important; }
html.preview-embed .modules-stage { display: block; width: 100%; height: 100%; min-height: 100%; margin: 0; padding: 0; }
html.preview-embed .client-preview { width: 100%; height: 100%; min-height: 100%; margin: 0; display: flex; flex-direction: column; border: 0; border-radius: 0; }
html.preview-embed .preview-columns { flex: 1; min-height: 0; }
html.preview-embed .preview-main { min-height: 0; }
html.preview-embed .preview-content { min-height: 0; }

.motion-ready [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .48s ease, transform .48s ease; }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.global-header, .modules-copy, .client-preview, .faq-heading, .legal-layout { animation: none; }

@media (max-width: 980px) {
  .global-header { gap: 24px; }
  .global-header nav { gap: 18px; }
  .home-hero h1 { font-size: clamp(42px, 6.2vw, 66px); }
  .home-story-heading { grid-template-columns: 1fr .8fr; }
  .account-layout, .admin-layout { grid-template-columns: 178px minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .global-header { min-height: 68px; padding: 10px var(--site-gutter); flex-wrap: wrap; gap: 8px 20px; }
  .global-brand img { width: 100px; }
  .site-menu-ready .site-menu-toggle {
    width: 42px; height: 42px; padding: 10px; display: inline-flex; justify-content: center; align-items: center;
    color: var(--site-ink); background: transparent; border: 1px solid var(--site-line); border-radius: 4px;
  }
  .global-navigation { width: 100%; flex-basis: 100%; align-items: stretch; flex-direction: column; gap: 14px; padding: 10px 0 8px; }
  .site-menu-ready .global-navigation:not(.is-open) { display: none; }
  .global-header nav { width: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .global-header nav a { padding: 8px 0; }
  .global-header .nav-right { padding-top: 12px; border-top: 1px solid var(--site-line); }
  .global-header .nav-accent { padding: 8px 12px; }
  .home-stage { padding-top: 18px; }
  .home-hero { min-height: 0; display: grid; grid-template-columns: 1fr; gap: 0; padding: 48px 0 56px; }
  .home-hero-copy { max-width: 620px; }
  .home-hero h1 { max-width: none; font-size: clamp(42px, 10.8vw, 58px); }
  .hero-product { width: 100%; margin-top: 46px; }
  .home-preview-frame { height: min(72svh, 620px); min-height: 430px; }
  .home-story { padding-block: 82px; }
  .home-story-heading { display: block; margin-bottom: 32px; }
  .home-story-heading p { margin-top: 20px; }
  .home-feature-list { grid-template-columns: 1fr; gap: 22px; }
  .home-feature-list li { min-height: 0; gap: 6px; }
  .home-feature-row { grid-template-columns: 1fr; gap: 28px; padding: 68px 0; }
  .home-account-inner { grid-template-columns: 1fr; gap: 32px; }
  .home-final { display: block; }
  .home-final > div + div { margin-top: 25px; }
  .home-final p { max-width: 560px; }
  .modules-stage, .changelog-main, .faq-stage, .legal-hub-stage, .legal-layout, .purchase-main { padding-top: 52px; padding-bottom: 64px; }
  .modules-copy, .changelog-intro, .faq-heading, .legal-hub-content { margin-bottom: 38px; }
  .preview-columns { min-height: 560px; }
  .preview-sidebar { width: 116px; }
  .changelog-entry { grid-template-columns: 1fr; gap: 8px; }
  .legal-layout { display: block; }
  .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-bottom: 48px; }
  .legal-toc p { grid-column: 1 / -1; }
  .purchase-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 26px; }
  .account-header { width: calc(100% - 2 * var(--site-gutter)); align-items: flex-start; }
  .account-header nav { justify-content: flex-end; gap: 8px 16px; }
  .account-layout, .admin-layout { display: block; }
  .account-sidebar, .admin-sidebar { position: static; margin: 0 0 24px; display: flex; gap: 18px; overflow-x: auto; }
  .account-nav-group, .admin-nav-group { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; margin: 0; }
  .account-nav-group > span { flex-basis: 100%; }
  .account-grid { grid-template-columns: 1fr; }
  .admin-group { padding: 16px; }
}

@media (max-width: 520px) {
  :root { --site-gutter: 20px; }
  .home-hero h1 { font-size: clamp(42px, 11.6vw, 52px); }
  .home-hero-lead { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .site-button, .hero-actions .arrow-link { width: 100%; }
  .home-preview-frame { height: 74svh; min-height: 430px; }
  .home-story h2, .home-final h2 { font-size: clamp(34px, 10vw, 48px); }
  .home-interface-piece, .home-profile-piece { min-height: 220px; }
  .legal-links { grid-template-columns: 1fr; }
  .legal-toc { grid-template-columns: 1fr; }
  .changelog-feed-head { align-items: flex-start; flex-direction: column; gap: 0; }
  .account-header { align-items: center; }
  .account-header nav { gap: 8px 12px; }
  .account-brand img { width: 86px; }
  .account-main, .admin-main { width: calc(100% - 40px); padding-top: 36px; }
  .account-footer { width: calc(100% - 40px); }
  .compact-footer, .home-footer, .legal-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 24px 0; }
  .compact-footer > span:nth-child(2), .home-footer > span:nth-child(2) { text-align: left; }
  .account-actions { align-items: stretch; flex-wrap: wrap; }
  .account-actions .account-button { flex: 1 1 140px; }
  .admin-main table { min-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-ready [data-reveal] { opacity: 0; transform: none; filter: none; transition: opacity .28s cubic-bezier(.23,1,.32,1); }
  .motion-ready [data-reveal].is-visible { opacity: 1; }
}
