/* The one stylesheet of every page. Fonts are served from this site: nothing loads from
   another origin. */

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/dm-mono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-sans.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --background: #12161d;
  --surface: #171c25;
  --raised: #1f2530;
  --deep: #0c0f14;
  --border: #262d39;
  --border-strong: #36404f;
  --rule: #1d232d;
  --text: #e7ebf1;
  --muted: #aab3c2;
  --faint: #6d7788;
  --accent: #f2b544;
  --accent-hover: #ffd27f;
  --warning-surface: #2a2113;
  --warning-text: #ffe3ad;
  --warning-soft: #e9cf9a;
  --warning-border: #3a2e17;
  --danger: #ff8f7a;
  --live: #5ccf8a;
  --string: #9fd0ff;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  /* The widest the content grows: past it, the page keeps space on both sides. */
  --page-max: 1120px;
  /* The side padding that holds the content to --page-max, and never under the gutter. */
  --page-inline: max(var(--gutter), calc((100% - var(--page-max)) / 2));
  --radius: 12px;
  --radius-small: 8px;
  /* The space between the sticky header and the first block of every page. */
  --below-header: 28px;
}

@media (max-width: 640px) {
  :root {
    --below-header: 20px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* The scrollbar's room is kept whether or not the page scrolls, so a page never moves
     sideways: not from one page to another, nor when a store or an example grows. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code,
pre,
kbd,
.mono {
  font-family: var(--mono);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header and footer, the same on every page. The header stays at the top as the page
   scrolls. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px 20px;
  padding: 14px var(--page-inline);
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}

/* The brand and the product, each an icon and a name with part of it in the brand's gold.
   On a page of a tool they make a breadcrumb: the brand leads to its root, the tool to
   its own page. */
.brand-home,
.product-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-home:hover,
.product-name:hover {
  color: var(--accent-hover);
}

.brand-mark,
.product-icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-accent,
.product-accent {
  color: var(--accent);
  background: linear-gradient(135deg, #ffd638, #fca51a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-separator {
  color: var(--accent);
  font-weight: 700;
}

/* Narrow, a tool's page keeps the brand's icon alone, so the header never breaks a name. */
@media (max-width: 640px) {
  .breadcrumb .brand-name {
    display: none;
  }
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: -3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-small);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text);
  background: var(--raised);
}

.nav-item[aria-current='page'] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* The icon of an entry takes the brand's gold under the pointer and on its own page.
   «Create a store», gold already, keeps its dark icon. */
.nav-item:not(.nav-create):hover .icon,
.nav-item[aria-current='page']:not(.nav-create) .icon {
  color: var(--accent);
}

.nav-create {
  margin-left: 6px;
  background: var(--accent);
  color: var(--background);
  font-weight: 600;
}

.nav-create:hover,
.nav-create[aria-current='page'] {
  background: var(--accent-hover);
  color: var(--background);
  box-shadow: none;
}

/* The entries give up their labels, not their line: the brand and the tool's names, with
   four labelled entries beside them, need about 920px. */
@media (max-width: 980px) {
  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-item {
    padding: 0 10px;
  }

  .nav-create {
    margin-left: 2px;
  }

  .site-nav {
    gap: 2px;
  }
}

@media (max-width: 760px) {
  .brand-home,
  .product-name {
    font-size: 18px;
  }
}

@media (max-width: 440px) {
  .site-header {
    gap: 6px;
  }

  .brand {
    gap: 6px;
  }

  .brand-home,
  .product-name {
    font-size: 16px;
  }

  .nav-item {
    min-height: 36px;
    padding: 0 8px;
  }
}

@media (max-width: 440px) {
  .brand-mark,
  .product-icon {
    width: 24px;
    height: 24px;
  }

  .brand-home,
  .product-name {
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .brand {
    gap: 4px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-icon {
    display: none;
  }
}

main {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: var(--below-header) var(--page-inline) 72px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 28px var(--page-inline);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--faint);
}

.site-footer .publisher {
  flex-grow: 1;
}

/* Narrow, who publishes it on a line of its own, and the pages on the line below. */
@media (max-width: 640px) {
  .site-footer {
    gap: 12px 20px;
  }

  .site-footer .publisher {
    flex-basis: 100%;
  }
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* Blocks shared by the pages. */

.intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--muted);
  max-width: 720px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
}

.section h3 {
  font-size: 18px;
  font-weight: 600;
}

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

.faint {
  color: var(--faint);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.grid-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h2,
.card h3 {
  font-size: 20px;
  font-weight: 600;
}

.card p {
  color: var(--muted);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.step strong {
  font-weight: 600;
}

.step span {
  color: var(--muted);
  font-size: 15px;
}

.outline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
}

.outline strong {
  font-weight: 600;
  font-size: 17px;
}

.outline p,
.outline li {
  color: var(--muted);
}

.outline ul {
  margin: 0;
  padding-left: 20px;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Buttons and fields. */

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-small);
  border: 1px solid var(--border-strong);
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  color: var(--text);
  border-color: var(--faint);
}

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

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

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button.small,
button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-small);
  border: 1px solid var(--border-strong);
  background: var(--deep);
  color: var(--text);
  font: inherit;
}

