:root {
  --ink: #111827;
  --muted: #667085;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --line: #e4e7ec;
  --navy: #0b1f35;
  --navy-soft: #31506f;
  --accent: #9b6a2f;
  --accent-soft: #f6efe6;
  --green: #177245;
  --green-bg: #e9f6ef;
  --amber-bg: #fff4e5;
  --shadow: 0 14px 34px rgb(15 23 42 / 6%);
  --hairline: 1px solid var(--line);
  font-family: Inter, "Avenir Next", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
h1, h2, h3, p { margin: 0; }

.hero {
  color: #f8fafc;
  background:
    radial-gradient(circle at 78% 18%, rgb(78 103 133 / 34%), transparent 32%),
    linear-gradient(135deg, #081727 0%, #0d253f 58%, #12263a 100%);
  padding: 24px max(calc((100vw - 1240px) / 2), 34px) 42px;
}
.nav, .hero-grid, .layout { max-width: 1240px; margin: 0 auto; }
.nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 52px; }
.brand { display: flex; gap: 14px; align-items: center; }
.mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgb(255 255 255 / 22%); border-radius: 50%;
  font: 600 15px Georgia, serif; color: #d8b878;
  background: rgb(255 255 255 / 5%);
}
.brand-title { font-size: 18px; letter-spacing: .01em; font-weight: 650; }
.brand-subtitle { font-size: 12px; color: #b7c5d5; margin-top: 2px; }
.primary {
  color: white; background: #173d63; border-radius: 999px;
  padding: 10px 18px; font-weight: 650;
  box-shadow: 0 8px 18px rgb(7 24 40 / 12%);
}
.primary:hover { background: #0f304f; }
.hero-grid { display: grid; grid-template-columns: 1fr 510px; gap: 44px; align-items: end; }
.eyebrow { color: #a88b5c; text-transform: uppercase; letter-spacing: .18em; font-size: 10px; font-weight: 800; margin-bottom: 12px; }
h1 { font-family: Georgia, "Songti SC", serif; font-size: 45px; line-height: 1.14; font-weight: 500; letter-spacing: -.03em; }
.intro { color: #c7d2df; margin-top: 18px; max-width: 560px; line-height: 1.75; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 4px; padding: 18px 16px;
  backdrop-filter: blur(10px);
}
.stat-value { font-size: 29px; color: #fff; font-weight: 550; letter-spacing: -.02em; }
.stat-label { margin-top: 5px; color: #aab8c8; font-size: 12px; }

.layout { display: grid; grid-template-columns: 292px 1fr; gap: 22px; padding: 26px 0 56px; }
.side-panel { display: flex; flex-direction: column; gap: 17px; }
.panel {
  background: var(--panel); border: var(--hairline); border-radius: 8px;
  padding: 22px; box-shadow: var(--shadow);
}
.section-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; gap: 15px; }
.section-heading h2 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.badge { font-size: 12px; color: var(--navy-soft); background: #f2f5f8; border: var(--hairline); padding: 4px 8px; border-radius: 999px; }
.badge.ready { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.badge.attention { color: #9a3412; background: #ffedd5; border-color: #fed7aa; }
.jurisdictions { display: flex; flex-direction: column; gap: 4px; }
.jurisdiction {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 8px;
  border-radius: 6px; font-size: 14px;
}
.jurisdiction:hover { background: #f5f7fa; }
.jurisdiction span:last-child { font-size: 12px; color: var(--muted); }
.small-note { background: #f8fafc; box-shadow: none; line-height: 1.65; color: #475467; font-size: 13px; }
.provider-panel h2 { font-size: 18px; margin-bottom: 12px; }
.provider-status { font-size: 12px; color: var(--muted); line-height: 1.6; }
.provider-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--ink); }
.glossary-panel h2 { font-size: 18px; }
.glossary-form { display: flex; flex-direction: column; gap: 8px; }
.glossary-list { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; }
.term { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.term span, .muted { color: var(--muted); font-size: 12px; }
.workspace { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.quiet { color: var(--navy-soft); background: transparent; padding: 4px 0; font-size: 13px; }
.product-panel { background: linear-gradient(135deg, #ffffff, #f8fafc); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-card {
  border: var(--hairline); border-radius: 7px; padding: 16px;
  background: rgb(255 255 255 / 78%);
}
.feature-step {
  display: inline-block; color: var(--accent); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; margin-bottom: 9px;
}
.feature-card h3 { font-size: 15px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.platform-preview {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 16px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line);
}
.platform-preview h3 { font-size: 16px; margin-bottom: 8px; }
.platform-preview p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.platform-tags { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; }
.platform-tags span {
  color: var(--navy); background: #f4f6f8; border: var(--hairline);
  border-radius: 999px; padding: 7px 10px; font-size: 12px;
}
.topic-panel { background: linear-gradient(135deg, #fffdfa, #f7fbff); }
.topic-strategy { color: var(--muted); font-size: 13px; line-height: 1.65; margin-bottom: 14px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.topic-card {
  border: var(--hairline); border-radius: 10px; padding: 17px;
  background: rgb(255 255 255 / 84%); display: flex; flex-direction: column; gap: 12px;
}
.topic-card.primary-topic {
  border-color: #d3a06e;
  background: linear-gradient(145deg, #fff8ef, #ffffff);
}
.topic-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.topic-card h3 { font-size: 17px; margin-top: 2px; }
.topic-card p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.topic-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.topic-metrics article {
  background: #f6f4ef; border-radius: 8px; padding: 9px;
  min-height: 76px;
}
.topic-metrics strong { display: block; color: var(--navy); font-size: 20px; }
.topic-metrics span { display: block; color: var(--ink); font-size: 12px; margin-top: 3px; }
.topic-metrics small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.35; }
.topic-next { display: flex; flex-wrap: wrap; gap: 7px; }
.topic-next span {
  color: var(--navy-soft); background: #eef4f8; border-radius: 999px;
  padding: 6px 8px; font-size: 11px;
}
.topic-link { margin-top: auto; text-align: center; text-decoration: none; }
.brics-panel { background: linear-gradient(135deg, #ffffff, #fbfaf7); }
.brics-coverage { display: flex; flex-direction: column; gap: 12px; }
.coverage-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr);
  gap: 16px; align-items: start;
}
.coverage-head p { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 7px; }
.brics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.brics-country {
  border: var(--hairline); border-radius: 7px; padding: 13px 14px;
  background: rgb(255 255 255 / 80%);
}
.brics-country p { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 7px; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.source {
  border: var(--hairline); border-radius: 7px; padding: 13px 14px;
  min-height: 83px; display: flex; flex-direction: column; gap: 6px;
}
.source.hidden { display: none; }
.source-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.source-name { font-weight: 600; }
.verification {
  flex-shrink: 0; border-radius: 999px; padding: 3px 7px; font-size: 11px;
  color: var(--green); background: var(--green-bg);
}
.verification.candidate { color: #946200; background: var(--amber-bg); }
.source a { color: var(--navy-soft); font-size: 12px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source p { font-size: 12px; color: var(--muted); }
.library-title { align-items: center; }
.import-callout {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  border-radius: 8px; background: #f4f7fb; border: var(--hairline); padding: 16px; margin-bottom: 17px;
}
.import-callout p { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.5; }
.content-summary { margin-top: 11px; color: var(--navy); font-size: 13px; line-height: 1.6; }
.import-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.hidden { display: none !important; }
.search { display: flex; gap: 8px; }
.search input { width: 250px; }
input, select, textarea {
  width: 100%; border: 1px solid #d0d5dd; border-radius: 6px;
  background: white; padding: 10px 11px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9fb8d2; outline-offset: -1px; border-color: #9fb8d2; }
.secondary {
  border-radius: 999px; background: #f2f5f8; color: var(--navy);
  border: var(--hairline); padding: 9px 14px; font-weight: 600; white-space: nowrap;
}
.secondary:hover { background: #e8eef5; }
.empty { text-align: center; padding: 55px 20px 60px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }
.empty p { margin: 0 auto 21px; max-width: 450px; line-height: 1.6; }
.law-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.law-card {
  border: var(--hairline); border-radius: 8px; padding: 17px;
  display: flex; flex-direction: column; gap: 9px;
  background: white;
}
.law-card.ready { border-color: #cbd5e1; background: linear-gradient(180deg, #fff, #fbfdff); }
.law-card-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.law-card .status { border-radius: 999px; background: #f2f5f8; border: var(--hairline); padding: 3px 8px; }
.law-card h3 { font-size: 16px; line-height: 1.45; }
.title-original { font-size: 13px; color: var(--muted); line-height: 1.45; min-height: 38px; }
.meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.preview { font-size: 12px; color: var(--muted); line-height: 1.55; min-height: 37px; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; }

.dialog {
  border: 0; border-radius: 10px; padding: 0; width: min(760px, calc(100vw - 48px));
  box-shadow: 0 28px 75px rgb(10 16 25 / 22%);
}
.dialog.wide { width: min(1050px, calc(100vw - 48px)); }
.dialog::backdrop { background: rgb(16 26 37 / 46%); }
.form-dialog { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.form-dialog header, .detail header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 5px; }
.form-dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #44515e; font-weight: 500; }
.fields { display: grid; gap: 12px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.icon {
  color: #667085; background: #f2f5f8; width: 34px; height: 34px;
  border-radius: 50%; font-size: 24px; line-height: 1;
}
.form-dialog footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.error { color: #a03432; font-size: 13px; }
.detail { padding: 27px; }
.detail h2 { max-width: 720px; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chip { border: var(--hairline); background: #f8fafc; padding: 5px 9px; border-radius: 999px; font-size: 12px; }
.detail-link { color: var(--navy-soft); font-size: 14px; }
.translation-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  border: 1px solid #ccd7e3; background: linear-gradient(135deg, #f7fbff, #f8fafc); border-radius: 8px;
  padding: 14px; margin-top: 18px;
}
.translation-hero p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 5px; }
.backend-job-line {
  color: var(--navy) !important; background: #eef5fb; border: var(--hairline);
  border-radius: 6px; padding: 8px 10px; margin-top: 10px !important;
}
.progress-bar { height: 7px; border-radius: 999px; background: #e6ebf0; overflow: hidden; margin-top: 10px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, #173d63, #24735a); }
.translation-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 310px; }
.actions { display: flex; gap: 8px; margin: 20px 0; }
.version-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.version {
  margin-top: 16px; border: var(--hairline); border-radius: 8px; padding: 15px;
}
.version h3 { font-size: 15px; margin-bottom: 10px; }
.archive-meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.archive-meta code { display: inline-block; margin-top: 5px; font-size: 11px; word-break: break-all; }
.section-pair { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.section-heading-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.section-kind { color: var(--green); background: var(--green-bg); border-radius: 20px; padding: 2px 8px; font-size: 11px; white-space: nowrap; }
.section-kind.muted-kind { color: var(--muted); background: #f2f5f8; }
button:disabled { cursor: wait; opacity: .65; }
.text-pane {
  white-space: pre-wrap; background: #f8fafc; border: var(--hairline); border-radius: 7px; padding: 12px;
  min-height: 150px; max-height: 310px; overflow: auto; font-size: 13px; line-height: 1.55;
}
.translation-form textarea { margin: 8px 0; min-height: 150px; }
.translation-form .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.compiled-text {
  width: 100%;
  min-height: 58vh;
  margin-top: 12px;
  padding: 18px;
  border: var(--hairline);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}
.compiled-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.quality-check-panel { margin-top: 14px; }
.quality-check-card {
  border: var(--hairline);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}
.quality-check-card p { margin-top: 6px; color: var(--muted); }
.quality-check-card ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.65; }
.quality-check-card li + li { margin-top: 8px; }
.quality-check-card span { color: var(--muted); }
.model-note { color: var(--muted); font-size: 11px; margin-top: 7px; }
.failure-note { color: #9a3412; }
.notice { font-size: 13px; color: var(--muted); padding: 13px; background: #f8fafc; border: var(--hairline); border-radius: 7px; }
.corpus-audit { margin-bottom: 12px; background: #fff7ed; border-color: #fed7aa; color: var(--navy); }
.corpus-audit.ok { background: var(--green-bg); border-color: #b7e4c7; }
.resume-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.resume-actions { display: flex; gap: 8px; flex-shrink: 0; }
.result-list { margin: 9px 0 0; padding-left: 18px; line-height: 1.7; }
.translation-notice { margin: 12px 0; color: var(--navy-soft); }
.setup-notice { color: var(--navy); margin-bottom: 14px; }

@media (max-width: 980px) {
  .hero-grid, .layout { display: flex; flex-direction: column; }
  .hero { padding: 22px 20px 34px; }
  .layout { padding: 16px; }
  .source-grid, .law-list, .version-grid, .feature-grid, .platform-preview, .topic-grid, .coverage-head, .brics-grid { grid-template-columns: 1fr; }
  .import-callout { flex-direction: column; align-items: start; }
  .translation-hero { flex-direction: column; align-items: start; }
  .translation-actions { justify-content: flex-start; min-width: 0; }
  .compiled-actions { justify-content: flex-start; flex-wrap: wrap; }
  .resume-notice { flex-direction: column; align-items: start; }
  h1 { font-size: 37px; }
}
