/* openmode.ai — plain CSS, no build step.
   Visual language from design/README.md: cream paper, black ink, hairline
   rules, serif headlines with tight tracking, one yellow accent. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fdfcf3;
  --ink: #000000;
  --rule: #d9d9d9;
  --caption: #6e6e6e;
  --white: #ffffff;
  --signal: #ffc500;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --page: 1200px;
  --gutter: 32px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Small tracked uppercase labels: the only job the sans has. */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.eyebrow.quiet {
  color: var(--caption);
  font-weight: 500;
}

/* ---------- Top line ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--ink);
}
.wordmark {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
/* The main action: copy the install command for the selected client. */
.top .cta {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 10px 16px;
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.top nav a.cta:hover {
  text-decoration: none;
}
.top nav a {
  text-decoration: none;
}
.top nav a:hover {
  text-decoration: underline;
}

/* ---------- Hero ---------- */

/* Wide: pitch and install stacked on the left, the proof on the right.
   Narrow: pitch, proof, install, so the real output stays near the top. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 56px;
  padding: 48px 0 64px;
  align-items: start;
}
.hero .pitch {
  grid-column: 1;
  grid-row: 1;
}
.hero .install {
  grid-column: 1;
  grid-row: 2;
}
.hero .shot {
  grid-column: 2;
  grid-row: 1 / span 3;
}

/* The demo: a replay of the real session, one step at a time. Radio inputs
   switch the panels, so it works without JavaScript; replay.js only plays it. */
.replay {
  background: var(--white);
  border: 1px solid var(--ink);
}
.replay input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ink);
}
.replay-again {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.replay-ask {
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--rule);
}
.ask {
  font-size: 18px;
  line-height: 1.35;
  margin-top: 6px;
}
.ask.typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--ink);
}
.replay-tabs {
  padding: 0 14px;
  gap: 0 18px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
}
#rs-1:checked ~ .tabs label[for="rs-1"],
#rs-2:checked ~ .tabs label[for="rs-2"],
#rs-3:checked ~ .tabs label[for="rs-3"],
#rs-4:checked ~ .tabs label[for="rs-4"],
#rs-5:checked ~ .tabs label[for="rs-5"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
#rs-1:focus-visible ~ .tabs label[for="rs-1"],
#rs-2:focus-visible ~ .tabs label[for="rs-2"],
#rs-3:focus-visible ~ .tabs label[for="rs-3"],
#rs-4:focus-visible ~ .tabs label[for="rs-4"],
#rs-5:focus-visible ~ .tabs label[for="rs-5"] {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Every panel has the same shape, so the page does not jump between steps. */
.replay-panel {
  display: none;
  flex-direction: column;
  aspect-ratio: 5 / 4;
  padding: 14px;
}
#rs-1:checked ~ .replay-panel[data-step="1"],
#rs-2:checked ~ .replay-panel[data-step="2"],
#rs-3:checked ~ .replay-panel[data-step="3"],
#rs-4:checked ~ .replay-panel[data-step="4"],
#rs-5:checked ~ .replay-panel[data-step="5"] {
  display: flex;
}
/* While the request is being typed the steps wait, without moving the layout. */
.replay.asking .replay-panel {
  visibility: hidden;
}
#replay.asking .replay-tabs label[for] {
  color: var(--caption);
  border-bottom-color: transparent;
}
.replay-panel .does {
  font-size: 18px;
  margin-bottom: 8px;
}
.replay-panel .cmd,
.replay-panel .out,
.replay-panel .media pre {
  font-size: 12px;
}
.cmd.plain::before {
  content: none;
}
.replay-panel .media {
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.replay-panel .media.dark {
  background: var(--ink);
}
.replay-panel .media img,
.replay-panel .media video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}
.replay-panel .media img {
  border: 1px solid var(--ink);
}
.replay-panel .media video {
  height: 100%;
  aspect-ratio: 1 / 1;
}
.replay-panel .media pre {
  align-self: stretch;
  width: 100%;
  overflow: auto;
}
.replay .replay-panel > .out {
  margin-top: 10px;
  padding: 0;
  border-bottom: 0;
}
.replay .replay-panel .media .out {
  align-self: flex-start;
  padding: 0;
  border-bottom: 0;
}
.hero .shot {
  max-width: 560px;
  justify-self: end;
  width: 100%;
}