/* A value with a Copy button beside it. */

.copyable {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.copyable code {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius-small);
  background: var(--deep);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: clamp(14px, 2.4vw, 18px);
  overflow-wrap: anywhere;
  user-select: all;
}

.copy-offscreen {
  position: fixed;
  top: -100px;
  left: 0;
  opacity: 0;
}

/* Code samples. */

pre.code {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius-small);
  background: var(--deep);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
}

.code-note {
  color: var(--faint);
  font-size: 14px;
}

/* Use cases. */

.example {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  background: var(--deep);
  font-family: var(--mono);
  font-size: 13px;
  list-style: none;
}

.example li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.example .key {
  color: var(--faint);
}

.example .by {
  color: var(--faint);
  font-style: italic;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--muted);
}

.chip[data-id='read-write'] {
  background: var(--warning-surface);
  color: var(--accent);
}

/* Legal pages. */

.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.prose h2 {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 600;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* A store's page: one screen that reads and, with the write id, writes. */

.store-screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.store-top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.store-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.store-title h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
}

/* The store's ids, whole, each beside the icons that copy it. */
.store-ids {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.store-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.store-id dt {
  flex-shrink: 0;
  width: 64px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.store-id dd {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.store-id code {
  min-width: 0;
  margin-right: 4px;
  font-size: 15px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* A button that is only an icon: its name shows on hover and is what a screen reader
   reads. Once it has copied, a check, for a moment. */
button.icon-button {
  flex-shrink: 0;
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  border-color: var(--border);
  border-radius: 7px;
  color: var(--muted);
}

button.icon-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-button .icon {
  width: 16px;
  height: 16px;
}

.icon-button .icon-done,
.icon-button.done .icon-idle {
  display: none;
}

.icon-button.done .icon-done {
  display: block;
}

button.icon-button.done {
  color: var(--live);
  border-color: rgb(92 207 138 / 50%);
}

button.icon-button.failed {
  color: var(--danger);
  border-color: rgb(255 143 122 / 50%);
}

@media (max-width: 640px) {
  .store-id {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .store-id code {
    font-size: 12px;
  }
}

.pill {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill.write {
  color: var(--accent);
  border-color: rgb(242 181 68 / 45%);
  background: rgb(242 181 68 / 12%);
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}

.beacon.live {
  background: var(--live);
}

.beacon.stale {
  background: var(--danger);
}

.status.stale {
  color: var(--danger);
}

.message {
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 17px;
}

.write-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgb(242 181 68 / 35%);
  border-radius: 10px;
  background: rgb(242 181 68 / 8%);
}

.write-bar input {
  min-width: 0;
  font-family: var(--mono);
  font-size: 14px;
}

.readonly-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}

.unlock-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
}

.unlock-form input {
  flex: 1 1 240px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 14px;
}

.keys-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}

.keys-table table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.keys-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.keys-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.keys-table tr:last-child td {
  border-bottom: 0;
}

.keys-table td.k {
  min-width: 10ch;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: break-word;
}

.keys-table td.v {
  color: var(--string);
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.keys-table td.t {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.keys-table tr.row {
  cursor: pointer;
}

.keys-table tr.row:hover td,
.keys-table tr.row:focus-visible td {
  background: var(--surface);
}

.keys-table tr.row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.keys-table tr.flash td {
  animation: written 1.2s ease-out;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 20px;
  text-align: center;
}

.empty-state .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  color: var(--accent);
}

.empty-state strong {
  font-size: 17px;
  font-weight: 600;
}

.empty-state p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 14px;
}

.open-screen {
  max-width: 640px;
}

.open-screen h1 {
  font-size: 26px;
  font-weight: 700;
}

/* In the page's column the form keeps its own height: the grow that sets it beside
   «Create» on the home page would stretch it down here, and push its help away. */
.open-screen .open-row {
  flex: none;
}

.open-screen .open-help {
  margin-top: -12px;
  color: var(--muted);
  font-size: 14px;
}

.hint {
  color: var(--faint);
  font-size: 13px;
}

@media (max-width: 640px) {
  .write-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .write-bar input {
    grid-column: 1 / -1;
  }

  .write-bar #write-submit {
    grid-column: 1;
  }

  .expires-column {
    display: none;
  }
}

/* Icons beside titles and labels. */

.section h2,
.panel h2,
.step strong,
.steps h3,
.button,
button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section h2 .icon,
.panel h2 .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.step strong .icon,
.steps h3 .icon {
  color: var(--accent);
}

/* The home page: the hero beside an example store that writes itself. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.example-store {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--deep);
  font-family: var(--mono);
  font-size: 14px;
  overflow: hidden;
}

.example-store figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.example-store .beacon.live {
  animation: pulse 2s ease-in-out infinite;
}

.example-head,
.example-keys li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  gap: 12px;
  padding: 10px 16px;
}

.example-head {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.example-keys {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  min-height: 220px;
}

.example-keys li {
  border-top: 1px solid var(--rule);
  transition:
    opacity 0.8s ease,
    background-color 0.8s ease;
}

.example-key {
  overflow-wrap: anywhere;
}

.example-value {
  color: var(--string);
  overflow-wrap: anywhere;
}

.example-when {
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
}

.example-keys li.fresh {
  animation: written 1.2s ease-out;
}

.example-keys li.expiring {
  opacity: 0.25;
}

.example-keys li.expiring .example-when {
  color: var(--danger);
}

.example-note {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 13px;
}

@keyframes written {
  from {
    background-color: rgb(242 181 68 / 22%);
  }

  to {
    background-color: transparent;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* How it works: three steps in order, joined by a rail. Each has a verb, a title and
   the store as it looks at that moment. */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 24px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.steps p {
  color: var(--muted);
  font-size: 15px;
}

.step-rail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-number {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--background);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.step-line {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(242, 181, 68, 0.15));
}

