/* RMAI Datasets — site styles, anchored on the design system */
@import url('./colors_and_type.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--rmai-font-sans);
  color: var(--rmai-fg-1);
  background: var(--rmai-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* Layout */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rmai-border);
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px;
}
.wordmark { line-height: 1.1; font-family: var(--rmai-font-sans); }
.wordmark .l1 { font-weight: 800; color: var(--rmai-fg-1); letter-spacing: -0.02em; }
.wordmark .l2 { font-weight: 500; color: var(--rmai-purple); letter-spacing: -0.02em; }
.wordmark .sub { font-size: 11px; color: var(--rmai-fg-mut); letter-spacing: 0.06em; margin-top: 2px; }

.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--rmai-fg-1); transition: color 180ms var(--rmai-ease); }
.site-nav a:hover { color: var(--rmai-purple); }
.site-nav a.is-active { color: var(--rmai-purple); }

.site-header__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--rmai-fg-2);
  font-family: var(--rmai-font-mono);
  letter-spacing: 0.02em;
  transition: color 120ms var(--rmai-ease);
  white-space: nowrap;
}
.site-header__back:hover { color: var(--rmai-purple); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--rmai-font-sans); font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 6px; transition: all 180ms var(--rmai-ease); line-height: 1.2; border: 1px solid transparent; }
.btn--cta { background: var(--rmai-orange); color: #fff; }
.btn--cta:hover { background: #DA5939; }
.btn--cta:active { background: #C44E2F; transform: translateY(1px); }
.btn--primary { background: var(--rmai-fg-1); color: #fff; }
.btn--primary:hover { background: #33343E; }
.btn--secondary { background: #fff; color: var(--rmai-fg-1); border-color: var(--rmai-border); }
.btn--secondary:hover { border-color: var(--rmai-fg-1); }
.btn--ghost { color: var(--rmai-purple); padding: 10px 4px; }
.btn--ghost:hover { color: var(--rmai-fg-1); }
.btn--sm { font-size: 13px; padding: 8px 14px; }

/* Type */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rmai-purple); }
.h1 { font-size: 56px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: var(--rmai-fg-1); }
.h2 { font-size: 32px; font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; color: var(--rmai-fg-1); }
.h3 { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--rmai-fg-1); }
.lead { font-size: 19px; line-height: 1.55; color: var(--rmai-fg-2); max-width: 64ch; }
.body-text { font-size: 15px; line-height: 1.6; color: var(--rmai-fg-1); }
.mut { color: var(--rmai-fg-mut); }
.mono { font-family: var(--rmai-font-mono); font-size: 12px; }

/* Hero */
.hero { padding: 88px 0 56px; position: relative; overflow: hidden; }
.hero__motif { position: absolute; right: -90px; top: -40px; width: 360px; opacity: 0.55; pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 64px; align-items: end; position: relative; }
.hero__statline { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 40px; font-family: var(--rmai-font-mono); font-size: 12px; color: var(--rmai-fg-2); }
.hero__statline .sep { color: var(--rmai-fg-mut); }
.hero__search {
  background: #fff; border: 1px solid var(--rmai-border); border-radius: 10px;
  padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--rmai-shadow-2);
}
.hero__search input {
  border: none; outline: none; flex: 1; font-size: 15px; color: var(--rmai-fg-1); padding: 10px 0;
  background: transparent;
}
.hero__search input::placeholder { color: var(--rmai-fg-mut); }
.hero__chips { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.chip {
  font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--rmai-border); color: var(--rmai-fg-2);
  cursor: pointer; transition: all 120ms var(--rmai-ease);
}
.chip:hover { border-color: var(--rmai-fg-1); color: var(--rmai-fg-1); }
.chip.is-on { background: var(--rmai-lavender); border-color: var(--rmai-purple); color: var(--rmai-purple); }

/* Section */
.section { padding: 64px 0; }
.section--stone { background: var(--rmai-stone); }
.section--lavender { background: var(--rmai-lavender); }

/* Catalogue list */
.dataset-row {
  display: grid;
  grid-template-columns: 64px 1.4fr 1fr 140px 110px;
  gap: 24px; align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rmai-border);
  cursor: pointer;
  transition: background 120ms var(--rmai-ease);
  position: relative;
}
.dataset-row:hover { background: rgba(167,122,205,0.04); }
.dataset-row:hover .dataset-row__name { color: var(--rmai-purple); }
.dataset-row__num { font-family: var(--rmai-font-mono); font-size: 12px; color: var(--rmai-fg-mut); }
.dataset-row__name { font-size: 18px; font-weight: 700; color: var(--rmai-fg-1); transition: color 120ms; }
.dataset-row__pub { font-size: 12px; color: var(--rmai-fg-mut); margin-top: 4px; font-family: var(--rmai-font-mono); }
.dataset-row__summary { font-size: 13px; color: var(--rmai-fg-2); line-height: 1.5; }
.dataset-row__meta { font-size: 12px; color: var(--rmai-fg-2); font-family: var(--rmai-font-mono); }
.dataset-row__cta { display: flex; justify-content: flex-end; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--rmai-border); background: #fff; color: var(--rmai-fg-2);
}
.pill--easy   { color: #1F7A3D; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.pill--medium { color: #6E5630; border-color: rgba(167,122,205,0.35); background: rgba(167,122,205,0.08); }
.pill--hard   { color: #8E3F26; border-color: rgba(242,101,65,0.35); background: rgba(242,101,65,0.08); }
.pill--cat    { color: var(--rmai-purple); border-color: rgba(167,122,205,0.35); background: var(--rmai-lavender); }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
  background: #fff; border: 1px solid var(--rmai-border); border-radius: 10px;
  padding: 20px; cursor: pointer; transition: all 180ms var(--rmai-ease);
  display: flex; flex-direction: column; gap: 12px; min-height: 160px;
}
.cat-card:hover { border-color: var(--rmai-purple); transform: translateY(-2px); box-shadow: var(--rmai-shadow-2); }
.cat-card__count { font-family: var(--rmai-font-mono); font-size: 11px; color: var(--rmai-fg-mut); }
.cat-card__title { font-size: 17px; font-weight: 700; color: var(--rmai-fg-1); }
.cat-card__blurb { font-size: 13px; color: var(--rmai-fg-2); line-height: 1.5; flex: 1; }
.cat-card__more  { font-size: 12px; color: var(--rmai-purple); font-weight: 600; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }
.detail-meta {
  background: #fff; border: 1px solid var(--rmai-border); border-radius: 10px; padding: 24px;
  position: sticky; top: 96px; align-self: start;
}
.detail-meta__row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rmai-border); font-size: 13px; }
.detail-meta__row:last-child { border-bottom: none; }
.detail-meta__row dt { color: var(--rmai-fg-mut); font-weight: 500; }
.detail-meta__row dd { color: var(--rmai-fg-1); }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--rmai-fg-mut); margin-bottom: 16px; font-family: var(--rmai-font-mono); }
.crumbs a { color: var(--rmai-fg-mut); transition: color 120ms; }
.crumbs a:hover { color: var(--rmai-purple); }
.crumbs .sep { color: var(--rmai-border); }

