:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #162033;
  --muted: #5c677d;
  --line: #dfe4ee;
  --accent: #2447ff;
  --accent-dark: #1730b5;
  --soft: #edf1ff;
  --warning: #fff4d6;
  --warning-border: #f2c94c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.hero {
  background: linear-gradient(135deg, #15213d, #2447ff);
  color: white;
  padding: 56px 20px;
  position: relative;
  overflow: hidden;
}

.hero__ribbon {
  position: absolute;
  top: 48px;
  right: -56px;
  transform: rotate(45deg);
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 90px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .hero__ribbon { display: none; }
}

.hero__link {
  position: absolute;
  bottom: 26px;
  right: 24px;
  color: rgba(255, 255, 255, .85);
  font-size: .85rem;
  text-decoration: none;
  max-width: 80%;
  text-align: right;
}

.hero__link:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .hero__link {
    position: static;
    display: block;
    margin-top: 18px;
    text-align: left;
  }
}

.hero-link {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-link:hover {
  color: #fff;
}

.hero__inner,
.layout {
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: inherit;
  opacity: .78;
  margin: 0 0 8px;
}

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

.eyebrow--shimmer {
  opacity: 1;
  font-size: 1.6rem;
  letter-spacing: .18em;
  background: linear-gradient(
    90deg,
    #c0392b 0%,
    #e67e22 25%,
    #f5c518 50%,
    #60a5fa 75%,
    #c0392b 100%
  );
  background-size: 400% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 8s linear infinite;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 24px 0 24px;
  max-width: 860px;
}

h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.lead {
  font-size: 1.1rem;
  max-width: 760px;
  opacity: .92;
}

.gar-note {
  font-size: .98rem;
  max-width: 760px;
  opacity: .72;
  margin: 12px 0 0;
  font-style: italic;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.badges span {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255,255,255,.12);
}

.layout {
  padding: 28px 20px 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .06);
  margin-bottom: 22px;
}

.popular-card {
  background: #e8f2fe;
}

.tag-card {
  background: linear-gradient(135deg, #15213d, #2447ff);
  border-color: #2447ff;
  color: #fff;
}

.tag-card h2 {
  color: #fff;
}

.search-card,
.answer-card {
  background: #edf1ff;
  border: 2px solid var(--accent);
  color: var(--ink);
}

.search-card .label,
.search-card h2,
#suggestedCard h2 {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

#suggestedCard {
  background: #edf1ff;
  border: 2px solid var(--accent);
}

.answer-card .eyebrow {
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  opacity: 1;
  color: var(--ink);
}

.search-card input[type="search"] {
  background: #fff;
  border-color: #aab8ff;
  color: var(--ink);
}

.search-card {
  margin-top: -54px;
}

.label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.search-row {
  display: flex;
  gap: 10px;
}

input[type="search"] {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 1rem;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: var(--soft);
  color: var(--accent-dark);
  border: 1px solid #ccd6ff;
}

button.secondary:hover {
  background: #dfe6ff;
}

.hint {
  color: var(--muted);
  font-size: .93rem;
}

.message {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px 14px;
  display: none;
}

.message.visible {
  display: block;
}

.message.warning {
  background: var(--warning);
  border: 1px solid var(--warning-border);
}

.message.info {
  background: var(--soft);
  border: 1px solid #ccd6ff;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .9rem;
}

.tag-cloud--sphere {
  position: relative;
  display: block;
  width: 100%;
  height: 460px;
  margin: 4px auto 0;
  overflow: hidden;
}

.tag-cloud--sphere .tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.85);
  padding: 2px 4px;
  border-radius: 0;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  will-change: left, top, font-size, opacity;
}

.tag-cloud--sphere .tag:hover {
  color: #fff;
  text-decoration: underline;
}

.result-card,
.question-button {
  width: 100%;
  text-align: left;
  display: block;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 10px;
}

.result-card:hover,
.question-button:hover {
  border-color: #9aabff;
  background: #f9fbff;
}

.result-meta {
  color: var(--muted);
  font-size: .88rem;
  margin-top: 6px;
}

