:root {
  --bg: #f6f8f6;
  --surface: #fff;
  --ink: #18231f;
  --muted: #718078;
  --line: #dce3dd;
  --brand: #125543;
  --accent: #d4f05f;
  --up: #218348;
  --down: #c7574e;
  --mixed: #7265b6;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", sans-serif;
  letter-spacing: -0.035em;
}
button,
input {
  font: inherit;
}
.app-header {
  height: 58px;
  padding: 0 max(20px, calc((100vw - 1320px) / 2));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.06em;
}
.logo b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--brand);
  color: var(--accent);
  font:
    500 14px "DM Mono",
    monospace;
}
.desktop-nav {
  display: flex;
  gap: 23px;
  margin-left: 52px;
}
.desktop-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.desktop-nav a.active {
  color: var(--brand);
}
.head-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.theme-toggle,
.search {
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.theme-toggle {
  width: 33px;
  padding: 0;
}
.theme-toggle svg,
.search svg,
.mobile-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 25px 20px 45px;
}
.context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.context h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.07em;
}
.context p {
  margin: 6px 0 0;
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
  letter-spacing: 0;
}
.context p i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.context-note {
  color: var(--muted);
  font-size: 11px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0;
}
.chips {
  display: flex;
  gap: 6px;
  overflow: auto;
}
.chips button,
.sort {
  height: 32px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.chips button.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.sort {
  margin-left: auto;
  color: var(--ink);
}
.sort span {
  margin-left: 8px;
}
.desktop-workspace {
  height: calc(100vh - 178px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.master {
  overflow-y: auto;
  border-right: 1px solid var(--line);
}
.list-head {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.list-head span {
  color: var(--muted);
  font:
    500 11px "DM Mono",
    monospace;
}
.issue-row {
  width: 100%;
  display: grid;
  grid-template-columns: 27px 1fr 14px;
  gap: 9px;
  padding: 14px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.issue-row.selected,
.sector-row.selected {
  background: #f0f6ee;
  box-shadow: inset 3px 0 var(--brand);
}
.status {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font:
    600 12px "DM Mono",
    monospace;
}
.status.up {
  color: var(--up);
  background: #e7f5e9;
}
.status.down {
  color: var(--down);
  background: #fbe8e4;
}
.status.mixed {
  color: var(--mixed);
  background: #eeebfb;
}
.status.neutral {
  color: var(--muted);
  background: #eef1ef;
}
.issue-row small,
.sector-row small {
  display: block;
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
  letter-spacing: 0;
}
.issue-row b {
  display: block;
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}
.issue-row em {
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
  font-style: normal;
}
.issue-row strong,
.sector-row strong,
.mobile-issue strong,
.mobile-sector strong {
  align-self: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}
.detail {
  overflow-y: auto;
  padding: 24px 28px;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.detail-top p {
  margin: 0;
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
}
.badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 3px;
  font:
    500 9px "DM Mono",
    monospace;
}
.market {
  color: #28602f;
  background: #e6f1c9;
}
.detail h2 {
  margin: 12px 0 0;
  font-size: 27px;
  line-height: 1.34;
  letter-spacing: -0.07em;
}
.impact {
  white-space: nowrap;
  font:
    600 10px "DM Mono",
    monospace;
  letter-spacing: -0.04em;
}
.up {
  color: var(--up);
}
.down {
  color: var(--down);
}
.mixed {
  color: var(--mixed);
}
.neutral {
  color: var(--muted);
}
.detail-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.detail-section h3,
.evidence h3 {
  margin: 0 0 12px;
  font-size: 13px;
}
.detail-section h3 small,
.evidence h3 small {
  margin-left: 4px;
  color: var(--muted);
  font:
    500 10px "DM Mono",
    monospace;
}
.detail-section > p {
  max-width: 700px;
  margin: 0;
  color: #465750;
  font-size: 13px;
  line-height: 1.75;
}
.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.path span {
  padding: 9px 11px;
  border: 1px solid #e0e8e0;
  border-radius: 3px;
  background: #f1f5f0;
  font-size: 11px;
}
.path b {
  color: var(--muted);
  font-size: 14px;
}
.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 33px;
}
.company {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid #edf0ed;
  color: var(--ink);
  text-decoration: none;
}
.company b {
  font-size: 12px;
}
.company b small {
  margin-left: 4px;
  color: var(--muted);
  font:
    500 9px "DM Mono",
    monospace;
}
.company p {
  grid-column: 1 / 3;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.conditions {
  margin: 0;
  padding: 0;
  list-style: none;
}
.conditions li {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #edf0ed;
  font-size: 11px;
  line-height: 1.6;
}
.conditions b {
  color: var(--brand);
  font:
    500 10px "DM Mono",
    monospace;
}
.conditions span {
  color: #465750;
}
.evidence {
  padding-top: 20px;
}
.evidence a,
.mini-link {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
}
.evidence a span {
  padding: 3px;
  color: var(--brand);
  background: #ecf4e5;
  font:
    500 9px "DM Mono",
    monospace;
}
.evidence time,
.mini-link span {
  color: var(--muted);
  font:
    500 9px "DM Mono",
    monospace;
}
.evidence > p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 10px;
}
.filter-search {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
}
.filter-search input {
  width: 130px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}
.sector-workspace {
  grid-template-columns: 410px minmax(0, 1fr);
}
.sector-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px 1fr auto 14px;
  gap: 9px;
  align-items: center;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sector-row b {
  display: block;
  font-size: 13px;
}
.sector-row i,
.mobile-sector i {
  font-style: normal;
}
.sector-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 14px;
}
.sector-icon.chips {
  color: #6856c4;
  background: #e9e5fc;
}
.energy {
  color: #43844d;
  background: #e2f4e3;
}
.finance {
  color: #497ab9;
  background: #e0edff;
}
.auto {
  color: #c06454;
  background: #ffe3dd;
}
.bio {
  color: #337b76;
  background: #e1f2f1;
}
.sector-detail .detail-top h2 {
  font-size: 24px;
}
.sector-detail .detail-top h2 small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.stats {
  display: flex;
  gap: 26px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.stats span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}
.stats b {
  color: var(--brand);
  font:
    500 21px "DM Mono",
    monospace;
}
.mobile-stream,
.mobile-detail,
.mobile-nav {
  display: none;
}
html[data-theme="dark"] {
  --bg: #101714;
  --surface: #16211c;
  --ink: #edf4ef;
  --muted: #9eafa5;
  --line: #35443c;
  --brand: #9ece74;
  --accent: #d4f05f;
}
html[data-theme="dark"] .issue-row.selected,
html[data-theme="dark"] .sector-row.selected {
  background: #213124;
}
html[data-theme="dark"] .path span {
  border-color: var(--line);
  background: #202d26;
}
html[data-theme="dark"] .detail-section > p,
html[data-theme="dark"] .conditions span {
  color: #c1cfc7;
}
html[data-theme="dark"] .market {
  color: #243b21;
  background: #d4ecaa;
}
@media (max-width: 767px) {
  .app-header {
    height: 56px;
    padding: 0 14px;
  }
  .desktop-nav {
    display: none;
  }
  .search {
    width: 33px;
    padding: 0;
  }
  .search span {
    display: none;
  }
  .app {
    padding: 17px 14px 83px;
  }
  .context {
    padding-bottom: 12px;
  }
  .context h1 {
    font-size: 20px;
  }
  .context p {
    font-size: 9px;
  }
  .context-note {
    display: none;
  }
  .toolbar {
    margin: 10px 0;
  }
  .chips button,
  .sort {
    height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }
  .desktop-workspace {
    display: none;
  }
  .mobile-stream {
    display: block;
    border-top: 1px solid var(--line);
  }
  .stream-head {
    display: flex;
    justify-content: space-between;
    margin: 13px 0 3px;
    font-size: 12px;
    font-weight: 600;
  }
  .stream-head span {
    color: var(--muted);
    font:
      500 10px "DM Mono",
      monospace;
  }
  .mobile-issue {
    width: 100%;
    min-height: 77px;
    display: grid;
    grid-template-columns: 28px 1fr 15px;
    gap: 9px;
    padding: 11px 1px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
  }
  .mobile-issue b {
    display: block;
    margin: 3px 0;
    font-size: 13px;
    line-height: 1.45;
  }
  .mobile-issue small,
  .mobile-issue p {
    margin: 0;
    color: var(--muted);
    font:
      500 9px "DM Mono",
      monospace;
  }
  .mobile-issue p i {
    width: 5px;
    height: 5px;
    display: inline-block;
    margin-right: 3px;
    border-radius: 50%;
    background: currentColor;
  }
  .mobile-nav {
    height: 70px;
    display: flex;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .mobile-nav a {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-nav svg {
    width: 22px;
    height: 22px;
  }
  .mobile-nav a.active {
    color: var(--brand);
  }
  .mobile-detail {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow: auto;
    padding-bottom: 30px;
    background: var(--bg);
  }
  .mobile-detail:not(.open) {
    display: none;
  }
  .mobile-detail header {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-detail header button {
    width: 30px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 22px;
  }
  .mobile-detail header b {
    font-size: 14px;
  }
  .mobile-detail header time {
    margin-left: auto;
    color: var(--muted);
    font:
      500 9px "DM Mono",
      monospace;
  }
  .mobile-detail article {
    padding: 20px 14px;
  }
  .mobile-detail article > p {
    margin: 0;
  }
  .mobile-detail h2 {
    margin: 12px 0 21px;
    font-size: 22px;
    line-height: 1.38;
  }
  .mobile-detail section {
    padding: 17px 0;
    border-top: 1px solid var(--line);
  }
  .mobile-detail h3 {
    margin: 0 0 12px;
    font-size: 13px;
  }
  .mobile-detail section > p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
  }
  .filter-search {
    display: none;
  }
  .sector-app .toolbar {
    justify-content: space-between;
  }
  .sector-stream .stream-head {
    margin-top: 8px;
  }
  .mobile-sector {
    width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: 30px 1fr auto 15px;
    gap: 8px;
    align-items: center;
    padding: 8px 1px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
  }
  .mobile-sector b {
    display: block;
    font-size: 13px;
  }
  .mobile-sector small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font:
      500 9px "DM Mono",
      monospace;
  }
  .mobile-sector i {
    font-size: 9px;
  }
  .sector-app .context {
    margin-bottom: 2px;
  }
  .stats {
    gap: 24px;
    padding: 15px 0;
  }
  .stats b {
    font-size: 19px;
  }
}
