:root {
  --bg: #09111b;
  --bg-deep: #050a11;
  --page: #efe7da;
  --page-deep: #e4d8c7;
  --surface: rgba(255, 251, 246, 0.9);
  --surface-strong: #fffdf9;
  --surface-muted: #f7efe4;
  --sidebar: #0d1723;
  --sidebar-soft: rgba(255, 255, 255, 0.08);
  --ink: #13202c;
  --muted: #62707f;
  --line: rgba(19, 32, 44, 0.11);
  --line-strong: rgba(19, 32, 44, 0.18);
  --accent: #b36841;
  --accent-soft: #efddcf;
  --accent-deep: #7f4327;
  --teal: #326c68;
  --teal-soft: rgba(50, 108, 104, 0.12);
  --success: #2d6661;
  --shadow: 0 28px 72px rgba(4, 10, 17, 0.22);
  --shadow-soft: 0 14px 34px rgba(9, 17, 27, 0.09);
  --radius: 30px;
  --radius-sm: 20px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(179, 104, 65, 0.18), transparent 18%),
    radial-gradient(circle at 78% 10%, rgba(50, 108, 104, 0.12), transparent 14%),
    linear-gradient(180deg, var(--bg) 0%, #0a1420 42%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center top, rgba(255, 237, 220, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(179, 104, 65, 0.08), transparent 24%);
  pointer-events: none;
}

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

button,
.button,
input,
textarea {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #b96e49);
  color: white;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 14px 28px rgba(139, 79, 53, 0.22);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 111, 108, 0.22);
  outline-offset: 2px;
}

.ghost-button {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid rgba(105, 51, 29, 0.22);
  box-shadow: none;
}

.ghost-button:hover {
  background: rgba(139, 79, 53, 0.06);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.75rem 1.35rem;
  color: rgba(255, 249, 241, 0.92);
  background:
    radial-gradient(circle at top right, rgba(179, 104, 65, 0.16), transparent 24%),
    linear-gradient(180deg, #101a27 0%, #09111b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.brand-block {
  padding: 1rem 1.05rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-copy {
  display: grid;
  gap: 0.18rem;
}

.brand-copy strong {
  font-family: "Source Serif 4", serif;
  font-size: 1.2rem;
  line-height: 1.05;
}

.brand-copy span {
  color: rgba(255, 249, 241, 0.72);
  font-size: 0.92rem;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #b36841, #e5ba78);
  color: white;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 30px rgba(179, 104, 65, 0.18);
}

.brand small,
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar .eyebrow,
.brand small {
  color: rgba(255, 249, 241, 0.56);
}

.nav {
  display: grid;
  gap: 0.45rem;
}

.nav a {
  padding: 0.82rem 0.95rem;
  border-radius: 18px;
  color: rgba(255, 249, 241, 0.82);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
}

.nav a:hover {
  background: var(--sidebar-soft);
  transform: translateX(2px);
}

.nav a.is-active {
  background: linear-gradient(135deg, rgba(179, 104, 65, 0.22), rgba(50, 108, 104, 0.16));
  border-color: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 600;
}

.sidebar-note,
.sidebar-section {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-note strong,
.sidebar-section strong {
  display: block;
  margin-bottom: 0.35rem;
  color: white;
}

.sidebar-note p,
.sidebar-section p,
.sidebar-foot p {
  margin: 0.3rem 0 0;
  color: rgba(255, 249, 241, 0.72);
}

.sidebar-section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.mini-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.mini-list span {
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 249, 241, 0.82);
  font-size: 0.92rem;
}

.mini-list span:first-child {
  border-top: 0;
  padding-top: 0;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.sidebar-user {
  font-size: 0.92rem;
}

.content {
  position: relative;
  min-height: 100vh;
  padding: 1.5rem 1.5rem 2.5rem;
  background:
    radial-gradient(circle at top left, rgba(255, 248, 240, 0.1), transparent 16%),
    linear-gradient(180deg, rgba(239, 231, 218, 0.98) 0%, var(--page) 52%, var(--page-deep) 100%);
}

.content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(50, 108, 104, 0.08), transparent 18%),
    radial-gradient(circle at 22% 24%, rgba(179, 104, 65, 0.06), transparent 20%);
  pointer-events: none;
}

.content-shell {
  position: relative;
  z-index: 1;
  max-width: 1420px;
  margin: 0 auto;
}

.topbar,
.hero,
.panel,
.stat-card,
.review-card,
.login-card,
.login-intro {
  animation: rise 320ms ease both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.3rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.9rem, 2vw, 2.4rem);
  letter-spacing: -0.03em;
}

