/* Aethagon automations: shared design system. Rules and reasoning are in DESIGN.md.
   These pages are part of aethagon.com (served at /automations/): brand black ground, cream type,
   flat white buttons and Mona Sans throughout; JetBrains Mono only inside the simulations.
   Page-specific styles live in their own files and only ever use
   the tokens below. Every font is self-hosted so the pages pass the site's CSP (font-src 'self'). */

/* Mona Sans, variable (wdth 75-125, wght 200-900), latin subset, SIL OFL. */
@font-face {
  font-family: "Mona Sans";
  src: url(../fonts/mona-sans.woff2?v=5ea3740633) format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}


/* The simulations draw data, logs and product UIs in a monospace face, as before. */
@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-400.woff2?v=14425ba9c6) format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-500.woff2?v=cb182feeed) format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --ink: #0F0E0C;            /* brand black: the page */
  --surface: #16140F;        /* lifted warm black: panels, cards */
  --elev: #1D1B16;
  --elev-2: #27241D;         /* quiet buttons, inactive tabs */
  --elev-3: #34302A;         /* their hover */
  --line: #38342C;
  --line-soft: #26231D;
  --bone: #F5F0E6;           /* brand cream: all type on black */
  --bone-80: rgb(245 240 230 / 0.8);
  --bone-70: rgb(245 240 230 / 0.7);
  --bone-50: rgb(245 240 230 / 0.5);
  --bone-10: rgb(245 240 230 / 0.1);
  --ash: #B4AD9F;            /* secondary text: 8:1 on --surface */
  --accent: #FFFFFF;         /* white (gold until 2026-11-12): buttons, the current item, money in the simulations */
  --accent-soft: #E6E3DD;
  --accent-ink: #0F0E0C;     /* all type on the accent */
  --accent-20: rgb(255 255 255 / 0.2);
  --accent-40: rgb(255 255 255 / 0.4);
  --danger: hsl(0 76% 62%);
  --danger-20: hsl(0 76% 62% / 0.2);
  --ok: hsl(152 60% 48%);
  --ok-20: hsl(152 60% 48% / 0.2);
  --info: hsl(214 85% 68%);
  --info-20: hsl(214 85% 68% / 0.2);
  --warn: hsl(28 90% 60%);

  /* WhatsApp, iOS dark mode */
  --wa-bg: #0b141a;
  --wa-bar: #111b21;
  --wa-in: #202c33;
  --wa-out: #005c4b;
  --wa-text: #e9edef;
  --wa-muted: #8696a0;
  --wa-green: #00a884;
  --wa-link: #53bdeb;
  --wa-chip: #182229;
  --wa-tick: #53bdeb;

  /* --font-display is used by the modules for small headings and figures, so it is the text
     face. Mona Sans (--font-mona) is the site's display face: weight 800, width 110%,
     letter-spacing -0.03em, as on aethagon.com. */
  --font-mona: "Mona Sans", system-ui, sans-serif;
  --font-display: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);

  --r-md: 3px;
  --r-lg: 4px;
  --max: 1560px;
  --pad: 16px;
  --side-w: 224px;
  /* Header height, and its side padding, as on the new aethagon.com. */
  --topbar-h: 60px;
  --site-pad: clamp(16px, 2.8vw, 48px);
}

@media (min-width: 1000px) {
  :root {
    --topbar-h: 64px;
  }

  body.has-side {
    --pad: 40px;
  }
}

@media (min-width: 1440px) {
  body.has-side {
    --pad: 20px;
  }
}

/* ---------- Base ---------- */


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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  tab-size: 4;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: clip;
  padding-top: var(--topbar-h);
}

html.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.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;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

/* ---------- Layout used by section fragments ---------- */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section,
.section--tight {
  position: relative;
  padding-block: 24px;
  scroll-margin-top: calc(var(--topbar-h) + 70px);
}

.sec-head {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
}

.sec-title,
.sec-lead {
  min-width: 0;
}

/* The tab already says which section this is; "04 / Live demo" labels are noise. */
.sec-title .eyebrow {
  display: none;
}

