/* www.helen.sh. Helen's own look (DESIGN.md): black type on a white page,
 * square corners, flat surfaces, 1px rules, no accent colour. */
:root {
  --surface: #ffffff;
  --ink: #000000;
  --quiet: #6b6b6b;
  --line: #e3e3e3;
  --wash: #f4f4f4;
  --signal: #d0021b;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", serif;
  --text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --margin: clamp(16px, 4vw, 48px);
  --measure: 62ch;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

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

/* The masthead: the one fixed thing. It runs nearly the width of the page. */
.masthead {
  padding: 0 var(--margin);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(96px, 39vw, 680px);
  line-height: 0.8;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
  padding: 0.1em 0 0.12em;
}

main {
  padding: 0 var(--margin);
}

section {
  padding: clamp(48px, 9vw, 120px) 0;
}

section + section {
  border-top: 1px solid var(--ink);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 17ch;
}

.lede p {
  margin-top: clamp(24px, 3vw, 40px);
  max-width: var(--measure);
  font-size: clamp(17px, 1.5vw, 21px);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.note {
  margin-top: 12px;
  max-width: var(--measure);
  color: var(--quiet);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

/* The picker. */
.picker {
  margin-top: 32px;
  max-width: 980px;
}

.agents {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  border-bottom: 1px solid var(--ink);
}

.agents button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 10px 0;
  font: inherit;
  color: var(--quiet);
  cursor: pointer;
}

.agents button:hover {
  color: var(--ink);
}

.agents button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

.panel {
  padding-top: 24px;
}

.panel p {
  max-width: var(--measure);
}

.picker + .note {
  margin-top: 40px;
}

.command {
  display: flex;
  align-items: stretch;
  margin: 12px 0;
  border: 1px solid var(--ink);
}

.command code {
  flex: 1;
  min-width: 0;
  padding: 16px;
  background: var(--wash);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: nowrap;
}

.copy {
  appearance: none;
  flex: none;
  min-width: 88px;
  padding: 0 20px;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-left: 1px solid var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.copy:hover {
  background: var(--wash);
}

/* The form. */
form {
  margin-top: 32px;
  max-width: 560px;
}

.field {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
}

textarea {
  resize: vertical;
}

input::placeholder {
  color: var(--quiet);
}

.hint {
  margin-top: 6px;
  font-size: 14px;
  color: var(--quiet);
}

/* Not for people: a field only a script fills in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.primary {
  appearance: none;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.primary[disabled] {
  background: var(--quiet);
  border-color: var(--quiet);
  cursor: default;
}

.status {
  margin-top: 16px;
  min-height: 1.55em;
}

.status[data-kind="error"] {
  color: var(--signal);
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 32px var(--margin) 48px;
  border-top: 1px solid var(--ink);
  font-size: 14px;
  color: var(--quiet);
}

footer p:first-child {
  margin-right: auto;
}

@media (max-width: 560px) {
  .command {
    flex-direction: column;
  }
  .copy {
    border-left: 0;
    border-top: 1px solid var(--ink);
    padding: 12px;
  }
}