.topbar-meta {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.meta-chip {
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.84rem;
  border: 1px solid rgba(47, 111, 108, 0.08);
}

.meta-chip-quiet {
  background: rgba(24, 33, 43, 0.06);
  color: var(--muted);
  border-color: rgba(24, 33, 43, 0.06);
}

.meta-user {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: rgba(19, 32, 44, 0.07);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", serif;
  margin: 0;
}

p {
  line-height: 1.6;
}

.hero,
.panel,
.stat-card,
.review-card,
.login-card,
.login-intro {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: 2.35rem 2.4rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
  color: rgba(255, 249, 241, 0.94);
  background:
    radial-gradient(circle at top right, rgba(228, 186, 120, 0.16), transparent 22%),
    radial-gradient(circle at bottom left, rgba(50, 108, 104, 0.18), transparent 28%),
    linear-gradient(135deg, #182331 0%, #101a27 48%, #0d1520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 238, 224, 0.14), transparent 68%);
  pointer-events: none;
}

.hero h2 {
  max-width: 15ch;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #fff8f0;
}

.hero-copy,
.hero-side,
.entity-header,
.entity-actions {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 780px;
}

.hero-text {
  max-width: 62ch;
  color: rgba(255, 243, 233, 0.78);
  margin-top: 0.95rem;
  font-size: 1.03rem;
}

.hero-side {
  display: grid;
  gap: 0.9rem;
}

.hero-side-compact {
  grid-template-columns: 1fr;
}

.hero-card {
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.hero-card strong,
.snapshot-item strong,
.timeline-date strong,
.fact-item strong {
  display: block;
}

.hero-card p:last-child,
.briefing-row p:last-child {
  margin-bottom: 0;
}

.hero-card a,
.evidence-card a,
.list-row p + a,
.fact-item a {
  color: #ffd7c1;
  font-weight: 600;
}

.hero .eyebrow,
.hero-card p,
.hero-card span,
.briefing-row p,
.briefing-row span,
.hero-footnote {
  color: rgba(255, 243, 233, 0.7);
}

.hero-card-list {
  display: grid;
  gap: 0.2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.metric-strip div {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-strip span {
  display: block;
  color: rgba(255, 243, 233, 0.62);
  font-size: 0.84rem;
}

.metric-strip strong {
  display: block;
  margin-top: 0.24rem;
  font-size: 1.24rem;
  color: #fff8f0;
}

.hero-footnote {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.briefing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 160ms ease, color 160ms ease;
}

.briefing-row:first-of-type {
  border-top: 0;
  padding-top: 0.4rem;
}

.briefing-row:hover {
  transform: translateX(2px);
}

.briefing-row span {
  align-self: start;
  color: var(--muted);
  font-size: 0.84rem;
}

.briefing-label {
  margin: 0 0 0.18rem;
  color: rgba(255, 224, 203, 0.88);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.snapshot-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.snapshot-item {
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa, #f5ede1);
  border: 1px solid rgba(19, 32, 44, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.snapshot-item-emphasis strong {
  font-size: 1.55rem;
}

.snapshot-item span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.stats-grid,
.grid.two-up {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.panel {
  padding: 1.2rem 1.25rem;
  background: var(--surface-strong);
  border: 1px solid rgba(19, 32, 44, 0.08);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf9 0%, #f6eee3 100%);
}

.stat-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(179, 104, 65, 0.42), rgba(50, 108, 104, 0.22), transparent);
}

.stat-card strong {
  display: block;
  margin: 0.3rem 0 0.4rem;
  font-size: 2rem;
  line-height: 1;
}

.compact-stat strong {
  font-size: 1.7rem;
}

.overview-panel {
  margin-bottom: 1rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.action-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdfa 0%, #f8f0e6 100%);
  border: 1px solid rgba(19, 32, 44, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.action-card p {
  margin: 0;
  color: var(--muted);
}

.panel-head,
.entity-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.panel {
  position: relative;
}

.panel-head span,
.list-row span,
.review-item span,
.timeline-content,
.empty,
.prose,
.search-result p:last-child {
  color: var(--muted);
}

.panel-head a {
  color: var(--accent-deep);
  font-weight: 600;
}

.list-row,
.review-item,
.timeline-row,
.search-result {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0.15rem;
  border-top: 1px solid var(--line);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.list-row:first-of-type,
.review-item:first-of-type,
.timeline-row:first-of-type,
.search-result:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.rich-row {
  align-items: start;
}

.rich-row > div {
  min-width: 0;
}

.rich-row p {
  margin: 0.35rem 0 0;
}

.list-row:hover,
.search-result:hover,
.review-item:hover {
  transform: translateX(2px);
}

.status-pill {
  border-radius: 999px;
  padding: 0.44rem 0.75rem;
  background: rgba(47, 111, 108, 0.1);
  color: var(--success);
  font-size: 0.84rem;
  white-space: nowrap;
  border: 1px solid rgba(47, 111, 108, 0.08);
}

.status-pill-pending {
  background: rgba(139, 79, 53, 0.1);
  color: var(--accent-deep);
  border-color: rgba(139, 79, 53, 0.08);
}

.status-pill-failed {
  background: rgba(145, 43, 43, 0.1);
  color: #8e2f2f;
  border-color: rgba(145, 43, 43, 0.08);
}

.status-pill-completed {
  background: rgba(47, 111, 108, 0.1);
  color: var(--success);
}

.status-pill-never-run {
  background: rgba(24, 33, 43, 0.08);
  color: var(--muted);
  border-color: rgba(24, 33, 43, 0.06);
}

.timeline-stack {
  position: relative;
}

.timeline-stack::before {
  content: "";
  position: absolute;
  left: 38px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(24, 33, 43, 0.12), rgba(24, 33, 43, 0.03));
}

.timeline-rich-row {
  align-items: stretch;
}

.timeline-date {
  position: relative;
  min-width: 76px;
  padding-top: 0.35rem;
  color: var(--accent-deep);
  font-weight: 600;
  text-align: center;
}

.timeline-date::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 79, 53, 0.12);
}

.timeline-date span {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.timeline-card {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f7efe5 100%);
  border: 1px solid rgba(19, 32, 44, 0.07);
}

.search-panel,
.result-summary-panel {
  margin-top: 0;
}

.search-form,
.inline-form,
.stack {
  display: grid;
  gap: 0.9rem;
}

.search-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

input[type="search"],
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(24, 33, 43, 0.12);
  background: rgba(255, 255, 255, 0.78);
  padding: 0.92rem 1rem;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8a98a6;
}

.inline-form {
  grid-template-columns: minmax(0, 240px) auto auto;
  align-items: center;
  margin-top: 1rem;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.chip-row-dense {
  margin-top: 0;
}

.chip {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.38rem 0.78rem;
  font-size: 0.88rem;
}

.chip-strong {
  background: rgba(24, 33, 43, 0.07);
  color: var(--ink);
}

.chip-link {
  transition: background 160ms ease, transform 160ms ease;
}

.chip-link:hover {
  background: rgba(47, 111, 108, 0.16);
  transform: translateY(-1px);
}

.search-result-card {
  padding: 1rem 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(19, 32, 44, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f1e7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.result-subtitle {
  margin: 0.22rem 0 0;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

.source-link {
  display: inline-flex;
  margin-top: 0.3rem;
  color: var(--accent-deep);
  font-weight: 600;
}

.evidence-card {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.evidence-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.evidence-card-rich {
  padding: 1rem 0 1.2rem;
}

.review-card {
  padding: 1.2rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fffdf9 0%, #f7efe4 100%);
  border: 1px solid rgba(19, 32, 44, 0.08);
}

.review-stack {
  align-items: start;
  flex-direction: column;
}

.review-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.entry-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.entry-links a {
  color: var(--accent-deep);
  font-weight: 600;
}

.payload-block {
  margin: 0.85rem 0 0;
  padding: 0.95rem;
  border-radius: 16px;
  background: rgba(24, 33, 43, 0.05);
  border: 1px solid rgba(24, 33, 43, 0.08);
  color: #566676;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.83rem;
}

.source-row,
.run-row {
  align-items: center;
}

.source-run-meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.source-actions {
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.entity-actions {
  display: grid;
  gap: 1rem;
  justify-items: end;
}

.entity-snapshot-grid {
  min-width: 320px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.fact-item {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f6eee4 100%);
  border: 1px solid rgba(19, 32, 44, 0.07);
}

.fact-item span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.prose-panel {
  padding-top: 1.45rem;
}

.prose p:first-child {
  margin-top: 0;
}

.messages {
  margin-bottom: 1rem;
}

.message {
  border-radius: 16px;
  padding: 0.92rem 1rem;
  margin-bottom: 0.6rem;
  background: rgba(255, 250, 244, 0.82);
  border: 1px solid rgba(19, 32, 44, 0.08);
  box-shadow: var(--shadow-soft);
}

.empty {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(179, 104, 65, 0.18), transparent 20%),
    radial-gradient(circle at 80% 18%, rgba(50, 108, 104, 0.16), transparent 18%),
    linear-gradient(180deg, #0c1621 0%, #09111b 100%);
}

.login-layout {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 1rem;
}

.login-intro,
.login-card {
  padding: 2rem;
}

.login-intro {
  color: rgba(255, 247, 238, 0.92);
  background:
    radial-gradient(circle at top right, rgba(228, 186, 120, 0.16), transparent 26%),
    linear-gradient(135deg, #172230 0%, #0d1520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-intro h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 0.95;
  max-width: 10ch;
  color: #fff7ef;
}

.login-intro p {
  max-width: 56ch;
  color: rgba(255, 243, 233, 0.76);
}

.login-card {
  width: 100%;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(19, 32, 44, 0.08);
}

.login-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.login-badge {
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #d49363);
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-highlights {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 1.35rem;
}

.login-highlights span {
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 243, 233, 0.9);
  font-size: 0.84rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-aside {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-intro .eyebrow,
.login-aside strong {
  color: rgba(255, 243, 233, 0.8);
}

.stack p {
  margin: 0;
}

.stack label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-weight: 500;
}

.stack input[type="checkbox"],
.inline-check input[type="checkbox"] {
  accent-color: var(--teal);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .snapshot-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two-up,
  .login-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 1rem;
  }

  .topbar,
  .panel-head,
  .entity-header,
  .timeline-row,
  .search-result {
    display: grid;
  }

  .topbar {
    position: relative;
    padding-top: 0.3rem;
  }

  .stats-grid,
  .stats-grid.three-up,
  .grid.two-up,
  .action-grid,
  .search-form,
  .inline-form,
  .snapshot-grid,
  .metric-strip,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .login-card,
  .login-intro,
  .panel,
  .stat-card,
  .review-card {
    padding: 1.25rem;
  }

  .hero h2,
  .login-intro h1 {
    max-width: none;
  }

  .entity-snapshot-grid {
    min-width: 0;
  }

  .timeline-stack::before {
    display: none;
  }

  .timeline-date {
    text-align: left;
    min-width: 0;
  }

  .timeline-date::after {
    display: none;
  }
}
