:root {
  --bg: #eff4eb;
  --paper: #f8fbf5;
  --paper-strong: #ffffff;
  --ink: #1f2421;
  --ink-soft: #3d463f;
  --navy: #232725;
  --navy-deep: #161917;
  --muted: #667066;
  --line: rgba(31, 36, 33, 0.12);
  --line-strong: rgba(31, 36, 33, 0.2);
  --warm: #7ed321;
  --warm-dark: #65ab1b;
  --gray-band: #d7ddd3;
  --shadow: 0 28px 80px rgba(22, 25, 23, 0.1);
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
  --soft-green: rgba(126, 211, 33, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 36, 33, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbf3 0%, #eef4ea 48%, #e8efe5 100%);
  background-size: 56px 56px, auto;
}

a {
  color: inherit;
}

input,
textarea,
select,
button {
  font: inherit;
}

button {
  border: none;
}

.page-shell {
  width: min(1360px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px 14px 24px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-badge {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(126, 211, 33, 0.12);
  color: var(--navy);
  border: 1px solid rgba(126, 211, 33, 0.18);
  font-size: 0.86rem;
}

.admin-inline-form {
  margin: 0;
}

.admin-inline-button {
  padding-block: 10px;
}

.admin-login-link {
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

.brand-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 211, 33, 0.12);
  border: 1px solid rgba(126, 211, 33, 0.18);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.marketing-page .page-shell {
  width: min(1380px, calc(100vw - 44px));
  padding-top: 28px;
}

.marketing-page .site-header {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 24px 20px 86px;
}

.marketing-page .brand-logo {
  width: clamp(184px, 13vw, 228px);
}

.marketing-page .site-nav {
  gap: clamp(20px, 2vw, 32px);
  justify-content: flex-end;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(31, 36, 33, 0.08);
  box-shadow: 0 18px 46px rgba(22, 25, 23, 0.06);
  backdrop-filter: blur(14px);
}

.marketing-page .site-nav a {
  color: rgba(31, 36, 33, 0.76);
  font-size: clamp(0.95rem, 0.95vw, 1.08rem);
  font-weight: 700;
  line-height: 1;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(31, 36, 33, 0.07);
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.marketing-page .site-nav a:hover {
  transform: translateY(-1px);
  background: rgba(126, 211, 33, 0.16);
  border-color: rgba(126, 211, 33, 0.28);
}

.marketing-page .landing-hero {
  margin-top: 0;
}

.landing-hero,
.story-band,
.proof-section,
.why-story-band,
.founders-band,
.workspace-shell {
  margin-top: 18px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 28px;
  padding: 42px;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 240, 0.96));
  box-shadow: var(--shadow);
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.hero-copy h1,
.section-heading h2,
.story-copy h2,
.proof-panel h2,
.faq-panel h2,
.contact-band h2,
.why-story-copy h2,
.founders-band .section-heading h2,
.founder-card h3,
.workspace-head h2,
.hero h1,
.panel h2,
.override-head h3,
.line-preview-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.landing-hero h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.94;
}

.lede,
.story-copy p,
.workspace-copy,
.service-card p,
.process-card p,
.proof-item span,
.faq-list p,
.story-note span,
.why-story-copy p,
.why-story-points p,
.founder-card p,
.override-copy,
.summary-meta,
.line-preview-head span,
label span,
.field-help {
  color: var(--muted);
}

.lede {
  margin: 20px 0 0;
  max-width: 58ch;
  line-height: 1.65;
  font-size: 1.05rem;
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.hero-metrics div,
.story-note,
.service-card,
.proof-item,
.summary-tile,
.info-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics div {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.hero-metrics span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--warm-dark);
}

.hero-metrics strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.hero-art {
  display: grid;
  align-content: center;
  gap: 22px;
}

.shape-collage {
  position: relative;
  min-height: 420px;
  border-radius: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.8), transparent 18%),
    linear-gradient(145deg, #dfe9d9, #cfdcc8);
  border: 1px solid rgba(126, 211, 33, 0.16);
}

.shape-block,
.shape-portrait,
.shape-card-note {
  position: absolute;
  box-shadow: 0 18px 48px rgba(22, 25, 23, 0.12);
}

.shape-block {
  background: var(--warm);
}

.shape-block-wide {
  width: 42%;
  height: 88px;
  top: 44px;
  right: 28px;
  border-radius: 999px 0 0 999px;
}

.shape-block-pill {
  width: 48%;
  height: 92px;
  top: 142px;
  right: 78px;
  border-radius: 999px;
}

.shape-block-tall {
  width: 132px;
  height: 188px;
  right: 30px;
  bottom: 46px;
  border-radius: 0 0 80px 80px;
  background: #2a302b;
}

.shape-portrait {
  display: grid;
  place-items: end center;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.95) 0 20%, transparent 21%),
    radial-gradient(circle at 50% 78%, rgba(255, 255, 255, 0.8) 0 34%, transparent 35%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(126, 211, 33, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.shape-portrait span {
  margin-bottom: 14px;
  font-size: 0.72rem;
}

.shape-portrait-one {
  width: 126px;
  height: 168px;
  left: 34px;
  top: 42px;
  border-radius: 70px 70px 22px 22px;
}

.shape-portrait-two {
  width: 118px;
  height: 118px;
  right: 20px;
  top: 112px;
  border-radius: 999px;
}

.shape-portrait-three {
  width: 148px;
  height: 154px;
  left: 74px;
  bottom: 32px;
  border-radius: 28px;
}

.shape-card-note {
  left: 210px;
  bottom: 44px;
  width: min(230px, 42%);
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.shape-card-note span {
  color: var(--warm-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shape-card-note strong {
  line-height: 1.2;
}

.art-card {
  border-radius: 34px;
  position: relative;
  overflow: hidden;
}

.art-card-main {
  min-height: 340px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(126, 211, 33, 0.2), transparent 30%),
    linear-gradient(145deg, #e5efe0, #cfdcc8);
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.hero-logo {
  width: min(100%, 280px);
  height: auto;
  display: block;
  margin: 12px auto 0;
}

.art-copy {
  position: absolute;
  left: 28px;
  bottom: 28px;
  right: 28px;
  display: grid;
  gap: 8px;
}

.art-copy span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(31, 36, 33, 0.58);
}

.art-copy strong {
  max-width: 14ch;
  font-size: 2rem;
  line-height: 0.95;
  color: var(--navy);
}

.art-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stack-tile {
  min-height: 110px;
  border-radius: 24px;
}

.tile-cream {
  background: #efe7db;
}

.tile-red {
  background: var(--warm);
}

.tile-ink {
  background: #2a302b;
}

.tile-white {
  background: #eef4ea;
}

.process-band {
  margin-top: 18px;
  padding: 36px;
  border-radius: 34px;
  background: linear-gradient(180deg, #243125 0%, #171d17 100%);
  color: white;
}

.section-heading,
.workspace-head {
  display: grid;
  gap: 8px;
}

.section-heading h2,
.workspace-head h2 {
  max-width: 26ch;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading-tight h2 {
  max-width: 12ch;
}

.process-grid {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.process-card {
  display: grid;
  grid-template-columns: 76px 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.process-card span {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.64);
}

.process-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.process-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.story-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(180deg, #dce6d5 0%, #d4dfce 100%);
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.story-copy p {
  max-width: 62ch;
  line-height: 1.7;
}

.story-aside {
  display: grid;
  gap: 14px;
  align-content: start;
}

.story-note {
  padding: 20px;
  background: rgba(255, 255, 255, 0.58);
}

.story-note strong {
  display: block;
  margin-bottom: 8px;
}

.sticky-systems-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 18px;
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(180deg, #9ca098 0%, #898e87 100%);
  color: white;
  overflow: visible;
}

.sticky-visual {
  align-self: start;
  position: sticky;
  top: 24px;
}

.sticky-panel {
  min-height: 560px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 30px;
  border-radius: 32px;
  background: rgba(31, 36, 33, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sticky-panel .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.sticky-panel strong {
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.system-shape-grid {
  width: min(280px, 100%);
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(3, 76px);
  grid-auto-rows: 76px;
  justify-content: end;
}

.system-shape {
  border-radius: 999px;
}

.system-shape-green {
  background: var(--warm);
  border-radius: 999px 0 0 999px;
}

.system-shape-cream {
  background: #f8fbf5;
}

.system-shape-dark {
  background: #243125;
  grid-row: span 2;
  border-radius: 0 0 999px 999px;
}

.system-shape-white {
  background: white;
}

.system-shape-arch {
  background: #f8fbf5;
  border-radius: 999px 999px 0 0;
}

.scrolling-copy {
  display: grid;
  gap: 22px;
  padding: 140px 0;
}

.scroll-card {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.scroll-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.4rem;
  font-family: Georgia, "Times New Roman", serif;
}

.scroll-card h2 {
  max-width: 13ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.scroll-card p {
  max-width: 48ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

.services-section {
  margin-top: 18px;
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 243, 0.98));
  box-shadow: var(--shadow);
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.service-grid,
.proof-list,
.faq-list,
.howto-grid,
.summary-grid,
.override-hint-grid {
  display: grid;
  gap: 14px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.service-card {
  padding: 22px;
}

.service-card h3 {
  margin: 0 0 10px;
}

.service-card p,
.proof-item span,
.faq-list p {
  line-height: 1.6;
}

.proof-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.proof-panel,
.faq-panel {
  padding: 34px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.proof-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 243, 0.98));
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.proof-list {
  margin-top: 24px;
}

.proof-item,
.faq-list article {
  padding: 20px;
}

.proof-item strong,
.faq-list h3 {
  display: block;
  margin-bottom: 8px;
}

.faq-panel {
  background: linear-gradient(180deg, #f4f9ef 0%, #ebf3e4 100%);
  border: 1px solid rgba(126, 211, 33, 0.12);
}

.faq-list {
  margin-top: 18px;
}

.faq-list h3 {
  margin-top: 0;
}

.why-story-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(180deg, #f8fbf5 0%, #eef5e9 100%);
  border: 1px solid rgba(126, 211, 33, 0.12);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.why-story-copy h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
}

.why-story-copy p {
  max-width: 66ch;
  line-height: 1.7;
}

.why-story-points {
  display: grid;
  gap: 14px;
  align-content: start;
}

.why-story-points article,
.founder-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.why-story-points article {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
}

.why-story-points span,
.founder-label {
  color: var(--warm-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.why-story-points p,
.founder-card p {
  margin: 0;
  line-height: 1.65;
}

.why-floating-shapes {
  position: absolute;
  right: 36px;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(2, 54px);
  grid-auto-rows: 54px;
  opacity: 0.5;
  pointer-events: none;
}

.why-floating-shapes div {
  border-radius: 999px;
  background: rgba(126, 211, 33, 0.24);
}

.why-floating-shapes div:nth-child(2) {
  border-radius: 999px 999px 0 0;
  background: rgba(31, 36, 33, 0.14);
}

.why-floating-shapes div:nth-child(3) {
  background: white;
}

.why-floating-shapes div:nth-child(4) {
  border-radius: 0 0 999px 999px;
  background: rgba(126, 211, 33, 0.34);
}

.founders-band {
  padding: 38px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(126, 211, 33, 0.08), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(126, 211, 33, 0.12);
  box-shadow: var(--shadow);
}

.founder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.founder-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: 22px;
}

.founder-card-copy {
  display: grid;
  gap: 12px;
}

.founder-card h3 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.98;
}

.founder-photo {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(31, 36, 33, 0.12);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.88) 0 13%, transparent 14%),
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.78) 0 25%, transparent 26%),
    linear-gradient(135deg, rgba(126, 211, 33, 0.22), rgba(31, 36, 33, 0.08));
}

.founder-photo-partner {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.88) 0 13%, transparent 14%),
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.78) 0 25%, transparent 26%),
    linear-gradient(135deg, rgba(31, 36, 33, 0.16), rgba(126, 211, 33, 0.16));
}

.founder-photo span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.founder-card-wide {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  color: white;
  background: linear-gradient(135deg, #233024 0%, #171c17 100%);
}

.founder-card-wide p {
  color: rgba(255, 255, 255, 0.76);
}

.founder-card-wide .founder-label {
  color: rgba(255, 255, 255, 0.72);
}

.contact-band {
  margin-top: 18px;
  padding: 28px 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #233024 0%, #171c17 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.admin-copy {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.admin-login-form {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.admin-login-form label {
  display: grid;
  gap: 8px;
}

.admin-login-form input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.workspace-shell {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(22, 25, 23, 0.1);
  border: 1px solid rgba(31, 36, 33, 0.08);
}

.workspace-copy {
  margin: 0;
  max-width: 72ch;
  line-height: 1.4;
}

.top-tabs {
  display: none;
  gap: 6px;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(244, 250, 240, 0.96);
  box-shadow: 0 16px 32px rgba(17, 24, 18, 0.08);
}

.top-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-tab-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(17, 24, 18, 0.08);
  cursor: pointer;
}

.mobile-tab-toggle span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-tab-toggle strong {
  font-family: var(--font-body);
  font-size: 1rem;
}

.mobile-tab-toggle::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--warm-dark);
  font-weight: 900;
}

.mobile-tab-toggle[aria-expanded="true"]::after {
  content: "-";
}

.top-tabs.mobile-tabs-open {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tab-button,
.ghost,
.primary {
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.tab-button:hover,
.ghost:hover,
.primary:hover {
  transform: translateY(-1px);
}

.tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  white-space: nowrap;
}

.tab-button.active,
.primary {
  background: var(--warm);
  color: white;
  border: 1px solid transparent;
}

.primary:hover,
.tab-button.active:hover {
  background: var(--warm-dark);
}

.ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.ghost-light {
  border-color: rgba(255, 255, 255, 0.26);
  color: white;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.tab-panel {
  display: none;
  gap: 22px;
  margin-top: 18px;
}

.tab-panel.active {
  display: grid;
}

.hero,
.panel {
  border-radius: 12px;
  background: #fffefa;
  box-shadow: 0 12px 30px rgba(22, 25, 23, 0.045);
  border: 1px solid rgba(31, 36, 33, 0.08);
}

.panel-hero,
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.68fr);
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
}

.hero h1 {
  font-size: 2rem;
  max-width: 34ch;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero .lede {
  margin-top: 10px;
  max-width: 70ch;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-card {
  display: grid;
  gap: 8px;
}

.hero-card div {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(126, 211, 33, 0.1);
  color: var(--navy);
  border: 1px solid rgba(126, 211, 33, 0.14);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--warm-dark);
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.7);
}

.panel {
  padding: 20px 22px;
}

.panel h2 {
  font-size: 1.45rem;
  letter-spacing: 0;
}

.panel-head,
.override-head,
.line-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.panel-head {
  margin-bottom: 18px;
}

.customer-meta {
  margin: -4px 2px 0;
  min-height: 1.2em;
  color: var(--muted);
}

form,
.grid {
  display: grid;
}

form {
  gap: 18px;
}

.grid {
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.88rem;
}

.fill-card {
  height: 100%;
}

.field-help {
  font-size: 0.82rem;
  line-height: 1.45;
}

.override-panel {
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(126, 211, 33, 0.08), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--line);
}

.override-panel[open] {
  display: grid;
}

.invoice-options {
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(246, 252, 241, 0.72);
}

.invoice-options[open] {
  display: grid;
}

.invoice-options summary,
.override-panel summary {
  cursor: pointer;
  list-style: none;
}

.invoice-options summary::-webkit-details-marker,
.override-panel summary::-webkit-details-marker {
  display: none;
}

.invoice-options summary {
  display: grid;
  gap: 4px;
}

.invoice-options summary strong {
  font-size: 1rem;
}

.invoice-options summary span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.invoice-options:not([open]),
.override-panel:not([open]) {
  gap: 0;
}

.invoice-options:not([open]) > :not(summary),
.override-panel:not([open]) > :not(summary) {
  display: none !important;
}

.invoice-demo-action {
  display: flex;
  justify-content: flex-start;
}

.scope-quick-builder,
.scope-advanced-terms,
.scope-draft-tools {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(235, 249, 235, 0.42);
}

.scope-draft-tools[open] {
  display: grid;
  gap: 16px;
}

.scope-draft-tools:not([open]) > :not(summary) {
  display: none !important;
}

.scope-quick-builder {
  display: grid;
  gap: 14px;
}

.scope-quick-builder h3 {
  margin: 0;
  font-size: 1.15rem;
}

.scope-quick-builder .muted {
  margin: 6px 0 0;
}

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

.scope-preset-button {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.scope-preset-button:hover {
  border-color: rgba(126, 211, 33, 0.65);
  background: rgba(235, 249, 235, 0.9);
}

.scope-preset-button span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.scope-ai-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.scope-advanced-terms summary,
.scope-draft-tools summary {
  cursor: pointer;
  font-weight: 800;
}

.scope-draft-tools summary {
  display: grid;
  gap: 4px;
}

.scope-draft-tools summary span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.scope-advanced-terms p {
  margin: 8px 0 14px;
  color: var(--muted);
}

.scope-draft-editor {
  min-height: 380px;
}

.scope-final-actions {
  justify-content: flex-end;
}

.missing-document {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: #a33d19;
  font-weight: 800;
}

.override-head h3 {
  font-size: 1.8rem;
}

.override-copy {
  margin: 0;
  max-width: 34ch;
  line-height: 1.55;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(126, 211, 33, 0.45);
  box-shadow: 0 0 0 4px rgba(126, 211, 33, 0.14);
}

textarea {
  resize: vertical;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.summary-tile {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.summary-tile strong {
  font-size: 1.5rem;
}

.summary-tile.total {
  background: linear-gradient(135deg, rgba(126, 211, 33, 0.14), rgba(31, 36, 33, 0.04));
}

.summary-meta {
  margin: 14px 2px 0;
}

.summary-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #8f2330;
  background: rgba(214, 64, 82, 0.08);
  border: 1px solid rgba(214, 64, 82, 0.16);
}

.line-preview,
.document-preview {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.preview-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.preview-frame {
  width: 100%;
  min-height: 820px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: white;
}

.line-preview-table-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.line-preview-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table {
  min-width: 1180px;
}

.customers-table {
  min-width: 1560px;
}

.projects-table {
  min-width: 1240px;
}

.assets-table {
  min-width: 1560px;
}

.projects-table input,
.projects-table select,
.assets-table input,
.assets-table select {
  min-width: 120px;
}

.projects-table textarea,
.assets-table textarea {
  min-width: 150px;
}

.line-preview-table th,
.line-preview-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.line-preview-table th {
  color: var(--navy);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.line-preview-table td:last-child,
.line-preview-table th:last-child {
  text-align: right;
}

.result pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 18px;
  background: #0e213f;
  color: #edf2fb;
}

.info-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  align-content: center;
  color: var(--navy);
}

.products-actions {
  justify-content: flex-end;
  align-items: end;
}

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

.invoice-template-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.invoice-template-card h3,
.invoice-template-card p {
  margin: 0;
}

.invoice-template-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.product-bucket-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.product-bucket-summary div,
.product-bucket {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.product-bucket-summary div {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
}

.product-bucket-summary strong {
  color: var(--navy);
  font-family: "Cooper Black", Georgia, serif;
  font-size: 1.35rem;
}

.product-bucket-summary span,
.product-bucket-head span {
  color: var(--muted);
}

.product-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(115, 184, 60, 0.18);
  border-radius: 14px;
  background: rgba(242, 250, 234, 0.82);
}

.product-filter-bar label {
  display: grid;
  gap: 6px;
}

.product-filter-bar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.product-filter-bar select {
  min-width: 0;
  width: 100%;
}

.product-search-filter input {
  width: 100%;
}

.product-filter-action {
  display: flex;
  align-items: end;
}

.product-filter-action .ghost {
  min-height: 46px;
}

.advanced-tools {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px dashed rgba(39, 46, 42, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.advanced-tools summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
}

.advanced-tools summary span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-weight: 700;
}

.advanced-tools summary strong {
  color: var(--navy);
}

.advanced-tools form {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.product-page-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(242, 250, 234, 0.82);
  color: var(--muted);
  font-weight: 800;
}

.product-page-controls div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.product-page-controls .ghost {
  min-height: auto;
  padding: 7px 10px;
}

.stacked-product-fields {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.product-display-cell {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.product-display-cell strong {
  color: var(--navy);
  font-weight: 850;
  line-height: 1.2;
}

.product-display-cell span {
  color: var(--muted);
  font-size: 0.82rem;
}

.product-category-pill,
.product-tax-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(242, 250, 234, 0.95);
  color: var(--navy);
  font-weight: 850;
  white-space: nowrap;
}

.product-tax-pill {
  background: rgba(245, 245, 240, 0.95);
  color: var(--muted);
}

.product-tax-pill.is-taxable {
  background: rgba(224, 247, 207, 0.95);
  color: #3f7e22;
}

.product-row-details {
  display: grid;
  gap: 8px;
  min-width: 120px;
}

.product-row-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.product-row-details[open] {
  min-width: min(720px, 70vw);
}

.product-row-details[open] summary {
  margin-bottom: 8px;
}

.product-row-details .product-updated-cell {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.product-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.product-edit-grid label {
  display: grid;
  gap: 5px;
}

.product-edit-grid label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.product-edit-wide {
  grid-column: span 2;
}

.product-edit-checkbox {
  align-self: end;
}

.product-edit-details .save-product {
  width: fit-content;
}

.products-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(252, 250, 245, 0.98);
}

.product-bucket .line-preview-table-wrap {
  max-height: 760px;
  overflow: auto;
  border-radius: 10px;
}

.products-table .save-product {
  min-width: 70px;
}

.product-bucket {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-top: 14px;
}

.product-bucket-head {
  align-items: center;
}

.product-bucket[hidden] {
  display: none;
}

.duplicate-clients-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.duplicate-client-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #fff7e8;
  border: 1px solid rgba(166, 109, 25, 0.22);
}

.duplicate-client-row div:first-child {
  display: grid;
  gap: 4px;
}

.duplicate-client-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.duplicate-actions,
.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inline-create-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(235, 249, 235, 0.55);
}

.inline-create-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.7fr) repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.inline-create-form label {
  min-width: 0;
}

.inline-create-form .full-field {
  grid-column: 1 / -1;
}

.inline-create-form input,
.inline-create-form textarea {
  width: 100%;
  min-width: 0;
}

.customer-record-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.customer-record-card {
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  overflow: hidden;
}

.customer-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.customer-record-toggle {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(72px, auto) minmax(180px, 1fr) minmax(220px, auto);
  gap: 10px;
  align-items: center;
  flex: 1;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.customer-record-toggle::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(126, 211, 33, 0.14);
  color: var(--warm-dark);
  font-weight: 900;
}

.customer-record-card.is-expanded .customer-record-toggle::before {
  content: "-";
}

.customer-record-toggle strong {
  display: block;
  min-width: 0;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-record-toggle small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-kicker {
  color: var(--warm-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-record-details {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.customer-record-details[hidden] {
  display: none;
}

.customer-record-grid {
  display: grid;
  grid-template-columns: 90px minmax(220px, 2fr) minmax(96px, 0.7fr) 92px minmax(220px, 1.25fr);
  gap: 7px 9px;
  align-items: start;
}

.customer-record-grid label {
  min-width: 0;
}

.customer-record-grid label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.customer-record-grid .name-field {
  grid-column: span 1;
}

.customer-record-grid .terms-field {
  grid-column: 2 / 5;
}

.customer-record-grid .address-field {
  grid-column: span 2;
}

.customer-record-grid .full-field {
  grid-column: 1 / -1;
}

.customer-record-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.payment-record-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.payment-record-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.payment-record-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 180px 180px auto;
  gap: 14px;
  align-items: center;
}

.payment-record-main strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
}

.payment-record-main p,
.payment-date-field small {
  margin: 4px 0 0;
  color: var(--muted);
}

.payment-money {
  color: var(--navy);
  font-family: "Cooper Black", Georgia, serif;
  font-size: 1.35rem;
}

.payment-status-field,
.payment-date-field {
  display: grid;
  gap: 5px;
}

.payment-details {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.payment-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.payment-detail-grid .full-field {
  grid-column: 1 / -1;
}

.products-table .product-input,
.customers-table .product-input,
.customer-record-card .product-input,
.projects-table .product-input,
.assets-table .product-input,
.payment-record-card .product-input {
  min-width: 0;
  border-radius: 7px;
  padding: 8px 9px;
}

.customer-record-card .product-input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.86rem;
}

.documents-table .link-button,
.customer-name-cell .ghost {
  white-space: nowrap;
}

.product-cost-input {
  max-width: 110px;
}

.customer-textarea {
  min-height: 46px;
  max-height: 92px;
  line-height: 1.25;
  overflow: auto;
  resize: vertical;
}

.compact-textarea {
  min-height: 38px;
  max-height: 68px;
}

.product-code-cell,
.product-updated-cell,
.product-tax-cell {
  white-space: nowrap;
}

.compact-number-input {
  max-width: 96px;
}

.merge-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.merge-cell .merge-code-input {
  max-width: 150px;
}

.customer-name-cell {
  display: grid;
  gap: 8px;
  min-width: 200px;
}

.merge-code-input {
  text-transform: uppercase;
}

.stacked-inputs {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.empty-products {
  text-align: center;
  color: var(--muted);
  padding: 22px 12px;
}

.document-library-panel {
  margin-top: 22px;
  padding-top: 6px;
}

.document-online-preview {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.document-preview-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

#document-online-frame {
  min-height: min(74vh, 860px);
  background: #f7f8f5;
  color-scheme: light;
}

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

.howto-card {
  min-height: 120px;
}

.deploy-card {
  margin-top: 18px;
}

.tab-button:focus-visible,
.ghost:focus-visible,
.primary:focus-visible {
  outline: 3px solid rgba(126, 211, 33, 0.34);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .marketing-page .page-shell {
    width: min(100vw - 28px, 100%);
    padding-top: 18px;
  }

  .marketing-page .site-header {
    padding: 18px 4px 44px;
  }

  .marketing-page .site-nav {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .landing-hero,
  .story-band,
  .proof-section,
  .service-grid,
  .why-story-band,
  .sticky-systems-band,
  .founder-grid,
  .panel-hero,
  .hero,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .sticky-visual {
    position: relative;
    top: 0;
  }

  .sticky-panel {
    min-height: 380px;
  }

  .scrolling-copy {
    padding: 0;
  }

  .scroll-card {
    min-height: 280px;
    padding: 28px 0;
  }

  .process-card {
    grid-template-columns: 56px 1fr;
    align-items: start;
  }

  .process-card p {
    grid-column: 2;
  }

  .site-header {
    align-items: center;
  }

  .customer-record-grid {
    grid-template-columns: 82px minmax(180px, 1.5fr) minmax(90px, 0.75fr) minmax(170px, 1fr);
  }

  .customer-record-grid .terms-field,
  .customer-record-grid .address-field,
  .customer-record-grid .wide-field,
  .inline-create-form .full-field,
  .customer-record-grid .full-field {
    grid-column: span 4;
  }

  .customer-record-grid .name-field {
    grid-column: span 2;
  }

  .customer-record-head,
  .customer-record-footer,
  .duplicate-client-row {
    align-items: flex-start;
  }

  .duplicate-client-row {
    flex-direction: column;
  }

  .customer-record-head {
    flex-direction: row;
    align-items: center;
  }

  .customer-record-toggle {
    grid-template-columns: auto minmax(64px, auto) minmax(160px, 1fr) minmax(180px, auto);
  }

  .customer-record-footer {
    justify-content: flex-end;
  }

  .duplicate-actions {
    justify-content: flex-start;
  }

  .record-actions {
    justify-content: flex-end;
  }

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

@media (max-width: 780px) {
  .marketing-page .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 10px;
  }

  .marketing-page .site-header {
    padding: 12px 2px 26px;
  }

  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 14px;
    padding-bottom: 22px;
  }

  .site-header,
  .contact-band,
  .panel-head,
  .override-head,
  .line-preview-head {
    flex-direction: column;
    align-items: start;
  }

  .site-header {
    gap: 12px;
  }

  .brand-logo {
    width: 132px;
  }

  .marketing-page .brand-logo {
    width: 164px;
  }

  .brand-label {
    font-size: 0.72rem;
    padding: 7px 10px;
  }

  .site-nav {
    gap: 8px 12px;
    font-size: 0.84rem;
    line-height: 1.2;
    width: 100%;
    justify-content: flex-start;
  }

  .marketing-page .site-nav {
    width: 100%;
    justify-content: flex-start;
    padding: 7px;
    border-radius: 22px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-login-link {
    width: 100%;
  }

  .founder-card {
    grid-template-columns: 1fr;
  }

  .founder-photo {
    min-height: 260px;
  }

  .landing-hero,
  .process-band,
  .story-band,
  .sticky-systems-band,
  .services-section,
  .proof-panel,
  .faq-panel,
  .why-story-band,
  .founders-band,
  .workspace-shell,
  .panel,
  .hero {
    padding: 22px;
  }

  .landing-hero h1,
  .section-heading h2,
  .workspace-head h2,
  .hero h1 {
    max-width: none;
  }

  .landing-hero h1 {
    font-size: clamp(2.1rem, 11vw, 3.4rem);
    line-height: 0.97;
  }

  .lede {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .art-card-main {
    min-height: 200px;
    padding: 18px;
  }

  .hero-logo {
    width: min(100%, 220px);
    margin-top: 4px;
  }

  .art-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .art-copy strong {
    font-size: 1.35rem;
    max-width: 16ch;
  }

  .art-stack {
    grid-template-columns: repeat(3, 1fr);
  }

  .shape-collage {
    min-height: 340px;
  }

  .shape-card-note {
    left: 18px;
    bottom: 18px;
    width: calc(100% - 36px);
  }

  .shape-portrait-one {
    left: 18px;
    top: 24px;
  }

  .shape-portrait-three {
    left: 36px;
    bottom: 98px;
  }

  .shape-block-wide,
  .shape-block-pill {
    right: 18px;
  }

  .sticky-panel {
    min-height: 320px;
    padding: 22px;
  }

  .system-shape-grid {
    grid-template-columns: repeat(3, 58px);
    grid-auto-rows: 58px;
  }

  .scroll-card {
    min-height: 240px;
    padding: 24px 0;
  }

  .why-floating-shapes {
    display: none;
  }

  .service-grid,
  .howto-grid,
  .two-col,
  .invoice-template-grid,
  .scope-preset-grid,
  .override-hint-grid,
  .customer-record-grid,
  .inline-create-form,
  .payment-record-main,
  .payment-detail-grid,
  .product-filter-bar {
    grid-template-columns: 1fr;
  }

  .mobile-tab-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(17, 24, 18, 0.08);
    cursor: pointer;
  }

  .mobile-tab-toggle span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-tab-toggle strong {
    font-family: var(--font-body);
    font-size: 1rem;
  }

  .mobile-tab-toggle::after {
    content: "+";
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--soft-green);
    color: var(--warm-dark);
    font-weight: 900;
  }

  .mobile-tab-toggle[aria-expanded="true"]::after {
    content: "-";
  }

  .top-tabs {
    display: none;
    position: static;
    margin: 8px 0 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(244, 250, 240, 0.96);
    box-shadow: 0 16px 32px rgba(17, 24, 18, 0.08);
  }

  .top-tabs.mobile-tabs-open {
    display: grid;
    grid-template-columns: 1fr;
  }

  #scope-tab .panel-hero {
    gap: 14px;
  }

  #scope-tab .panel-hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 0.95;
  }

  #scope-tab .hero-card {
    gap: 6px;
  }

  #scope-tab .hero-card div {
    padding: 10px 12px;
  }

  #scope-form {
    display: grid;
    gap: 14px;
  }

  #scope-form label {
    gap: 6px;
  }

  #scope-form input,
  #scope-form textarea,
  #scope-form select {
    min-height: 46px;
    padding: 11px 12px;
    font-size: 16px;
  }

  #scope-form textarea {
    min-height: 112px;
  }

  #scope-form .scope-draft-editor {
    min-height: 340px;
  }

  .scope-quick-builder {
    gap: 12px;
    padding: 14px;
  }

  .scope-ai-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .scope-ai-actions .primary {
    min-height: 48px;
  }

  .customer-record-grid .wide-field,
  .customer-record-grid .name-field,
  .customer-record-grid .terms-field,
  .customer-record-grid .address-field,
  .customer-record-grid .full-field,
  .payment-detail-grid .full-field {
    grid-column: auto;
  }

  .actions {
    flex-direction: column;
  }

  .product-page-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-edit-grid {
    grid-template-columns: 1fr;
  }

  .product-edit-wide {
    grid-column: auto;
  }

  .primary,
  .ghost,
  .tab-button,
  .link-button {
    width: 100%;
  }

  .preview-frame {
    min-height: 520px;
  }
}