.sec-lead .lead {
  max-width: 62rem;
}

.hairline {
  border-top: 1px solid var(--line);
}

.hairline-b {
  border-bottom: 1px solid var(--line);
}

/* ---------- Type ---------- */

.display-xl,
.display-hero,
.display-lg,
.display-md,
.display-sm,
.display-xs {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.display-xl,
.display-hero {
  font-size: 1.875rem;
  line-height: 1.15;
}

.display-lg {
  font-size: 1.625rem;
  line-height: 1.25;
}

.display-md {
  font-size: 1.375rem;
  line-height: 1.3;
}

.display-sm {
  font-size: 1.25rem;
  line-height: 1.3;
}

.display-xs {
  font-size: 1.0625rem;
  line-height: 1.35;
}

/* The new aethagon.com never puts a gold word in a heading: the spans stay in src/, unstyled. */
.gold-i {
  color: inherit;
  font-style: normal;
}

.gold {
  color: var(--accent);
}

.lead {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--bone-70);
  max-width: 44rem;
}

.lead--lg {
  font-size: 1rem;
  color: var(--ash);
}

.body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ash);
}

.eyebrow,
.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ash);
}

.mono-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ash);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ash);
}

.bone-70 {
  color: var(--bone-70);
}

/* ---------- Buttons ----------
   Short bars of the mark: square, with the logo's 30 degree cut on two corners. Gold is flat,
   with black type. The quiet button is a lifted black bar, never an outline (a clipped corner
   would cut an outline). */

.btn {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% calc(var(--cut) * 0.577), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut) * 0.577));
  transition: background-color 0.15s, color 0.15s;
}

/* An outline outside the shape would be clipped, so focus draws inside it. */
.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -6px;
  border-radius: 0;
}

.btn .arrow {
  display: none;
}

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

.btn-primary:hover {
  background: var(--accent-soft);
}

.btn-ghost {
  background: var(--elev-2);
  color: var(--bone);
}

.btn-ghost:hover {
  background: var(--elev-3);
}

.btn-sm {
  --cut: 8px;
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  font-size: 15px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  color: var(--ash);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon svg {
  width: 1rem;
  height: 1rem;
}

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

.link-underline {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.link-underline:hover {
  text-decoration-thickness: 2px;
}

.link-mono {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.link-mono:hover {
  color: var(--accent-soft);
}

.link-mono svg {
  width: 14px;
  height: 14px;
}

/* ---------- Chips and tabs inside modules ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--bone-70);
  white-space: nowrap;
}

.chip-gold {
  color: var(--accent);
  border-color: var(--accent-40);
}

.chip-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--bone-80);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.tab:hover {
  border-color: var(--bone-50);
  color: var(--bone);
}

.tab[aria-selected="true"] {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--ink);
}

.tab-n {
  display: none;
}

.tab[aria-selected="true"] .tab-m {
  color: inherit;
  opacity: 0.65;
}

.tab-l {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.tab-m {
  font-size: 13px;
  color: var(--ash);
}

@media (max-width: 639px) {
  .tab-m {
    display: none;
  }
}

/* ---------- Hairline grids ---------- */

.hgrid {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.hgrid > * {
  padding: 16px 18px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.hgrid > *:first-child {
  border-left: 0;
}

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

.hgrid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hgrid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hgrid-4 > *:nth-child(4n + 1),
.hgrid-3 > *:nth-child(3n + 1),
.hgrid-2 > *:nth-child(2n + 1) {
  border-left: 0;
}

.hgrid-4 > *:nth-child(n + 5),
.hgrid-3 > *:nth-child(n + 4),
.hgrid-2 > *:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

@media (max-width: 1023px) {
  .hgrid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hgrid-4 > * {
    border-left: 1px solid var(--line);
    border-top: 0;
  }

  .hgrid-4 > *:nth-child(2n + 1) {
    border-left: 0;
  }

  .hgrid-4 > *:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 767px) {
  .hgrid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hgrid-3 > * {
    border-left: 0;
  }

  .hgrid-3 > *:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 639px) {
  .hgrid-4,
  .hgrid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hgrid-4 > *,
  .hgrid-2 > * {
    border-left: 0;
  }

  .hgrid-4 > *:nth-child(n + 2),
  .hgrid-2 > *:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

.cell-n {
  display: none;
}

.cell-t {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 1.125rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cell-p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ash);
}

/* ---------- Stats ---------- */

.stat-n {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  font-size: 2rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-n small {
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ash);
  margin-left: 0.25em;
}

.stat-l {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ash);
}

.stat-p {
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ash);
}

/* ---------- Stage, panels, cards ---------- */

.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--elev);
  padding: 6px;
}

.stage-inner {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink);
  overflow: hidden;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}