.steps li:last-child .step-line {
  visibility: hidden;
}

.step-verb {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.steps h3 {
  font-size: 18px;
}

.steps .step-example {
  /* At the foot of its step, so the three examples line up whatever the text above. */
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--deep);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.steps .step-example b {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 4px 20px;
  }

  /* Stacked in their card, the steps are set apart by a rule instead of the rail. */
  .steps li {
    padding: 18px 0;
  }

  .steps li + li {
    border-top: 1px solid var(--border);
  }

  .step-line {
    display: none;
  }
}

/* Use it from your chat: the catalog, or the address, never mixed; then what to ask. */

.connect-paths {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
}

.connect-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* The button keeps its own width, at the foot of the card, whatever the card's height. */
.connect-card.featured [data-chatgpt-app] {
  align-self: flex-start;
  margin-top: auto;
}

.connect-card.featured {
  border-color: rgba(242, 181, 68, 0.45);
  background: linear-gradient(
    180deg,
    rgba(242, 181, 68, 0.12),
    var(--surface) 60%
  );
}

.connect-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.connect-card h3 .icon {
  color: var(--accent);
}

.connect-card p {
  color: var(--muted);
  font-size: 15px;
}

.connect-card b {
  color: var(--text);
  font-weight: 600;
}

.connect-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.connect-tabs button {
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: 500 14px var(--sans);
  white-space: nowrap;
  cursor: pointer;
}

