:root {
  --navy: #08283f;
  --navy-2: #153d61;
  --midnight: #001723;
  --ink: #14212d;
  --muted: #607080;
  --coral: #ef5c4d;
  --fit-red: #f52d3d;
  --fit-orange: #ff9518;
  --fit-yellow: #ffcc36;
  --fit-green: #79c900;
  --fit-blue: #3f78df;
  --fit-pink: #cc78ad;
  --coral-soft: #fff0ed;
  --blue-soft: #eaf3f8;
  --aqua-soft: #e8f7f5;
  --canvas: #f4f7f8;
  --white: #ffffff;
  --line: #dce4e8;
  --shadow: 0 18px 50px rgba(11, 43, 74, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(239, 92, 77, 0.35);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 10px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 228, 232, 0.9);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--navy); text-decoration: none; }
.brand-logo { width: 174px; height: 58px; object-fit: contain; object-position: left center; }
.brand-title { padding-left: 14px; border-left: 1px solid var(--line); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.98rem; line-height: 1.2; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 0.75rem; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 650; }
.nav-action, footer button, .empty-state button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--midnight);
  background: var(--fit-orange);
  font-weight: 750;
  cursor: pointer;
}

main { overflow: hidden; }
.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  gap: clamp(36px, 7vw, 104px);
  align-items: center;
  padding: clamp(56px, 8vw, 108px) clamp(20px, 7vw, 104px) clamp(68px, 9vw, 118px);
  color: white;
  background:
    radial-gradient(circle at 84% 10%, rgba(63, 120, 223, 0.3), transparent 31%),
    radial-gradient(circle at 76% 86%, rgba(121, 201, 0, 0.13), transparent 24%),
    linear-gradient(125deg, var(--midnight) 0%, #062b42 66%, #0e3750 100%);
}
.intro::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -155px;
  width: 390px;
  height: 390px;
  border: 62px solid transparent;
  background: conic-gradient(var(--fit-blue), var(--fit-pink), var(--fit-red), var(--fit-orange), var(--fit-yellow), var(--fit-green), var(--fit-blue)) border-box;
  border-radius: 50%;
  opacity: 0.22;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.intro h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  font-weight: 420;
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.intro h1 span { display: block; color: #4f82ed; }
.intro-summary { max-width: 630px; margin: 24px 0 0; color: #d6e3ed; font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.search-panel {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 34px);
  color: var(--ink);
  background: white;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}
.search-panel > label { display: block; margin-bottom: 12px; font-size: 0.9rem; font-weight: 800; }
.current-workspace { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.current-workspace span { color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.current-workspace strong { color: var(--navy); font-size: 0.92rem; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  background: #f8fafb;
  border: 1px solid #cfdade;
  border-radius: 12px;
}
.search-box:focus-within { border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(21, 61, 97, 0.1); }
.search-box svg { width: 22px; fill: none; stroke: var(--navy); stroke-width: 2; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
kbd { padding: 2px 7px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 5px; font-size: 0.75rem; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 0.78rem; }
.suggestions button { padding: 5px 8px; color: var(--navy); background: var(--blue-soft); border: 0; border-radius: 6px; cursor: pointer; font-size: 0.78rem; }

.intent-section, .resource-section { padding: clamp(64px, 8vw, 108px) clamp(20px, 7vw, 104px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.section-heading h2, .next-steps h2 { margin: 0; color: var(--navy); font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); }
.intent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.intent-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.intent-card:nth-child(1) { border-top: 5px solid var(--fit-blue); }
.intent-card:nth-child(2) { border-top: 5px solid var(--fit-red); }
.intent-card:nth-child(3) { border-top: 5px solid var(--fit-green); }
.intent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.intent-number { color: var(--coral); font-size: 0.8rem; font-weight: 850; letter-spacing: 0.1em; }
.intent-card h3 { margin: 0 0 12px; color: var(--navy); font-size: 1.45rem; letter-spacing: -0.02em; }
.intent-card p { margin: 0 0 22px; color: var(--muted); }
.intent-do { background: var(--navy); border-color: var(--navy); }
.intent-do h3, .intent-do .text-link { color: white; }
.intent-do p { color: #d3e1ea; }
.intent-reference { background: var(--aqua-soft); }
.text-link { display: inline-block; padding: 0; color: var(--navy); border: 0; background: transparent; font-weight: 800; cursor: pointer; text-decoration: none; }
.text-link span { display: inline-block; margin-left: 6px; transition: transform 160ms ease; }
.text-link:hover span { transform: translateX(4px); }

.next-steps {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 60px;
  padding: clamp(52px, 7vw, 88px) clamp(20px, 7vw, 104px);
  background: white;
}
.step-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.step-list li { border-bottom: 1px solid var(--line); }
.step-list button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 18px;
  padding: 17px 8px;
  text-align: left;
  border: 0;
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}
.step-list button::after { content: "↗"; margin-left: auto; color: var(--coral); }
.step-list span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--navy); background: var(--blue-soft); border-radius: 50%; font-size: 0.82rem; }

.resource-section { background: #edf2f4; }
.resource-heading { margin-bottom: 24px; }
.view-count { color: var(--muted); font-size: 0.88rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { padding: 9px 13px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 0.86rem; font-weight: 700; }
.filter.active { color: white; background: var(--navy); border-color: var(--navy); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 160ms ease, border-color 160ms ease;
}
.resource-card:hover { transform: translateY(-3px); border-color: #b9c8d0; }
.resource-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; color: var(--navy); background: var(--blue-soft); border-radius: 13px; }
.resource-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.resource-icon-logo { width: 108px; padding: 7px 9px; background: #f7f9fa; }
.resource-icon-logo img { width: 100%; height: 100%; object-fit: contain; }
.resource-card:nth-child(1) { border-top: 4px solid var(--fit-blue); }
.resource-card:nth-child(2) { border-top: 4px solid var(--fit-orange); }
.resource-card:nth-child(3) { border-top: 4px solid var(--fit-red); }
.resource-card:nth-child(4) { border-top: 4px solid var(--fit-pink); }
.resource-card:nth-child(5) { border-top: 4px solid var(--fit-green); }
.resource-card:nth-child(6) { border-top: 4px solid var(--fit-yellow); }
.resource-card:nth-child(2) .resource-icon { color: #8c4b0a; background: #fff2dd; }
.resource-card:nth-child(3) .resource-icon { color: #a61d2a; background: #ffeaed; }
.resource-card:nth-child(4) .resource-icon { color: #7d3c68; background: #f8eaf3; }
.resource-card:nth-child(5) .resource-icon { color: #3f6900; background: #edf8df; }
.resource-card:nth-child(6) .resource-icon { color: #7a5a00; background: #fff7d9; }
.resource-card h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.12rem; }
.resource-card > p { margin: 0 0 20px; color: var(--muted); font-size: 0.92rem; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.resource-meta span { padding: 5px 8px; color: var(--muted); background: #f4f7f8; border-radius: 6px; font-size: 0.72rem; font-weight: 700; }
.resource-card button { align-self: flex-start; margin-top: 18px; padding: 0; color: var(--navy); background: transparent; border: 0; font-weight: 800; cursor: pointer; }
.empty-state { padding: 60px 20px; text-align: center; background: white; border-radius: 16px; }
.empty-state h3 { color: var(--navy); font-size: 1.4rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 36px clamp(20px, 7vw, 104px); color: #d8e5ee; background: #071f36; }
footer strong { color: white; }
footer p { margin: 4px 0 0; font-size: 0.86rem; }
footer button { background: var(--coral); }

.resource-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.resource-dialog::backdrop { background: rgba(7, 31, 54, 0.62); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 16px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef3f5; cursor: pointer; font-size: 1.5rem; }
#dialog-content { padding: 42px clamp(24px, 5vw, 52px); }
.dialog-kicker { color: var(--coral); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
#dialog-content h2 { margin: 10px 44px 12px 0; color: var(--navy); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.08; }
.dialog-summary { color: var(--muted); font-size: 1.06rem; }
.dialog-section { margin-top: 28px; }
.dialog-section h3 { margin: 0 0 10px; color: var(--navy); font-size: 1rem; }
.dialog-section ul { margin: 0; padding-left: 20px; }
.dialog-section li + li { margin-top: 8px; }
.dialog-route { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }

.assistant-panel {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  display: flex;
  width: min(430px, 100vw);
  height: 100dvh;
  flex-direction: column;
  background: white;
  box-shadow: -20px 0 55px rgba(7, 31, 54, 0.2);
  transform: translateX(105%);
  transition: transform 220ms ease;
}
.assistant-panel.open { transform: translateX(0); }
.assistant-header { display: flex; align-items: center; gap: 12px; padding: 20px; color: white; background: var(--navy); }
.assistant-header h2, .assistant-header p { margin: 0; }
.assistant-header h2 { font-size: 1rem; }
.assistant-header p { color: #cbdce7; font-size: 0.76rem; }
.assistant-avatar { width: 54px; height: 38px; padding: 4px; object-fit: contain; background: white; border-radius: 8px; }
.assistant-header button { margin-left: auto; color: white; background: transparent; border: 0; cursor: pointer; font-size: 1.6rem; }
.assistant-body { flex: 1; overflow-y: auto; padding: 24px 20px; background: #f5f8f9; }
.message { max-width: 88%; margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; font-size: 0.9rem; }
.message p { margin: 0; }
.message.bot { background: white; border: 1px solid var(--line); border-top-left-radius: 3px; }
.message.user { margin-left: auto; color: white; background: var(--navy); border-bottom-right-radius: 3px; }
.answer-source { display: block; margin-top: 10px; padding-top: 9px; color: var(--navy); border-top: 1px solid var(--line); font-size: 0.76rem; font-weight: 800; }
.prompt-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 16px; }
.prompt-chips button { padding: 8px 10px; color: var(--navy); background: var(--blue-soft); border: 0; border-radius: 8px; cursor: pointer; font-size: 0.8rem; text-align: left; }
.assistant-form { display: flex; gap: 10px; align-items: end; padding: 14px; border-top: 1px solid var(--line); }
.assistant-form textarea { min-height: 44px; max-height: 120px; flex: 1; resize: none; padding: 10px 12px; border: 1px solid #cfdade; border-radius: 10px; outline: 0; }
.assistant-form button { width: 44px; height: 44px; color: var(--midnight); background: var(--fit-orange); border: 0; border-radius: 50%; cursor: pointer; font-size: 1.25rem; font-weight: 900; }
.assistant-note { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 0.7rem; text-align: center; }
.scrim { position: fixed; z-index: 30; inset: 0; background: rgba(7, 31, 54, 0.42); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 940px) {
  .intro { grid-template-columns: 1fr; }
  .intro-copy { max-width: 720px; }
  .intent-grid, .resource-grid { grid-template-columns: 1fr 1fr; }
  .intent-grid .intent-card:last-child { grid-column: 1 / -1; }
  .next-steps { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 650px) {
  .topbar { padding: 12px 16px; }
  .brand-logo { width: 92px; height: 36px; }
  .brand-title { display: none; }
  nav a { display: none; }
  .nav-action { padding: 9px 12px; }
  .intro { padding: 50px 18px 64px; }
  .intro h1 { font-size: clamp(2.3rem, 13vw, 3.5rem); }
  .search-panel { padding: 20px; }
  kbd { display: none; }
  .intent-section, .resource-section, .next-steps { padding-left: 18px; padding-right: 18px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .intent-grid, .resource-grid { grid-template-columns: 1fr; }
  .intent-grid .intent-card:last-child { grid-column: auto; }
  .intent-card { min-height: 240px; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
