@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap");

:root {
  --brand-action: #0369a1;
  --veris-blue: #0077c8;
  --veris-dark-blue: #002147;
  --veris-black: #010203;
  --veris-grey: #c8c9c7;
  --ink: #0f172a;
  --muted-ink: #475569;
  --soft-ink: #64748b;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eef6fb;
  --line: #dbe3ee;
  --line-strong: #cbd5e1;
  --focus: #0f172a;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  line-height: 1.55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: var(--surface-soft); }
.portal-page { padding-bottom: 86px; }
a { color: var(--veris-blue); }
a, button, summary { touch-action: manipulation; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(154, 107, 0, .48);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--veris-dark-blue);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand-action);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small { display: block; }
.brand strong { line-height: 1.1; }
.brand small { margin-top: 2px; color: var(--muted-ink); font-size: 12px; }

.top-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--veris-dark-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-actions a:hover,
.top-actions a:focus-visible { background: var(--surface-tint); }

.portal-shell {
  width: min(1220px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: clamp(18px, 3.2vw, 32px);
  border: 1px solid var(--line);
  border-left: 6px solid var(--veris-blue);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--veris-blue);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-intro h1 {
  max-width: 880px;
  margin: 0;
  color: var(--veris-dark-blue);
  font-size: clamp(28px, 5.3vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.portal-intro p {
  max-width: 860px;
  margin: 14px 0 0;
  color: var(--muted-ink);
  font-size: clamp(16px, 2vw, 19px);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--brand-action);
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--brand-action);
}

.button.secondary {
  color: var(--veris-dark-blue);
  background: #fff;
  border-color: var(--line-strong);
}

.button.full { width: 100%; }

.portal-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.topic-rail,
.review-queue,
.review-panel,
.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-rail,
.review-panel {
  position: sticky;
  top: 82px;
  padding: 16px;
}

.topic-rail h2,
.review-panel h2,
.section-heading h2 {
  margin: 0;
  color: var(--veris-dark-blue);
}

.topic {
  display: block;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-top: 10px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}

.topic.active {
  border-color: var(--brand-action);
  background: var(--surface-tint);
}

.topic.disabled { color: var(--soft-ink); }
.topic span,
.topic small { display: block; }
.topic span { font-weight: 800; }
.topic small { margin-top: 2px; color: var(--muted-ink); }

.rail-note {
  margin-top: 18px;
  padding: 12px;
  border-left: 4px solid var(--veris-blue);
  background: #f1f8ff;
  color: var(--muted-ink);
}

.rail-note strong { display: block; color: var(--veris-dark-blue); }
.rail-note p { margin: 6px 0 0; font-size: 13px; }

.review-queue { padding: clamp(14px, 2.4vw, 20px); }

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.section-heading p {
  max-width: 700px;
  margin: 0;
  color: var(--muted-ink);
}

.doc-list {
  display: grid;
  gap: 10px;
}

.doc-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.doc-row:hover,
.doc-row:focus-visible {
  border-color: var(--brand-action);
  box-shadow: 0 12px 28px rgba(104, 91, 199, .14);
  transform: translateY(-1px);
}

.doc-row.priority {
  border-color: rgba(104, 91, 199, .5);
  background: var(--surface-tint);
}

.doc-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--veris-dark-blue);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.doc-row strong {
  display: block;
  color: var(--veris-dark-blue);
  font-size: 17px;
}

.doc-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-ink);
  line-height: 1.45;
}

.doc-row em {
  justify-self: end;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--veris-dark-blue);
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
  background: #fff;
}

.review-panel h2 { font-size: 24px; line-height: 1.15; }
.review-panel ol {
  margin: 14px 0;
  padding-left: 20px;
  color: var(--muted-ink);
}

.review-panel li { margin: 8px 0; }

.workflow-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.workflow-status span {
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-status strong {
  max-width: 170px;
  color: var(--veris-dark-blue);
  text-align: right;
  font-size: 13px;
}

.doc {
  width: min(980px, calc(100% - 28px));
  min-height: 100vh;
  margin: 18px auto;
  padding: clamp(18px, 3vw, 34px);
  overflow-wrap: anywhere;
}

.doc h1 {
  margin-top: 0;
  color: var(--veris-dark-blue);
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.08;
}

.doc h2 {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--brand-action);
  font-size: clamp(23px, 5vw, 34px);
  line-height: 1.15;
}

.doc h3 { color: var(--veris-dark-blue); }
.doc p,
.doc li {
  max-width: 72ch;
  color: var(--veris-black);
  font-size: 17px;
}

.doc pre {
  max-width: 100%;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f1f5f9;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

@media (min-width: 760px) {
  .portal-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (max-width: 1040px) {
  .portal-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .review-panel {
    position: static;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar { min-height: 62px; }
  .top-actions { display: none; }
  .portal-shell {
    width: min(100% - 20px, 1220px);
    padding-top: 10px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .topic-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .topic-rail h2 { margin-bottom: 0; }
  .topic { margin-top: 0; }
  .rail-note { margin-top: 4px; }
  .doc-row {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 92px;
  }
  .doc-index {
    width: 36px;
    height: 36px;
  }
  .doc-row em {
    grid-column: 2;
    justify-self: start;
  }
  .intro-actions,
  .button { width: 100%; }
  .doc {
    width: 100%;
    margin: 10px 0 82px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 22px 20px;
  }
}