/* Schema table */
.schema {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: #fff; border: 1px solid var(--rmai-border); border-radius: 10px; overflow: hidden;
}
.schema th, .schema td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rmai-border); }
.schema th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rmai-fg-mut); background: var(--rmai-bg); font-weight: 600; }
.schema td:first-child { font-family: var(--rmai-font-mono); font-size: 12px; color: var(--rmai-fg-1); }
.schema td:nth-child(2) { font-family: var(--rmai-font-mono); font-size: 12px; color: var(--rmai-purple); }
.schema tr:last-child td { border-bottom: none; }

/* Sample table */
.sample {
  width: 100%; border-collapse: collapse; font-family: var(--rmai-font-mono); font-size: 12px;
  background: #fff; border: 1px solid var(--rmai-border); border-radius: 10px; overflow: hidden;
}
.sample th, .sample td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--rmai-border); white-space: nowrap; }
.sample th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rmai-fg-mut); background: var(--rmai-bg); font-weight: 600; }
.sample-wrap { overflow: auto; border: 1px solid var(--rmai-border); border-radius: 10px; }
.sample-wrap .sample { border: none; border-radius: 0; }

/* Code block */
pre.code {
  background: #1A1B25; color: #EDEBE8; border-radius: 10px; padding: 18px 20px;
  font-family: var(--rmai-font-mono); font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; border: 1px solid #2a2b35;
}
pre.code .k { color: #A77ACD; }
pre.code .s { color: #22C55E; }
pre.code .c { color: #8D8D92; font-style: italic; }
pre.code .v { color: #F26541; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rmai-border); margin-bottom: 24px; }
.tabs button {
  padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--rmai-fg-mut);
  border-bottom: 2px solid transparent; transition: all 120ms;
}
.tabs button.is-on { color: var(--rmai-purple); border-bottom-color: var(--rmai-purple); }
.tabs button:hover { color: var(--rmai-fg-1); }

/* Filters bar */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--rmai-border); }
.filters .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--rmai-fg-mut); font-weight: 700; }

