:root {
  color-scheme: light;
  font: 16px/1.52 system-ui, sans-serif;
  --ink: #162323;
  --muted: #4d6360;
  --line: #d5e1dd;
  --canvas: #f1f4f3;
  --header: #173738;
  --accent: #146757;
  --mint: #dcefe8;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #159682; outline-offset: 3px; }
button { cursor: pointer; background: var(--accent); color: white; border: 1px solid var(--accent); border-radius: 8px; font-weight: 680; min-height: 44px; padding: 9px 16px; }
button:disabled { cursor: default; opacity: .62; }
a { color: #0e624e; text-underline-offset: .19em; }
h1, h2, h3, h4, p, dl { margin: 0; }
small { font-size: .83rem; }
.wrap { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.topbar { background: var(--header); color: white; border-bottom: 3px solid #63b6a0; }
.masthead { min-height: 69px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.brand { color: white; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; line-height: 1.15; }
.brand strong { display: block; font-size: 1.15rem; letter-spacing: -.02em; }
.brand small { display: block; color: #c4ded9; font-size: .75rem; margin-top: 3px; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #86bdad; border-radius: 8px; background: #24514e; color: #d9f6ea; font-size: 1.15rem; font-weight: 800; }
.account { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 8px 14px; font-size: .87rem; color: #d8edeb; }
.sign-out { background: transparent; border-color: #82a9a1; min-height: 40px; padding: 6px 12px; }
.sample-label { padding: 2px 9px; border: 1px solid #a7d4c6; border-radius: 20px; font-weight: 620; }
.layout { padding-block: 34px 56px; }
.intro { display: grid; grid-template-columns: 1fr minmax(340px, 445px); gap: 20px 24px; align-items: center; margin-bottom: 24px; }
h1 { font-size: clamp(1.85rem, 5vw, 2.65rem); line-height: 1.13; letter-spacing: -.042em; }
.intro p { color: var(--muted); margin-top: 6px; }
.search-box { position: relative; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; min-width: 0; }
.search-box label { display: block; font-size: .88rem; font-weight: 680; margin-bottom: 6px; }
.search-row { display: flex; gap: 7px; }
.search-row input { width: 100%; min-width: 0; padding: 8px 11px; border: 1px solid #829a95; border-radius: 8px; color: var(--ink); background: white; }
.search-row input::placeholder { color: #58716b; }
.search-status { font-size: .88rem; }
.search-status:empty { display: none; }
.results { position: absolute; z-index: 2; top: calc(100% + 5px); left: 0; width: 100%; margin: 0; padding: 5px; list-style: none; max-height: min(50vh, 360px); overflow: auto; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px #17373820; }
.results button { text-align: left; background: white; border-color: transparent; color: var(--ink); width: 100%; padding: 8px 12px; }
.results button:hover { background: #edf5f1; }
.results strong, .results small { display: block; }
.results small { color: var(--muted); }
.empty-state { border: 1px solid var(--line); background: white; border-radius: 14px; padding: 26px 22px; color: var(--muted); }
.company-card, .panel { background: white; border: 1px solid var(--line); border-radius: 14px; }
.company-heading { display: flex; align-items: center; gap: 15px; min-height: 95px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.company-heading h2 { font-size: clamp(1.35rem, 4vw, 2rem); line-height: 1.2; letter-spacing: -.033em; overflow-wrap: anywhere; }
.company-heading p { color: var(--muted); margin-top: 4px; }
.company-mark { display: grid; place-items: center; flex: 0 0 49px; height: 49px; border-radius: 10px; background: var(--mint); color: #145747; font-size: 1.04rem; font-weight: 760; }
.company-heading .secondary { margin-left: auto; flex: none; }
.secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; border: 1px solid #83a99c; background: white; color: #125749; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 660; font-size: .9rem; }
.secondary:hover { background: #eef6f2; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; padding: 15px 23px; }
.facts dt { font-size: .83rem; color: var(--muted); }
.facts dd { margin: 1px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.tabs { display: flex; align-items: stretch; gap: 7px; margin: 20px 0 13px; border-bottom: 1px solid #bfd1ca; }
.tabs button { flex: 0 1 auto; background: transparent; color: #2d514b; border-color: transparent; border-radius: 8px 8px 0 0; border-bottom-width: 3px; }
.tabs button[aria-selected="true"] { color: #0f5245; background: #e1efe9; border-bottom-color: var(--accent); }
.panels { display: grid; gap: 15px; }
.panel { padding: 19px 23px; min-width: 0; }
.auth-card { width: min(100%, 460px); margin: 18px auto; display: grid; justify-items: start; gap: 15px; padding: 25px; }
.auth-card h1 { font-size: 1.85rem; }
.auth-card p { color: var(--muted); }
.auth-card #auth-status { color: #8e2c29; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-heading h3 { font-size: 1.22rem; line-height: 1.25; letter-spacing: -.015em; }
.panel-heading p, .research-note, .panel-status { color: var(--muted); font-size: .89rem; margin-top: 4px; }
.panel-status:not(:empty) { margin-top: 12px; }
.research-note { margin-top: 12px; }
.research-list { list-style: none; margin: 8px 0 0; padding: 0; }
.research-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.research-list a { font-weight: 665; }
.research-list p { margin-top: 4px; overflow-wrap: anywhere; }
.source-meta { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; overflow-wrap: anywhere; }
.leader { margin: 14px 0; padding: 14px; background: #eef6f2; border-radius: 9px; overflow-wrap: anywhere; }
.leader h4 { font-size: 1.1rem; }
.leader p { margin-top: 4px; }
.timeline { margin: 12px 0 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 104px 100px minmax(0,1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.timeline time, .timeline .kind { color: var(--muted); font-size: .87rem; }
.timeline strong { display: block; font-weight: 650; overflow-wrap: anywhere; }
.timeline small { color: var(--muted); }
@media (max-width: 710px) {
  .wrap { width: calc(100% - 28px); }
  .layout { padding-block: 24px 36px; }
  .intro { grid-template-columns: 1fr; gap: 12px; margin-bottom: 17px; }
  .company-heading, .panel { padding: 15px; }
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 13px 15px; }
  .company-heading { flex-wrap: wrap; gap: 10px; }
  .company-heading .secondary { margin-left: 0; }
  .tabs { gap: 3px; margin-top: 15px; }
  .tabs button { flex: 1; padding: 7px 3px; font-size: .88rem; }
  .timeline li { grid-template-columns: 86px minmax(0,1fr); gap: 2px 10px; }
  .timeline li > :last-child { grid-column: 2; }
  .panel-heading { align-items: center; flex-wrap: wrap; }
  .account #session-label { display: none; }
}