.score-pill {
  float: right;
  background: var(--soft);
  color: var(--accent-dark);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .76rem;
}

.empty-state {
  color: var(--muted);
  padding: 12px 0;
}

.answer-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.answer-text {
  font-size: 1.04rem;
  padding: 4px 0 18px;
}

.answer-placeholder {
  color: #8fa3c8;
  font-style: italic;
}
.answer-text p {
  margin: 0 0 0.75em;
}
.answer-text ul {
  margin: 0.25em 0 0.75em 1.25em;
  padding: 0;
  list-style: disc;
}
.answer-text li {
  margin-bottom: 0.5em;
}

.metadata {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.metadata div {
  background: #fafbfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

dt {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

dd {
  margin: 4px 0 0;
  font-weight: 650;
}

.feedback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.small-print p,
.footer {
  color: var(--muted);
}

.footer {
  text-align: center;
  padding: 26px 20px;
}

@media (max-width: 760px) {
  .search-row {
    grid-template-columns: 1fr;
    display: grid;
  }
  .metadata {
    grid-template-columns: 1fr;
  }
  .answer-header {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════
   V2.0 CHANGES CAROUSEL
═══════════════════════════════════════════ */

.changes-carousel-section {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 40px 20px 32px;
  text-align: center;
}

.changes-carousel-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--ink);
}

.changes-carousel-sub {
  margin: 0 0 24px;
  font-size: .88rem;
  color: var(--muted);
}

.changes-carousel-wrapper {
  max-width: 1100px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.changes-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  transition: opacity .25s ease;
}

.change-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.change-card--new {
  border-top-color: #2447ff;
}

.change-card--modified {
  border-top-color: #5c677d;
}

.change-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  width: fit-content;
}

.change-card--modified .change-badge {
  background: #f0f1f4;
  color: var(--muted);
}

.change-section {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.change-criterion {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.change-detail {
  margin: 0;
  font-size: .87rem;
  color: var(--ink);
  line-height: 1.55;
}

.changes-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.carousel-btn {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 8px 14px;
  transition: background .15s, color .15s;
}

.carousel-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.changes-carousel-pips {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.pip--active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (max-width: 700px) {
  .changes-carousel-track {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   REQUIREMENTS DASHBOARD
═══════════════════════════════════════════ */

.req-dashboard {
  background: linear-gradient(135deg, #15213d, #2447ff);
  padding: 48px 20px 56px;
}

.req-dashboard__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.req-dashboard__header h2 {
  color: #fff;
  font-size: 1.4rem;
  margin: 0 0 6px;
}

.req-dashboard__sub {
  color: rgba(255,255,255,.72);
  font-size: .92rem;
  margin: 0 0 28px;
}

.req-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.req-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.req-label {
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.req-select-wrap {
  position: relative;
}

.req-select {
  appearance: none;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  color: #fff;
  font-size: .95rem;
  padding: 10px 36px 10px 14px;
  cursor: pointer;
  min-width: 180px;
}

.req-select:focus {
  outline: 2px solid rgba(255,255,255,.5);
}

.req-select option {
  background: #15213d;
  color: #fff;
}

.req-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.7);
  pointer-events: none;
  font-size: .8rem;
}

.req-filter-group--count {
  padding-bottom: 10px;
}

.req-count {
  color: rgba(255,255,255,.6);
  font-size: .88rem;
}

.req-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.req-results::-webkit-scrollbar {
  width: 6px;
}

.req-results::-webkit-scrollbar-track {
  background: rgba(255,255,255,.08);
  border-radius: 3px;
}

.req-results::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.25);
  border-radius: 3px;
}

.req-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.req-card__section {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.req-card__statement {
  margin: 0;
  font-size: .97rem;
  color: #fff;
  line-height: 1.6;
}

.req-card__statement strong {
  color: #f5c518;
}

.req-card__term {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  border-radius: 999px;
  padding: 2px 10px;
  width: fit-content;
}

.req-empty {
  color: rgba(255,255,255,.5);
  font-style: italic;
  padding: 12px 0;
}