h1 {
  font-size: clamp(40px, 4.6vw, 60px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 16px 0 20px;
  text-wrap: balance;
}

.lede {
  font-size: 20px;
  line-height: 1.4;
  max-width: 30em;
}

/* Install: radio tabs in CSS, so it works without JavaScript. */
.install {
  margin-top: 28px;
}
.install input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: -1px;
}
.tabs label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--caption);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tabs label:hover {
  color: var(--ink);
}
#tab-claude:checked ~ .tabs label[for="tab-claude"],
#tab-codex:checked ~ .tabs label[for="tab-codex"],
#tab-other:checked ~ .tabs label[for="tab-other"],
#tab-cli:checked ~ .tabs label[for="tab-cli"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
#tab-claude:focus-visible ~ .tabs label[for="tab-claude"],
#tab-codex:focus-visible ~ .tabs label[for="tab-codex"],
#tab-other:focus-visible ~ .tabs label[for="tab-other"],
#tab-cli:focus-visible ~ .tabs label[for="tab-cli"] {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.panel {
  display: none;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--ink);
}
#tab-claude:checked ~ .panel[data-tab="claude"],
#tab-codex:checked ~ .panel[data-tab="codex"],
#tab-other:checked ~ .panel[data-tab="other"],
#tab-cli:checked ~ .panel[data-tab="cli"] {
  display: flex;
}
.panel pre {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre,
code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
}
pre {
  margin: 0;
}
p code {
  font-size: 0.82em;
}

.copy {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 16px;
  min-width: 84px;
  cursor: pointer;
}
.copy:hover {
  background: var(--ink);
  color: var(--paper);
}
/* Yellow means one thing on this page: copy the install command. */
.copy.primary {
  background: var(--signal);
}
.copy.primary:hover {
  background: var(--ink);
  color: var(--signal);
}

.note {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--caption);
  margin-top: 12px;
}

/* The proof: a real contact sheet and the facts printed with it. */
.proof {
  margin: 0;
}
.proof-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 10px;
}
.cmd {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.cmd::before {
  content: "$ ";
  color: var(--caption);
  font-weight: 400;
}
.out {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* One span per printed line; a line that has to wrap hangs its remainder. */
.out span {
  display: block;
  padding-left: 2ch;
  text-indent: -2ch;
}
.proof .out {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
mark {
  background: var(--signal);
  color: var(--ink);
  padding: 1px 4px;
  margin: 0 -4px;
}
.note code,
figcaption code {
  font-size: 12px;
}
figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--caption);
  padding-top: 10px;
}

/* ---------- Sections ---------- */

section {
  border-top: 1px solid var(--ink);
  padding: 14px 0 64px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 28px;
}

h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  text-wrap: balance;
}

/* Three abilities set as newspaper columns: rules between, no boxes. */
.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.columns article {
  padding: 0 24px;
  border-left: 1px solid var(--rule);
}
.columns article:first-child {
  padding-left: 0;
  border-left: 0;
}
.columns article:last-child {
  padding-right: 0;
}
.columns h2 {
  margin-top: 10px;
}

/* MCP tools: a plain ruled list. */
.tools {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  vertical-align: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
tr:first-child th,
tr:first-child td {
  border-top: 1px solid var(--rule);
}
th {
  width: 9.5em;
  padding-right: 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
td {
  font-size: 17px;
}
.get p {
  margin-bottom: 14px;
}
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links li {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.links li:last-child {
  border-bottom: 1px solid var(--rule);
}
.get .big {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Questions: closed by default, so the page stays short. */
.faq {
  max-width: 46em;
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq details:first-child {
  border-top: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  padding: 0 0 16px;
  max-width: 40em;
}

footer {
  border-top: 1px solid var(--ink);
  padding: 14px 0 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ---------- Narrow screens: one column, rules between ---------- */

@media (max-width: 900px) {
  :root {
    --gutter: 20px;
  }
  .hero,
  .tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .hero {
    grid-template-rows: none;
    row-gap: 28px;
    padding: 32px 0 48px;
  }
  .hero .pitch,
  .hero .install,
  .hero .shot {
    grid-column: 1;
    grid-row: auto;
  }
  .hero .shot {
    order: 2;
  }
  .hero .install {
    order: 3;
    margin-top: 0;
  }
  .hero .shot {
    max-width: none;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .columns article,
  .columns article:first-child,
  .columns article:last-child {
    padding: 20px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .columns article:first-child {
    padding-top: 0;
    border-top: 0;
  }
  .columns article:last-child {
    padding-bottom: 0;
  }
  section {
    padding-bottom: 48px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }
  .lede {
    font-size: 18px;
  }
  .top nav {
    gap: 14px;
  }
  .top .cta .wide {
    display: none;
  }
  .replay-panel {
    aspect-ratio: 4 / 5;
  }
  .replay-tabs {
    gap: 0 12px;
  }
  .ask,
  .replay-panel .does {
    font-size: 17px;
  }
  .top .cta {
    padding: 9px 12px;
  }
  .faq summary {
    font-size: 18px;
  }
  h1 {
    margin: 12px 0 14px;
  }
  .tabs label .wide {
    display: none;
  }
  .panel {
    flex-direction: column;
  }
  .panel .copy {
    border-left: 0;
    border-top: 1px solid var(--ink);
    padding: 12px 16px;
  }
  th {
    width: 8em;
  }
}
