/* Carta Desk public site. The console's look: light, flat, hairlines, Plex, with the AI's work as the one dark thing. */

@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #EDF1F4; --surface: #FFFFFF; --surface2: #F5F8FA;
  --ink: #0B2239; --mute: #52677B; --faint: #71838F;
  --line: #D3DCE4; --line2: #E4EAEF;
  --accent: #0A86A0; --accent-strong: #086B80;
  --blue: #1F5FBF; --amber: #96590A; --green: #11765A; --red: #B8322A;
  --fb: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fm: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

/* Everything is in rem and the root grows with the window, so a very wide screen gets the same page, larger. */
html { font-size: clamp(16px, 11px + .35vw, 24px); scroll-behavior: smooth; scroll-padding-top: 4.5rem; background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--fb); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { width: min(100% - 3rem, 84rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .4rem .8rem; z-index: 20; }
.skip:focus { left: .5rem; }

.mark { flex: none; display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 3px; background: var(--accent); color: #fff; font: 600 .85rem var(--fm); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.1rem; border: 1px solid var(--accent-strong); border-radius: 4px; background: var(--accent-strong); color: #fff; font-weight: 600; font-size: .94rem; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: #06566A; border-color: #06566A; }
.btn.small { padding: .35rem .8rem; font-size: .84rem; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface); border-color: var(--faint); }
.btn.invert { background: #fff; border-color: #fff; color: var(--ink); }
.btn.invert:hover { background: #DDF1F5; border-color: #DDF1F5; }

.tag { --c: var(--mute); display: inline-block; padding: .05rem .45rem; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--c) 36%, #fff); background: color-mix(in srgb, var(--c) 8%, #fff); color: var(--c); font: 600 .68rem/1.5 var(--fm); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tag[data-tone="accent"] { --c: var(--accent-strong); }
.tag[data-tone="green"] { --c: var(--green); }
.tag[data-tone="amber"] { --c: var(--amber); }
.tag[data-tone="red"] { --c: var(--red); }
.tag[data-tone="blue"] { --c: var(--blue); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 2rem; height: 3.5rem; }
.top nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: .9rem; }
.top nav a { color: var(--mute); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.signin { font-size: .9rem; font-weight: 600; text-decoration: none; }
.signin:hover { color: var(--accent-strong); }

/* ---------- hero ---------- */
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: center; padding-block: 4.5rem; }
.eyebrow, .label { font: 500 .72rem var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); }
.eyebrow { display: flex; align-items: center; gap: .55rem; }
.dot { width: .45rem; height: .45rem; background: var(--accent); border-radius: 50%; }
h1 { margin-top: 1.1rem; font-size: clamp(2.3rem, 4.1vw + .4rem, 3.9rem); line-height: 1.06; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
h1 span { display: block; color: var(--accent-strong); }
.lede { margin-top: 1.4rem; max-width: 34rem; color: var(--mute); font-size: 1.13rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }

/* ---------- the replay ---------- */
.demo { min-width: 0; }
.demo-head { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; }
.demo-id { font: 500 .78rem var(--fm); color: var(--mute); }
.demo-title { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-note { margin-top: .55rem; font: 400 .72rem var(--fm); color: var(--faint); }

.term { --t-bg: #0A1118; --t-fg: #DCE5EC; --t-dim: #8A9BAA; --t-green: #56D39A; --t-red: #FF8A80; --t-yellow: #E9BC5A; --t-accent: #6FD3E6; background: var(--t-bg); color: var(--t-fg); border: 1px solid #000; border-radius: 0 0 4px 4px; font: 400 .82rem/1.55 var(--fm); font-variant-ligatures: none; display: flex; flex-direction: column; }
.term b { font-weight: 600; }
.t-log { height: 26rem; overflow: auto; padding: .85rem 1rem .4rem; display: flex; flex-direction: column; gap: .45rem; scrollbar-width: thin; scrollbar-color: #2A3A48 transparent; }
.t-branch { display: flex; flex-direction: column; gap: .45rem; }
.t-line { display: flex; gap: 1ch; align-items: baseline; }
.t-line > .m { flex: none; width: 1ch; }
.t-line > span:last-child { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.t-line i { font-style: normal; color: var(--t-dim); }
.t-out { padding-left: 2ch; color: var(--t-dim); }
.t-say { padding-block: .2rem; }
.t-dim { color: var(--t-dim); } .t-green { color: var(--t-green); } .t-red { color: var(--t-red); } .t-yellow { color: var(--t-yellow); } .t-accent { color: var(--t-accent); }
.t-ask { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; margin-inline: -.7rem; background: #1C1608; border-left: 2px solid var(--t-yellow); }
.t-ask pre { margin: .1rem 0 .2rem 2ch; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.t-ask > .t-red, .t-ask > .t-dim { padding-left: 2ch; }
.t-keys { display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem 0 .1rem 2ch; }
.t-keys button, .t-replay { font: 600 .82rem var(--fm); color: var(--t-fg); background: none; border: 1px solid #3A4A58; border-radius: 3px; padding: .2rem .7rem; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
#t-allow { background: var(--t-yellow); border-color: var(--t-yellow); color: #1C1608; }
#t-allow:hover { background: #F5D27F; border-color: #F5D27F; }
#t-deny:hover, .t-replay:hover { border-color: var(--t-fg); }
.term :focus-visible { outline: 1px solid var(--t-accent); outline-offset: 2px; }
.t-foot { display: flex; align-items: center; justify-content: space-between; gap: 1ch; min-height: 2.5rem; padding: .35rem 1rem; border-top: 1px solid #1B2733; font-size: .76rem; }
.t-replay { font-size: .74rem; padding: .05rem .55rem; font-weight: 500; }
/* Without the script the whole transcript shows, finished; with it, the script reveals one line at a time. */
.js .t-log > [data-wait]:not(.show), .js .t-branch > [data-wait]:not(.show) { display: none; }

/* ---------- sections ---------- */
.band { padding-block: 4.5rem; border-top: 1px solid var(--line); }
.band.alt { background: var(--surface); }
.sec-head { margin-bottom: 2.5rem; }
h2 { margin-top: .6rem; font-size: clamp(1.7rem, 1.9vw + .6rem, 2.3rem); line-height: 1.15; font-weight: 600; letter-spacing: -.018em; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.steps li { padding: 1.1rem 1.6rem 0 0; }
.steps li + li { padding-left: 1.4rem; border-left: 1px solid var(--line); }
.num { font: 500 .78rem var(--fm); color: var(--accent-strong); }
h3 { margin-top: .9rem; font-size: 1.06rem; font-weight: 600; }
.steps p { margin-top: .4rem; color: var(--mute); font-size: .95rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
.split.rev { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.split-copy > p:not(.label) { margin-top: 1rem; color: var(--mute); }
.split-copy > p b { color: var(--ink); font-weight: 600; }
.facts { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.facts li { padding: .6rem 0; border-bottom: 1px solid var(--line2); color: var(--mute); font-size: .94rem; }
.facts b { color: var(--ink); font-weight: 600; }

.policy { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .78rem 1.1rem; border-top: 1px solid var(--line2); }
.p-row:first-child { border-top: 0; }
.p-head { padding-block: .5rem; background: var(--surface2); font: 500 .7rem var(--fm); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid > div { padding: 1.4rem 1.5rem 1.6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid dt { font: 500 .72rem var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); }
.grid dd { margin-top: .5rem; font-size: 1.02rem; }

/* ---------- your brand ---------- */
.brand-form { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.brand-form label { display: block; margin-bottom: .4rem; font: 500 .7rem var(--fm); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.brand-form input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; }
.brand-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.swatches { display: flex; gap: .45rem; margin-top: .7rem; }
.swatches button { width: 1.6rem; height: 1.6rem; padding: 0; border: 1px solid rgb(0 0 0 / .15); border-radius: 3px; cursor: pointer; }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatches [data-accent="#0A86A0"] { background: #0A86A0; } .swatches [data-accent="#1F5FBF"] { background: #1F5FBF; }
.swatches [data-accent="#11765A"] { background: #11765A; } .swatches [data-accent="#B8322A"] { background: #B8322A; }
.swatches [data-accent="#6847B5"] { background: #6847B5; }
.pricing { margin-top: 1.5rem !important; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .94rem; }
.pricing b { color: var(--ink); font-weight: 600; }

.mock { --accent: #0A86A0; min-width: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--bg); }
.mock-bar { padding: .5rem .8rem; background: var(--surface2); border-bottom: 1px solid var(--line); }
.mock-url { display: block; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--mute); font: 400 .76rem var(--fm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-url b { color: var(--ink); font-weight: 500; }
.mock-app { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); min-height: 17.5rem; }
.mock-side { display: flex; flex-direction: column; gap: .15rem; padding: 1rem .7rem; background: #F7F9FB; border-right: 1px solid var(--line); font-size: .86rem; }
.mock-brand { display: flex; align-items: center; gap: .55rem; padding: 0 .35rem .9rem; font-weight: 600; min-width: 0; }
.mock-brand span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock .mark { background: var(--accent); transition: background .15s; }
.mock-sec { padding: 0 .5rem .3rem; font: 500 .64rem var(--fm); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.mock-nav { display: flex; justify-content: space-between; padding: .32rem .5rem; border-radius: 3px; color: var(--mute); font-weight: 500; }
.mock-nav.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.mock-nav em { font: 600 .68rem/1.6 var(--fm); padding: 0 .35rem; border-radius: 3px; background: var(--accent); color: #fff; transition: background .15s; }
.mock-main { padding: 1.1rem 1.2rem; min-width: 0; }
.mock-title { font-size: 1.15rem; font-weight: 600; }
.mock-sub { margin-bottom: .9rem; font: 400 .74rem var(--fm); color: var(--mute); }
.mock-table { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.m-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .62rem .8rem; border-top: 1px solid var(--line2); font-size: .88rem; }
.m-row:first-child { border-top: 0; }
.m-row code { font: 500 .74rem var(--fm); color: var(--mute); }
.m-row span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- closing ---------- */
.cta { background: var(--ink); color: #fff; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 3.5rem; flex-wrap: wrap; }
.cta h2 { margin: 0; }
.cta p { margin-top: .4rem; color: #A9BBCB; }
.foot { border-top: 1px solid var(--line); font-size: .85rem; color: var(--mute); }
.foot-in { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; padding-block: 1.4rem; }
.foot .brand { color: var(--ink); font-size: .95rem; margin-right: auto; }
.foot .mark { width: 1.35rem; height: 1.35rem; font-size: .72rem; }
.foot a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- sign in, not found ---------- */
.page-small { min-height: 100dvh; display: flex; flex-direction: column; }
.page-small main { flex: 1; display: grid; place-items: center; padding: 3rem 1rem; }
.panel { width: min(100%, 27rem); padding: 1.9rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.panel h1 { margin-top: .5rem; font-size: 1.7rem; letter-spacing: -.015em; }
.panel > p:not(.label) { margin-top: .6rem; color: var(--mute); font-size: .95rem; }
.panel form { margin-top: 1.4rem; }
.panel label { display: block; margin-bottom: .4rem; font: 500 .7rem var(--fm); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.address { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.address:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.address input { flex: 1; min-width: 0; padding: .6rem .7rem; border: 0; background: none; color: var(--ink); font: inherit; outline: 0; }
.address span { display: flex; align-items: center; padding-right: .7rem; color: var(--faint); font: 400 .82rem var(--fm); white-space: nowrap; }
.panel .btn { width: 100%; margin-top: .9rem; cursor: pointer; font-family: inherit; }
.form-error { margin-top: .6rem; color: var(--red); font-size: .88rem; }
.panel .note { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line2); font-size: .86rem; }
.panel .note a { color: var(--accent-strong); }

/* ---------- narrower ---------- */
@media (max-width: 1080px) {
  .hero-in, .split, .split.rev { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-in { padding-block: 3rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li { padding-bottom: 1.4rem; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .top nav { display: none; }
  .top-in { gap: 1rem; }
  .top-in .signin { margin-left: auto; }
  .band { padding-block: 3rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .mock-app { grid-template-columns: minmax(0, 1fr); }
  .mock-side { display: none; }
  .m-row { grid-template-columns: minmax(0, 1fr) auto; }
  .m-row code { display: none; }
  .t-log { height: 38rem; }
  .demo-title { white-space: normal; }
}
@media (max-width: 460px) {
  .steps, .grid { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: 1rem 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
