:root {
  --ink: #0e1116;
  --muted: #55606e;
  --page: #f3f5f7;
  --card: #ffffff;
  --border: #d9dee4;
  --control: #8892a0;
  --highlight: #ffe45c;
  --err-bg: #fdeeec;
  --err-border: #e7b1aa;
  --err: #b42318;
  --hover-dark: #2a313c;
  --hover-light: #e6eaee;
  --placeholder: #677283;
  --on-dark-sub: #c9d0d9;
  --link-hover: #3a4350;
  --font-sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}

[hidden] { display: none !important; }

body { margin: 0; background: var(--page); }
a { color: var(--ink); }
a:hover { color: var(--link-hover); }

.rv {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.rv :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.rv h1:focus { outline: none; }

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

/* Header */
.site-header {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.logo svg { display: block; flex: none; }

/* Layout */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px) 0 clamp(40px, 6vw, 72px);
}
.screen {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 var(--gutter);
}
.narrow {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.head { display: flex; flex-direction: column; gap: 12px; }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
.lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}
.note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.actions { display: flex; flex-direction: column; gap: 12px; }

/* Create screen */
.wrap { container-type: inline-size; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 640px;
  margin: 0 auto;
}
.intro { display: flex; flex-direction: column; gap: 16px; }
.intro h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.lead-big {
  max-width: 46ch;
  font-size: clamp(17px, 1.5vw, 19px);
}
.card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.field label, .expiry legend { font-size: 14px; font-weight: 600; }
.counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.counter.over { color: var(--err); font-weight: 600; }
.input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--control);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
}
.input::placeholder { color: var(--placeholder); }
.expiry { margin: 0; padding: 0; border: 0; min-width: 0; }
.expiry legend { padding: 0; margin-bottom: 8px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.seg {
  flex: 1 1 0;
  min-width: 72px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.seg:hover { border-color: var(--ink); }
.seg[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.more { display: flex; flex-direction: column; gap: 12px; }
.more h2 { margin: 0; font-size: 15px; font-weight: 600; }
.more ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

@container (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 80px;
    row-gap: 32px;
    max-width: none;
  }
  .intro { grid-column: 1; grid-row: 1; }
  .more { grid-column: 1; grid-row: 2; }
  .card { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
}

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  font-size: 14.5px;
  line-height: 1.5;
}
.alert p { margin: 0; }
.alert-icon { flex: none; margin-top: 1px; color: var(--err); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
  font-family: inherit;
  cursor: pointer;
}
.btn.primary {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}
.btn.primary:not(:disabled):hover { background: var(--hover-dark); }
.btn.ghost {
  min-height: 48px;
  border: 1px solid var(--control);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.btn.ghost:hover { background: var(--hover-light); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn[aria-busy="true"]:disabled { opacity: 0.75; cursor: progress; }
.btn-idle, .btn-done { display: inline-flex; align-items: center; gap: 10px; }
.check { color: var(--highlight); }
.btn.big {
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 20px;
  border-radius: 12px;
}
.big-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.big-sub { font-size: 14px; font-weight: 400; color: var(--on-dark-sub); }

/* Link and secret */
.linkbox {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  word-break: break-all;
  user-select: all;
}
.hl { background: var(--highlight); border-radius: 3px; padding: 2px 1px; }
.bullets {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.secret {
  margin: 0;
  box-sizing: border-box;
  min-height: 132px;
  max-height: 420px;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--highlight);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
}

/* Notice screens */
.dashed {
  box-sizing: border-box;
  min-height: 132px;
  display: flex;
  align-items: center;
  padding: 20px;
  border: 1.5px dashed var(--control);
  border-radius: 12px;
}
.dashed p { margin: 0; font-size: 15px; line-height: 1.55; }
.about {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.about h2 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.about p { margin: 0; }
.about-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

.note.sr-only { margin: -1px; }
