@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --paper: #f5f6f1;
  --paper-deep: #ebeee7;
  --ink: #17211d;
  --muted: #718078;
  --line: #d5ddd5;
  --line-dark: #bdc9c1;
  --lime: #c9ef3c;
  --lime-dark: #91b80f;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(36, 53, 43, .08);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(201, 239, 60, .12), transparent 30rem),
    var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.shell { max-width: 1600px; min-height: 100vh; margin: 0 auto; padding: 0 46px; }

.topbar {
  height: 82px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand-mark {
  width: 25px;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  transform: rotate(45deg);
}

.brand-mark i { display: block; border: 2px solid var(--ink); }
.brand-mark i:nth-child(2) { background: var(--lime); }

.topbar-note, .stat-label, .sidebar-label, .eyebrow, .reader-label, footer, .search-shortcut {
  font-family: "DM Mono", monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.topbar-note { color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--lime-dark); }

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 78px 0 66px;
}

.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 10px; font-weight: 500; }

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

h1 {
  max-width: 750px;
  margin-bottom: 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(48px, 6vw, 88px);
  line-height: .95;
  letter-spacing: -.075em;
}

h1 em { color: var(--lime-dark); font-style: normal; }
.hero-copy { max-width: 440px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.hero-stamp { min-width: 135px; padding-bottom: 8px; text-align: right; }
.hero-stamp span { display: block; margin-bottom: 8px; color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .15em; }
.hero-stamp strong { font: 600 15px "DM Mono", monospace; }

.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.stat-card { min-height: 146px; padding: 26px 30px; border-left: 1px solid var(--line-dark); }
.stat-card:first-child { border-left: 0; }
.stat-card-primary { background: var(--lime); }
.stat-label { display: block; margin-bottom: 17px; font-size: 10px; }
.stat-card strong { display: block; font: 600 clamp(32px, 4vw, 48px)/1 "Space Grotesk", sans-serif; letter-spacing: -.06em; }
.stat-foot { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; }
.stat-card-primary .stat-foot { color: rgba(23, 33, 29, .65); }

.workspace { display: grid; grid-template-columns: 250px minmax(390px, 1fr) minmax(290px, 370px); min-height: 720px; }
.sidebar { padding: 42px 30px 30px 0; border-right: 1px solid var(--line-dark); }
.sidebar-section + .sidebar-section { margin-top: 45px; }
.sidebar-label { margin: 0 0 20px; color: var(--muted); font-size: 10px; font-weight: 500; }
.sidebar-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.sidebar-label-row .sidebar-label { margin-bottom: 15px; }
.sidebar-label-row > span { color: var(--muted); font: 12px "DM Mono", monospace; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 15px; padding: 13px 14px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; font-size: 15px; }
.nav-item + .nav-item { margin-top: 3px; }
.nav-item:hover, .nav-item.is-active { background: var(--white); box-shadow: 0 5px 18px rgba(52, 68, 57, .05); }
.nav-item b { margin-left: auto; color: var(--muted); font: 12px "DM Mono", monospace; font-weight: 400; }
.nav-icon { width: 19px; height: 19px; flex: 0 0 19px; position: relative; }
.grid-icon { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 1px; border: 1px solid var(--lime-dark); padding: 2px; }
.grid-icon:before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 31%, var(--lime-dark) 32%, var(--lime-dark) 37%, transparent 38%, transparent 63%, var(--lime-dark) 64%, var(--lime-dark) 69%, transparent 70%), linear-gradient(0deg, transparent 31%, var(--lime-dark) 32%, var(--lime-dark) 37%, transparent 38%, transparent 63%, var(--lime-dark) 64%, var(--lime-dark) 69%, transparent 70%); }
.diamond-icon { border: 1.5px solid var(--lime-dark); transform: rotate(45deg) scale(.76); }
.run-list { max-height: 510px; overflow-y: auto; padding-right: 4px; }
.run-list::-webkit-scrollbar { width: 5px; }
.run-list::-webkit-scrollbar-thumb { background: var(--line-dark); border-radius: 99px; }
.run-item { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.run-item:hover, .run-item.is-active { background: var(--white); }
.run-date { font-size: 14px; }
.run-item.is-active .run-date { font-weight: 700; }
.run-item b { color: var(--muted); font: 11px "DM Mono", monospace; font-weight: 400; }

.catalog { min-width: 0; padding: 42px 36px 60px; }
.catalog-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.catalog-header .eyebrow { margin-bottom: 12px; }
h2 { margin-bottom: 0; font: 600 clamp(30px, 4vw, 46px)/1 "Space Grotesk", sans-serif; letter-spacing: -.065em; }
.result-count { padding-bottom: 5px; color: var(--muted); font: 11px "DM Mono", monospace; white-space: nowrap; }
.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 22px; }
.search-wrap input { width: 100%; height: 52px; padding: 0 78px 0 45px; border: 1px solid var(--line-dark); border-radius: 10px; outline: none; background: rgba(255, 255, 255, .54); color: var(--ink); font-size: 14px; }
.search-wrap input::placeholder { color: #93a099; }
.search-wrap input:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(201, 239, 60, .22); }
.search-icon { position: absolute; left: 17px; width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-icon:after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.5px; background: var(--muted); transform: rotate(45deg); }
.search-shortcut { position: absolute; right: 16px; color: var(--muted); font-size: 11px; }
.clear-search { position: absolute; right: 42px; display: none; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 21px; line-height: 1; }
.clear-search.is-visible { display: block; }
.active-filter { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 10px; border-radius: 99px; background: var(--paper-deep); color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.active-filter button { padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1; }
.idea-list { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.idea-card { position: relative; display: grid; grid-template-columns: 34px 1fr 28px; gap: 12px; align-items: start; padding: 21px 8px 20px 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; transition: background .18s, padding .18s; }
.idea-card:hover, .idea-card.is-selected { padding-left: 14px; background: var(--white); }
.idea-number { padding-top: 3px; color: var(--muted); font: 10px "DM Mono", monospace; }
.idea-card h3 { margin-bottom: 7px; font: 600 18px/1.2 "Space Grotesk", sans-serif; letter-spacing: -.035em; }
.idea-card p { max-width: 540px; margin-bottom: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.idea-arrow { padding-top: 2px; color: var(--lime-dark); font-size: 19px; opacity: 0; transform: translateX(-5px); transition: opacity .18s, transform .18s; }
.idea-card:hover .idea-arrow, .idea-card.is-selected .idea-arrow { opacity: 1; transform: translateX(0); }
.empty-state { padding: 80px 20px; border-top: 1px solid var(--line); text-align: center; }
.empty-mark { color: var(--lime-dark); font-size: 34px; }
.empty-state h3 { margin: 15px 0 7px; font: 600 21px "Space Grotesk", sans-serif; }
.empty-state p { color: var(--muted); font-size: 13px; }
.text-button { border: 0; background: none; color: var(--lime-dark); cursor: pointer; font-weight: 600; }

.reader { position: relative; min-width: 0; padding: 42px 0 50px 36px; border-left: 1px solid var(--line-dark); }
.reader-empty { height: 100%; min-height: 480px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 30px; background: var(--paper-deep); }
.reader-line { width: 40px; height: 2px; margin-bottom: 18px; background: var(--lime-dark); }
.reader-empty p { margin-bottom: 10px; color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .15em; }
.reader-empty span:last-child { color: var(--muted); font-size: 13px; }
.reader article { min-height: 480px; padding: 30px; background: var(--white); box-shadow: var(--shadow); }
.reader-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.close-reader { width: 25px; height: 25px; display: none; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 19px; line-height: 1; }
.reader article h3 { margin-bottom: 13px; font: 600 30px/1.04 "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.reader-audience { margin-bottom: 32px; color: var(--lime-dark); font-size: 12px; font-weight: 600; }
.reader-block { padding: 18px 0; border-top: 1px solid var(--line); }
.reader-label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.reader-block p { margin-bottom: 0; color: #53635a; font-size: 13px; line-height: 1.55; }
.reader-why { padding-bottom: 0; }

footer { display: flex; justify-content: space-between; padding: 30px 0 38px; border-top: 1px solid var(--line-dark); color: var(--muted); font-size: 9px; }

@media (max-width: 1050px) {
  .shell { padding: 0 28px; }
  .workspace { grid-template-columns: 205px minmax(330px, 1fr); }
  .reader { grid-column: 1 / -1; min-height: auto; padding: 30px 0 45px; border-top: 1px solid var(--line-dark); border-left: 0; }
  .reader-empty, .reader article { min-height: 0; }
  .reader-empty { padding: 30px; }
  .reader article { position: relative; }
  .close-reader { display: block; }
}

@media (max-width: 700px) {
  .shell { padding: 0 18px; }
  .topbar { height: 68px; }
  .topbar-note { font-size: 8px; }
  .hero { display: block; padding: 54px 0 43px; }
  h1 { font-size: clamp(46px, 15vw, 72px); }
  .hero-copy { font-size: 14px; }
  .hero-stamp { padding-top: 28px; text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 120px; padding: 19px 17px; }
  .stat-card:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line-dark); }
  .stat-card strong { font-size: 35px; }
  .stat-label { margin-bottom: 12px; font-size: 9px; }
  .stat-foot { margin-top: 9px; font-size: 10px; }
  .workspace { display: block; min-height: 0; }
  .sidebar { padding: 30px 0 12px; border-right: 0; }
  .sidebar-section:first-child { display: flex; gap: 5px; align-items: center; }
  .sidebar-section:first-child .sidebar-label { display: none; }
  .sidebar-section:first-child .nav-item { padding: 10px; }
  .sidebar-section:first-child .nav-icon { display: none; }
  .runs-section { margin-top: 25px !important; }
  .run-list { display: flex; gap: 5px; max-height: none; overflow-x: auto; padding-bottom: 3px; }
  .run-item { min-width: max-content; padding: 9px 11px; background: var(--paper-deep); }
  .run-item.is-active { background: var(--white); }
  .catalog { padding: 28px 0 38px; }
  .catalog-header { align-items: start; display: block; }
  .result-count { margin-top: 12px; }
  .reader { padding: 0 0 30px; border-top: 0; }
  .reader article, .reader-empty { padding: 24px; }
  footer { font-size: 8px; }
}