.connect-tabs button[aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.connect-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.connect-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.connect-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.small-text {
  font-size: 13px;
}

.asks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.asks li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.asks q {
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}

.asks span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 760px) {
  .connect-paths {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Creating a store: the button, and what it says when it could not. */

button.nav-item {
  border: 0;
  font: inherit;
  font-size: 15px;
}

button.nav-create {
  font-weight: 600;
}

.create-store-error {
  color: var(--danger);
  font-size: 14px;
}

.nav-create-error {
  position: absolute;
  top: calc(100% + 6px);
  right: var(--gutter);
  max-width: min(380px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-small);
  background: var(--surface);
}

/* The hero's own ways in: create, or open one you have. */

.intro h1 em {
  font-style: normal;
  color: var(--accent);
}

.start-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 14px;
}

.start-create {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.or {
  align-self: center;
  color: var(--faint);
  font-size: 13px;
}

.open-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  flex: 1 1 320px;
  gap: 8px;
  min-width: 0;
}

.open-row input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 14px;
}

@media (max-width: 640px) {
  .start-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Between the two ways in, centred on a rule. */
  .or {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 12px;
  }

  .or::before,
  .or::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
  }

  /* One line: a row that may wrap is given the height of two in a column, and leaves
     that room empty under it. */
  .open-row {
    flex: none;
    flex-wrap: nowrap;
  }
}

/* The connector's tools, as signatures. */

.signatures {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--deep);
}

.signatures > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-top: 1px solid var(--rule);
}

.signatures > div:first-child {
  border-top: 0;
}

.signatures dt code {
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.signatures .fn {
  color: var(--accent);
}

.signatures .returns {
  color: var(--faint);
}

.signatures dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* The one calm line about what a store is not for. */

.calm-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.calm-note .icon {
  margin-top: 3px;
  color: var(--accent);
}

/* The way to the API reference. */

.cta-card {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  padding: 16px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.cta-card:hover {
  color: var(--text);
  border-color: var(--accent);
}

.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-small);
  background: rgb(242 181 68 / 12%);
  color: var(--accent);
}

.cta-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.cta-text strong {
  font-weight: 600;
}

.cta-text span {
  color: var(--muted);
  font-size: 14px;
}

.cta-card > .icon {
  color: var(--faint);
}

/* Small links with an icon, side by side. */

.link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.chip-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

.chip-link .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* What the store page has of the view in the chat: its dates, a summary, the filter and
   the order, the pages of keys and the changes seen. */

.store-dates {
  color: var(--faint);
  font-size: 13px;
}

.store-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  align-items: start;
}

