:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6b78;
  --line: #d9e1e8;
  --panel: #ffffff;
  --page: #f4f6f8;
  --blue: #24a986;
  --green: #13795b;
  --red: #b42318;
  --gold: #9a6700;
  --shadow: 0 16px 40px rgba(24, 39, 75, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.workspace {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  width: min(360px, 38vw);
  height: 92px;
  flex: 0 0 auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.profile-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 156px;
}

.profile-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}

.profile-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.profile-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.profile-photo {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: #e8f0fe;
}

.status-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-pill {
  min-width: 112px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.query-panel,
.snapshot,
.report-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.query-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.lookup {
  position: relative;
}

.input-wrap {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid #b8c4cf;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 78, 166, 0.14);
}

.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #b8c4cf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 39, 75, 0.14);
}

.suggestions[hidden] {
  display: none;
}

.suggestion {
  width: 100%;
  height: auto;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion.active {
  background: #edf3fc;
  filter: none;
}

.suggestion strong,
.suggestion small {
  overflow-wrap: anywhere;
}

.suggestion small {
  color: var(--muted);
  font-weight: 650;
  text-align: right;
}

button {
  height: 48px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.96);
}

.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-list button,
.report-actions button {
  height: 34px;
  border-color: var(--line);
  background: #f7f9fb;
  color: var(--ink);
  font-size: 13px;
}

.report-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.snapshot {
  position: sticky;
  top: 24px;
  padding: 20px;
}

.company-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e8f0fe;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.snapshot h2 {
  margin-bottom: 6px;
  font-size: 25px;
  line-height: 1.12;
}

.snapshot p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.45;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.report-card {
  position: relative;
  padding: 22px;
}

.report-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.report-card section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.report-card section:first-of-type {
  padding-top: 4px;
  padding-right: 150px;
  border-top: 0;
}

h3 {
  margin-bottom: 8px;
  color: #263442;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h4 {
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.report-card p,
li {
  color: #2f3c48;
  line-height: 1.62;
}

ul {
  margin: 0;
  padding-left: 20px;
}

.metric-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}

.metric {
  min-height: 104px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.metric:nth-child(2n),
.metric:last-child {
  border-right: 0;
}

.metric:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.38;
}

.verdict,
.summary-line {
  margin: 12px 0 0;
  font-weight: 850;
}

.buy {
  color: var(--green);
}

.hold {
  color: var(--gold);
}

.sell {
  color: var(--red);
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .search-row,
  .report-grid {
    grid-template-columns: 1fr;
  }

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

  .brand-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    width: min(300px, 92vw);
    height: 76px;
  }

  .profile-block,
  .status-row {
    justify-content: flex-start;
  }

  .profile-copy {
    text-align: left;
  }

  .search-row {
    display: grid;
  }

  .snapshot {
    position: static;
  }

  .report-actions {
    position: static;
    margin-bottom: 12px;
  }

  .report-card section:first-of-type {
    padding-right: 0;
  }

  .metric-table {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 480px) {
  .metric-table {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }
}
