/* ==========================================================================
   Interface components: cards, lists, forms, notices, footer.
   Loaded after site.css so these rules can rely on its tokens.
   ========================================================================== */

/* --- Visiting card stats ------------------------------------------------- */

.card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-s);
  margin-top: var(--space-m);
  padding-top: var(--space-s);
  border-top: 1px solid var(--rule);
}

.card__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.card__stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 0.28rem;
  line-height: 1.35;
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: start;
  }

  .hero__grid > .card {
    position: sticky;
    top: 5.75rem;
  }
}

/* --- Entry list: ventures, articles, offerings --------------------------- */

.entries {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.entry {
  display: grid;
  gap: var(--space-s);
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--rule);
  transition: background var(--fast) var(--ease);
}

.entry:hover {
  background: color-mix(in srgb, var(--paper-raised) 55%, transparent);
}

.entry__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.entry__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0;
}

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

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

.entry__body {
  color: var(--ink-soft);
  max-width: var(--measure-wide);
  font-size: var(--step-0);
}

.entry__aside {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry__tags li {
  font-size: 0.7rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  color: var(--ink-muted);
  background: var(--paper-raised);
}

@media (min-width: 52rem) {
  .entry {
    grid-template-columns: 9rem minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--space-m);
  }

  .entry__topline {
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.35rem;
  }

  .entry--noaside {
    grid-template-columns: 9rem minmax(0, 1fr);
  }
}

/* --- Price -------------------------------------------------------------- */

.price {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.price small {
  font-family: var(--font-text);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  display: block;
  text-align: right;
}

/* --- Filter bar --------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-m);
}

.filters a {
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  background: transparent;
  transition: border-color var(--fast) var(--ease),
    background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.filters a:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.filters a[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filters .count {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  margin-left: 0.3rem;
}

.filters a[aria-current="true"] .count {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

/* --- Forms -------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-s);
}

.field {
  display: grid;
  gap: 0.34rem;
}

.field--half {
  grid-column: span 1;
}

.field label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.field .help {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-m);
  padding: 0.62rem 0.75rem;
  font-size: var(--step--1);
  color: var(--ink);
  transition: border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
  min-height: 2.6rem;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--danger);
}

.field__error {
  font-size: 0.74rem;
  color: var(--danger);
}

.form__grid {
  display: grid;
  gap: var(--space-s);
}

@media (min-width: 34rem) {
  .form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin-top: var(--space-2xs);
}

/* Honeypot: present for bots, invisible and inert for people. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --- Notices ------------------------------------------------------------ */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-m);
  font-size: var(--step--1);
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  margin-bottom: var(--space-m);
}

.notice--success {
  border-color: color-mix(in srgb, var(--success) 40%, var(--rule));
  background: color-mix(in srgb, var(--success) 8%, var(--paper-raised));
  color: color-mix(in srgb, var(--success) 80%, var(--ink));
}

.notice--error {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--rule));
  background: color-mix(in srgb, var(--danger) 7%, var(--paper-raised));
  color: color-mix(in srgb, var(--danger) 85%, var(--ink));
}

.notice svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  margin-top: 0.1rem;
}

/* --- Panel: a bordered block used for forms and detail sidebars ---------- */

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: var(--space-m);
}

.panel--sunk {
  background: var(--paper-sunk);
}

.panel__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: var(--space-2xs);
}

.panel__note {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: var(--space-s);
}

/* --- Definition list ---------------------------------------------------- */

.facts {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  font-size: var(--step--1);
}

.facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.facts dt {
  color: var(--ink-muted);
}

.facts dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

/* --- Newsletter --------------------------------------------------------- */

.subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.subscribe input {
  flex: 1 1 12rem;
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-m);
  padding: 0.55rem 0.7rem;
  font-size: var(--step--1);
  min-height: 2.5rem;
}

.subscribe input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.subscribe__status {
  flex-basis: 100%;
  font-size: 0.74rem;
  min-height: 1.1rem;
}

.subscribe__status[data-state="ok"] {
  color: var(--success);
}

.subscribe__status[data-state="error"] {
  color: var(--danger);
}

/* --- Checklist ---------------------------------------------------------- */

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: var(--step--1);
}

.checklist li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--ink-soft);
}

.checklist svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
  margin-top: 0.25rem;
  color: var(--accent);
}

/* --- Page header -------------------------------------------------------- */

.page-head {
  padding-block: var(--space-xl) var(--space-m);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-l);
}

.page-head h1 {
  font-size: var(--step-4);
  margin-bottom: var(--space-xs);
}

.page-head .lede {
  margin-bottom: 0;
}

/* --- Article ------------------------------------------------------------ */

.article-head {
  padding-block: var(--space-xl) var(--space-m);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-l);
}

.article-head h1 {
  font-size: var(--step-4);
  margin-block: var(--space-xs) var(--space-s);
  max-width: 40ch;
}

.article-body {
  max-width: var(--measure-wide);
}

.article-body > p:first-child {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.byline span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Empty state -------------------------------------------------------- */

.empty {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: var(--step-0);
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunk);
  margin-top: var(--space-2xl);
  padding-block: var(--space-xl) var(--space-m);
}

.footer__grid {
  display: grid;
  gap: var(--space-l);
  margin-bottom: var(--space-l);
}

.footer__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: var(--space-2xs);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
  font-size: var(--step--1);
}

.footer__links a {
  text-decoration: none;
  color: var(--ink-soft);
}

.footer__links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding-top: var(--space-m);
  border-top: 1px solid var(--rule);
  font-size: 0.74rem;
  color: var(--ink-muted);
}

@media (min-width: 48rem) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* --- Utility ------------------------------------------------------------ */

.stack-xs > * + * {
  margin-top: var(--space-xs);
}

.stack-s > * + * {
  margin-top: var(--space-s);
}

.stack-m > * + * {
  margin-top: var(--space-m);
}

.stack-l > * + * {
  margin-top: var(--space-l);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.split {
  display: grid;
  gap: var(--space-l);
}

@media (min-width: 54rem) {
  .split--aside {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
  }

  .split--aside > aside {
    position: sticky;
    top: 5.75rem;
  }
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-m);
  font-size: var(--step--1);
  text-decoration: none;
  transition: top var(--fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-s);
  color: var(--paper);
}

.rule {
  border-top: 1px solid var(--rule);
  margin-block: var(--space-l);
}

/* --- Print -------------------------------------------------------------- */

@media print {
  .masthead,
  .footer,
  .hero__actions,
  .filters,
  .card__qr {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    text-decoration: none;
  }
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