.kv {
  display: grid;
  gap: 2px;
}

.kv-l {
  font-size: 13.5px;
  color: var(--ash);
}

.kv-v {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bone);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

/* ---------- Header: the new aethagon.com's bar ----------
   Logo left, Work, Automations, Studio, and one white "Start a project". All three links stay
   on screen on phones, with the mark alone as the logo. */

.bar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.4vw, 56px);
  height: var(--topbar-h);
  padding: 0 var(--site-pad);
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: block;
  flex: none;
  color: var(--bone);
}

.logo svg {
  width: auto;
  height: clamp(30px, 2.2vw, 38px);
}

.bar .logo-mark,
.bar-cta .short {
  display: none;
}

.bar-nav {
  display: flex;
  gap: clamp(18px, 2.4vw, 44px);
}

.bar-nav a {
  padding: 10px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.bar-nav a:hover,
.bar-nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.bar-cta {
  margin-left: auto;
}

@media (max-width: 560px) {
  .bar {
    gap: 14px;
  }

  .bar .logo-full {
    display: none;
  }

  .bar .logo-mark {
    display: block;
    height: 32px;
  }

  .bar-nav {
    gap: 14px;
  }

  .bar-nav a {
    font-size: 16px;
  }

  .bar-cta {
    --cut: 8px;
    min-height: 40px;
    padding: 6px 14px;
  }

  .bar-cta .long {
    display: none;
  }

  .bar-cta .short {
    display: inline;
  }
}

@media (max-width: 350px) {
  .bar,
  .bar-nav {
    gap: 10px;
  }

  .bar-nav a {
    font-size: 15px;
  }
}

/* ---------- Automation list: the same markup in the side rail and the "All 12" menus ---------- */

.auto-list {
  display: grid;
  gap: 16px;
}

.auto-group h2 {
  padding: 0 10px 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ash);
}

.auto-group a {
  display: block;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--bone);
}

.auto-group a:hover {
  background: var(--elev-2);
}

.auto-group a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

/* ---------- Side list (wide screens) ---------- */

.side {
  display: none;
}

/* Modules respond to the viewport, not their column, so the list only appears once there is
   still room for their full desktop layouts beside it. It stops before the full-width footer. */
@media (min-width: 1440px) {
  body.has-side .layout {
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }

  .shell {
    min-width: 0;
  }

  .side {
    position: sticky;
    top: var(--topbar-h);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - var(--topbar-h));
    padding: 16px 12px 14px;
    background: var(--ink);
    border-right: 1px solid var(--line);
  }

  .side .auto-group a {
    font-size: 15px;
  }

  .side-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  .side-all {
    display: block;
    margin-bottom: 14px;
    padding: 4px 10px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.25em;
  }

  .side-all:hover {
    text-decoration-thickness: 3px;
  }

  .side-foot {
    display: grid;
    gap: 8px;
    padding: 14px 4px 2px;
    border-top: 1px solid var(--line);
  }

  .side-foot .btn {
    width: 100%;
    padding-inline: 8px;
  }

  .side-mail {
    font-size: 15px;
    color: var(--ash);
    text-align: center;
  }

  .side-mail:hover {
    color: var(--bone);
    text-decoration: underline;
  }
}

