:root {
  --ink: #10253b;
  --ink-soft: #526477;
  --paper: #f4f1e9;
  --paper-deep: #e9e4d8;
  --white: #fffdf8;
  --line: #d9d4c8;
  --blue: #155dfc;
  --blue-dark: #0d3fb6;
  --cyan: #c9f4ff;
  --orange: #ff6b2c;
  --green: #16845b;
  --red: #c74430;
  --shadow: 0 18px 50px rgba(16, 37, 59, 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--white); font-family: Georgia, serif; font-size: 18px; }
.snapshot { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(22,132,91,.10); }

.hero { padding: 76px 0 58px; }
.eyebrow, .section-kicker { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .17em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 80px; align-items: end; margin-top: 22px; }
h1 { margin: 0; max-width: 850px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(58px, 7.6vw, 112px); line-height: .88; letter-spacing: -.065em; font-weight: 500; }
h1 span { color: var(--blue); font-style: italic; }
.hero-copy { max-width: 680px; margin: 34px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.75; }
.hero-note { padding-left: 28px; border-left: 3px solid var(--orange); }
.note-number { display: block; font-family: Georgia, serif; font-size: 72px; line-height: .9; letter-spacing: -.05em; }
.note-label { display: block; margin-top: 10px; font-size: 13px; font-weight: 850; letter-spacing: .12em; }
.hero-note p { margin: 18px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.metric { min-height: 176px; padding: 26px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric-primary { background: var(--ink); color: var(--white); }
.metric-label { min-height: 38px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.metric strong { margin-top: auto; font-family: Georgia, serif; font-size: 48px; font-weight: 500; letter-spacing: -.04em; }
.metric-foot { margin-top: 7px; color: var(--ink-soft); font-size: 12px; }
.metric-primary .metric-foot { color: #b7c6d5; }
.metric-foot.warning { color: var(--red); }

.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.topic-card { position: relative; overflow: hidden; min-height: 300px; padding: 30px; border-radius: 18px; border: 1px solid var(--line); background: var(--white); }
.topic-card::after { content: attr(data-number); position: absolute; right: -4px; top: -28px; color: rgba(16,37,59,.045); font-family: Georgia, serif; font-size: 170px; line-height: 1; }
.topic-head { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; }
.topic-index { display: inline-flex; margin-bottom: 18px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.topic-card h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.03em; }
.topic-total { text-align: right; }
.topic-total strong { display: block; font-family: Georgia, serif; font-size: 46px; font-weight: 500; }
.topic-total span { color: var(--ink-soft); font-size: 11px; }
.status-strip { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 42px; }
.status-box { padding: 14px 16px; border-radius: 12px; background: var(--paper); }
.status-box span { display: block; color: var(--ink-soft); font-size: 11px; }
.status-box strong { display: block; margin-top: 6px; font-size: 20px; }
.status-box.zero { background: #fff0eb; color: var(--red); }
.platforms { position: relative; z-index: 1; margin-top: 22px; }
.platform-row { display: grid; grid-template-columns: 72px 1fr 44px; gap: 10px; align-items: center; margin-top: 10px; font-size: 11px; }
.platform-row strong { text-align: right; font-weight: 750; }
.bar { height: 6px; overflow: hidden; border-radius: 20px; background: var(--paper-deep); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.method-card { margin: 18px 0 74px; border: 1px solid var(--line); border-radius: 16px; background: transparent; }
.method-toggle { width: 100%; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-weight: 750; }
.method-index { display: inline-flex; margin-right: 14px; padding: 4px 8px; border-radius: 5px; background: var(--cyan); color: var(--blue-dark); font-size: 10px; letter-spacing: .12em; }
.toggle-icon { font-size: 24px; font-weight: 300; transition: transform .2s ease; }
.method-toggle[aria-expanded="true"] .toggle-icon { transform: rotate(45deg); }
.method-body { padding: 0 22px 24px; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.method-body:not([hidden]) { display: grid; }
.method-body h3 { margin: 0 0 8px; font-size: 12px; }
.method-body p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
code { padding: 2px 5px; border-radius: 4px; background: var(--paper-deep); font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }

.explorer { margin-bottom: 80px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.explorer-head { padding: 32px; display: flex; align-items: end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); }
.explorer-head h2 { margin: 8px 0 0; font-family: Georgia, serif; font-size: 38px; font-weight: 500; letter-spacing: -.03em; }
.download-btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: white; cursor: pointer; font-size: 12px; font-weight: 750; }
.download-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, 185px); gap: 12px; padding: 20px 32px; border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.search-icon { color: var(--blue); font-size: 24px; line-height: 0; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.select-wrap { min-height: 48px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.select-wrap > span { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.select-wrap select { width: 100%; margin-top: 3px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; }
.results-meta { display: flex; justify-content: space-between; padding: 14px 32px; color: var(--ink-soft); font-size: 11px; background: #faf8f3; border-bottom: 1px solid var(--line); }
.results-meta strong { color: var(--ink); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { padding: 14px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); background: var(--white); text-align: left; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 17px 12px; border-bottom: 1px solid #e9e5dc; vertical-align: top; font-size: 12px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f7f9ff; }
.col-index { width: 56px; }
.col-topic { width: 190px; }
.col-title { width: 36%; }
.col-asset { width: 250px; }
.col-url { width: 180px; }
.row-index { color: #9aa6b2; font-family: Georgia, serif; font-size: 14px; }
.topic-name { display: block; font-weight: 750; line-height: 1.4; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--paper); color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.badge.pending { background: #fff0eb; color: var(--red); }
.badge.processed { background: #e7f7ef; color: var(--green); }
.title-cell { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.55; font-weight: 620; }
.asset-cell { display: flex; align-items: flex-start; gap: 8px; }
.asset-id { overflow-wrap: anywhere; color: var(--ink-soft); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.5; }
.copy-btn { flex: 0 0 auto; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink-soft); cursor: pointer; font-size: 9px; }
.copy-btn:hover { color: var(--blue); border-color: var(--blue); }
.source-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: white; text-decoration: none; font-size: 10px; font-weight: 750; white-space: nowrap; }
.source-link:hover { background: var(--blue); }
.empty-state { padding: 80px 20px; text-align: center; }
.empty-zero { display: block; color: var(--red); font-family: Georgia, serif; font-size: 72px; }
.empty-state h3 { margin: 4px 0 8px; }
.empty-state p { max-width: 500px; margin: auto; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.pagination { padding: 18px 32px; display: flex; align-items: center; justify-content: center; gap: 20px; border-top: 1px solid var(--line); }
.pagination button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 700; }
.pagination button:disabled { cursor: not-allowed; opacity: .35; }
.pagination span { min-width: 96px; text-align: center; color: var(--ink-soft); font-size: 11px; }

footer { padding: 28px 0 42px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; padding: 11px 16px; border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 11px; font-weight: 700; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-note { max-width: 420px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1500px); }
  .topbar { height: 64px; }
  .brand { font-size: 10px; letter-spacing: .08em; }
  .snapshot { font-size: 10px; }
  .hero { padding: 54px 0 42px; }
  h1 { font-size: clamp(54px, 17vw, 78px); }
  .hero-copy { font-size: 15px; }
  .metrics, .topic-grid { grid-template-columns: 1fr; }
  .metric { min-height: 145px; border-left: 0; border-top: 1px solid var(--line); }
  .metric:first-child { border-top: 0; }
  .topic-card { min-height: 320px; }
  .topic-card h2 { font-size: 29px; }
  .method-body:not([hidden]) { grid-template-columns: 1fr; }
  .explorer-head { padding: 24px 18px; align-items: flex-start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; padding: 18px; }
  .results-meta { padding: 13px 18px; }
  .col-title { width: 330px; }
  .col-topic { width: 160px; }
  .pagination { padding: 16px; gap: 10px; }
  footer { gap: 20px; flex-direction: column; }
}
