/* /vault/: the list behind the distribewt posts. Same field, card and pill language as /redeem/:
   a paper field, a white two-part card for the email gate, and a plain list of tools by week. */

.vault-hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  column-gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding-top: clamp(36px, 5vw, 72px);
  padding-bottom: clamp(40px, 5vw, 72px);
}
.vault-kicker {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted, #605b63);
}
.vault-hero h1 {
  font-size: clamp(2.75rem, 1rem + 5.6vw, 5.5rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.03em;
}
.vault-hero .field-sub {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--muted, #605b63);
}
.vault-count {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card, #fff);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.vault-gate, .vault-open {
  justify-self: end;
  width: min(100%, 520px);
  color: var(--ink, #111012);
}
.gate-top, .gate-body { background: var(--card, #fff); }
.gate-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 26px;
  border-radius: 18px 18px 12px 12px;
}
.gate-top b {
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.gate-top span { font-size: 15px; font-weight: 500; color: var(--muted, #605b63); }
.gate-body {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 26px 28px 28px;
  border-radius: 12px 12px 18px 18px;
}
.gate-body label { font-size: 15px; font-weight: 500; }
.email-box {
  display: flex;
  min-height: 64px;
  border-radius: 14px;
  background: var(--paper-2, #eaeae7);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.email-box:focus-within { background: var(--card, #fff); box-shadow: inset 0 0 0 2px var(--ink, #111012); }
.email-box:has([aria-invalid="true"]) { background: var(--card, #fff); box-shadow: inset 0 0 0 2px var(--dw-red, #e5202e); }
.email-box input {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  border: 0;
  background: none;
  color: var(--ink, #111012);
  font-size: 1.1875rem;
  font-weight: 500;
}
.email-box input::placeholder { color: color-mix(in srgb, var(--muted, #605b63) 65%, transparent); }
.email-box input:focus-visible { outline: 0; }
.gate-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gate-error { color: var(--ui-tint-ink, #a3121e); font-size: 14px; font-weight: 500; }
.gate-go {
  min-height: 54px;
  border-radius: 999px;
  background: var(--ink, #111012);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 180ms ease, transform 140ms ease;
}
.gate-go:active { transform: scale(0.98); }
.gate-go[disabled] { opacity: 0.6; }
@media (hover: hover) and (pointer: fine) { .gate-go:hover { background: var(--ink-2, #3b383e); } }
.gate-note, .open-line { color: var(--muted, #605b63); font-size: 14px; line-height: 1.45; }
.open-line { font-size: 16px; color: var(--ink, #111012); }
.gate-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.vault-page[data-vault="open"] .vault-gate { display: none; }
.vault-page[data-vault="open"] .vault-open { display: block; }

/* The list */
.vault-weeks {
  display: grid;
  gap: clamp(48px, 6vw, 88px);
  padding: clamp(40px, 5vw, 72px) var(--page-pad);
}
.vault-loading { color: var(--muted, #605b63); }
.week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink, #111012) 14%, transparent);
}
.week-head h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; }
.week-head span { flex: none; color: var(--muted, #605b63); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin-top: 24px;
  list-style: none;
  padding: 0;
}
.tool {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: var(--card, #fff);
}
.tool-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tool h3 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tool-tag {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-2, #eaeae7);
  font-size: 13px;
  font-weight: 500;
}
.tool p { color: var(--ink, #111012); font-size: 15.5px; line-height: 1.5; max-width: none; }
.tool-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.tool-go {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink, #111012);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .tool-go:hover { background: var(--ink-2, #3b383e); } }
.tool-src { color: var(--muted, #605b63); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tool-src a { color: inherit; text-underline-offset: 2px; }

/* Locked cards: shapes only. The locked entries are never in the page until the email is in. */
.tool.is-locked { min-height: 196px; align-content: start; }
.tool.is-locked .bar { height: 14px; border-radius: 7px; background: var(--paper-2, #eaeae7); }
.tool.is-locked .bar.w1 { width: 46%; height: 20px; }
.tool.is-locked .bar.w2 { width: 92%; }
.tool.is-locked .bar.w3 { width: 74%; }
.locked-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 16px;
  color: var(--muted, #605b63);
  font-size: 15px;
}
.locked-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink, #111012);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.vault-why {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: 24px;
  row-gap: 24px;
  padding: clamp(56px, 7vw, 104px) var(--page-pad);
}
.vault-plug { grid-column: 2; color: var(--muted, #605b63); }
.vault-plug a { color: var(--ink, #111012); }

@media (prefers-reduced-motion: no-preference) {
  .js .gate-top { animation: stand 750ms var(--ease-expo, ease) both 80ms; }
  .js .gate-body { animation: stand 750ms var(--ease-expo, ease) both 150ms; }
}
@media (max-width: 900px) {
  .vault-hero { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .vault-gate, .vault-open { justify-self: stretch; width: 100%; }
  .vault-why { grid-template-columns: minmax(0, 1fr); }
  .vault-plug { grid-column: 1; }
}
@media (max-width: 640px) {
  .gate-top, .gate-body { padding-inline: 18px; }
  .tool { padding: 20px 18px 18px; }
}
