/* Palette sampled from chickensaladchick.com */
:root {
  --csc-red: #9a222d;
  --csc-red-hover: #7d1c25;
  --csc-red-bright: #c42b39;
  --csc-sage: #abcc77;
  --csc-olive: #405520;
  --csc-forest: #021805;
  --csc-cream: #eff5e5;
  --csc-slate: #4c5561;

  --bg: #f8faf3;
  --surface: #ffffff;
  --surface-2: #f3f7ec;
  --text: #1b2a1d;
  --text-muted: #5b6658;
  --border: #e2e8d8;
  --accent: var(--csc-red);
  --accent-hover: var(--csc-red-hover);
  --accent-text: #ffffff;
  --link: var(--csc-red);
  --hero-bg: var(--csc-cream);
  --hero-text: var(--csc-forest);
  --chip-on-bg: var(--csc-olive);
  --chip-on-text: #ffffff;
  --sel-bg: #f6ecec;

  --ok-bg: #e8f2d6;  --ok-text: #36501a;  --ok-dot: #6f9a35;
  --soon-bg: #fbf0d4; --soon-text: #7a5a0c; --soon-dot: #d39b1c;
  --bad-bg: #f8e1e3; --bad-text: #8a1f29; --bad-dot: #c42b39;

  --shadow: 0 1px 2px rgba(2, 24, 5, .06), 0 8px 24px rgba(2, 24, 5, .06);
  --radius: 14px;
  color-scheme: light;
}


* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Montserrat", "Gotham", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--csc-sage); outline-offset: 2px; }

/* Brand block: logo centered above the title */
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text); }
.brand__logo { width: 108px; height: 108px; object-fit: contain; margin-bottom: 6px; transition: width .2s, height .2s; }
.is-home .brand__logo { width: 189px; height: 189px; }
@media (max-width: 480px) { .is-home .brand__logo { width: 135px; height: 135px; } .brand__logo { width: 72px; height: 72px; } }

/* Hero / search */
.hero { background: var(--hero-bg); border-bottom: 1px solid var(--border); }
.hero__inner { max-width: 820px; margin: 0 auto; padding: 36px 16px 28px; text-align: center; }
.hero__title { margin: 0; font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--hero-text); }
.hero__lede { margin: 12px 0 20px; color: var(--text-muted); }
.search { position: relative; }
.search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-muted); pointer-events: none; }
.search__input {
  width: 100%; height: 58px; padding: 0 52px 0 50px; border-radius: 999px;
  border: 2px solid var(--csc-red); background: var(--surface); color: var(--text);
  font: 500 17px/1 inherit; font-family: inherit; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.search__input::placeholder { color: var(--text-muted); opacity: .8; }
.search__input:focus { outline: none; border-color: var(--csc-red); box-shadow: 0 0 0 4px rgba(154, 34, 45, .15), var(--shadow); }
.search__kbd { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 600 12px/1 inherit; font-family: inherit; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; background: var(--surface-2); }
.search__input:not(:placeholder-shown) ~ .search__kbd { display: none; }
/* Home state: just the search, centered in the page */
.is-home .hero { flex: 1; display: flex; align-items: center; border-bottom: 0; }
.is-home .hero__inner { width: 100%; padding-bottom: 12vh; }

/* Workspace */
.workspace { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 32px; display: grid; grid-template-columns: minmax(280px, 350px) 1fr; gap: 20px; align-items: start; }
.workspace[hidden] { display: none; }
.workspace.no-query { grid-template-columns: 1fr; max-width: 900px; }
.workspace.no-query .results { display: none; }
.results { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.results__head { padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.results__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.result { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; }
.result:hover { background: var(--surface-2); }
.result.is-active { background: var(--sel-bg); box-shadow: inset 4px 0 0 var(--csc-red); }
.result__num { grid-row: span 2; font-weight: 800; font-size: 14px; color: var(--csc-red); background: var(--surface-2); border-radius: 8px; padding: 6px 8px; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.result__name { font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__sub { grid-column: 2 / 4; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: rgba(171, 204, 119, .55); color: inherit; border-radius: 3px; padding: 0 1px; }
.more-btn { margin: 10px 16px 14px; padding: 9px; border-radius: 10px; border: 1px dashed var(--border); background: transparent; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.more-btn:hover { color: var(--text); border-color: var(--csc-olive); }
.no-results { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* Status pill */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--O { background: var(--ok-bg); color: var(--ok-text); } .pill--O::before { background: var(--ok-dot); }
.pill--P { background: var(--soon-bg); color: var(--soon-text); } .pill--P::before { background: var(--soon-dot); }
.pill--C { background: var(--bad-bg); color: var(--bad-text); } .pill--C::before { background: var(--bad-dot); }
.result .pill { font-size: 11px; padding: 2px 8px; }

/* Detail */
.detail { min-width: 0; }
.detail__empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 60px 20px; text-align: center; color: var(--text-muted); }
.detail__empty svg { font-size: 40px; color: var(--csc-sage); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 700; color: #fff; }
.banner svg { font-size: 16px; flex: none; }
.banner--closed { background: var(--csc-red); }
.banner--soon { background: #b07d10; }
.banner--company { background: var(--csc-olive); }
.banner span { font-weight: 500; opacity: .9; }
.card__head { padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.card__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--csc-red); }
.card__title { margin: 2px 0 0; font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.card__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn.back-btn { display: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; text-decoration: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--csc-olive); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn svg { font-size: 15px; }

.sections { padding: 8px 20px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 28px; }
.section { padding-top: 14px; }
.section--wide { grid-column: 1 / -1; }
.section h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--csc-olive); display: flex; align-items: center; gap: 8px; }
.section h3::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.fields { margin: 0; display: grid; gap: 2px; }
.field { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.field:last-child { border-bottom: 0; }
.field dt { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.field dd { margin: 0; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.field dd a { font-weight: 700; text-decoration: none; }
.field dd a:hover { text-decoration: underline; }
.empty-val { color: var(--text-muted); font-weight: 500; font-style: italic; opacity: .7; }
.mini { border: 0; background: transparent; color: var(--text-muted); padding: 3px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 14px; }
.mini:hover { color: var(--csc-red); background: var(--surface-2); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); text-decoration: none; }
a.tag:hover { color: var(--link); }

/* Footer, toast */
.footer { max-width: 1200px; width: 100%; margin: 0 auto; padding: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--csc-forest); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .results { position: static; max-height: none; }
  .workspace.has-detail .results { display: none; }
  .workspace:not(.has-detail) .detail { display: none; }
  .btn.back-btn { display: inline-flex; }
  .sections { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .field { grid-template-columns: 1fr; gap: 0; }
  .card__head { flex-direction: column; }
  .card__actions { justify-content: flex-start; }
  .hero__inner { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