/* ---------- "All 12" and Previous / Next ----------
   In the sticky tab bar from 1100px; above the tabs on narrower screens, so the five tabs keep
   the whole width there. From 1440px the side list does the job of "All 12". */

.case-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--max);
  padding: 0 var(--pad) 12px;
}

.case-nav .case-pager {
  margin-left: auto;
}

.case-pager {
  flex: none;
  display: flex;
  gap: 6px;
}

.bar-menu {
  flex: none;
}

.bar-menu > summary {
  --cut: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 16px;
  background: var(--elev-2);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% calc(var(--cut) * 0.577), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut) * 0.577));
}

.bar-menu > summary:hover,
.bar-menu[open] > summary {
  background: var(--elev-3);
}

.bar-menu > summary:focus-visible {
  outline-offset: -6px;
}

.bar-menu > summary::-webkit-details-marker {
  display: none;
}

.bar-menu > summary svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s;
}

.bar-menu[open] > summary svg {
  transform: rotate(180deg);
}

.bar-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 25;
  max-height: calc(100vh - var(--topbar-h) - 60px);
  overflow-y: auto;
  padding: 16px var(--pad) 22px;
  background: var(--surface);
  border-block: 1px solid var(--line);
  box-shadow: 0 18px 36px -18px rgb(0 0 0 / 0.8);
}

.bar-panel .auto-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.bar-panel-all {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.tabbar .bar-menu,
.tabbar .case-pager {
  display: none;
}

@media (min-width: 1100px) {
  .case-nav {
    display: none;
  }

  .tabbar .bar-menu {
    display: block;
  }

  .tabbar .case-pager {
    display: flex;
  }
}

@media (min-width: 1440px) {
  .tabbar .bar-menu {
    display: none;
  }
}

/* ---------- Case-study header: what it does, then what it is worth ---------- */

.case-head {
  display: grid;
  gap: 18px 32px;
  max-width: var(--max);
  padding: 22px var(--pad) 18px;
}

.case-head h1 {
  font-family: var(--font-mona);
  font-size: clamp(32px, 3.05vw, 48px);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.case-sub {
  margin-top: 10px;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--bone-80);
}

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin-top: 14px;
}

.case-facts div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.case-facts dt {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.case-facts dd {
  font-size: 17px;
  line-height: 1.25;
  color: var(--ash);
}

/* The money is a bar of brushed gold, cut like the mark. The outer shape shows round the face
   as a bevel. Same plate as the money section on the aethagon.com home page. */
.case-money {
  --cut: 26px;
  justify-self: start;
  display: block;
  padding: 2px 0;
  color: var(--accent-ink);
  background: linear-gradient(100deg, #FFF0C8 0%, #E9BE6E 45%, #8E6220 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% calc(var(--cut) * 0.577), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut) * 0.577));
}

.case-money-face {
  display: grid;
  gap: 4px;
  padding: 14px 34px 16px 30px;
  background: var(--bg-2, #161512);
  clip-path: polygon(0 0, calc(100% - var(--cut) - 1px) 0, 100% calc(var(--cut) * 0.577 + 0.6px), 100% 100%, calc(var(--cut) + 1px) 100%, 0 calc(100% - var(--cut) * 0.577 - 0.6px));
  transition: filter 0.15s;
}

.case-money:hover .case-money-face {
  filter: brightness(1.07);
}

.case-money:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: -9px;
  border-radius: 0;
}

.case-money-n {
  font-family: var(--font-mona);
  font-size: clamp(52px, 5vw, 76px);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgb(255 238 196 / 0.5);
}

/* The tilde, sized for the digits it stands in front of. */
.case-money-n .t {
  display: inline-block;
  margin-right: 0.02em;
  font-size: 0.8em;
  line-height: 1;
  vertical-align: 0.04em;
  letter-spacing: 0;
}

.case-money-n small {
  margin-left: 0.2em;
  font-size: clamp(20px, 1.7vw, 26px);
  letter-spacing: -0.02em;
}

.case-money-y {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.case-money-cta {
  font-size: 17px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

@media (min-width: 1000px) {
  .case-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 639px) {
  .case-head {
    padding-top: 16px;
    gap: 16px;
  }

  .case-money {
    --cut: 18px;
    justify-self: stretch;
  }

  .case-money-face {
    padding: 12px 20px 14px;
  }

  .case-money-n {
    font-size: 56px;
  }

  .case-money-n small {
    font-size: 22px;
  }
}

/* ---------- Views ---------- */


/* Sticky, so the views and the previous and next buttons stay in reach while scrolling.
   The views are the main way around a page, so they are solid bars, the open one in the accent. */
.tabbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--pad);
  background: var(--ink);
  border-block: 1px solid var(--line);
}

.view-tabs {
  order: 1;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}

.tabbar .case-pager {
  order: 2;
}

.view-tab {
  --cut: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 6px 10px;
  background: var(--elev-2);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--bone);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% calc(var(--cut) * 0.577), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut) * 0.577));
  transition: background-color 0.15s, color 0.15s;
}

