/* Fonts */

@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Tokens: the panel's own */

:root {
  --bg: #0B0C0E;
  --surface: #15171B;
  --track: #1C1F24;
  --line: #262A30;
  --border: #3A3F47;
  --mark: #4A4F57;
  --dim: #7B818A;
  --muted: #A3A8B0;
  --fg: #F4F5F7;
  --accent: #FFB020;
  --accent-pressed: #FFD27A;

  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --label: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --page: 1840px;
  --wide: 1840px;
  color-scheme: dark;
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

p {
  margin: 0;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

strong {
  color: var(--fg);
  font-weight: 500;
}

code,
pre,
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-variant-ligatures: none;
}

code {
  font-size: 0.86em;
  color: var(--fg);
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
  font-size: 14.5px;
  line-height: 1.6;
  overflow-x: auto;
}

pre code {
  font-size: inherit;
  overflow-wrap: normal;
}

.label {
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wide {
  width: 100%;
  max-width: calc(var(--wide) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}

.skip:focus {
  top: 12px;
}

/* Buttons: the primary one is the panel's Approve */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--label);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.button:hover {
  border-color: var(--fg);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.button.primary:hover,
.button.primary:active {
  background: var(--accent-pressed);
  border-color: var(--accent-pressed);
}

.button.primary:focus-visible {
  outline-color: var(--fg);
}

.button.small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

/* Top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: stretch;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 24px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 17px;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.top nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}

.top nav a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.top nav a:hover {
  color: var(--fg);
  background: var(--surface);
}

.top nav a:focus-visible {
  outline-offset: -3px;
}

.top .button {
  align-self: center;
  margin-left: 18px;
}

/* Hero */

.hero {
  padding: clamp(48px, 8vw, 104px) 0 0;
}

.hero-text {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(40px, 6.2vw, 84px);
}

.hero .lede {
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--muted);
}

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

.hero-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--dim);
}

.hero-note a {
  color: var(--muted);
}

/* The panel strip: every picture of the panel sits in one */

.strip {
  margin: 0;
}

.strip-frame {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(5px, 0.7vw, 12px);
}

.strip-frame img {
  width: 100%;
  border-radius: 6px;
}

.strip figcaption {
  margin-top: 12px;
  font-size: 15px;
  color: var(--dim);
}

.strip .swipe {
  display: none;
}

.hero .strip {
  margin-top: clamp(40px, 6vw, 80px);
}

/* The rail under the hero, after the panel's own bar */

.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rail li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border-left: 1px solid var(--line);
}

.rail li:first-child {
  border-left: 0;
  padding-left: 0;
}

.rail .figure {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* Sections */

.section {
  padding: clamp(64px, 9vw, 128px) 0 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 80px);
  align-items: end;
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.2vw, 56px);
}

/* Features: words, then the panel at full width */

.feature {
  padding-top: clamp(40px, 6vw, 80px);
}

.feature-text {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(16px, 5vw, 80px);
  align-items: start;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.feature h3 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 38px);
}

.feature-text p + p {
  margin-top: 14px;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}

@media (min-width: 1800px) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Columns divided by rules, as on a calm panel */

.columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.columns > div {
  padding: 32px 28px 36px;
  border-left: 1px solid var(--line);
}

.columns > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.columns h3 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.columns p {
  font-size: 16.5px;
}

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

/* Requirements */

.needs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.needs li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 12px 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.needs .what {
  color: var(--fg);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.aside {
  margin-top: 24px;
  max-width: 68ch;
}

/* Steps */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(24px, 4vw, 64px);
  padding: clamp(32px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}

.steps > li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  color: var(--fg);
}

.steps h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin-bottom: 14px;
}

.steps p + p,
.steps p + pre,
.steps pre + p,
.steps ol + p,
.steps p + ol {
  margin-top: 14px;
}

.steps ol {
  margin: 0;
  padding-left: 1.2em;
}

.steps ol li + li {
  margin-top: 6px;
}

.note {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 16.5px;
}

.setup-shot {
  margin: 0;
  max-width: 520px;
}