.store-keys {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.summary {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.controls input {
  flex: 1 1 200px;
  min-width: 0;
}

.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.changes-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.changes-panel h2 {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.changes {
  display: flex;
  flex-direction: column;
  max-height: 480px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.changes li {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.changes .at {
  margin-right: 8px;
  color: var(--faint);
}

@media (max-width: 860px) {
  .store-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.button.small .icon {
  width: 16px;
  height: 16px;
}

/* The sort: the theme's own control, with its chevron where the text cannot reach. */

select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  padding-right: 36px;
  background-color: var(--deep);
  background-image: url('chevron.svg');
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px 16px;
  cursor: pointer;
}

select option {
  background: var(--surface);
  color: var(--text);
}

/* A write that failed, said in one line under the bar until dismissed. */

.error-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-small);
  background: rgb(255 143 122 / 8%);
  color: var(--danger);
  font-size: 14px;
}

.error-line > span {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.icon-button {
  flex-shrink: 0;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.error-line .icon-button {
  color: var(--danger);
}

/* The skill: a document to read, rendered by the server. */

.skill-doc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 70ch;
  line-height: 1.65;
}

.skill-doc h1 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.skill-doc h2 {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 600;
}

.skill-doc p,
.skill-doc li {
  color: var(--muted);
}

.skill-doc ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.skill-doc code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font-size: 0.9em;
}

/* Cards side by side, and a link inside a step's title. */

.cta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.cta-row .cta-card {
  max-width: none;
}

.step-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

/* Use cases: one tab each, with an example store played step by step. */

.use-cases {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.uc-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.uc-tabs [role='tab'] {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-small) var(--radius-small) 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.uc-tabs [role='tab']:hover {
  color: var(--text);
  border-color: transparent;
}

.uc-tabs [role='tab'][aria-selected='true'] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.uc-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.uc-panel h2 {
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 600;
}

.uc-player {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.uc-actors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.uc-actors li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.uc-actors li.acting {
  border-color: var(--accent);
  background: rgb(242 181 68 / 10%);
}

.uc-actors li.has-turn:not(.acting) {
  border-style: dashed;
  border-color: var(--accent);
}

.uc-name {
  font-weight: 600;
}

.uc-doing {
  min-height: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.uc-store {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--deep);
  font-family: var(--mono);
  font-size: 13px;
  overflow: hidden;
}

.uc-store-head,
.uc-keys li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  gap: 12px;
  padding: 10px 14px;
}

.uc-store-head {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.uc-keys li {
  border-top: 1px solid var(--rule);
}

.uc-keys li.flash {
  animation: written 1.2s ease-out;
}

.uc-key {
  overflow-wrap: anywhere;
}

.uc-value {
  color: var(--string);
  overflow-wrap: anywhere;
}

.uc-when {
  color: var(--faint);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.uc-empty {
  padding: 14px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-family: var(--sans);
}

.uc-caption {
  min-height: 24px;
  color: var(--text);
}

.uc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.uc-controls .icon-button {
  border-color: var(--border-strong);
}

.uc-count {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 720px) {
  .uc-player {
    grid-template-columns: minmax(0, 1fr);
  }

  .uc-actors {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .uc-actors li {
    flex: 1 1 140px;
  }

  .uc-store-head .uc-expires,
  .uc-keys .uc-expires {
    display: none;
  }

  .uc-store-head,
  .uc-keys li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  }
}

/* The Only4AI portal: the brand's own page, which lists its tools. Same tokens, header
   and width as the rest of the site. */

/* The portal's header leads to each tool, named as its own pages name it, and to
   support. Narrow, a tool keeps its icon alone, its name read from the link. */
.nav-tool {
  color: var(--text);
  font-weight: 600;
}

.nav-tool:hover {
  color: var(--accent-hover);
}

.nav-tool-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .nav-tool-name {
    display: none;
  }
}

.portal-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.portal-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.portal-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.portal-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.portal-tool {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.portal-tool.live {
  border-color: rgba(242, 181, 68, 0.45);
  background: linear-gradient(
    180deg,
    rgba(242, 181, 68, 0.1),
    var(--surface) 55%
  );
}

.portal-tool.live:hover,
.portal-tool.live:focus-visible {
  border-color: var(--accent);
}

.portal-tool-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-tool-head strong {
  display: block;
  font-size: 20px;
}

.portal-tool-head small {
  display: block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.portal-tool-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.portal-tool-text {
  color: var(--muted);
  font-size: 15px;
}

.portal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--deep);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.portal-tool-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.portal-example {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.portal-example b {
  color: var(--text);
  font-weight: 500;
}

.portal-open {
  color: var(--accent);
  font-weight: 600;
}

.portal-tool.soon {
  border-style: dashed;
  background: transparent;
}

.portal-tool.soon strong {
  color: var(--muted);
  font-size: 20px;
}

.portal-soon {
  align-self: flex-start;
  padding: 3px 9px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portal-principle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.portal-principle h3 {
  font-size: 17px;
}

.portal-principle p {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 760px) {
  .portal-principles {
    grid-template-columns: minmax(0, 1fr);
  }
}
