:root {
  --ink: #162033;
  --muted: #68758a;
  --line: #dce2ea;
  --line-strong: #c9d2df;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --blue: #1456d9;
  --blue-dark: #0d3fa8;
  --blue-soft: #eaf1ff;
  --navy: #101b32;
  --green: #157a55;
  --green-soft: #e7f6ef;
  --amber: #a65f00;
  --amber-soft: #fff2d9;
  --red: #b33434;
  --shadow: 0 12px 34px rgba(24, 39, 75, .08);
  --radius: 10px;
  font-family: "IBM Plex Sans", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1180px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { border-color: var(--line-strong); background: white; }
.button.secondary:hover { border-color: var(--blue); color: var(--blue); }
.button.demo { margin-top: 11px; border: 1px solid var(--line); background: #f7f9fc; }
.button.disabled { background: #e9edf3; color: #8994a5; cursor: not-allowed; }
.wide { width: 100%; }

/* Access and registration */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(500px, .92fr) minmax(580px, 1.08fr); background: #fff; }
.auth-story { position: relative; padding: 54px 8vw 64px 5.5vw; color: white; background: var(--navy); overflow: hidden; display: flex; flex-direction: column; }
.auth-story::after { content: ""; position: absolute; width: 360px; height: 360px; right: -150px; bottom: 80px; border: 80px solid #174cc0; border-radius: 50%; opacity: .8; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: white; font-size: 19px; font-weight: 700; position: relative; z-index: 1; text-decoration: none; }
.auth-brand b:first-child { width: 34px; height: 34px; display: grid; place-items: center; color: var(--navy); background: #fff; border-radius: 7px; }
.auth-story-copy, .auth-copy { max-width: 560px; margin: auto 0; position: relative; z-index: 1; }
.auth-story-copy > span, .auth-kicker { display: inline-block; margin-bottom: 20px; color: #9ebdff; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.auth-story-copy h1, .auth-copy h1 { margin: 0; font-size: clamp(42px, 4vw, 64px); line-height: 1.05; letter-spacing: -.045em; }
.auth-story-copy p, .auth-copy p { max-width: 520px; margin: 24px 0 38px; color: #c0cce1; font-size: 16px; line-height: 1.75; }
.auth-proof { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.17); }
.auth-proof div { padding: 20px 14px 0 0; }
.auth-proof strong { display: block; font-size: 22px; }
.auth-proof span { color: #9eabc1; font-size: 12px; }
.auth-footnote { position: relative; z-index: 1; color: #8d9bb2; font-size: 12px; }
.auth-security { position: relative; z-index: 1; display: flex; gap: 11px; max-width: 540px; padding: 15px 0 0; border-top: 1px solid rgba(255,255,255,.14); color: #9eabc1; font-size: 12px; line-height: 1.55; }
.auth-security b { display: block; color: white; }
.auth-security .icon { color: #71d3aa; flex: 0 0 auto; }
.auth-panel { display: grid; place-items: center; background: white; }
.auth-form-wrap { display: grid; place-items: center; padding: 60px; background: #fff; }
.auth-card { width: min(430px, 100%); }
.auth-heading > span, .auth-card > span { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.auth-heading h2, .auth-card h2 { margin: 10px 0 8px; font-size: 34px; letter-spacing: -.03em; }
.auth-heading p, .auth-card > p { margin: 0 0 30px; color: var(--muted); }
.auth-form, .form-stack { display: grid; gap: 17px; }
.auth-form label, .form-stack label, .website-form label, .order-summary label { display: grid; gap: 8px; color: #354158; font-size: 13px; font-weight: 600; }
.auth-form input, .auth-form select, .form-stack input, .form-stack select, .website-form input, .website-form select, .order-summary input { width: 100%; height: 46px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 13px; color: var(--ink); background: #fff; outline: none; }
.auth-form input:focus, .auth-form select:focus, .form-stack input:focus, .form-stack select:focus, .website-form input:focus, .website-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.password-field, .domain-input { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 7px; padding-right: 12px; }
.password-field input, .domain-input input { border: 0; box-shadow: none !important; }
.password-field button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.domain-input { padding-left: 12px; color: var(--muted); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch button, .text-button { border: 0; background: transparent; color: var(--blue); font-weight: 600; cursor: pointer; }
.auth-note { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; color: #8994a5; }

/* Website qualification */
.onboarding-page { min-height: 100vh; background: #eef2f7; }
.minimal-header { height: 70px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); font-size: 19px; }
.onboarding-card { width: 640px; margin: 70px auto; padding: 42px 54px 48px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.progress-line { display: flex; align-items: center; margin-bottom: 40px; }
.progress-line span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: #e8edf4; color: #7f8a9b; font-size: 12px; font-weight: 700; }
.progress-line span.done, .progress-line span.active { color: #fff; background: var(--blue); }
.progress-line i { flex: 1; height: 1px; background: var(--line); }
.onboarding-heading > span { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.onboarding-heading h1 { margin: 9px 0 12px; font-size: 30px; letter-spacing: -.03em; }
.onboarding-heading p { margin: 0 0 28px; color: var(--muted); line-height: 1.7; }
.website-form { display: grid; gap: 19px; }
.gate-explanation { margin-top: 24px; padding: 16px; display: flex; gap: 12px; border: 1px solid #cfe0ff; background: #f1f6ff; border-radius: 8px; color: #4e607c; font-size: 13px; line-height: 1.55; }
.gate-explanation .icon { flex: 0 0 auto; color: var(--blue); }
.gate-explanation b { display: block; color: var(--ink); }

/* Application frame */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 226px; padding: 24px 14px; display: flex; flex-direction: column; background: var(--navy); color: white; z-index: 10; }
.brand { height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 11px; font-size: 18px; }
.brand > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: var(--navy); background: white; font-weight: 800; }
.sidebar nav { margin-top: 42px; display: grid; gap: 5px; }
.nav-item { height: 44px; padding: 0 12px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 12px; color: #9facbf; background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover { color: white; background: #172744; }
.nav-item.active { color: white; background: #1f4fa6; }
.nav-item em { margin-left: auto; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 12px; color: var(--navy); background: white; font-size: 11px; font-style: normal; font-weight: 700; }
.sidebar-guard { margin-top: auto; padding: 14px 10px; display: flex; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); color: #bec9d8; font-size: 12px; }
.sidebar-guard .icon { color: #71d3aa; }
.sidebar-guard small { display: block; margin-top: 3px; color: #76869d; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 70px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 8; }
.project small { display: block; color: var(--muted); font-size: 11px; }
.project strong { font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.plan-pill { padding: 7px 11px; border-radius: 6px; color: #38516f; background: #edf2f8; font-size: 12px; font-weight: 600; }
.avatar { width: 34px; height: 34px; border: 0; border-radius: 50%; color: white; background: var(--blue); font-weight: 700; }
.icon-button { width: 35px; height: 35px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.content { padding: 28px 30px 56px; }

.page-head { min-height: 100px; margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.page-head > div > span { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.page-head h1 { margin: 8px 0 7px; font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.access-meter { width: 224px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.access-meter > div { display: flex; justify-content: space-between; font-size: 12px; }
.access-meter i { height: 5px; margin: 10px 0 7px; display: block; background: #e4e9f0; border-radius: 4px; overflow: hidden; }
.access-meter i b { height: 100%; display: block; background: var(--blue); }
.access-meter small { color: var(--muted); }
.quota-strip { min-height: 38px; margin-bottom: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: 10px; }
.quota-strip > span { color: var(--blue); font-weight: 700; letter-spacing: .06em; }
.quota-strip b { color: var(--ink); font-weight: 600; }
.quota-strip em { padding: 3px 6px; color: #874a20; background: #fff0df; font-style: normal; }
.quota-strip small { margin-left: auto; }
.protection-banner { min-height: 58px; margin-bottom: 14px; padding: 10px 15px; display: flex; align-items: center; gap: 12px; color: #284365; border: 1px solid #c9dafa; border-radius: 8px; background: #edf4ff; }
.protection-banner > .icon { color: var(--blue); }
.protection-banner div { display: grid; gap: 2px; }
.protection-banner strong { font-size: 13px; }
.protection-banner span { font-size: 12px; color: #5d6e85; }
.protection-banner button { margin-left: auto; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; }

/* Search marketplace */
.search-console { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.search-line { height: 62px; padding: 9px 10px 9px 18px; display: flex; align-items: center; gap: 10px; }
.search-line > .icon { color: #8490a2; }
.search-line input { flex: 1; height: 42px; border: 0; outline: none; font-size: 14px; }
.quick-stats { height: 38px; padding: 0 17px; display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.quick-stats span + span { padding-left: 20px; border-left: 1px solid var(--line); }
.quick-stats button { margin-left: auto; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 600; cursor: pointer; }
.market-layout { display: grid; grid-template-columns: 248px minmax(720px, 1fr); gap: 14px; align-items: start; }
.filters, .results { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.filters { padding: 16px; position: sticky; top: 84px; }
.filter-title { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.filter-title strong { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.filter-title button { border: 0; background: transparent; color: var(--blue); font-size: 11px; cursor: pointer; }
.filter-grid { display: grid; gap: 13px; }
.filter-field { display: grid; gap: 6px; color: #536078; font-size: 11px; font-weight: 600; }
.filter-field select, .result-toolbar select { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--ink); font-size: 12px; }
.range-group { margin-top: 17px; }
.range-group > span, .single-range label { color: #536078; font-size: 11px; font-weight: 600; }
.range-group > div { margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.range-group input { width: 92px; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 12px; }
.range-group b { color: #a2abba; font-weight: 400; }
.single-range { margin: 17px 0; }
.single-range label { display: flex; justify-content: space-between; }
.single-range output { color: var(--blue); }
.single-range input { width: 100%; margin-top: 10px; accent-color: var(--blue); }
.result-toolbar { height: 58px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.result-toolbar > div { display: flex; align-items: baseline; gap: 9px; }
.result-toolbar strong { font-size: 13px; }
.result-toolbar span { color: var(--muted); font-size: 11px; }
.result-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.result-toolbar select { width: 175px; }
.table-wrap { overflow-x: auto; }
.resource-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.resource-table th { height: 39px; padding: 0 11px; color: #707c8f; background: #f7f9fb; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
.resource-table td { height: 69px; padding: 0 11px; border-bottom: 1px solid #edf0f4; font-size: 12px; vertical-align: middle; }
.resource-table tbody tr:hover { background: #f9fbff; }
.select-box { width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 1px solid #bfc8d5; border-radius: 4px; background: white; cursor: pointer; }
.select-box.selected { border-color: var(--blue); color: white; background: var(--blue); }
.select-box .icon { width: 13px; height: 13px; }
.publisher { padding: 0; display: grid; gap: 5px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.publisher strong { font-size: 13px; }
.publisher span { display: flex; align-items: center; gap: 4px; color: #6c788b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.publisher .icon { width: 11px; height: 11px; color: var(--blue); }
.country { display: flex; align-items: center; gap: 6px; }
.country b { min-width: 25px; padding: 3px 4px; border-radius: 3px; color: #3f4e63; background: #eaf0f6; font-size: 9px; text-align: center; }
.muted, .metric small, .price small { display: block; margin-top: 4px; color: #8994a4; font-size: 10px; }
.metric strong, .price strong { font-size: 13px; }
.spam { min-width: 38px; padding: 4px 6px; display: inline-block; border-radius: 4px; font-weight: 700; text-align: center; }
.spam.good { color: var(--green); background: var(--green-soft); }
.spam.medium { color: var(--amber); background: var(--amber-soft); }
.spam.high { color: var(--red); background: #fdeaea; }
.row-action { border: 0; display: flex; align-items: center; gap: 2px; color: var(--blue); background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }
.row-action .icon { width: 14px; }
.pagination { min-height: 51px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.pagination button { height: 30px; margin-left: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: white; cursor: pointer; }
.pagination button:disabled { color: #a7b0be; background: #f4f6f8; cursor: default; }
.loading-state { min-height: 340px; display: grid; place-items: center; color: var(--muted); }
.empty { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: #9aa5b5; }
.empty strong { color: var(--ink); }
.empty.large { min-height: 430px; border: 1px solid var(--line); border-radius: 10px; background: white; }

/* Detail drawer */
.drawer-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(12, 23, 42, .35); opacity: 0; visibility: hidden; transition: .2s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.detail-drawer { position: fixed; inset: 0 0 0 auto; width: 530px; z-index: 31; display: flex; flex-direction: column; background: white; box-shadow: -16px 0 50px rgba(25,27,25,.16); transform: translateX(100%); transition: transform .24s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-head { padding: 26px 28px 22px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-head > div > span { color: var(--blue); font-size: 11px; font-weight: 700; }
.drawer-head h2 { margin: 7px 0 6px; font-size: 24px; }
.drawer-head p { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.drawer-head p .icon { width: 12px; color: var(--blue); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 28px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; }
.metric-grid div { padding: 13px; border-right: 1px solid var(--line); }
.metric-grid div:last-child { border: 0; }
.metric-grid span { display: block; color: var(--muted); font-size: 10px; }
.metric-grid strong { font-size: 17px; }
.drawer-body section { margin-top: 28px; }
.section-title { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.section-title h3 { margin: 0; font-size: 15px; }
.section-title span { color: var(--muted); font-size: 10px; }
.drawer-body section > p { color: #58677c; font-size: 13px; line-height: 1.75; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-list span { padding: 5px 8px; border-radius: 4px; background: #eef2f7; color: #4e5e73; font-size: 10px; }
.offer-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.offer-list > div { padding: 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.offer-list > div:last-child { border: 0; }
.offer-list span { display: grid; gap: 4px; }
.offer-list b { font-size: 12px; }
.offer-list small { color: var(--muted); font-size: 10px; }
.condition-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.condition-list li { display: flex; gap: 8px; color: #59677a; font-size: 12px; }
.condition-list .icon { width: 15px; color: var(--green); }
.domain-policy { margin-top: 28px; padding: 14px; display: flex; gap: 10px; color: #4d607a; background: #eef4ff; border: 1px solid #cfddf6; border-radius: 8px; font-size: 11px; line-height: 1.55; }
.domain-policy .icon { color: var(--blue); flex: 0 0 auto; }
.domain-policy b { display: block; color: var(--ink); }
.drawer-footer { min-height: 72px; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.drawer-footer > div { display: grid; }
.drawer-footer span { color: var(--muted); font-size: 10px; }
.drawer-footer strong { font-size: 19px; }

/* Plan and orders */
.plan-layout { display: grid; grid-template-columns: minmax(620px, 1fr) 320px; gap: 16px; align-items: start; }
.plan-list, .order-summary, .orders-list article { border: 1px solid var(--line); border-radius: 10px; background: white; }
.plan-list > header { height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.plan-list > header strong { font-size: 13px; }
.plan-list > header span { color: var(--muted); font-size: 11px; }
.plan-list article { min-height: 74px; padding: 12px 16px; display: grid; grid-template-columns: 34px 1fr auto 32px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.plan-list article:last-child { border: 0; }
.plan-index { color: #9aa5b5; font: 11px ui-monospace, monospace; }
.plan-list article div { display: grid; gap: 5px; }
.plan-list article div strong { font-size: 13px; }
.plan-list article div small { color: var(--muted); font-size: 10px; }
.plan-list article > button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: #8b96a7; cursor: pointer; }
.order-summary { padding: 20px; position: sticky; top: 84px; }
.order-summary > span { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.order-summary > div { margin-top: 18px; display: flex; justify-content: space-between; }
.order-summary small { color: var(--muted); }
.order-summary hr { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.order-summary .summary-total { margin: 0 0 22px; align-items: end; }
.summary-total strong { font-size: 23px; }
.order-summary label { margin-bottom: 15px; }
.order-summary > p { display: flex; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.order-summary > p .icon { width: 14px; flex: 0 0 auto; color: var(--blue); }
.orders-list { display: grid; gap: 14px; }
.orders-list article header { height: 62px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.orders-list header div { display: grid; gap: 3px; }
.orders-list header span { color: var(--muted); font-size: 10px; }
.orders-list header strong { font: 600 13px ui-monospace, monospace; }
.status-badge { padding: 6px 9px; border-radius: 5px; color: var(--amber) !important; background: var(--amber-soft); font-weight: 700; }
.order-items { padding: 7px 18px; }
.order-items > div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f4; }
.order-items > div:last-child { border: 0; }
.order-items span { display: grid; gap: 4px; }
.order-items b { font-size: 12px; }
.order-items small { color: var(--muted); font-size: 10px; }
.orders-list article footer { min-height: 67px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border-radius: 0 0 10px 10px; }
.orders-list footer > span { color: var(--muted); font-size: 11px; }
.orders-list footer > div { display: flex; align-items: center; gap: 13px; }
.orders-list footer small { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: 480px; padding: 12px 17px; border-radius: 7px; color: white; background: #17253b; box-shadow: var(--shadow); font-size: 13px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1250px) {
  body { min-width: 1024px; }
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { width: 190px; }
  .content { padding-left: 20px; padding-right: 20px; }
  .market-layout { grid-template-columns: 228px minmax(650px, 1fr); }
  .resource-table th, .resource-table td { padding-left: 8px; padding-right: 8px; }
}

/* Restored research-workbench visual language from the initial product direction. */
:root {
  --paper: #f3f1eb;
  --paper-deep: #ebe8df;
  --surface: #fbfaf6;
  --surface-strong: #ffffff;
  --ink: #181a19;
  --muted: #696c69;
  --line: #d9d5cb;
  --line-strong: #c6c1b6;
  --blue: #315df4;
  --blue-dark: #2145c7;
  --blue-soft: #e9edff;
  --navy: #202220;
  --signal: #b8e34a;
  --signal-soft: #eff8d8;
  --green: #557115;
  --green-soft: #eff8d8;
  --amber: #9a6619;
  --amber-soft: #f7ecd9;
  --shadow: 0 18px 50px rgba(25, 27, 25, .12);
}

::selection { color: #151713; background: var(--signal); }
body { background: var(--paper); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

.app-shell { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar {
  width: 76px;
  padding: 0 10px 18px;
  align-items: center;
  background: #202220;
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand { width: 76px; height: 68px; padding: 0; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand > span { width: 38px; height: 38px; border-radius: 3px; color: #171917; background: var(--signal); font-size: 0; }
.brand > span::after { content: "MD"; font-size: 11px; letter-spacing: -.03em; }
.brand > b { display: none; }
.sidebar nav { width: 100%; margin-top: 18px; gap: 8px; }
.nav-item {
  position: relative;
  width: 54px;
  height: 56px;
  padding: 0;
  align-self: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-radius: 4px;
  color: #9da19d;
}
.nav-item span { font-size: 10px; letter-spacing: .04em; }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item.active::before { content: ""; position: absolute; left: -11px; width: 3px; height: 28px; border-radius: 0 2px 2px 0; background: var(--signal); }
.nav-item em { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; color: #171917; background: var(--signal); font-size: 9px; }
.sidebar-guard { margin-top: auto; width: 42px; padding: 14px 0 0; justify-content: center; border-top-color: rgba(255,255,255,.1); }
.sidebar-guard .icon { color: var(--signal); }
.sidebar-guard span { display: none; }
.main { grid-column: 2; }

.topbar {
  height: 68px;
  padding: 0 30px;
  background: rgba(243,241,235,.94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}
.project small { color: var(--muted); }
.project strong { font-family: "Noto Serif SC", serif; }
.plan-pill { border: 1px solid var(--line-strong); border-radius: 2px; color: var(--muted); background: transparent; letter-spacing: .02em; }
.avatar { border-radius: 50%; color: #202220; background: #e8e3d8; border: 1px solid var(--line-strong); }
.icon-button { border-radius: 4px; border-color: var(--line-strong); background: var(--surface); }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 38px 36px 64px; }

.page-head { min-height: auto; margin-bottom: 28px; align-items: flex-end; }
.page-head > div > span { display: none; }
.page-head h1 { margin: 0 0 8px; font: 700 clamp(29px, 3vw, 42px)/1.2 "Noto Serif SC", "Songti SC", serif; letter-spacing: -.04em; }
.page-head p { max-width: 680px; font-size: 13px; }
.access-meter { width: 230px; padding: 12px 14px; border-radius: 4px; background: transparent; box-shadow: none; }
.access-meter i { background: var(--paper-deep); }
.access-meter i b { background: var(--signal); }

.sample-data-notice {
  margin: -12px 0 18px;
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d8d0bd;
  border-radius: 3px;
  background: #f1ede3;
  color: #4f493e;
}
.sample-data-notice .icon { width: 16px; margin-top: 1px; color: #75674d; }
.sample-data-notice div { display: grid; gap: 2px; }
.sample-data-notice strong { font: 600 12px "Noto Serif SC", serif; }
.sample-data-notice span { color: #716a5e; font-size: 10px; line-height: 1.55; }

.protection-banner {
  min-height: 52px;
  margin-bottom: 18px;
  border-color: #cfddac;
  border-radius: 3px;
  color: #424c31;
  background: var(--signal-soft);
}
.protection-banner > .icon { color: #657e29; }
.protection-banner span { color: #667054; }
.protection-banner button { color: #445b14; }

.search-console { margin-bottom: 18px; overflow: hidden; border: 0; border-radius: 5px; color: white; background: #202220; }
.search-mode-grid { padding: 16px 18px 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.search-mode-grid label { min-width: 0; display: grid; gap: 6px; }
.search-mode-grid label > span { color: #aeb2ad; font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.search-mode-grid label > div { height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #50534f; border-radius: 3px; background: #292c29; }
.search-mode-grid label > div:focus-within { border-color: var(--signal); }
.search-mode-grid .icon { width: 15px; color: #9fa39e; flex: 0 0 auto; }
.search-mode-grid input { width: 100%; min-width: 0; height: 38px; border: 0; outline: 0; color: white; background: transparent; caret-color: var(--signal); font-size: 11px; }
.search-mode-grid input::placeholder { color: #858984; }
.discovery-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.known-domain-search { padding: 15px 18px; display: grid; grid-template-columns: minmax(210px, .7fr) minmax(420px, 1.3fr); align-items: center; gap: 18px; border-top: 1px solid rgba(255,255,255,.12); background: #292c29; }
.known-domain-search > div { display: grid; gap: 4px; }
.known-domain-search > div > span { color: var(--signal); font: 600 12px "Noto Serif SC", serif; }
.known-domain-search > div > small { color: #989d97; font-size: 9px; line-height: 1.5; }
.known-domain-search label { height: 42px; padding-left: 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #5b6059; border-radius: 3px; background: #202220; }
.known-domain-search label:focus-within { border-color: var(--signal); }
.known-domain-search label .icon { width: 15px; color: #9fa39e; }
.known-domain-search input { min-width: 0; flex: 1; height: 40px; border: 0; outline: 0; color: white; background: transparent; font-size: 11px; }
.known-domain-search .button { height: 42px; margin: -1px -1px -1px 0; border-radius: 0 3px 3px 0; color: #171917; background: var(--signal); border-color: var(--signal); }
.known-quote-result { margin: 0 18px 15px; padding: 13px 14px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 18px; color: var(--ink); border: 1px solid #cfddac; border-radius: 3px; background: var(--signal-soft); }
.known-quote-result > div { display: grid; gap: 3px; }
.known-quote-result > div > span { color: #657e29; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.known-quote-result > div > strong { font: 700 13px "Noto Serif SC", serif; }
.known-quote-result > div > small { display: flex; align-items: center; gap: 5px; color: #626b52; font-size: 10px; }
.known-quote-result > div > small .icon { width: 12px; }
.known-quote-result dl { margin: 0; display: flex; gap: 18px; }
.known-quote-result dl div { display: grid; gap: 2px; }
.known-quote-result dt { color: #788165; font-size: 8px; text-transform: uppercase; }
.known-quote-result dd { margin: 0; font-size: 11px; font-weight: 700; }
.search-actions { min-height: 48px; padding: 0 18px 14px; display: flex; align-items: center; gap: 16px; }
.search-actions > span { flex: 1; color: #9da19d; font-size: 10px; }
.search-actions .button { min-width: 136px; color: #171917; background: var(--signal); border-color: var(--signal); border-radius: 3px; }
.search-actions .button:hover { color: #171917; background: #c7ef61; }
.search-line { height: 64px; padding: 10px 10px 10px 18px; }
.search-line > .icon { color: #aeb2ad; }
.search-line input { color: white; background: transparent; caret-color: var(--signal); }
.search-line input::placeholder { color: #b8bbb7; }
.search-line .button.primary { color: #171917; background: var(--signal); border-color: var(--signal); border-radius: 3px; }
.search-line .button.primary:hover { color: #171917; background: #c7ef61; }
.quick-stats { border-top-color: rgba(255,255,255,.12); color: #aaada9; }
.quick-stats span + span { border-left-color: rgba(255,255,255,.14); }
.quick-stats button { color: var(--signal); }
.search-insight { margin: 0 18px 14px; padding: 10px 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid rgba(172,194,113,.42); color: #535c48; background: rgba(215,239,151,.18); }
.search-insight > .icon { width: 14px; height: 14px; margin-top: 2px; color: #607929; }
.search-insight > div { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.search-insight strong { color: var(--ink); font-size: 10px; }
.search-insight span { color: var(--muted); font-size: 9px; }
.search-insight b { color: #405711; font-weight: 600; }

.market-layout { grid-template-columns: 224px minmax(760px, 1fr); gap: 0; border-top: 1px solid var(--line-strong); }
.filters, .results { border: 0; border-radius: 0; background: transparent; }
.filters { top: 82px; padding: 21px 24px 0 0; border-right: 1px solid var(--line); }
.filter-title { margin-bottom: 19px; }
.filter-title strong { font-size: 12px; }
.filter-field { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.filter-field select, .result-toolbar select, .range-group input { border-radius: 3px; border-color: var(--line); background: var(--surface); }
.range-group, .single-range { padding-top: 16px; border-top: 1px solid var(--line); }
.filters > .button.secondary { border-radius: 3px; border-color: var(--ink); background: var(--ink); color: white; }
.results { padding: 18px 0 0 24px; }
.result-toolbar { height: 48px; padding: 0 0 12px; border-bottom-color: var(--line-strong); }
.result-toolbar strong { font-family: "Noto Serif SC", serif; }
.table-wrap { overflow: visible; }
.resource-table { background: transparent; }
.resource-table th { height: 42px; padding: 0 9px; color: var(--muted); background: transparent; border-bottom-color: var(--line); font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.resource-table td { height: 78px; padding: 10px 9px; border-bottom-color: var(--line); }
.resource-table tbody tr { transition: background .14s ease; }
.resource-table tbody tr:hover { background: rgba(255,255,255,.64); }
.publisher strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font: 700 13px/1.4 "Noto Serif SC", serif; }
.publisher span { color: var(--muted); }
.publisher > button { max-width: 230px; padding: 0; overflow: hidden; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.publisher span code { color: inherit; font-family: inherit; }
.unlock-button { padding: 2px 6px; border: 1px solid #9aab70; border-radius: 2px; color: #445b14; background: transparent; font: 600 9px "IBM Plex Sans", "Noto Sans SC", sans-serif; cursor: pointer; }
.unlock-button:hover { color: #171917; background: var(--signal); border-color: var(--signal); }
.unlocked-badge { padding: 2px 5px; border-radius: 2px; color: #445b14; background: var(--signal-soft); font: 600 8px "IBM Plex Sans", "Noto Sans SC", sans-serif; }
.publisher .match-label { margin-left: 5px; padding: 2px 5px; border-radius: 2px; color: #445b14; background: var(--signal-soft); font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif; font-size: 8px; font-style: normal; font-weight: 600; letter-spacing: .02em; }
.country b { border-radius: 2px; background: var(--paper-deep); }
.spam { border-radius: 2px; }
.row-action { color: var(--blue); }
.pagination { padding-left: 0; padding-right: 0; }
.pagination button { border-radius: 3px; background: transparent; }

.add-plan-button {
  min-width: 86px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: #3f443f;
  background: var(--surface);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.add-plan-button .icon { width: 14px; height: 14px; }
.add-plan-button:hover { border-color: var(--ink); background: white; }
.add-plan-button.selected { border-color: #738f30; color: #34440f; background: var(--signal-soft); }

.detail-drawer { width: min(720px, calc(100vw - 76px)); background: var(--paper); box-shadow: -20px 0 70px rgba(22,24,22,.18); }
.drawer-head { background: rgba(243,241,235,.95); }
.drawer-head h2 { font-family: "Noto Serif SC", serif; }
.metric-grid, .offer-list { border-radius: 4px; background: var(--surface); }
.domain-policy { border-radius: 3px; border-color: #cfddac; color: #596248; background: var(--signal-soft); }
.case-list { display: grid; gap: 8px; }
.case-list article { padding: 13px 14px; display: grid; gap: 5px; border: 1px solid var(--line); background: var(--surface); }
.case-list article strong { font: 700 12px "Noto Serif SC", serif; }
.case-list article p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.case-list article small { color: #52651f; font-size: 9px; font-weight: 600; }
.drawer-head p { display: flex; align-items: center; gap: 6px; }
.drawer-head p .unlock-button { margin-left: 4px; }
.status-badge.paid { color: var(--green) !important; background: var(--green-soft); }
.order-items small { display: flex; align-items: center; gap: 5px; }
.order-items small .icon { width: 12px; height: 12px; color: var(--green); }
.drawer-footer { background: var(--surface); }

.plan-list, .order-summary, .orders-list article { border-radius: 5px; background: var(--surface); }
.plan-list article div strong, .orders-list article header strong { font-family: "Noto Serif SC", serif; }
.order-summary > span { display: inline-block; padding-bottom: 5px; border-bottom: 2px solid var(--signal); }

.auth-story { background: #202220; }
.auth-story::after { border-color: var(--signal); opacity: .72; }
.auth-kicker, .auth-heading > span { color: var(--blue); }
.auth-proof strong { font-family: "Noto Serif SC", serif; }
.auth-form-wrap, .auth-panel { background: var(--paper); }
.auth-heading h2 { font-family: "Noto Serif SC", serif; }
.auth-card, .auth-form-wrap { width: min(500px, 100%); }
.auth-form input, .auth-form select, .form-stack input, .form-stack select { border-radius: 3px; background: var(--surface); }

.order-timeline { margin: 4px 20px 16px; padding: 14px 16px; display: grid; gap: 12px; border-left: 1px solid var(--line); background: var(--paper); }
.order-timeline > div { display: flex; gap: 10px; }
.order-timeline i { width: 8px; height: 8px; margin: 4px 0 0 -20px; flex: 0 0 auto; border: 2px solid var(--paper); border-radius: 50%; background: #929790; box-shadow: 0 0 0 1px #929790; }
.order-timeline .current i { background: var(--signal); box-shadow: 0 0 0 1px #718d2c; }
.order-timeline span { display: grid; gap: 3px; }
.order-timeline b { font-size: 11px; }
.order-timeline small { color: var(--muted); font-size: 9px; }
.order-timeline a { color: var(--blue); font-size: 10px; }

.admin-shell { min-height: 100vh; color: var(--ink); background: var(--paper); }
.admin-top { height: 64px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; color: white; background: #202220; }
.admin-top > div { display: flex; align-items: center; gap: 12px; }
.admin-top strong { font: 700 18px "Noto Serif SC",serif; }
.admin-top span { padding-left: 12px; border-left: 1px solid #555; color: var(--signal); font-size: 10px; letter-spacing: .08em; }
.admin-main { max-width: 1500px; margin: 0 auto; padding: 38px 36px 70px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.admin-heading span { color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.admin-heading h1 { margin: 7px 0 5px; font: 700 34px "Noto Serif SC",serif; }
.admin-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.driver-badges { display: flex; gap: 7px; }
.driver-badges span { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); letter-spacing: 0; }
.admin-stats { margin: 28px 0 18px; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); background: var(--surface); }
.admin-stats article { padding: 20px; display: grid; gap: 8px; border-right: 1px solid var(--line); }
.admin-stats article:last-child { border: 0; }
.admin-stats span { color: var(--muted); font-size: 9px; }
.admin-stats strong { font: 700 27px "Noto Serif SC",serif; }
.admin-grid { display: grid; grid-template-columns: minmax(700px,1.65fr) minmax(360px,.85fr); gap: 18px; align-items: start; }
.admin-panel { border: 1px solid var(--line); background: var(--surface); }
.admin-panel > header { min-height: 66px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.admin-panel > header > div { display: grid; gap: 3px; }
.admin-panel > header span { color: var(--blue); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.admin-panel > header strong { font: 700 15px "Noto Serif SC",serif; }
.admin-panel > header form { display: flex; gap: 6px; }
.admin-panel input,.admin-panel select { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--paper); font: inherit; font-size: 10px; }
.admin-resource-form { padding: 14px 18px; display: grid; grid-template-columns: repeat(6,minmax(80px,1fr)); gap: 7px; border-bottom: 1px solid var(--line); }
.admin-resource-form input[name="domain"],.admin-resource-form input[name="name"],.admin-resource-form input[name="keywords"] { grid-column: span 2; }
.admin-import { padding: 11px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.admin-import label { cursor: pointer; }
.admin-import small { color: var(--muted); font-size: 9px; }
.admin-table-wrap { max-height: 520px; overflow: auto; }
.admin-table-wrap table { width: 100%; border-collapse: collapse; font-size: 10px; }
.admin-table-wrap th,.admin-table-wrap td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table-wrap th { position: sticky; top: 0; color: var(--muted); background: var(--paper); font-size: 8px; letter-spacing: .05em; }
.text-button.danger { color: #a33d35; }
.admin-orders { max-height: 750px; padding: 12px; display: grid; gap: 9px; overflow: auto; }
.admin-orders article { padding: 13px; display: grid; grid-template-columns: 1fr 130px; gap: 8px; border: 1px solid var(--line); background: var(--paper); }
.admin-orders article > div { display: grid; gap: 4px; }
.admin-orders small { color: var(--muted); font-size: 9px; }
.admin-orders label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; }
.admin-orders input { grid-column: span 2; }
.admin-orders button { justify-self: end; grid-column: span 2; }

/* Resource quality and quote selection */
.freshness-strip { margin-top: 16px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #cbd8aa; background: #f4f8e9; }
.freshness-strip > span { display: flex; align-items: center; gap: 7px; color: #425714; font-size: 10px; }
.freshness-strip .icon { width: 14px; height: 14px; }
.freshness-strip small { color: #667251; font-size: 9px; text-align: right; }
.freshness-strip.needs-review { border-color: #dec9a6; background: #fbf3e6; }
.freshness-strip.needs-review > span { color: #7c5318; }
.offer-options { display: grid; gap: 8px; }
.offer-option { width: 100%; padding: 14px; display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: start; gap: 11px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.offer-option:hover { border-color: #a7b66f; background: #f8faef; }
.offer-option.selected { border-color: #779331; background: #f2f8df; box-shadow: 0 5px 16px rgba(72,91,30,.08); }
.offer-radio { width: 14px; height: 14px; margin-top: 2px; border: 1px solid #939b85; border-radius: 50%; background: white; }
.offer-option.selected .offer-radio { border: 4px solid #6f8c28; }
.offer-copy { display: grid; gap: 4px; }
.offer-copy b { font-size: 12px; }
.offer-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.offer-copy em { color: #536143; font-size: 9px; font-style: normal; }
.offer-price { display: grid; justify-items: end; gap: 4px; }
.offer-price strong { font: 700 16px "Noto Serif SC",serif; }
.offer-price small { color: var(--muted); font-size: 9px; }
.offer-empty { padding: 18px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 11px; text-align: center; }
.data-provenance dl { margin: 0; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data-provenance dl div { padding: 10px 0; }
.data-provenance dt { color: var(--muted); font-size: 8px; }
.data-provenance dd { margin: 3px 0 0; font-size: 10px; }
.drawer-footer > div small { color: var(--muted); font-size: 9px; }
.plan-list article div em,.order-items em { color: #617052; font-size: 9px; font-style: normal; }

.admin-stats { grid-template-columns: repeat(6,1fr); }
.admin-stats article:nth-child(4) strong,.admin-stats article:nth-child(5) strong { color: var(--amber); }
.resource-editor { display: block; padding: 0; }
.editor-section { padding: 13px 18px; display: grid; grid-template-columns: 120px repeat(4,minmax(90px,1fr)); gap: 7px; border-bottom: 1px solid var(--line); }
.editor-section > strong { align-self: center; color: var(--muted); font-size: 9px; }
.resource-editor textarea { min-height: 82px; padding: 9px; resize: vertical; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--paper); font: inherit; font-size: 10px; }
.editor-more { padding: 11px 18px; border-bottom: 1px solid var(--line); }
.editor-more summary { color: var(--blue); font-size: 10px; font-weight: 600; cursor: pointer; }
.editor-more[open] { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 120px; gap: 7px; }
.editor-more[open] summary { grid-column: 1 / -1; }
.editor-actions { padding: 12px 18px; display: flex; justify-content: flex-end; gap: 7px; }
.admin-import { flex-wrap: wrap; }
.admin-import a { color: var(--blue); }
.admin-import small { flex: 1 1 280px; }
.import-report { padding: 12px 18px; display: grid; gap: 5px; border-bottom: 1px solid var(--line); background: #f3f7e8; }
.import-report strong { font-size: 11px; }
.import-report > span { color: #5f694f; font-size: 9px; }
.import-report details { color: var(--muted); font-size: 9px; }
.import-report p { margin: 5px 0 0; }
.admin-table-wrap td > small { margin-top: 4px; display: block; color: var(--muted); font-size: 8px; }
.admin-table-wrap td:last-child { display: flex; gap: 8px; }
.admin-table-wrap tr.archived { opacity: .58; }
.resource-state { padding: 4px 6px; border: 1px solid #c3d498; color: #4c6514; background: #f3f8e5; font-size: 8px; }
.resource-state.inactive { border-color: var(--line); color: var(--muted); background: var(--paper); }

@media (max-width: 1250px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { width: 76px; }
  .content { padding-left: 24px; padding-right: 24px; }
  .market-layout { grid-template-columns: 210px minmax(740px, 1fr); }
}

@media (max-width: 1050px) {
  body { min-width: 0; }
  .topbar { padding: 0 20px; }
  .content { padding: 30px 20px 54px; }
  .market-layout { display: block; }
  .filters { position: static; padding: 18px 0 20px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .filters .range-group { width: calc(33.333% - 8px); margin-right: 8px; display: inline-block; vertical-align: top; }
  .range-group input { width: calc(50% - 12px); }
  .filters .single-range { width: calc(50% - 6px); margin-right: 6px; display: inline-block; vertical-align: top; }
  .filters > .button.secondary { width: 180px; margin-top: 4px; }
  .results { padding: 18px 0 0; }
  .table-wrap { overflow-x: auto; }
  .resource-table { min-width: 1040px; }
  .search-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .known-domain-search { grid-template-columns: 1fr; }
  .known-quote-result { grid-template-columns: 1fr auto; }
  .known-quote-result dl { grid-column: 1 / -1; grid-row: 2; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(3,1fr); }
  .editor-section { grid-template-columns: 100px repeat(3,minmax(90px,1fr)); }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { inset: auto 0 0; width: 100%; height: 64px; padding: 0 10px; flex-direction: row; border: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .brand, .sidebar-guard { display: none; }
  .sidebar nav { margin: 0; flex: 1; height: 64px; display: flex; flex-direction: row; justify-content: space-around; }
  .nav-item { width: 92px; height: 56px; }
  .nav-item.active::before { inset: auto auto -4px; width: 28px; height: 3px; border-radius: 2px 2px 0 0; }
  .main { width: 100%; }
  .topbar { height: 60px; padding: 0 14px; }
  .project small { display: none; }
  .project strong { font-size: 12px; }
  .plan-pill { display: none; }
  .content { padding: 24px 14px 92px; }
  .page-head { display: block; }
  .page-head h1 { font-size: 28px; }
  .access-meter { width: 100%; margin-top: 18px; }
  .quota-strip { flex-wrap: wrap; gap: 6px 12px; }
  .quota-strip small { width: 100%; margin-left: 0; }
  .protection-banner { align-items: flex-start; }
  .protection-banner button { display: none; }
  .search-line { height: auto; min-height: 62px; flex-wrap: wrap; }
  .search-line input { min-width: calc(100% - 34px); }
  .search-line .button { width: 100%; }
  .search-mode-grid { grid-template-columns: 1fr; }
  .known-domain-search { padding: 14px; }
  .known-domain-search label { height: auto; padding: 8px; flex-wrap: wrap; }
  .known-domain-search input { min-width: calc(100% - 30px); }
  .known-domain-search .button { width: 100%; margin: 0; border-radius: 3px; }
  .known-quote-result { margin: 0 14px 14px; grid-template-columns: 1fr; }
  .known-quote-result dl { grid-column: auto; grid-row: auto; flex-wrap: wrap; }
  .search-actions { align-items: stretch; flex-direction: column; }
  .search-actions .button { width: 100%; }
  .quick-stats { height: auto; min-height: 42px; flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .quick-stats span + span { padding-left: 0; border-left: 0; }
  .quick-stats button { margin-left: 0; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .range-group, .filters .single-range { width: 100%; margin-right: 0; display: block; }
  .filters > .button.secondary { width: 100%; }
  .result-toolbar { height: auto; min-height: 54px; gap: 10px; }
  .result-toolbar > div { display: grid; }
  .result-toolbar label { align-items: flex-start; flex-direction: column; }
  .detail-drawer { width: 100%; }
  .plan-layout { display: block; }
  .order-summary { position: static; margin-top: 14px; }
  .admin-main { padding: 24px 14px 60px; }
  .admin-top { padding: 0 14px; }
  .admin-heading { display: block; }
  .driver-badges { margin-top: 14px; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
  .admin-stats article:nth-child(2) { border-right: 0; }
  .admin-resource-form { grid-template-columns: repeat(2,1fr); }
  .editor-section { grid-template-columns: 1fr 1fr; }
  .editor-section > strong { grid-column: 1 / -1; }
  .editor-more[open] { grid-template-columns: 1fr; }
  .editor-more[open] summary { grid-column: auto; }
  .freshness-strip { align-items: flex-start; flex-direction: column; gap: 4px; }
  .freshness-strip small { text-align: left; }
  .offer-option { grid-template-columns: 18px 1fr; }
  .offer-price { grid-column: 2; justify-items: start; }
}
