/* LUMIREXO STOCK — monochrome brand, gradient accent used sparingly. Korean market colours: up = red, down = blue. */
:root {
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --muted: #8A8A8A;
  --line: #E5E5E5;
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --up: #E5383B;
  --down: #2F5BEA;
  --accent: linear-gradient(90deg, #4A6CF7 0%, #8B5CF6 50%, #EC4899 100%);
  --radius: 12px;
  --font: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 20px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: -0.01em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top::before { content: ""; display: block; height: 3px; background: var(--accent); }
.top-inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; font-size: 14px; }
.brand b { font-weight: 800; }
.brand:hover { text-decoration: none; }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input { width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: inherit; color: var(--ink); }
.search input:focus { outline: 2px solid #8B5CF6; outline-offset: 1px; background: #fff; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.search-results li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; }
.search-results li a:hover, .search-results li a.active { background: var(--bg); text-decoration: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; font-size: 14px; }
.nav a.on { background: var(--ink); color: #fff; }
.nav a:hover { text-decoration: none; background: var(--line); }
.nav a.on:hover { background: var(--ink); }

/* cards and layout */
main { padding-bottom: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; min-width: 0; }
.card h2 a { text-decoration: none; }
.card h2 a::after { content: " ›"; color: var(--muted); }
.indices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.indices .card { margin: 0; }
.index-name { color: var(--muted); font-size: 13px; }
.index-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.summary { border-left: 4px solid; border-image: var(--accent) 1; border-radius: 0 var(--radius) var(--radius) 0; }
.summary p { margin: 0; font-size: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid3 .card { margin: 0; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-2); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 4px; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
.tbl td a { font-weight: 500; }
.tbl tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.tbl td:first-child { overflow-wrap: anywhere; }

/* tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a:hover { text-decoration: none; border-color: var(--ink); }

/* disclosures */
.disc { list-style: none; margin: 0; padding: 0; }
.disc li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 9px 0; border-bottom: 1px solid #F0F0F0; }
.disc li:last-child { border-bottom: 0; }
.disc-date { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 40px; }
.disc-corp { font-weight: 600; }
.disc-title { color: var(--ink-2); flex: 1 1 240px; overflow-wrap: anywhere; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #EEF0FE; color: #3D4FD1; white-space: nowrap; }
.tag:hover { text-decoration: none; background: #E0E4FD; }

/* stock page */
.stock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.stock-head h1 { margin: 0 0 4px; overflow-wrap: anywhere; }
.price strong { font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-right: 8px; }
.price span { font-variant-numeric: tabular-nums; }
.watch-btn { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.watch-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }
.chart { height: 300px; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; margin: 0; }
.stats div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #F0F0F0; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }

/* footer */
.foot { border-top: 1px solid var(--line); background: #fff; padding: 20px 0 32px; font-size: 13px; color: var(--ink-2); }
.foot p { margin: 2px 0; }
.foot .base { font-weight: 600; color: var(--ink); }

@media (max-width: 900px) {
  .grid3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top-inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .index-value { font-size: 20px; }
  .stock-head { flex-direction: column; }
  .stats { grid-template-columns: 1fr; }
  .chart { height: 240px; }
}
