:root {
  color-scheme: light;
  --ink: #142b46;
  --muted: #637287;
  --line: #dce4eb;
  --soft: #f3f7fa;
  --navy: #0b2340;
  --blue: #1756a0;
  --cyan: #47c5c7;
  --white: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #f7f9fb; font-size: 16px; }
button { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 22px; color: #dce8f4; background: linear-gradient(180deg, #0b2748, #081b31); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; color: white; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 800; }
.brand-mark { position: relative; display: block; flex: 0 0 58px; width: 58px; height: 58px; overflow: hidden; filter: drop-shadow(0 6px 10px rgba(0,0,0,.28)); }
.brand-mark img { position: absolute; top: -5px; left: -13px; width: 86px; height: 86px; max-width: none; object-fit: contain; }
.brand-name { color: #fff; background: linear-gradient(90deg, #ffffff 0 48%, #f7c944 72%, #ffd96a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -.02em; }

.rooster-ai-mark {
  width: clamp(150px, 15vw, 210px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  overflow: visible;
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(11, 39, 72, .18));
}

.rooster-ai-mark:disabled { cursor: not-allowed; opacity: .52; filter: grayscale(.35) drop-shadow(0 6px 12px rgba(11, 39, 72, .12)); }
.rooster-ai-mark:not(:disabled):hover img { transform: translate3d(10px, -4px, 0) rotate(1deg) scale(1.03); }
.rooster-ai-mark:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
.rooster-ai-mark.is-running img { animation-duration: .8s; }

.rooster-ai-mark img {
  display: block;
  width: 100%;
  height: auto;
  animation: rooster-ai-stride 2.8s cubic-bezier(.45, 0, .25, 1) infinite;
  transform-origin: 42% 62%;
}
.rooster-crop { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 20px; }
.rooster-crop img { width: 100%; height: 100%; object-fit: contain; }

@keyframes rooster-ai-stride {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  45% { transform: translate3d(9px, -4px, 0) rotate(1deg); }
  65% { transform: translate3d(5px, -1px, 0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rooster-ai-mark img { animation: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.product-label { margin: 5px 0 30px 68px; color: #b8c8d9; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
nav { display: grid; gap: 7px; }
.nav-item { width: 100%; padding: 13px 14px; border: 0; border-radius: 10px; color: #c6d5e4; background: transparent; text-align: left; cursor: pointer; }
.nav-item:hover, .nav-item:focus-visible { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { color: white; background: linear-gradient(90deg, #1756a0, #1e6f9e); box-shadow: inset 3px 0 var(--cyan); }
.sidebar-foot { margin-top: auto; padding: 18px 14px 0; border-top: 1px solid rgba(255,255,255,.12); color: #8fa5bb; font-size: .78rem; line-height: 1.25; }
.sidebar-foot p { margin: 6px 0; }
main { min-width: 0; }
.topbar { min-height: 82px; padding: 14px 38px; border-bottom: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 22px; }
.eyebrow { margin: 0 0 6px; color: #668099; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.company-switcher { min-width: 190px; padding: 7px 28px 7px 8px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: white; font-weight: 750; cursor: pointer; }
.company-switcher:focus-visible { border-color: var(--blue); outline: 2px solid rgba(23,86,160,.18); }
.company-switcher:disabled { color: var(--muted); cursor: not-allowed; }
.account-area { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .88rem; }
.primary-button, .secondary-button { min-height: 42px; padding: 10px 18px; border-radius: 10px; font-weight: 750; cursor: pointer; }
.primary-button { border: 0; color: white; background: var(--blue); }
.secondary-button { border: 1px solid var(--line); color: var(--muted); background: white; }
.secondary-button:disabled { cursor: not-allowed; opacity: .7; }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 8px; background: white; }
.workspace { padding: 46px 42px 60px; }
.workspace-view { margin-top: 28px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.workspace-view:focus { outline: none; }
.view-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-heading h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 1.8rem; }
.view-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.view-stats article, .review-summary, .view-empty { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.view-stats span, .review-summary > span, .view-empty > span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.view-stats strong { display: block; margin-top: 8px; font-family: Georgia, serif; font-size: 1.8rem; }
.view-records { display: grid; gap: 9px; }
.view-records article { display: flex; align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.view-records strong, .view-records small { display: block; }
.view-records small { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.view-empty h3, .review-summary h3 { margin: 8px 0; }
.view-empty p, .review-summary p, .view-note { margin: 0; color: var(--muted); }
.prospect-intro { margin-bottom: 20px; }
.prospect-grid { display: grid; gap: 12px; }
.prospect-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.prospect-card h3 { margin: 8px 0 4px; }
.prospect-card a { color: var(--blue); overflow-wrap: anywhere; }
.prospect-card p { margin: 7px 0 0; color: var(--muted); font-size: .84rem; }
.prospect-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.workspace-heading { display: flex; justify-content: space-between; gap: 30px; align-items: start; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 760px; margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.06; letter-spacing: -.035em; }
.lede { max-width: 720px; margin: 16px 0 0; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.notice { margin: 34px 0 22px; padding: 18px 20px; border: 1px solid #b8dfe0; border-left: 4px solid var(--cyan); border-radius: 10px; background: #ecf9f9; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.notice div { display: flex; flex-direction: column; gap: 4px; }
.notice span { color: #536d78; }
.text-button { padding: 4px; border: 0; color: var(--blue); background: transparent; font-weight: 750; cursor: pointer; }
dialog { width: min(720px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 28px 80px rgba(8,27,49,.3); }
dialog::backdrop { background: rgba(8,27,49,.62); }
dialog form { padding: 28px; }
.wide-dialog { width: min(1180px, calc(100% - 28px)); }
.wide-dialog .dialog-content { padding: 28px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dialog-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.65rem; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.form-note { margin: 16px 0 22px; padding: 12px 14px; border-left: 3px solid var(--cyan); color: #536d78; background: #ecf9f9; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: .88rem; font-weight: 750; }
.form-grid input, .form-grid textarea { width: 100%; padding: 11px 12px; border: 1px solid #bcc8d4; border-radius: 8px; color: var(--ink); background: white; font: inherit; font-weight: 400; }
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--blue); outline: 2px solid rgba(23,86,160,.14); }
.full-field { grid-column: 1 / -1; }
.form-status { min-height: 22px; margin: 14px 0 0; color: #a13c35; }
.dialog-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.foundation-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.foundation-columns > section { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.foundation-columns h3 { margin: 0 0 15px; font-family: Georgia, serif; font-size: 1.2rem; }
.compact-form { padding: 0; display: grid; gap: 11px; }
.compact-form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 750; }
.compact-form input, .compact-form textarea { width: 100%; padding: 9px 10px; border: 1px solid #bcc8d4; border-radius: 7px; font: inherit; font-weight: 400; }
.compact-form .primary-button { justify-self: start; }
.record-list { margin-top: 17px; display: grid; gap: 9px; }
.record { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.record p { margin: 6px 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.record a { color: var(--blue); font-size: .78rem; overflow-wrap: anywhere; }
.record-status { display: inline-block; margin-right: 7px; padding: 3px 6px; border-radius: 999px; background: #e7edf3; color: var(--muted); font-size: .64rem; font-weight: 800; text-transform: uppercase; }
.record-status.verified { color: #17625f; background: #dff5f3; }
.record-status.rejected { color: #8f1f17; background: #ffe1dd; }
.record-actions { margin-top: 9px; display: flex; gap: 7px; }
.record-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: white; cursor: pointer; }
.record-empty { color: var(--muted); font-size: .83rem; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; }
.metrics article { min-height: 148px; padding: 23px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.metrics article:last-child { border-right: 0; }
.metric-label { color: var(--muted); font-size: .86rem; font-weight: 700; }
.metrics strong { margin: 7px 0 12px; font-family: Georgia, serif; font-size: 2.3rem; }
.metrics small { margin-top: auto; color: #8490a0; font-size: .76rem; line-height: 1.4; }
.work-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 22px; }
.priority-panel, .system-panel, .areas { border: 1px solid var(--line); border-radius: 14px; background: white; }
.priority-panel { min-height: 360px; padding: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-heading h2, .system-panel h2 { margin: 0; font-family: Georgia, serif; font-size: 1.45rem; }
.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state h3 { margin: 13px 0 5px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.55; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #17736f; background: #dff5f3; font-weight: 900; }
.finding-list { margin-top: 22px; display: grid; gap: 10px; }
.finding-list[hidden] { display: none; }
.audit-status, .finding { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.audit-status div, .finding { display: flex; align-items: center; gap: 11px; }
.audit-status small, .finding small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.ai-review-panel { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; }
.ai-review-panel h3 { margin: 0 0 6px; }
.ai-review-panel > p { margin: 0 0 14px; color: var(--muted); }
.ai-output-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ai-output { padding: 14px; border-radius: 10px; background: white; border: 1px solid var(--line); }
.ai-output span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.ai-output strong, .ai-output p { display: block; margin-top: 7px; }
.ai-output p { color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .ai-output-grid { grid-template-columns: 1fr; } }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #8090a2; display: inline-block; }
.status-dot.queued { background: #b67b12; }
.status-dot.running { background: var(--blue); animation: pulse 1.2s infinite; }
.score-row { padding: 17px 18px; border-radius: 12px; color: white; background: linear-gradient(120deg, #123d6d, #17607e); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.score-row div { display: flex; align-items: baseline; gap: 7px; }
.score-row span { margin-right: 8px; font-weight: 700; }
.score-row strong { font-family: Georgia, serif; font-size: 2rem; }
.score-row p { margin: 0; color: #d7edf2; font-size: .82rem; }
.provider-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin: 14px 0; }
.provider-status { display: grid; gap: 4px; padding: 12px; border: 1px solid #d7e0ea; border-radius: 10px; background: #fff; }
.provider-status span { font-weight: 700; text-transform: capitalize; }
.provider-status small { color: #52657a; }
.provider-status.failed { border-color: #e2a8a8; background: #fff8f8; }
.provider-status.succeeded { border-color: #a8d5bd; background: #f6fcf8; }
.severity { min-width: 64px; padding: 4px 7px; border-radius: 999px; font-size: .68rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.severity.critical { color: #8f1f17; background: #ffe1dd; }
.severity.high { color: #8b3d12; background: #ffead9; }
.severity.medium { color: #74530c; background: #fff2bf; }
.severity.low { color: #17625f; background: #dff5f3; }
.more-findings { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
@keyframes pulse { 50% { opacity: .35; } }
.system-panel { padding: 26px; color: white; background: linear-gradient(145deg, #143c69, #0b294b); }
.system-panel .eyebrow { color: #88cfd0; }
.system-panel ol { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 17px; }
.system-panel li { display: flex; gap: 13px; }
.system-panel li > span { color: var(--cyan); font-family: Georgia, serif; font-size: .88rem; }
.system-panel li div { display: flex; flex-direction: column; gap: 3px; }
.system-panel small { color: #b4c6d7; line-height: 1.4; }
.areas { margin-top: 22px; padding: 26px; }
.area-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.area-grid button { min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfd; text-align: left; display: flex; flex-direction: column; cursor: pointer; }
.area-grid button:hover, .area-grid button:focus-visible { border-color: #70a9cf; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,43,70,.08); }
.area-number { color: var(--blue); font-family: Georgia, serif; font-weight: 700; }
.area-grid strong { margin: auto 0 8px; line-height: 1.25; }
.area-grid small { color: var(--muted); line-height: 1.45; }
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.program-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; box-shadow: 0 8px 24px rgba(17, 40, 72, .06); }
.program-card h3 { margin: .55rem 0 .2rem; }
.program-card > p { color: var(--muted); line-height: 1.55; }
.program-card dl { margin: 1rem 0; display: grid; gap: .75rem; }
.program-card dl div { border-top: 1px solid var(--line); padding-top: .7rem; }
.program-card dt { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.program-card dd { margin: .25rem 0 0; line-height: 1.45; }
.program-controls { display: grid; gap: .7rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.program-controls label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; }
.program-controls select { min-width: 150px; }
.opportunity-section { margin-top: 22px; }
.opportunity-section .section-heading { align-items: end; }
.opportunity-section h3 { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; }
.opportunity-section .section-heading > span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.opportunity-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opportunity-card { display: grid; gap: 9px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.opportunity-card > div { display: flex; align-items: center; gap: 8px; }
.opportunity-card strong { overflow-wrap: anywhere; }
.opportunity-card small, .opportunity-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.opportunity-card a { color: var(--blue); font-size: .76rem; overflow-wrap: anywhere; }
.opportunity-card .secondary-button { justify-self: start; }
.opportunity-score { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--blue); font-weight: 850; }
.benchmark-note { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.query-details { margin-top: 22px; }
.query-details summary { color: var(--blue); font-weight: 750; cursor: pointer; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; width: min(86vw, 290px); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 15px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; width: 42px; height: 42px; }
  .topbar { padding: 12px 16px; }
  .account-area span { display: none; }
  .workspace { padding: 32px 18px 45px; }
  .workspace-heading { display: block; }
  .heading-actions { margin-top: 20px; justify-content: flex-start; }
  .notice { align-items: start; flex-direction: column; }
  .metrics, .work-grid, .area-grid, .view-stats { grid-template-columns: 1fr; }
  .workspace-view { padding: 20px; }
  .view-heading { display: block; }
  .view-heading .secondary-button { margin-top: 14px; }
  .metrics article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics article:last-child { border-bottom: 0; }
  .work-grid { display: grid; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .foundation-columns { grid-template-columns: 1fr; }
  .prospect-card { align-items: stretch; flex-direction: column; }
  .prospect-actions { justify-content: flex-start; }
  .opportunity-grid { grid-template-columns: 1fr; }
}
