/* =====================================================================
   LockDrop design system
   Monochrome, text-first, Pinterest-style masonry feed.
   No build step: this file is served as-is.
   ===================================================================== */

:root {
  /* Warm paper neutrals — Claude's palette, not a cool grey ramp. */
  --bg: #faf9f5;
  --surface: #fffdfa;
  --surface-2: #f1efe8;
  --surface-3: #e8e5db;
  --border: #e7e3d9;
  --border-strong: #d4cfc1;
  --text: #1f1e1d;
  --text-muted: #6f6d66;
  --text-subtle: #9c998e;
  --inverse: #1f1e1d;
  --inverse-fg: #faf9f5;
  --danger: #a4342c;
  --danger-bg: #f9ece9;
  --warn: #8a6116;
  --warn-bg: #f8f1e0;
  --ok: #2f6b3a;
  --ok-bg: #eaf3ea;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Depth comes from borders and tints, not shadows. */
  --shadow-sm: 0 1px 2px rgba(31, 30, 29, 0.04);
  --shadow: 0 6px 24px rgba(31, 30, 29, 0.08);
  --shadow-float: 0 8px 28px rgba(31, 30, 29, 0.12);

  /*
   * San Francisco where the platform has it, Inter everywhere else.
   * -apple-system resolves to SF Pro on Apple devices, so the design reads
   * natively there and stays visually consistent elsewhere.
   */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale */
  --fs-micro: 10px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --lh-tight: 1.18;
  --lh-snug: 1.35;
  --lh-body: 1.62;
  --tracking-label: 0.13em;

  --shell-max: 1180px;
  --bottom-nav-height: 66px;
}

.dark {
  --bg: #1f1e1d;
  --surface: #262523;
  --surface-2: #302e2b;
  --surface-3: #3a3834;
  --border: #37352f;
  --border-strong: #4b4842;
  --text: #f5f4ee;
  --text-muted: #a5a298;
  --text-subtle: #78756c;
  --inverse: #f5f4ee;
  --inverse-fg: #1f1e1d;
  --danger: #e8938a;
  --danger-bg: #33221f;
  --warn: #ddb869;
  --warn-bg: #322818;
  --ok: #93c79b;
  --ok-bg: #1f2c20;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.18s ease, color 0.18s ease;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

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

/*
 * The micro-label: uppercase, tracked out, monospaced. Used for every piece
 * of metadata so the information design stays consistent and quiet.
 */
.label-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
  line-height: 1.4;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--text-subtle);
  font-size: 13px;
}

/* ---------------------------------------------------------------- shell */

.shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  display: none;
}

@media (min-width: 1024px) {
  .topbar {
    display: block;
  }
}

.topbar-inner {
  margin: 0 auto;
  max-width: var(--shell-max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--inverse);
  color: var(--inverse-fg);
}

/* A brand mark on a plain surface — the inverse foreground would be
   invisible here, so the colour is set explicitly. */
.drop-brand {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  flex-shrink: 0;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

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

.topnav a.is-active {
  color: var(--text);
  font-weight: 500;
}

.topnav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 1px;
  background: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 28px 20px calc(var(--bottom-nav-height) + 32px);
}

@media (min-width: 1024px) {
  .main {
    padding: 40px 24px 64px;
  }
}

.narrow {
  max-width: 620px;
  margin: 0 auto;
}

/* ------------------------------------------------------------ bottom nav */

/*
 * A transparent bar with the buttons floating on it. The container never
 * catches a tap — only the pills do — so the content behind stays usable.
 */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
  background: transparent;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .bottomnav {
    display: none;
  }
}

.bottomnav a {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.bottomnav a:active {
  transform: scale(0.96);
}

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

.bottomnav a.is-active {
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--inverse-fg);
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--text) 7%, transparent);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--inverse);
  color: var(--inverse-fg);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.88;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  height: auto;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row .grow {
  flex: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ---------------------------------------------------------------- inputs */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.input,
.select {
  width: 100%;
  height: 46px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  letter-spacing: -0.005em;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.input::placeholder,
.select::placeholder {
  color: var(--text-subtle);
}

.input:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 7%, transparent);
}

.input.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.input::placeholder {
  color: var(--text-subtle);
  opacity: 0.75;
}

.hint {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 400;
}

/* --------------------------------------------------------------- surfaces */

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
}

.panel-lg {
  padding: 30px;
}

@media (min-width: 640px) {
  .panel-lg {
    padding: 38px;
  }
}

.panel-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.alert {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

.alert-error {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-bg);
  color: var(--danger);
}

.alert-warn {
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  background: var(--warn-bg);
  color: var(--warn);
}

.alert-ok {
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
  background: var(--ok-bg);
  color: var(--ok);
}

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

.subtle {
  color: var(--text-subtle);
}

.tiny {
  font-size: 11px;
}

/* ----------------------------------------------------------------- steps */

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.stepper-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
}

.stepper-dot.is-done {
  background: var(--text);
}

.stepper-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-right: auto;
}

/* ------------------------------------------------------------- segmented */

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
}

