:root {
  --paper: #f6f2ea;
  --paper-deep: #eee8db;
  --ink: #1b1813;
  --muted: #625b50;
  --rule: #d7cebc;
  --blue: #1a41a8;
  --blue-dark: #143283;
  --success: #176b43;
  --warning: #8a5a00;
  --danger: #9c2f27;
  --serif: Charter, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  border-top: 5px solid var(--blue);
  background: var(--paper) url("../media/site/grain.png") repeat;
  background-size: 128px 128px;
  background-blend-mode: multiply;
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}

a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }

header.masthead {
  border-bottom: 1px solid var(--ink);
  padding: 18px 0;
}

.masthead .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand img { width: auto; height: 34px; }
nav.top { display: flex; gap: 24px; font: 16px/1.4 var(--serif); flex-wrap: wrap; }
nav.top a { color: var(--ink); text-decoration: none; }
nav.top a.active, nav.top a:hover { color: var(--blue); }

main { padding: 52px 0 80px; }
.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 56px;
  align-items: center;
  margin-bottom: 40px;
}
.app-copy { min-width: 0; }
.app-shot { margin: 0; }
.app-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font: 600 12px/1.2 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 700 clamp(36px, 5vw, 48px)/1.06 var(--serif);
  letter-spacing: -.02em;
}

.summary { max-width: 35em; margin: 18px 0 0; color: var(--muted); font-size: 19px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; color: var(--muted); font-size: 14px; }

.panel {
  width: min(720px, 100%);
  border: 1px solid var(--rule);
  background: #fff;
  padding: clamp(22px, 5vw, 34px);
  box-shadow: 0 8px 28px rgb(27 24 19 / .07);
}

.panel + .panel { margin-top: 22px; }
.prerequisites { background: var(--paper-deep); }
.prerequisites ol { margin: 20px 0 0; padding-left: 22px; color: var(--muted); }
.prerequisites li + li { margin-top: 12px; }
.setup-command {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 14px/1.5 var(--mono);
}
.setup { background: var(--paper-deep); }
.setup ol { margin: 20px 0 24px; padding-left: 22px; color: var(--muted); }
.setup li + li { margin-top: 8px; }
.panel h2 { margin: 0 0 8px; font: 700 26px/1.2 var(--serif); }
.panel p { margin: 0 0 22px; color: var(--muted); }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
#pair-form { width: min(100%, 460px); margin-inline: auto; }
#pair-form button { width: 100%; }
label { font-weight: 650; font-size: 14px; }
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #918878;
  border-radius: 4px;
  padding: 10px 13px;
  background: #fff;
  color: var(--ink);
  font: 600 20px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
#pair-code { text-align: center; font-size: 30px; letter-spacing: .2em; }
input.secret { font-size: 16px; letter-spacing: .03em; text-transform: none; }

button {
  min-height: 48px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  padding: 11px 18px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: 650 16px/1.2 var(--sans);
}

button:hover { background: var(--blue-dark); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #e0a500; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .62; }
button.secondary { border-color: #918878; background: transparent; color: var(--ink); }
button.secondary:hover { border-color: var(--ink); background: var(--paper-deep); }
.button-link {
  display: inline-block;
  min-height: 48px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  padding: 11px 18px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.button-link:hover { background: var(--blue-dark); text-decoration: none; }
.button-link.secondary { border-color: #918878; background: transparent; color: var(--ink); }
.button-link.secondary:hover { border-color: var(--ink); background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status {
  min-height: 1.55em;
  margin: 20px 0 0 !important;
  color: var(--ink) !important;
  font-weight: 600;
}
.status[data-tone="success"] { color: var(--success) !important; }
.status[data-tone="warning"] { color: var(--warning) !important; }
.status[data-tone="error"] { color: var(--danger) !important; }
.privacy { margin-top: 22px !important; font-size: 13px; }
.community {
  width: min(720px, 100%);
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}
.community strong { color: var(--ink); }
[hidden] { display: none !important; }

footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 540px) {
  .wrap { width: min(calc(100% - 36px), 1080px); }
  main { padding-top: 34px; }
  .masthead .wrap { align-items: center; }
  nav.top {
    width: 100%;
    gap: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    font-size: 15px;
  }
  nav.top a { white-space: nowrap; }
  .app-hero { grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
  .app-shot { width: min(240px, 72vw); }
  .panel { box-shadow: none; }
  .actions button { width: 100%; }
}

@media (min-width: 541px) and (max-width: 760px) {
  .app-hero { grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color 150ms ease, opacity 150ms ease; }
}

/* Every application page is a place somebody can arrive without having Cobalt
   at all. The pairing panel below assumes they already do, so this offers the
   step before it, and is deliberately the brightest thing on the page after
   the screenshot. */
.get-cobalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
  border-color: var(--blue);
  border-left-width: 4px;
  background: linear-gradient(180deg, #fff, var(--paper-deep));
}
.get-cobalt h2 { margin: 6px 0 0; font-size: clamp(21px, 3vw, 26px); letter-spacing: -.01em; }
.get-cobalt p { margin: 9px 0 0; color: var(--muted); max-width: 34em; }
.get-cobalt .eyebrow { color: var(--blue); }
.get-cobalt-go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  border: 1px solid var(--blue);
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.get-cobalt-go:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; transform: translateX(2px); }
.get-cobalt-go span { font-size: 19px; line-height: 1; }
@media (max-width: 620px) {
  .get-cobalt { flex-direction: column; align-items: flex-start; }
  .get-cobalt-go { width: 100%; justify-content: center; }
}
