:root {
  --ink: #0a0e18;
  --ink-2: #0f1523;
  --panel: #131a2a;
  --panel-2: #172033;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --muted: #96a2bb;
  --muted-2: #6f7c94;
  --accent: #f0b64b;
  --accent-soft: rgba(240, 182, 75, 0.14);
  --blue: #6fa8ff;
  --green: #5fd0a6;
  --radius: 16px;
  --wrap: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Apple SD Gothic Neo", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body { margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(76, 110, 200, 0.20), transparent 60%),
    radial-gradient(900px 480px at 92% 4%, rgba(240, 182, 75, 0.10), transparent 62%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: keep-all;
}

a { color: var(--text); text-decoration: none; }
body.modal-open { overflow: hidden; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 60;
  background: var(--accent); color: #16120a; padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { left: 16px; color: #16120a; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 14, 24, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #f5c76a, #d98f2b);
  color: #1a1206; font-weight: 800; font-size: 15px; letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: 0.16em; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: 0.02em; }

.head-meta { display: flex; align-items: center; gap: 10px; }
.updated { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.ghost-btn {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; font-size: 15px; line-height: 1;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.1); }
.ghost-btn.is-busy { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.tabs-inner {
  display: flex; gap: 6px; overflow-x: auto; padding-top: 6px; padding-bottom: 8px;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none; white-space: nowrap;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tab.is-active { color: #16120a; background: var(--accent); }
.tab-count { font-size: 11px; opacity: 0.62; margin-left: 3px; font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero { padding: 34px 0 8px; max-width: 760px; }
.kicker {
  margin: 0 0 10px; color: var(--accent); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.22em;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 5.4vw, 42px); line-height: 1.28; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 0; color: var(--muted); font-size: 15px; max-width: 640px; }

/* ---------- ad slot ---------- */
.ad-slot {
  margin: 22px 0;
  border: 1px dashed var(--line-strong); border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.025);
}
.ad-label { margin: 0 0 4px; font-size: 10px; letter-spacing: 0.2em; color: var(--muted-2); }
.ad-body { display: flex; flex-direction: column; gap: 2px; }
.ad-title { font-weight: 650; font-size: 14.5px; }
.ad-desc { color: var(--muted); font-size: 12.5px; }

/* ---------- top5 ---------- */
.top5 {
  margin: 26px 0 8px;
  background: linear-gradient(180deg, rgba(240, 182, 75, 0.09), rgba(240, 182, 75, 0.02));
  border: 1px solid rgba(240, 182, 75, 0.22);
  border-radius: var(--radius);
  padding: 18px 18px 6px;
}
.top5-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 6px; }
.top5-head h2 { margin: 0; font-size: 16.5px; letter-spacing: -0.01em; }
.muted { color: var(--muted); font-size: 12.5px; margin: 0; }
.top5-list { list-style: none; margin: 0; padding: 0; counter-reset: t5; }
.top5-item {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px;
  padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.top5-item:first-child { border-top: 0; }
.top5-item.is-loading { display: block; color: var(--muted); font-size: 13.5px; padding: 10px 0 16px; }
.top5-rank {
  counter-increment: t5;
  font-family: var(--serif); font-size: 20px; color: var(--accent); line-height: 1.2;
}
.top5-body { min-width: 0; }
.top5-title { display: block; font-weight: 650; font-size: 15px; line-height: 1.45; }
.top5-sub { color: var(--muted); font-size: 12.5px; margin: 3px 0 0; }
.top5-src { color: var(--muted-2); font-size: 11.5px; margin-left: 6px; }

/* ---------- controls ---------- */
.controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 22px 0 16px;
}
.search-box { flex: 1 1 260px; min-width: 0; }
.search-box input, .select-box select {
  width: 100%; padding: 11px 14px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 14px; min-height: 44px;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus, .select-box select:focus {
  outline: 2px solid rgba(240, 182, 75, 0.55); outline-offset: 1px; border-color: transparent;
}
.select-box { flex: 0 1 200px; min-width: 150px; }
.select-box select { appearance: none; cursor: pointer; }
.result-count { margin: 0 0 0 auto; color: var(--muted-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.notice {
  margin: 0 0 16px; padding: 11px 14px; border-radius: 12px;
  background: rgba(240, 182, 75, 0.1); border: 1px solid rgba(240, 182, 75, 0.3);
  color: #f4d79b; font-size: 13px;
}

/* ---------- feed ---------- */
.feed { display: grid; gap: 14px; }
@media (min-width: 900px) { .feed { grid-template-columns: 1fr 1fr; } }

.loading { grid-column: 1 / -1; padding: 28px 0 34px; color: var(--muted); font-size: 14px; }
.loading-bar {
  display: block; height: 3px; border-radius: 3px; margin-bottom: 14px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 1.4s ease-in-out infinite;
}
@keyframes sweep { 0% { opacity: 0.25; } 50% { opacity: 1; } 100% { opacity: 0.25; } }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  padding: 16px 17px 14px;
  display: flex; flex-direction: column; gap: 9px;
  min-width: 0;
}
.card:hover { border-color: var(--line-strong); }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.cat-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(240, 182, 75, 0.24);
}
.cat-chip[data-cat="tech"] { color: #9dc0ff; background: rgba(111, 168, 255, 0.12); border-color: rgba(111, 168, 255, 0.26); }
.cat-chip[data-cat="economy"] { color: #7ee0b8; background: rgba(95, 208, 166, 0.11); border-color: rgba(95, 208, 166, 0.26); }
.cat-chip[data-cat="world"] { color: #f5c9a0; background: rgba(240, 160, 75, 0.11); border-color: rgba(240, 160, 75, 0.24); }
.cat-chip[data-cat="science"] { color: #d3b8ff; background: rgba(170, 140, 255, 0.12); border-color: rgba(170, 140, 255, 0.26); }
.card-src { font-size: 12px; color: var(--muted); }
.card-dot { color: var(--muted-2); font-size: 11px; }
.card-time { font-size: 12px; color: var(--muted-2); white-space: nowrap; }

.card-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; }
.card-title a { display: inline; }
.card-title a:hover { color: var(--accent); }

.card-sum { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.card-sum li {
  position: relative; padding-left: 13px;
  color: #c7d0e2; font-size: 13.5px; line-height: 1.62;
}
.card-sum li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: rgba(240, 182, 75, 0.7);
}

.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.read-tag {
  font-size: 11px; font-weight: 650; color: var(--green);
  background: rgba(95, 208, 166, 0.1); border: 1px solid rgba(95, 208, 166, 0.22);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; }
.tag-list li {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.card-more {
  margin-left: auto; background: none; border: 0; padding: 4px 2px;
  color: var(--blue); font-size: 12.5px; cursor: pointer;
}
.card-more:hover { text-decoration: underline; }

.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 46px 16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted);
}
.empty-state strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.retry-btn {
  margin-top: 14px; padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #16120a; border: 0; font-weight: 700;
}

/* ---------- newsletter ---------- */
.newsletter {
  margin: 34px 0 10px; padding: 22px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(111, 168, 255, 0.08), rgba(255, 255, 255, 0.02));
  display: grid; gap: 16px;
}
@media (min-width: 860px) { .newsletter { grid-template-columns: 1fr 1fr; align-items: center; padding: 26px 26px; } }
.nl-copy h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.nl-copy p { margin: 0; color: var(--muted); font-size: 13.5px; }
.nl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-row input {
  flex: 1 1 200px; min-width: 0; min-height: 44px;
  padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.28); color: var(--text);
  font: inherit; font-size: 14px;
}
.nl-row input::placeholder { color: var(--muted-2); }
.nl-row input:focus { outline: 2px solid rgba(240, 182, 75, 0.5); outline-offset: 1px; }
.nl-row button {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 11px; border: 0;
  background: var(--accent); color: #16120a; font-weight: 750; font-size: 14px; cursor: pointer;
}
.nl-row button:hover { filter: brightness(1.07); }
.nl-row button:disabled { opacity: 0.6; cursor: default; }
.nl-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 9px; color: var(--muted); font-size: 12px; }
.nl-consent input { margin-top: 3px; accent-color: var(--accent); }
.nl-status { margin: 8px 0 0; font-size: 12.5px; min-height: 18px; }
.nl-status.is-ok { color: var(--green); }
.nl-status.is-error { color: #ff9a8d; }

/* ---------- sources ---------- */
.sources { margin: 30px 0 10px; }
.sources h2 { margin: 0 0 4px; font-size: 16px; }
.source-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; padding: 0; }
.source-list li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.source-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); flex: none; }
.source-dot.is-ok { background: var(--green); }
.source-dot.is-off { background: #8a5560; }

/* ---------- footer ---------- */
.site-foot { margin-top: 34px; border-top: 1px solid var(--line); padding: 24px 0 34px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.foot-brand { margin: 0; font-size: 12px; letter-spacing: 0.18em; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-foot nav a { color: var(--muted); font-size: 13px; }
.foot-note { margin: 0; width: 100%; color: var(--muted-2); font-size: 11.5px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 14, 0.72); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 18px;
  padding: 22px 22px 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05); cursor: pointer; font-size: 13px; line-height: 1;
}
.modal-meta { margin: 0 26px 8px 0; font-size: 12px; color: var(--muted); }
.modal-title { margin: 0 0 12px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.36; }
.modal-summary { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.modal-summary li { color: #d7dfee; font-size: 14.5px; line-height: 1.7; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 11px; font-size: 13.5px; font-weight: 700;
}
.btn-primary { background: var(--accent); color: #16120a; }
.btn-primary:hover { color: #16120a; filter: brightness(1.07); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer; }
.modal-related { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.modal-related h3 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.modal-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.modal-related li a { font-size: 13.5px; color: #cfd8e8; }
.modal-related li a:hover { color: var(--accent); }
.modal-related li span { color: var(--muted-2); font-size: 11.5px; margin-left: 6px; }

@media (max-width: 560px) {
  .hero { padding-top: 24px; }
  .updated { display: none; }
  .result-count { width: 100%; margin-left: 0; }
  .card-title { font-size: 17px; }
  .modal-title { font-size: 19px; }
  .modal-panel { padding: 20px 17px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- static pages ---------- */
.page { padding: 36px 0 20px; max-width: 800px; }
.page h1 { font-family: var(--serif); font-size: clamp(25px, 4.6vw, 34px); margin: 0 0 6px; font-weight: 600; }
.page h2 { margin: 30px 0 8px; font-size: 17px; }
.page h3 { margin: 20px 0 6px; font-size: 15px; }
.page p, .page li { color: #c3cddf; font-size: 14.5px; }
.page ul { padding-left: 20px; }
.page .updated-at { color: var(--muted-2); font-size: 12.5px; margin: 0 0 22px; }
.page a.inline { color: var(--blue); text-decoration: underline; }
.page table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.page th, .page td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.page th { color: var(--muted); font-weight: 600; background: rgba(255, 255, 255, 0.03); }
.page .back { display: inline-block; margin-top: 26px; color: var(--muted); font-size: 13px; }

.modal-note { margin: -6px 0 12px; color: var(--muted-2); font-size: 11.5px; }
.modal-note[hidden] { display: none; }
