/* The home and set-up pages (home.html, setup.html). The fonts are Schibsted Grotesk and Spline Sans Mono, under the
   SIL Open Font License, served from here so a visitor's browser talks to nobody else (fonts/README.md). */
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
             src: url(/static/fonts/schibsted-grotesk-latin.woff2) format('woff2'); }
@font-face { font-family: 'Spline Sans Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
             src: url(/static/fonts/spline-sans-mono-latin.woff2) format('woff2'); }

:root {
  --sky: #C5D3EE; --sky-deep: #B5C6E8; --ink: #121B3A; --ink-2: #26335F; --text-2: #2C3763; --muted: #3F4A73;
  --paper: #FFFFFF; --mist: #F4F6FB; --mist-2: #E9EEF8; --chip-line: #9AA8CC; --red: #D6370F; --err: #8A1F04;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif; --mono: 'Spline Sans Mono', Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--sans); }
a { color: var(--ink); }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1 { margin: 0; font-size: clamp(40px, 4.7vw, 68px); line-height: 1.02; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
h1:focus { outline: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; font-size: 20px; font-weight: 600;
         letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.panel { max-width: 560px; display: flex; flex-direction: column; gap: 28px; }
.panel.wide { max-width: 720px; }
.lede { margin: 0; max-width: 500px; font-size: 20px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; overflow-wrap: anywhere; }
.lede strong { font-weight: 600; color: var(--ink); }
.small { margin: 0; max-width: 520px; font-size: 15px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.small strong { color: var(--ink); font-weight: 600; }
.error { margin: -14px 0 0; font-size: 16px; font-weight: 600; color: var(--err); }
.button { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: 62px; padding: 0 26px;
          border: 0; border-radius: 4px; background: var(--ink); color: #FFFFFF; font: inherit; font-size: 18px; font-weight: 600;
          text-decoration: none; text-align: center; cursor: pointer; }
.button:hover { background: var(--ink-2); color: #FFFFFF; }
.button[disabled] { opacity: .75; cursor: progress; }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.button.ghost:hover { background: var(--mist); }
.link { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Home: the form on the left, a forest plot on the right; one above the other on a narrow screen. */
.split { min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); overflow: hidden; }
.left { min-height: 100vh; padding: 40px clamp(16px, 5.6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.signup { display: flex; flex-wrap: wrap; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; }
.signup:focus-within { box-shadow: 0 0 0 4px var(--mist); }
.signup input { flex: 1 1 220px; min-width: 0; height: 62px; padding: 0 20px; border: 0; background: transparent; font: inherit;
                font-size: 19px; color: var(--ink); }
.signup input:focus { outline: none; }
.signup input::placeholder { color: #5C6690; opacity: 1; }
.signup .button { flex: 0 0 auto; align-self: stretch; border-radius: 1px; }
.foot { margin: 0; font-size: 14px; color: var(--muted); }

.right { position: relative; overflow: hidden; padding: 64px clamp(16px, 4.5vw, 72px) 64px clamp(16px, 1.4vw, 24px); display: flex; flex-direction: column;
         justify-content: center; gap: 22px; }
.plot-head, .plot-row, .axis { display: grid; grid-template-columns: minmax(92px, 136px) minmax(0, 1fr) minmax(112px, 150px); column-gap: 14px; }
.plot-head { align-items: end; font-size: 15px; color: var(--text-2); }
.plot-head .title { grid-column: 1 / 3; max-width: 300px; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.plot-head .hr { text-align: right; line-height: 1.35; }
.rows { display: flex; flex-direction: column; }
.plot-row { align-items: center; height: 58px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.plot-row:hover { background: var(--sky-deep); color: var(--ink); }
.plot-row .name { font-size: 16px; line-height: 1.2; padding-left: 6px; }
.plot-row .name b { font-weight: 500; }
.plot-row .name strong { font-weight: 700; }
.plot-row .name span { color: var(--muted); }
.track { position: relative; height: 100%; display: block; }
.null { position: absolute; left: 84.93%; top: -900px; bottom: -900px; width: 2px; margin-left: -1px; background: var(--ink); }
.ci { position: absolute; top: calc(50% - 1.5px); height: 3px; background: var(--ink); animation: draw .8s cubic-bezier(.2, .8, .2, 1) both; }
.pt { position: absolute; top: calc(50% - 8px); width: 16px; height: 16px; margin-left: -8px; background: var(--ink); }
.num { padding-right: 6px; text-align: right; font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.num strong { font-weight: 500; }
.r1 .ci { left: 8.16%; width: 53.15%; transform-origin: 51.06% 50%; animation-delay: .15s; }  .r1 .pt { left: 35.30%; }
.r2 .ci { left: 62.80%; width: 20.31%; transform-origin: 51.35% 50%; animation-delay: .29s; } .r2 .pt { left: 73.23%; }
.r3 .ci { left: 59.77%; width: 16.82%; transform-origin: 50.83% 50%; animation-delay: .43s; } .r3 .pt { left: 68.32%; }
.r4 .ci { left: 67.67%; width: 19.45%; transform-origin: 48.64% 50%; animation-delay: .57s; } .r4 .pt { left: 77.13%; }
.r5 .ci { left: 77.66%; width: 13.92%; transform-origin: 48.99% 50%; animation-delay: .71s; } .r5 .pt { left: 84.48%; }
.plot-row.meta { height: 84px; }
.diamond { position: absolute; left: 58.98%; width: 22.7%; top: calc(50% - 18px); height: 36px; background: var(--red);
           clip-path: polygon(0 50%, 57.58% 0, 100% 50%, 57.58% 100%); transform-origin: 57.58% 50%;
           animation: land .7s 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.axis .ticks { position: relative; height: 34px; display: block; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.axis .ticks::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink); }
.axis .ticks span { position: absolute; top: 10px; transform: translateX(-50%); }
.axis .t1 { left: 12.88%; } .axis .t2 { left: 53.9%; } .axis .t3 { left: 84.93%; padding: 0 6px; background: var(--sky); }
.caption { margin: 0; max-width: 430px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes land { 0% { transform: scaleX(0); opacity: 0; } 60% { transform: scaleX(1.12); opacity: 1; } 100% { transform: scaleX(1); } }

/* Set-up: numbered steps, the fields to fill in, and a status line that becomes "You're connected". */
.setup-page { min-height: 100vh; }
.setup { max-width: 800px; margin: 0 auto; padding: 40px clamp(16px, 5.6vw, 80px) 72px; display: flex; flex-direction: column; gap: 44px; }
.setup h1 { font-size: clamp(36px, 4.2vw, 56px); }
.app-chatgpt .for-claude, .app-claude .for-chatgpt { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.steps > li { position: relative; padding: 22px 24px 24px 80px; border-radius: 4px; background: var(--mist); counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 24px; top: 20px; width: 36px; height: 36px; border-radius: 50%;
                      display: grid; place-items: center; background: var(--ink); color: #FFFFFF; font-size: 17px; font-weight: 600; }
.steps > li.plain { padding: 16px 24px; background: transparent; box-shadow: inset 0 0 0 2px var(--mist-2); counter-increment: none; }
.steps > li.plain::before { content: none; }
.steps h2 { margin: 5px 0 0; font-size: 20px; font-weight: 600; line-height: 1.45; text-wrap: pretty; }
.steps p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.steps .button { margin-top: 18px; }
.steps .hint { min-height: 1.5em; font-weight: 600; color: var(--ink); }
.ui { display: inline-block; padding: 0 8px; border: 1px solid var(--chip-line); border-radius: 4px; background: var(--paper);
      font-weight: 600; font-size: .92em; line-height: 1.5; white-space: nowrap; }
.fields { margin: 16px 0 0; display: grid; gap: 8px; }
.field { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px;
         padding: 8px 10px 8px 14px; border-radius: 4px; background: var(--paper); }
.field dt { font-size: 14px; color: var(--muted); }
.field dd { margin: 0; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.field dd:last-child { grid-column: 2 / 4; }
.field dd .lead { display: block; margin-bottom: 4px; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.copy { height: 36px; min-width: 76px; padding: 0 14px; border: 0; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--ink);
        background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.copy:hover { background: var(--mist); }
details summary { cursor: pointer; font-size: 16px; font-weight: 600; }
details[open] summary { margin-bottom: 4px; }
.status { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border: 2px solid var(--ink); border-radius: 4px;
          background: var(--paper); font-size: 16px; line-height: 1.45; }
.wait { position: relative; flex: 0 0 auto; width: 96px; height: 20px; }
.wait::before { content: ''; position: absolute; left: 0; right: 0; top: 8.5px; height: 3px; background: var(--ink); animation: breathe 2.4s ease-in-out infinite; }
.wait::after { content: ''; position: absolute; left: 50%; top: 2px; width: 16px; height: 16px; margin-left: -8px; background: var(--ink); }
.landed { display: block; width: 96px; height: 40px; background: var(--red); clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
          animation: settle .9s cubic-bezier(.2, .8, .2, 1) both; }
.tries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tries a { display: block; padding: 18px 22px; border-radius: 4px; background: var(--mist); font-size: 18px; font-weight: 500;
           line-height: 1.4; text-decoration: none; }
.tries a::after { content: ' →'; color: var(--muted); }
.tries a:hover { background: var(--paper); color: var(--ink); }
@keyframes breathe { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.55); } }
@keyframes settle { 0% { transform: scaleX(3.2) scaleY(.12); } 70% { transform: scaleX(.92) scaleY(1.08); } 100% { transform: none; } }

@media (max-width: 640px) {
  .left { min-height: auto; gap: 40px; padding-bottom: 24px; }
  .right { padding-top: 24px; }
  .lede { font-size: 18px; }
  .signup .button { flex: 1 1 100%; }
  .steps > li { padding: 70px 18px 20px; }
  .steps > li::before { left: 18px; top: 20px; }
  .field { grid-template-columns: minmax(0, 1fr) auto; }
  .field dt { grid-column: 1 / -1; }
  .field dd:last-child { grid-column: 1 / -1; }
  .status { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ci, .diamond, .landed, .wait::before { animation: none; }
}