.view-tab:hover {
  background: var(--elev-3);
}

.view-tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.view-tab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -6px;
  border-radius: 0;
}

/* Phones: all five stay visible with no sideways scrolling. */
@media (max-width: 639px) {
  .tabbar {
    padding: 8px;
  }

  .view-tabs {
    gap: 4px;
  }

  .view-tab {
    --cut: 6px;
    min-height: 50px;
    padding: 4px 3px;
    font-size: 14px;
  }
}

/* Off views keep their width so modules can measure themselves, but take no space. */
.views {
  position: relative;
  max-width: var(--max);
}

.js .view.is-off {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.view {
  margin: 12px var(--pad) 0;
}

.view .wrap {
  max-width: none;
  padding-inline: 14px;
}

.view.instrument {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: clip;
}

.view:not(.instrument) .wrap {
  padding-inline: 0;
}

.view:not(.instrument) .section {
  padding-block: 0 28px;
}

.view:not(.instrument) .section:first-child {
  padding-top: 8px;
}

/* Deliverables: heading above, list across the full width, no section number. */
.view #deliverables .closing-deliv-head .eyebrow {
  display: none;
}

.view #deliverables .closing-deliv-grid {
  display: block;
}

.view #deliverables .closing-deliv-head {
  position: static;
  margin-bottom: 12px;
}

.view #deliverables .closing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}

@media (max-width: 767px) {
  .view #deliverables .closing-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.view.instrument > .section + .section {
  border-top: 1px solid var(--line);
}

/* Demo view: the simulator is the point, so everything above it stays as short as possible. */
.view[data-view="demo"] > .section:first-child {
  padding-block: 14px 16px;
}

.view[data-view="demo"] > .section:first-child .sec-head {
  margin-bottom: 10px;
  gap: 0;
}

.view .demo-bar {
  gap: 8px 16px;
  margin-bottom: 10px;
}

.view .demo-bar .tab-m {
  display: none;
}

.view .demo-bar .tab {
  padding: 7px 14px;
}

.view .demo-top {
  padding-block: 8px;
}

.view .demo-note {
  font-family: var(--font-sans);
  font-size: 13.5px;
  text-transform: none;
  letter-spacing: 0;
}

/* Fewer words: the headings, figures and simulations carry each tab. The wording stays in src/. */
.view .lead,
.view .sec-lead,
.view .cell-p,
.view .features-caption,
.view .flow-caption,
.view .flow-foot,
.view .ra-stack-note,
.view .crm-demo-caption,
.view .ia-demo-caption,
.view .pm-demo-caption,
.view .ra-demo-caption,
.view .sup-demo-caption,
.view .vr-caption,
.view [class*="-ind-line"],
.view [class*="-tool-r"] {
  display: none;
}

/* The working behind each result stays one click away. */
#roi:not(.show-maths) .roi-how {
  display: none;
}

.view .roi-maths {
  margin-bottom: 10px;
}

.view #roi .roi-big-n {
  font-size: clamp(3.5rem, 5.6vw, 5.25rem);
}

