/* neuronetz.ai — handcrafted stylesheet, no framework.
   Palette: paper #f4f2ed · ink #1a1816 · steel #345e85 · brand #ff6a00 */

:root {
    --bg: #f4f2ed;
    --bg-deep: #ebe8e1;
    --ink: #1a1816;
    --ink-soft: #4a453e;
    --ink-mid: #6b655b;
    --ink-faint: #8a847a;
    --line: #d4cfc5;
    --accent: #c25a0c;
    --brand: #ff6a00;
    --steel: #345e85;
    --grid: rgba(26,24,22,0.04);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter Tight', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
  }

  body {
    background-image:
      linear-gradient(var(--grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 48px 48px;
  }

  .frame {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 64px 64px;
  }

  @media (max-width: 768px) {
    .frame { padding: 24px; }
  }

  header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 120px;
  }

  @media (max-width: 768px) {
    header { margin-bottom: 64px; padding-bottom: 32px; flex-wrap: wrap; row-gap: 20px; }
    header .meta { margin-left: auto; }
  }

  .wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .wordmark .dot { color: var(--accent); }
  .wordmark img { display: block; height: 160px; width: auto; }
  @media (max-width: 768px) { .wordmark img { height: 112px; } }

  .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    text-align: right;
    line-height: 1.8;
  }
  .meta .status {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
  }
  .meta .pulsedot {
    margin-top: 7px; /* optically centers on the first text line when the status wraps */
    flex-shrink: 0;
    width: 6px; height: 6px;
    background: var(--brand);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 96px;
    align-items: end;
    margin-bottom: 160px;
  }

  @media (max-width: 960px) {
    .hero {
      grid-template-columns: 1fr;
      gap: 48px;
      margin-bottom: 96px;
    }
  }

  .claim {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(48px, 7vw, 108px);
    line-height: 0.96;
    letter-spacing: -0.035em;
    color: var(--ink);
  }

  /* CJK: hero glyphs are ~2x wider — smaller size, no mid-word breaks */
  html[lang="ja"] .claim {
    font-size: clamp(34px, 4.6vw, 72px);
    letter-spacing: 0;
    line-height: 1.15;
    word-break: keep-all;
  }
  .claim .em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
  }
  .claim .line {
    display: block;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .claim .line:nth-child(1) { animation-delay: 0.1s; }
  .claim .line:nth-child(2) { animation-delay: 0.28s; }
  .claim .line:nth-child(3) { animation-delay: 0.46s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 12px;
  }

  .hero-lede {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-soft);
    font-weight: 300;
    letter-spacing: -0.005em;
    max-width: 44ch;
    font-style: italic;
  }

  .apply-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--steel);
    color: var(--bg);
    padding: 16px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    align-self: flex-start;
    text-decoration: none;
  }
  .apply-cta:hover {
    background: var(--accent);
    transform: translateX(4px);
  }
  .apply-cta .arrow {
    transition: transform 0.25s ease;
  }
  .apply-cta:hover .arrow {
    transform: translateX(4px);
  }

  .waitlist-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    line-height: 1.7;
    margin-top: 4px;
  }
  .waitlist-link a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.2s, color 0.2s;
    cursor: pointer;
    padding-bottom: 2px;
  }
  .waitlist-link a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .manifesto {
    max-width: 960px;
    margin: 0 auto 160px;
    padding: 0 32px;
  }

  @media (max-width: 768px) {
    .manifesto { padding: 0; margin-bottom: 96px; }
  }

  .section {
    margin-bottom: 96px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 48px;
    align-items: start;
  }

  @media (max-width: 768px) {
    .section {
      grid-template-columns: 1fr;
      gap: 16px;
      margin-bottom: 64px;
    }
  }

  .section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .section-body h2 {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 24px;
  }
  .section-body h2 .em {
    font-style: italic;
    color: var(--accent);
  }

  .section-body p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 18px;
    max-width: 62ch;
  }

  .section-body p:last-child { margin-bottom: 0; }

  .section-body em {
    color: var(--ink);
    font-style: italic;
  }

  .section-body strong {
    color: var(--ink);
    font-weight: 500;
  }

  /* === Rework components — same visual language as the base system === */

  html { scroll-behavior: smooth; }

  .hero-note {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-faint);
    max-width: 48ch;
  }

  .cta-secondary {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    align-self: flex-start;
    padding-bottom: 2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
  }
  .cta-secondary:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .section-body p.section-sub {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.5;
    color: var(--ink-mid);
    margin-bottom: 22px;
    max-width: 56ch;
  }

  .section-cta { margin-top: 28px; }

  .section-note {
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    background: var(--bg-deep);
    padding: 16px 20px;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    /* full column width — right edge aligns with the stepper panel below */
  }

  .cases {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 4px;
  }
  .case-card {
    border: 1px solid var(--line);
    background: var(--bg-deep);
    padding: 32px 36px;
    position: relative;
  }
  .case-icon {
    position: absolute;
    top: 30px;
    right: 36px;
    width: 64px;
    height: 64px;
    mix-blend-mode: multiply;
    opacity: 0.92;
  }
  @media (max-width: 768px) {
    .case-icon { width: 44px; height: 44px; top: 22px; right: 20px; }
  }
  .section-figure {
    margin: 30px 0 10px;
  }
  .section-figure img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
  }
  @media (max-width: 768px) {
    .case-card { padding: 24px 20px; }
  }
  .case-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    margin-bottom: 10px;
  }
  .case-card h3 {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .case-who {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-mid);
    margin-bottom: 22px;
    max-width: 70ch;
  }
  .case-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
  @media (max-width: 900px) {
    .case-cols { grid-template-columns: 1fr; gap: 18px; }
  }
  .case-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 8px;
  }
  .case-cols p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 0;
  }

  .steps {
    list-style: none;
    counter-reset: step;
    max-width: 62ch;
    margin-bottom: 6px;
  }
  .steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 28px 60px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-soft);
  }
  .steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--accent);
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 5px 7px;
  }
  .steps li::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 36px;
    bottom: 6px;
    width: 1px;
    background: var(--line);
  }
  .steps li:last-child { padding-bottom: 0; }
  .steps li:last-child::after { display: none; }
  .steps li strong {
    color: var(--ink);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
  }
  /* Interactive steppers — hidden source markup remains the no-JS fallback */
  .stepper { display: none; }
  .stepper-on .steps { display: none; }
  .stepper-on .cases { display: none; }
  .stepper-on .stepper { display: block; }
  .stepper-track {
    display: flex;
    margin-bottom: 28px;
  }
  .stepper-node {
    position: relative;
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
  }
  .stepper-node .num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--ink-mid);
    border: 1px solid var(--line);
    background: var(--bg);
    position: relative;
    z-index: 2;
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  }
  /* connector line runs through the circle centers, split per node */
  .stepper-node::before,
  .stepper-node::after {
    content: '';
    position: absolute;
    top: 19px;
    height: 2px;
    background: var(--line);
    transition: background 0.3s;
    z-index: 1;
  }
  .stepper-node::before { left: 0; right: calc(50% + 19px); }
  .stepper-node::after { left: calc(50% + 19px); right: 0; }
  .stepper-node:first-child::before { display: none; }
  .stepper-node:last-child::after { display: none; }
  .stepper-node.done::before,
  .stepper-node.done::after,
  .stepper-node.active::before { background: var(--steel); }
  .stepper-node.done .num {
    background: var(--steel);
    color: var(--bg);
    border-color: var(--steel);
  }
  .stepper-node.active .num {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    transform: scale(1.12);
    box-shadow: 0 0 0 5px rgba(255, 106, 0, 0.16);
  }
  .stepper-node:hover:not(.active) .num {
    border-color: var(--ink-soft);
    transform: scale(1.06);
  }
  .stepper-t {
    display: block;
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--ink-mid);
    padding: 0 8px;
    max-width: 150px;
  }
  .stepper-node.active .stepper-t { color: var(--ink); font-weight: 500; }
  .panel-icon-img {
    width: 56px;
    height: 56px;
    float: right;
    margin-left: 16px;
    mix-blend-mode: multiply;
    opacity: 0.92;
  }
  .stepper-panel {
    border: 1px solid var(--line);
    background: var(--bg-deep);
    padding: 30px 34px;
  }
  .stepper-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    margin-bottom: 12px;
  }
  .stepper-title {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: 25px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 10px;
  }
  .stepper-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 68ch;
    margin-bottom: 0;
  }
  /* All slides share one grid cell — the panel is always as tall as the tallest step. */
  .stepper-stage { display: grid; }
  .stepper-slide { grid-area: 1 / 1; visibility: hidden; }
  .stepper-slide.active { visibility: visible; }
  .stepper-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
  }
  .stepper-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: none;
    border: 1px solid var(--ink-mid);
    color: var(--ink);
    padding: 12px 22px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
  }
  .stepper-btn.next {
    background: var(--steel);
    color: var(--bg);
    border-color: var(--steel);
  }
  .stepper-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
  .stepper-btn:disabled { opacity: 0.25; cursor: default; }
  @media (max-width: 768px) {
    .stepper-t { display: none; }
    .stepper-node .num { width: 32px; height: 32px; font-size: 11px; }
    .stepper-node::before,
    .stepper-node::after { top: 16px; }
    .stepper-node::before { right: calc(50% + 16px); }
    .stepper-node::after { left: calc(50% + 16px); }
    .stepper-panel { padding: 22px 20px; }
    .stepper-title { font-size: 21px; }
    .panel-icon-img { width: 40px; height: 40px; }
  }

  .explainer {
    border: 1px solid var(--line);
    background: var(--bg-deep);
    padding: 20px 24px;
    margin-top: 28px;
  }
  .explainer-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    margin-bottom: 14px;
  }
  .explainer p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
  }
  .explainer p:last-child { margin-bottom: 0; }

  .faq { }
  .faq-item { border-top: 1px solid var(--line); padding: 18px 0; }
  .faq-item:last-child { border-bottom: 1px solid var(--line); }
  .faq-item > summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 36px;
  }
  .faq-item > summary::-webkit-details-marker { display: none; }
  .faq-item > summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    color: var(--brand);
    transition: transform 0.2s;
  }
  .faq-item[open] > summary::after { content: '−'; }
  .faq-item > .faq-a { padding-top: 12px; }
  .rights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 6px 0 24px;
  }
  @media (max-width: 900px) {
    .rights-grid { grid-template-columns: 1fr; }
  }
  .rights-cell {
    border: 1px solid var(--line);
    background: var(--bg-deep);
    padding: 20px 22px;
  }
  .rights-cell p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0;
    max-width: none;
  }

  /* Read-more folds */
  .more > summary {
    list-style: none;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    padding: 2px 0 14px;
  }
  .more > summary::-webkit-details-marker { display: none; }
  .more > summary::after { content: ' ↓'; }
  .more[open] > summary::after { content: ' ↑'; }
  .more > summary:hover { color: var(--ink); }

  /* Chapter rail */
  html { scroll-behavior: smooth; }
  .rail {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
  }
  @media (min-width: 1200px) { .rail { display: flex; } }
  .rail a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    text-decoration: none;
    padding: 2px 4px;
    border-right: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }
  .rail a:hover { color: var(--ink); }
  .rail a.active { color: var(--accent); border-right-color: var(--brand); }
  .faq-q {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .faq .faq-a {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 0;
  }

  .section-body p.pullquote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 21px;
    line-height: 1.45;
    color: var(--ink);
    border-left: 2px solid var(--accent);
    padding-left: 20px;
    margin-top: 28px;
    margin-bottom: 0;
    max-width: 56ch;
  }
  .section-body p.pullquote .accent { color: var(--accent); }

  .closing-text {
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0 auto 16px;
  }
  .closing .closing-cta { margin-top: 16px; }
  .closing .waitlist-link { margin-top: 24px; }

  .closing {
    max-width: 960px;
    margin: 0 auto 120px;
    padding: 64px 32px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
  }

  .closing-quote {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 32px;
  }
  .closing-quote .accent { color: var(--accent); }

  .closing-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--steel);
    color: var(--bg);
    padding: 18px 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
  }
  .closing-cta:hover {
    background: var(--accent);
  }

  .lang-switch {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
    margin-bottom: 10px;
  }
  .lang-switch button {
    background: transparent;
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .lang-switch button:hover {
    color: var(--ink);
    border-color: var(--ink-soft);
  }
  .lang-switch button.active {
    background: var(--steel);
    color: var(--bg);
    border-color: var(--steel);
  }

  footer {
    padding-top: 48px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
  }
  footer a {
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 0.2s;
  }
  footer a:hover { color: var(--ink); }
  footer .contact-mini {
    margin-top: 6px;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.6;
  }
  footer .contact-mini a { text-decoration: underline; text-decoration-color: var(--line); }

  @media (max-width: 640px) {
    footer { flex-direction: column; gap: 12px; }
  }

  /* === MODALS (Apply + Waitlist share styling) === */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,24,22,0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
  }

  .modal {
    background: var(--bg);
    max-width: 560px;
    width: 100%;
    padding: 40px;
    border: 1px solid var(--line);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
    max-height: 90vh;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
  }
  .modal-backdrop.open .modal { transform: translateY(0); }

  /* Apply modal is wider and taller than waitlist */
  .modal.modal-apply {
    max-width: 760px;
  }

  @media (max-width: 640px) {
    /* Full-screen sheet: the form is fully laid out, never clipped; if the
       device is short, the whole sheet scrolls natively — no inner scrollbar. */
    .modal-backdrop {
      padding: 0;
      align-items: flex-start;
      overflow-y: auto;
    }
    .modal {
      padding: 22px 18px 34px;
      max-height: none;
      min-height: 100dvh;
      border-left: none;
      border-right: none;
    }
    .modal-title { font-size: 22px; }
    .modal-intro { font-size: 13.5px; margin-bottom: 16px; }
    .form-native {
      overflow-y: visible;
      flex: none;
      padding-right: 0;
      gap: 14px;
    }
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .modal-title {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .modal-close {
    background: none;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    cursor: pointer;
    color: var(--ink-faint);
    line-height: 1;
    padding: 0;
  }
  .modal-close:hover { color: var(--accent); }

  .modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 24px;
    flex-shrink: 0;
  }

  /* === Native form (apply + waitlist) — kept visually consistent with the page === */
  .form-native {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
  .form-native .field { display: flex; flex-direction: column; gap: 7px; }
  .form-native .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  @media (max-width: 520px) {
    .form-native .field-row { grid-template-columns: 1fr; gap: 18px; }
  }
  .form-native label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.5;
    color: var(--ink-mid);
  }
  .form-native label .opt {
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink-faint);
    margin-left: 6px;
  }
  .form-native label .req {
    color: var(--accent);
    margin-left: 4px;
  }
  .form-native input,
  .form-native textarea,
  .form-native select {
    width: 100%;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink);
    background: rgba(255,255,255,0.45);
    border: 1px solid var(--line);
    padding: 11px 12px;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  .form-native input::placeholder,
  .form-native textarea::placeholder {
    color: var(--ink-faint);
    opacity: 0.8;
  }
  .form-native input:hover,
  .form-native textarea:hover,
  .form-native select:hover {
    border-color: var(--ink-faint);
  }
  .form-native input:focus,
  .form-native textarea:focus,
  .form-native select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
    /* background-color, NOT the background shorthand — the shorthand resets
       background-repeat and makes the select's chevron tile across the field */
    background-color: rgba(255,255,255,0.7);
  }
  .form-native input:invalid:not(:placeholder-shown),
  .form-native textarea:invalid:not(:placeholder-shown) {
    border-color: var(--accent);
  }
  .form-native textarea { resize: vertical; min-height: 104px; }

  .form-native select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b655b' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
  }
  .form-native select:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c25a0c' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
  }

  /* Honeypot — hidden from humans, visible to bots */
  .form-native .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .form-native .form-privacy {
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-faint);
    margin-top: -2px;
  }
  .form-native .form-privacy a {
    color: var(--ink-mid);
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 2px;
  }
  .form-native .form-privacy a:hover { color: var(--accent); }

  .form-native .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 2px;
  }
  .form-native button[type="submit"] {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--bg);
    background: var(--steel);
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
  }
  .form-native button[type="submit"]:hover:not(:disabled) {
    background: var(--accent);
  }
  .form-native button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: progress;
  }

  .form-status {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-mid);
  }
  .form-status.is-success { color: var(--ink); }
  .form-status.is-error   { color: var(--accent); }
  @media (max-width: 520px) {
    .form-native .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-native button[type="submit"] { width: 100%; padding: 15px 24px; }
    .form-status:empty { display: none; }
  }

  .form-native[hidden],

  /* === Thanks modal === */
  .modal.modal-thanks { max-width: 520px; }
  .modal-thanks .thanks-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 28px;
    flex-shrink: 0;
  }
  .modal-thanks .thanks-actions {
    display: flex;
    justify-content: flex-end;
  }
  .modal-thanks .thanks-actions button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bg);
    background: var(--steel);
    border: 1px solid var(--steel);
    padding: 12px 22px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .modal-thanks .thanks-actions button:hover {
    background: var(--accent);
    border-color: var(--accent);
  }
  .modal-thanks .thanks-mark {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 12px;
    line-height: 1;
  }

  .corner {
    position: fixed;
    width: 24px;
    height: 24px;
    border-color: var(--ink-faint);
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
  }
  .corner.tl { top: 24px; left: 24px; border-top: 1px solid; border-left: 1px solid; }
  .corner.tr { top: 24px; right: 24px; border-top: 1px solid; border-right: 1px solid; }
  .corner.bl { bottom: 24px; left: 24px; border-bottom: 1px solid; border-left: 1px solid; }
  .corner.br { bottom: 24px; right: 24px; border-bottom: 1px solid; border-right: 1px solid; }

  @media (max-width: 768px) {
    .corner { display: none; }
  }