.segmented button {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 8px 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------- category picker */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

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

.category-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.category-option:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.category-option.is-active {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.category-option .brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-option:hover .brand-mark {
  color: var(--text);
}

.category-option.is-active .brand-mark {
  background: var(--inverse);
  color: var(--inverse-fg);
}

.category-option-text {
  min-width: 0;
  flex: 1;
}

.category-option-name {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-option-hint {
  display: block;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* --------------------------------------------------------------- verdict */

/*
 * The verdict is a label, not a status widget. It reads as part of the
 * metadata line so the card stays a piece of text.
 */
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.verdict-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.verdict-Trusted { color: var(--ok); }
.verdict-Caution { color: var(--warn); }
.verdict-Blocked { color: var(--danger); }

.report {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 14px;
  font-size: 12px;
}

.finding {
  display: flex;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
}

.finding:first-child {
  border-top: none;
}

.finding-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--text-subtle);
}

.sev-critical .finding-dot { background: var(--danger); }
.sev-high .finding-dot { background: var(--danger); }
.sev-medium .finding-dot { background: var(--warn); }
.sev-low .finding-dot { background: var(--text-subtle); }

/* ------------------------------------------------------------- the feed */

.feed-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.feed-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.feed-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.feed-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.chip.is-active {
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--inverse-fg);
}

/* Pinterest-style masonry using CSS multi-column. */
.feed {
  columns: 1;
  column-gap: 16px;
}

@media (min-width: 600px) {
  .feed { columns: 2; }
}

@media (min-width: 1024px) {
  .feed { columns: 3; }
}

@media (min-width: 1360px) {
  .feed { columns: 4; }
}

.card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-brand {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  flex-shrink: 0;
}

.card-category {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-verdict {
  margin-left: auto;
  flex-shrink: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.017em;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text);
}

.card-summary {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-subtle);
}

.card-price {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

.card-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  vertical-align: 1px;
}

.card-score {
  position: relative;
  height: 2px;
  border-radius: 999px;
  background: var(--surface-3);
  margin-top: 12px;
  overflow: hidden;
}

.card-score span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--text-subtle);
}

.card-score.is-trusted span { background: var(--ok); }
.card-score.is-caution span { background: var(--warn); }
.card-score.is-blocked span { background: var(--danger); }

/* ----------------------------------------------------------------- table */

.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

table.data th {
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}

table.data td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data tr:last-child td {
  border-bottom: none;
}

table.data tbody tr:hover {
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 30, 29, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: modal-fade 0.14s ease;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow-float);
  animation: modal-rise 0.16s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes modal-fade {
  from { opacity: 0; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(6px) scale(0.99); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}

.modal-subtitle {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

/* ------------------------------------------------------------------ misc */

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 4px 0;
}

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  padding: 7px 0;
}

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

.kv dt {
  color: var(--text-muted);
}

.kv dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

pre.code {
  margin: 0;
  overflow: auto;
  max-height: 62vh;
  border-radius: var(--radius);
  background: #0c0c0e;
  color: #e4e4e7;
  padding: 20px;
  font-size: 11.5px;
  line-height: 1.65;
}

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-subtle);
  font-size: 13px;
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footer {
  border-top: 1px solid var(--border);
  padding: 14px 20px calc(14px + var(--bottom-nav-height));
  text-align: center;
  font-size: 10.5px;
  color: var(--text-subtle);
}

@media (min-width: 1024px) {
  .footer {
    padding-bottom: 14px;
  }
}

.footer a:hover {
  text-decoration: underline;
}

.crumb {
  font-size: 12px;
  color: var(--text-muted);
}

.crumb:hover {
  color: var(--text);
}

.urlbox {
  display: flex;
  gap: 8px;
  align-items: center;
}

.urlbox .input {
  flex: 1;
  min-width: 0;
}

.hidden {
  display: none !important;
}

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

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

/* ------------------------------------------------------------- the prompt */

/*
 * Step one is a prompt, not a form. Nothing around it but the name — a
 * centred, underlined input with a single quiet hint beneath it.
 */
.prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 44px 0 12px;
  text-align: center;
}

.prompt-ask {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.prompt-field {
  width: 100%;
  max-width: 560px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 6px;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.2;
  text-align: center;
  color: var(--text);
  transition: border-color 0.18s ease;
}

.prompt-field:focus {
  outline: none;
  border-bottom-color: var(--text);
}

.prompt-field::placeholder {
  color: var(--text-subtle);
}

.prompt-hint {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0;
}

.prompt-hint kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 1px 4px;
  color: var(--text-muted);
}

/* The step indicator: one quiet line, not three dots. */
.steps {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
  display: flex;
  gap: 10px;
}

.steps .is-current {
  color: var(--text);
}

/* ------------------------------------------- the prompt row and its button */

/*
 * The input and the small arrow button share one rule, so the button reads as
 * part of the field rather than as a separate control.
 */
.prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.18s ease;
}

.prompt-row:focus-within {
  border-bottom-color: var(--text);
}

.prompt-row .prompt-field {
  flex: 1;
  min-width: 0;
  max-width: none;
  border-bottom: none;
  padding-right: 0;
}

/* A URL or an amount reads better in the mono face. */
.prompt-field.is-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.prompt-unit {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-subtle);
  flex-shrink: 0;
}

/*
 * The small round button at the end of the field. It is the tap
 * equivalent of pressing enter.
 */
.prompt-go {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

.prompt-go:hover:not(:disabled) {
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--inverse-fg);
}

.prompt-go:active:not(:disabled) {
  transform: scale(0.94);
}

.prompt-go.is-busy svg {
  animation: spin 0.9s linear infinite;
}

.prompt-go:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* The row of quiet actions under a prompt. */
.prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 14px auto 0;
}

.prompt-meta .label-mono {
  color: var(--text-subtle);
}

/* A quieter field label — the mono micro-label everywhere. */
.field-label,
.field > label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-subtle);
}

.hint {
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--text-subtle);
}

/* The segmented control: flatter, and labelled in mono. */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segmented button {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