/* Dashboards: the mock-up's menu is decoration, and its width is better spent on the figures. */
.view #dashboard .dashboard-rail {
  display: none;
}

@media (min-width: 1100px) {
  .view #dashboard :has(> .dashboard-rail) {
    grid-template-columns: minmax(0, 1fr);
  }

  .view #dashboard :has(> .dashboard-rail):has(> :nth-child(3)) {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* Dense simulations: keep room for their middle columns at the larger text size. */
.view #demo .pm-th {
  font-size: 10.5px;
  letter-spacing: 0;
}

/* A printed invoice is meant to look small; it has to fit its frame in the narrower column. */
.view #demo .ip-paper {
  font-size: 8.4px;
}

/* The file name is already on the attachment above the invoice. */
.view #demo .ip-strip {
  display: none;
}

.view #demo .pm-pt-sub {
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 1360px) {
  .view #demo .ip-grid {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
  }

  .view #demo .ip-side {
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 16px;
  }

  .view #demo .ce-side {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .view #demo .ia-grid {
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 18px;
  }

  .view #demo .ia-side {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 18px;
  }

  .view #demo .pm-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) 250px;
    gap: 18px;
  }
}

/* End of a tab: the next automation, and how to get this one built. */
.case-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: calc(var(--max) - 2 * var(--pad));
  margin: 16px var(--pad) 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.case-end p {
  font-size: 1.25rem;
  font-weight: 700;
}

.case-end p span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ash);
}

/* ---------- Footer: the new aethagon.com's ---------- */

.foot {
  display: grid;
  gap: 28px;
  margin-top: 48px;
  padding: clamp(36px, 6vh, 64px) var(--site-pad) 28px;
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px 64px;
}

.foot-logo svg {
  width: auto;
  height: clamp(36px, 2.6vw, 48px);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px clamp(40px, 5vw, 96px);
}

.foot-nav ul {
  display: grid;
  gap: 8px;
  align-content: start;
}

.foot-nav a {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.foot-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.foot-hire {
  font-size: 17px;
}

.foot-hire a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.foot-legal {
  font-size: 15px;
  color: var(--ash);
}

@media (max-width: 639px) {
  .foot-nav {
    display: grid;
    gap: 18px;
  }
}

/* ---------- Home ---------- */

.home {
  max-width: 1440px;
  margin-inline: auto;
  padding: 18px var(--site-pad) 8px;
}

.home-intro {
  margin-bottom: 16px;
}

.home-intro h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.15;
}

.home-intro p {
  margin-top: 4px;
  font-size: 1.0625rem;
  color: var(--bone-70);
}

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

.home-group {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  gap: 8px;
  min-width: 0;
}

.home-group h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}

.auto-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auto-card:hover {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.auto-card h3 {
  font-size: 1.0625rem;
  line-height: 1.25;
}

.auto-money {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}

.auto-money small {
  margin-left: 6px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.auto-example {
  font-size: 13.5px;
  color: var(--ash);
}

.auto-card p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--bone-70);
}

.home-how {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.home-how h2 {
  font-size: 1.125rem;
}

.home-how ol {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.home-how li + li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--ash);
}

@media (max-width: 1199px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  :root {
    --pad: 14px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-group {
    grid-row: auto;
    grid-template-rows: none;
  }

  .view .wrap {
    padding-inline: 12px;
  }
}

/* ---------- Touch targets ---------- */

@media (pointer: coarse) {
  .btn-sm,
  .bar-menu > summary {
    min-height: 44px;
  }

  .auto-group a {
    padding-block: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- ?static=1: every view shows, one after another ---------- */

.shot-full .view.is-off {
  position: static;
  height: auto;
  overflow: visible;
  visibility: visible;
}

/* ==========================================================================
   Aligned with the aethagon.com redesign (2026-11-10): calm black, flat gold,
   Mona Sans at moderate weights, rounded controls, no metal plates or cut
   corners. These rules sit last on purpose and override the ones above.
   ========================================================================== */

:root {
  --bg-2: #161512;
  --bg-3: #1e1c18;
  --text-2: #bbb5aa;
  --text-3: #8e897f;
  --line-a: rgba(245, 240, 230, 0.1);
  --line-b: rgba(245, 240, 230, 0.2);
}

body {
  font-family: var(--font-sans);
}

/* Buttons and tabs: rounded, no chamfers */
.btn,
.view-tab,
.bar-menu > summary,
.case-money,
.case-money-face {
  clip-path: none;
}
.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-soft);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-b);
  color: var(--bone);
}
.btn-ghost:hover {
  border-color: var(--bone);
}