.setup-shot img {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.setup-shot figcaption {
  margin-top: 10px;
  font-size: 15px;
  color: var(--dim);
}

/* Agents table */

.agents {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.agents th,
.agents td {
  padding: 22px 28px 24px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 16.5px;
}

.agents thead th {
  padding-top: 0;
  padding-bottom: 12px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.agents tbody th {
  width: 22%;
  color: var(--fg);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.agents td:last-child {
  padding-right: 0;
}

.tag {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--dim);
  white-space: normal;
}

/* Widget list */

.widgets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.widgets div {
  padding: 18px 20px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.widgets dt {
  color: var(--fg);
  font-weight: 500;
  font-size: 19px;
}

.widgets a {
  text-decoration-color: var(--border);
}

.widgets dd {
  margin: 4px 0 0;
  font-size: 15.5px;
  line-height: 1.45;
}

.own {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.own p + p,
.own p + pre,
.own pre + p {
  margin-top: 14px;
}

/* Docs */

.docs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.docs li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.docs a {
  display: block;
  height: 100%;
  padding: 24px 24px 28px;
  color: var(--muted);
  text-decoration: none;
}

.docs a:hover {
  background: var(--surface);
}

.docs a:focus-visible {
  outline-offset: -3px;
}

.docs .title {
  display: block;
  color: var(--fg);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

.docs .path {
  display: block;
  margin: 6px 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  overflow-wrap: anywhere;
}

.docs .about {
  display: block;
  font-size: 15.5px;
  line-height: 1.45;
}

/* Closing call and footer */

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(64px, 9vw, 128px);
  padding: clamp(28px, 4vw, 48px);
  border: 2px solid var(--accent);
  border-radius: 8px;
}

.closing h2 {
  font-size: clamp(28px, 3.4vw, 44px);
}

.closing p {
  margin-top: 8px;
}

.closing .hero-actions {
  margin-top: 0;
}

footer {
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
  padding: 36px 0 56px;
  font-size: 15px;
  color: var(--dim);
}

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px clamp(24px, 5vw, 80px);
}

.foot p + p {
  margin-top: 10px;
}

.foot a {
  color: var(--muted);
}

/* Wide desktops */

.hero-text > div:last-child,
.section-head > p,
.feature-text > :last-child {
  max-width: 64ch;
}

@media (min-width: 1900px) {
  body {
    font-size: 20px;
  }

  .label {
    font-size: 15px;
  }

  .columns p,
  .agents th,
  .agents td,
  .widgets dd,
  .docs .about {
    font-size: 18px;
  }

  pre {
    font-size: 16px;
  }
}

/* Narrower screens */

@media (max-width: 1100px) {
  .top nav a.optional {
    display: none;
  }

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

  .columns > div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .columns > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .columns.three > div:nth-child(odd) {
    border-left: 1px solid var(--line);
    padding-left: 28px;
  }

  .columns.three > div:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .columns.three > div:nth-child(n + 3) {
    border-top: 0;
  }

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

  .steps > li {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .steps > li > :nth-child(2) {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 17px;
  }

  .top nav {
    display: none;
  }

  .top .button {
    margin-left: auto;
  }

  .hero-text,
  .section-head,
  .feature-text,
  .own,
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .rail li {
    padding: 16px 16px;
  }

  .rail li:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .rail li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .columns > div,
  .columns.three > div,
  .columns.three > div:nth-child(odd) {
    border-left: 0;
    padding: 24px 0 26px;
  }

  .columns > div + div,
  .columns.three > div + div,
  .columns.three > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .needs li {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps > li > :nth-child(2) {
    grid-column: auto;
  }

  .steps > li::before {
    font-size: 34px;
  }

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

  /* The agents table becomes a list of blocks */

  .agents thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .agents,
  .agents tbody,
  .agents tr,
  .agents th,
  .agents td {
    display: block;
    width: auto;
  }

  .agents tr {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
  }

  .agents th,
  .agents td {
    padding: 0;
    border: 0;
  }

  .agents tbody th {
    width: auto;
    white-space: normal;
  }

  .agents td {
    margin-top: 10px;
  }

  .agents td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--label);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
  }

  /* A 32:9 picture is unreadable at phone width, so it keeps a readable
     height and scrolls sideways */

  .strip-frame {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-radius: 10px;
    padding: 5px;
  }

  .strip-frame img {
    width: auto;
    max-width: none;
    height: 236px;
  }

  .strip-frame.from-end {
    direction: rtl;
  }

  .strip .swipe {
    display: inline;
  }
}

@media (max-width: 520px) {
  .widgets,
  .docs {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand {
    padding-right: 12px;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  pre {
    font-size: 13px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