/* Email gate modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(26,27,37,0.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal {
  background: #fff; border-radius: 12px; padding: 28px; width: 100%; max-width: 460px;
  border: 1px solid var(--rmai-border); box-shadow: 0 20px 60px rgba(26,27,37,0.18);
}
.modal__title { font-size: 20px; font-weight: 700; color: var(--rmai-fg-1); margin-bottom: 8px; }
.modal__desc { font-size: 14px; color: var(--rmai-fg-2); line-height: 1.55; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--rmai-fg-mut); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.field input {
  border: 1px solid var(--rmai-border); border-radius: 6px; padding: 12px 14px; font-size: 14px; color: var(--rmai-fg-1);
  outline: none; transition: border-color 120ms;
}
.field input:focus { border-color: var(--rmai-purple); }

/* Footer — dark, mirrors sites/skills structure (top CTA strip + 3-col grid + bottom bar) */
.site-footer {
  background: var(--rmai-fg-1);
  color: #fff;
  padding: 64px 0 32px;
  margin-top: 96px;
}
.site-footer .wordmark .l1 { color: #fff; }
.site-footer .wordmark .l2 { color: var(--rmai-purple); }
.site-footer__cta {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer__cta-text { max-width: 56ch; }
.site-footer__cta-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rmai-purple); margin-bottom: 10px;
}
.site-footer__cta h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.site-footer__cta p { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 8px; line-height: 1.5; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.site-footer h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { color: #fff; font-size: 14px; }
.site-footer ul a:hover { color: var(--rmai-purple); }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__tag { font-style: italic; letter-spacing: 0.06em; }
.site-footer__tag .dash { color: var(--rmai-purple); margin-right: 6px; font-style: normal; }

/* Standing rule strip */
.standing-rule {
  background: var(--rmai-fg-1); color: #fff; padding: 32px 0; margin-top: 64px;
}
.standing-rule .row { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.standing-rule .quote { font-size: 22px; font-weight: 700; line-height: 1.3; }
.standing-rule .quote em { color: var(--rmai-purple); font-style: normal; }
.standing-rule .meta { font-family: var(--rmai-font-mono); font-size: 12px; color: var(--rmai-fg-mut); }

/* About / API content */
.prose { max-width: 70ch; }
.prose h2 { font-size: 28px; margin-top: 40px; margin-bottom: 16px; }
.prose h3 { font-size: 18px; margin-top: 28px; margin-bottom: 10px; }
.prose p { font-size: 15px; line-height: 1.7; color: var(--rmai-fg-1); margin-bottom: 14px; }
.prose ul { margin: 12px 0 18px 22px; }
.prose li { font-size: 15px; line-height: 1.7; color: var(--rmai-fg-1); margin-bottom: 6px; }
.prose code { font-family: var(--rmai-font-mono); font-size: 13px; padding: 1px 6px; background: var(--rmai-stone); border-radius: 3px; }

/* Trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--rmai-border); border-radius: 10px; background: #fff; }
.trust-strip > div { padding: 22px 24px; border-right: 1px solid var(--rmai-border); }
.trust-strip > div:last-child { border-right: none; }
.trust-strip__num { font-size: 32px; font-weight: 800; color: var(--rmai-purple); letter-spacing: -0.02em; }
.trust-strip__lbl { font-size: 12px; color: var(--rmai-fg-mut); margin-top: 4px; }

/* Skills callout */
.skills-callout {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: var(--rmai-lavender); border: 1px solid rgba(167,122,205,0.3); border-radius: 12px;
  padding: 24px 28px;
}
.skills-callout__t { font-size: 16px; font-weight: 700; color: var(--rmai-fg-1); }
.skills-callout__d { font-size: 13px; color: var(--rmai-fg-2); margin-top: 4px; }

/* Empty state */
.empty {
  padding: 56px 24px; text-align: center; color: var(--rmai-fg-mut);
  border: 1px dashed var(--rmai-border); border-radius: 10px; background: #fff;
}
.empty__big { font-size: 17px; color: var(--rmai-fg-1); margin-bottom: 6px; font-weight: 600; }

/* Live dot */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rmai-green); margin-right: 8px; }

/* Selection */
::selection { background: rgba(167,122,205,0.25); color: var(--rmai-fg-1); }

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(26,27,37,0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(26,27,37,0.32); }
::-webkit-scrollbar-track { background: transparent; }

/* Responsive (basic) */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .h1 { font-size: 40px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-meta { position: static; }
  .dataset-row { grid-template-columns: 36px 1fr; gap: 12px; padding: 18px 0; }
  .dataset-row__summary, .dataset-row__meta, .dataset-row__cta { grid-column: 2; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip > div { border-right: none; border-bottom: 1px solid var(--rmai-border); }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__cta { flex-direction: column; align-items: flex-start; }
  .build-in-public { grid-template-columns: 1fr; gap: 20px; }
  .build-in-public__form { width: 100%; }
}

/* ============================================================
   Live ticker marquee — mirrors mu-plugins/rmai-ticker.php styles.
   Same shape as sites/skills; the source of truth is the main
   site's WP plugin.
   ============================================================ */
.rmai-ticker {
  background: linear-gradient(90deg, #1A1B25 0%, #2D1F3D 100%);
  color: #FFF;
  padding: 10px 0;
  overflow: hidden;
  border-bottom: 2px solid var(--rmai-purple);
  font-family: var(--rmai-font-sans);
}
.rmai-ticker__track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: rmai-ticker-scroll 110s linear infinite;
  width: max-content;
  padding-left: 32px;
}
.rmai-ticker__item {
  font-family: var(--rmai-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.rmai-ticker__label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--rmai-purple);
  padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,0.18);
}
.rmai-ticker__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rmai-green);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: rmai-ticker-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.rmai-ticker__sep { color: rgba(255,255,255,0.25); }
.rmai-ticker__cta { color: var(--rmai-purple); text-decoration: none; font-weight: 700; }
.rmai-ticker__cta:hover { color: #FFF; }
@keyframes rmai-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes rmai-ticker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
@media (prefers-reduced-motion: reduce) {
  .rmai-ticker__track { animation: none; }
  .rmai-ticker__dot { animation: none; }
}

/* ============================================================
   Build-in-public capture — replaces the prototype's Skills callout.
   Soft-tone email opt-in + small skills cross-link.
   ============================================================ */
.build-in-public {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--rmai-lavender);
  border: 1px solid rgba(167,122,205,0.35);
  border-radius: 16px;
  padding: 32px;
}
.build-in-public__copy { min-width: 0; }
.build-in-public__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--rmai-purple);
  margin-bottom: 12px;
}
.build-in-public__t {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--rmai-fg-1); margin-bottom: 8px;
}
.build-in-public__d {
  font-size: 14px; line-height: 1.55; color: var(--rmai-fg-2);
}
.build-in-public__sub {
  margin-top: 12px; font-size: 12px; color: var(--rmai-fg-mut);
}
.build-in-public__form {
  display: flex; flex-direction: column; gap: 10px;
}
.build-in-public__form input {
  height: 44px; padding: 0 14px;
  border: 1px solid var(--rmai-border);
  border-radius: 8px; background: #fff;
  font-size: 14px; color: var(--rmai-fg-1);
  transition: border-color 180ms var(--rmai-ease);
}
.build-in-public__form input:focus {
  outline: none; border-color: var(--rmai-purple);
}
.build-in-public__form .btn { justify-content: center; }
.build-in-public--done {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.35);
}