/* Header: the same bar as the React site */
.bar {
  background: rgba(15, 14, 12, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--line-a);
  gap: 28px;
}
.logo svg,
.bar .logo-full {
  height: 27px;
}
.bar-nav {
  margin-left: auto;
  gap: 28px;
}
.bar-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}
.bar-nav a:hover,
.bar-nav a[aria-current] {
  color: var(--bone);
  text-decoration: none;
}
.bar-cta {
  margin-left: 0;
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

/* Side list */
.auto-group h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}
.auto-group a {
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-2);
}
.auto-group a:hover {
  color: var(--bone);
  background: var(--bg-2);
}
.auto-group a[aria-current="page"] {
  background: var(--bg-3);
  color: var(--accent);
  font-weight: 600;
}
.side-all {
  color: var(--accent);
  font-weight: 600;
}

/* Case header: plain title, the money in a quiet panel */
.case-head h1 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.case-sub {
  color: var(--text-2);
}
.case-money {
  padding: 0;
  background: none;
  color: var(--bone);
  border-radius: 20px;
}
.case-money-face {
  padding: 18px 26px 20px;
  border-radius: 20px;
  border: 1px solid var(--line-a);
  background: radial-gradient(90% 120% at 20% 0%, rgba(255, 255, 255, 0.07), transparent 70%), var(--bg-2);
}
.case-money:hover .case-money-face {
  filter: none;
  border-color: var(--line-b);
}
.case-money:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 20px;
}
.case-money-n {
  font-family: var(--font-sans);
  font-size: clamp(40px, 4vw, 60px);
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--accent);
  text-shadow: none;
}
.case-money-n .t {
  font-size: 1em;
  margin-right: 0;
  vertical-align: 0;
}
.case-money-n small {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
}
.case-money-y {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
}
.case-money-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* View tabs: one quiet row, the current one in the accent */
.view-tab {
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-a);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}
.view-tab:hover {
  color: var(--bone);
  border-color: var(--line-b);
}
.view-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.bar-menu > summary {
  border-radius: 12px;
}

/* Footer: the same as the React site */
.foot {
  border-top: 1px solid var(--line-a);
  padding: 56px var(--site-pad) 28px;
}
.foot-in {
  max-width: 1240px;
  margin-inline: auto;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
}
.foot-brand .logo svg {
  height: 27px;
}
.foot-brand p {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 15px;
}
.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 64px;
}
.foot-h {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
.foot-nav ul {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-nav li + li {
  margin-top: 8px;
}
.foot-nav a {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
}
.foot-nav a:hover {
  color: var(--bone);
}
.foot-bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line-a);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--text-3);
}
.foot-bottom p {
  margin: 0;
}
.foot-bottom a {
  color: var(--accent);
}
@media (max-width: 900px) {
  .foot-top {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .foot-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .bar {
    gap: 14px;
  }
  .bar-nav {
    gap: 16px;
  }
  .bar-nav a {
    font-size: 15px;
  }
  .bar-cta {
    padding: 0 14px;
  }
  /* All five views stay visible: they wrap onto two rows instead of squeezing. */
  .view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .view-tab {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .bar-nav {
    gap: 12px;
  }
  .bar-nav a {
    font-size: 14px;
  }
}

/* Line the header up with the React site's: content inside the same 1240px column. */
@media (min-width: 1100px) {
  .bar {
    padding-inline: max(var(--site-pad), calc((100vw - 1240px) / 2));
  }
}

/* The figure is a gain, not a price (client feedback 2026-11-10). */
.case-money-k {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}
