:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #101827;
  --muted: #62708a;
  --line: #dbe4f1;
  --blue: #1d4ed8;
  --blue2: #0891b2;
  --blue-soft: #eaf1ff;
  --purple: #7c3aed;
  --green: #15803d;
  --red: #b91c1c;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 18px 48px rgba(15, 23, 42, .08);
  --soft-shadow: 0 12px 32px rgba(15, 23, 42, .06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h: 86px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(29,78,216,.13), transparent 36vw),
    radial-gradient(circle at bottom right, rgba(8,145,178,.10), transparent 40vw),
    linear-gradient(180deg, #f8fafc, #eef4fb 58%, #f8fafc);
  font: 16px/1.58 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(12px, 2vw, 22px);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219,228,241,.9);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
  flex: 0 0 auto;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.brand-title { font-weight: 900; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link, .lang-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.nav-link:hover, .lang-btn:hover {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 12px 24px rgba(29,78,216,.10);
  transform: translateY(-1px);
}
.nav-link:active, .lang-btn:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 3px 10px rgba(15,23,42,.08); }
.nav-link.active { background: linear-gradient(135deg, #1d4ed8, #0891b2); color: white; box-shadow: 0 12px 26px rgba(29,78,216,.18); }
.language-switch { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: #f8fafc; }
.lang-btn { padding: 6px 9px; font-size: 12px; }
.lang-btn.active { background: #0f172a; color: #fff; }
main { width: min(1240px, calc(100% - 28px)); margin: calc(var(--topbar-h) + 24px) auto 48px; }
.page { display: none; animation: pageIn .24s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(219,228,241,.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 32px);
  margin-bottom: 22px;
}
.hidden { display: none !important; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 420px); gap: clamp(22px, 5vw, 48px); align-items: center; overflow: visible; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 900; }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; }
h1 { font-size: clamp(42px, 7vw, 78px); line-height: .9; margin: 10px 0 18px; }
h2 { font-size: clamp(27px, 4vw, 42px); line-height: 1.08; }
h3 { font-size: 20px; }
p { color: var(--muted); margin: 8px 0 0; }
.warning-text {
  color: #7c2d12;
  background: linear-gradient(180deg, #fff7ed, #fffaf5);
  border: 1px solid #fed7aa;
  padding: 12px 14px;
  border-radius: 16px;
  margin-top: 18px;
  font-weight: 700;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.orbit-card {
  min-height: 360px;
  border-radius: 32px;
  position: relative;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.orbit-card::before {
  content: none;
}
.orbit-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 116px; height: 116px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  text-align: center;
  font-weight: 950;
  color: var(--blue);
  border: 1px solid #c7d8ff;
  box-shadow: 0 18px 40px rgba(29,78,216,.16);
  z-index: 4;
}
.orbit-ring {
  --size: 220px;
  --duration: 12s;
  --start: 0deg;
  --neg-start: 0deg;
  position: absolute;
  left: 50%; top: 50%;
  width: var(--size); height: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) / -2);
  border: 1px solid rgba(29,78,216,.10);
  border-radius: 50%;
  animation: spinOrbit var(--duration) linear infinite;
  transform-origin: center;
  transform: rotate(var(--start));
}
.orbit-ring::before { content:none; }
.ring-o { --size: 190px; --duration: 10s; --start: -90deg; --neg-start: 90deg; }
.ring-r { --size: 230px; --duration: 13s; --start: -18deg; --neg-start: 18deg; }
.ring-b { --size: 270px; --duration: 16s; --start: 54deg; --neg-start: -54deg; }
.ring-i { --size: 305px; --duration: 20s; --start: 126deg; --neg-start: -126deg; }
.ring-t { --size: 335px; --duration: 24s; --start: 198deg; --neg-start: -198deg; }
.satellite {
  position: absolute;
  left: 50%; top: -23px;
  margin-left: -23px;
  width: 46px; height: 46px; border-radius: 50%;
  color: #fff;
  display: grid; place-items: center;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(15,23,42,.18);
  animation: counterSpin var(--duration) linear infinite;
  transform: rotate(var(--neg-start));
}
.sat-o { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.sat-r { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.sat-b { background: linear-gradient(135deg, #06b6d4, #67e8f9); }
.sat-i { background: linear-gradient(135deg, #ef4444, #f97316); }
.sat-t { background: linear-gradient(135deg, #22c55e, #86efac); }
@keyframes spinOrbit { from { transform: rotate(var(--start)); } to { transform: rotate(calc(var(--start) + 360deg)); } }
@keyframes counterSpin { from { transform: rotate(var(--neg-start)); } to { transform: rotate(calc(var(--neg-start) - 360deg)); } }
.quick-grid, .contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.info-card, .contact-card {
  background: rgba(255,255,255,.93);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--soft-shadow);
}
.info-icon, .contact-icon {
  width: 54px; height: 54px; border-radius: 17px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  color: #1e3a8a;
  font-size: 24px;
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 10px 22px rgba(15,23,42,.07);
}
.info-card, .contact-card, .method-card { position: relative; overflow: hidden; }
.info-card::before, .contact-card::before, .method-card::before {
  content:""; position:absolute; inset:0 auto 0 0; width:5px; opacity:.85; background: var(--tone, #60a5fa);
}
.info-card.tone-o, .contact-card.tone-o, .method-card.tone-o { --tone:#60a5fa; background: linear-gradient(135deg, rgba(239,246,255,.95), #fff); }
.info-card.tone-r, .contact-card.tone-r, .method-card.tone-r { --tone:#a78bfa; background: linear-gradient(135deg, rgba(245,243,255,.96), #fff); }
.info-card.tone-b, .contact-card.tone-b, .method-card.tone-b { --tone:#67e8f9; background: linear-gradient(135deg, rgba(236,254,255,.96), #fff); }
.info-card.tone-i, .contact-card.tone-i, .method-card.tone-i { --tone:#fb7185; background: linear-gradient(135deg, rgba(255,241,242,.96), #fff); }
.info-card.tone-t, .contact-card.tone-t, .method-card.tone-t { --tone:#86efac; background: linear-gradient(135deg, rgba(240,253,244,.96), #fff); }
.tone-o .info-icon, .tone-o .contact-icon { color:#1d4ed8; background:linear-gradient(135deg,#dbeafe,#ffffff); }
.tone-r .info-icon, .tone-r .contact-icon { color:#7c3aed; background:linear-gradient(135deg,#ede9fe,#ffffff); }
.tone-b .info-icon, .tone-b .contact-icon { color:#0891b2; background:linear-gradient(135deg,#cffafe,#ffffff); }
.tone-i .info-icon, .tone-i .contact-icon { color:#be123c; background:linear-gradient(135deg,#ffe4e6,#ffffff); }
.tone-t .info-icon, .tone-t .contact-icon { color:#15803d; background:linear-gradient(135deg,#dcfce7,#ffffff); }

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head.compact-head { margin-top: 26px; }
.toolbar, .action-row, .review-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-grid { display: grid; grid-template-columns: minmax(0,1fr) 160px auto; gap: 14px; align-items: end; }
.input-wrap label { display: block; color: #334155; font-weight: 850; margin-bottom: 7px; font-size: 14px; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px;
  background: #fff; color: var(--ink); outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
input:focus, select:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(147,197,253,.24); }
button:not(.nav-link):not(.lang-btn) {
  border: 0; border-radius: 16px; padding: 13px 17px; font-weight: 850;
  cursor: pointer; transition: transform .14s ease, box-shadow .16s ease, filter .16s ease, background .16s ease;
}
button:not(.nav-link):not(.lang-btn):hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.03); }
button:not(.nav-link):not(.lang-btn):active:not(:disabled) { transform: translateY(1px) scale(.985); box-shadow: inset 0 3px 12px rgba(15,23,42,.16); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.primary-btn { background: linear-gradient(135deg, #1d4ed8, #0891b2); color: white; box-shadow: 0 14px 26px rgba(29,78,216,.18); }
.primary-btn:hover:not(:disabled) { box-shadow: 0 18px 34px rgba(29,78,216,.28), 0 0 0 4px rgba(29,78,216,.06); }
.primary-btn.ghost { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.secondary-btn { color: #1e3a8a; background: #eaf1ff; border: 1px solid #c7d8ff !important; }
.secondary-btn:hover { background: #dbeafe; box-shadow: 0 12px 24px rgba(29,78,216,.12); }
.status {
  margin: 16px 0; padding: 12px 14px; border-radius: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; color: #475569;
}
.status.busy { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.status.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.status.ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.status.warn { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.candidate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.candidate-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: #fff;
  display: grid; gap: 9px; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.candidate-card:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 14px 30px rgba(29,78,216,.10); }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 900; cursor: pointer; }
.check-line input { width: auto; margin-top: 5px; }
.candidate-meta, .candidate-stats { color: var(--muted); font-size: 13px; }
.candidate-topics { display: flex; gap: 6px; flex-wrap: wrap; }
.topic-chip, .pill {
  border-radius: 999px; padding: 5px 8px; font-size: 12px; font-weight: 850; background: #eef2ff; color: #3730a3;
}
.pill { background: #f1f5f9; color: #475569; }
.action-row { margin-top: 16px; }
.summary-grid, .score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-card, .score-card, .card, .method-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px;
}
.score-card { min-height: 168px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; position: relative; }
.score-card::after { content:""; position:absolute; inset:auto -20px -40px auto; width:110px; height:110px; border-radius:50%; opacity:.12; background: currentColor; }
.score-main, .score-meta { position: relative; z-index: 1; }
.score-main { display: grid; gap: 8px; }
.score-meta { margin-top: auto; display: grid; gap: 6px; }
.score-label { color: rgba(71,85,105,.95); font-weight: 900; font-size: 13px; }
.score-value { font-size: 36px; font-weight: 950; letter-spacing: -.04em; line-height: 1; min-height: 36px; margin: 0; }
.score-caption { color: var(--muted); font-size: 13px; line-height:1.35; overflow:visible; }
.score-card.primary { background: linear-gradient(135deg, #2563eb, #0891b2); color: white; }
.score-card.c-base { background: linear-gradient(135deg, #eef2ff, #ffffff); color: #4f46e5; }
.score-card.c-data { background: linear-gradient(135deg, #ecfdf5, #ffffff); color: #15803d; }
.score-card.c-risk { background: linear-gradient(135deg, #fff7ed, #ffffff); color: #c2410c; }
.score-card.c-integrity { background: linear-gradient(135deg, #fdf2f8, #ffffff); color: #be185d; }
.score-card.primary .score-label, .score-card.primary .score-caption { color: rgba(255,255,255,.88); }
.range-line { font-size: 12px; font-weight: 800; color: #475569; position: relative; z-index: 1; margin-bottom: 4px; }
.range-line.light { color: rgba(255,255,255,.92); }
.range-bar { position: relative; z-index: 1; height: 6px; border-radius: 999px; background: rgba(100,116,139,.18); margin-bottom: 8px; overflow: hidden; }
.range-bar.light { background: rgba(255,255,255,.28); }
.range-bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: currentColor; opacity: .85; }
.range-bar.light span { background: #fff; opacity: .95; }
.robust-note { margin-top: 12px; padding: 12px 16px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; border: 1px solid var(--line); color: #475569; background: #f8fafc; }
.robust-note.flag-stable { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.robust-note.flag-moderate { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.robust-note.flag-sensitive { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.tone-robust { background: linear-gradient(135deg, #ffffff, #f5f3ff) !important; border-color: #e2dcf5 !important; }
.tone-robust h3 { color: #0f172a; }
.tone-robust p { color: #64748b; }
.progress-narrative { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #f0f9ff, #fefce8); border: 1px solid #e0ecf7; font-size: 15px; line-height: 1.6; color: #1e293b; font-style: italic; font-weight: 600; }
.progress-narrative .narrative-icon { font-style: normal; font-size: 20px; line-height: 1.3; }
#progressChart.map-chart { min-height: 380px; }
#progressPanel.map-page { display: grid; gap: 18px; }
#progressOverallChart.map-chart { min-height: 320px; }

/* v1.3 — chip delta tổng thể */
.progress-delta-chip .delta-chip { display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 16px; font-weight: 900; font-size: 16px; line-height: 1.2; border: 1px solid transparent; }
.progress-delta-chip .delta-chip small { font-weight: 600; font-size: 11px; opacity: .85; }
.progress-delta-chip .delta-chip { max-width: 300px; }
.delta-chip .delta-main { font-size: 16px; }
.delta-chip .delta-quip { font-style: italic; opacity: .92; line-height: 1.4; white-space: normal; }
/* Thang màu 8 bậc: dương xanh đậm dần, quanh 0 trung tính, âm ấm dần sang đỏ */
.delta-chip.grade-rocket { background: #dcfce7; border-color: #86efac; color: #14532d; }
.delta-chip.grade-good { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.delta-chip.grade-nice { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.delta-chip.grade-flat { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
.delta-chip.grade-dip { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.delta-chip.grade-down { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.delta-chip.grade-red { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

/* v1.3 — chips so với 5 năm trước */
.progress-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.progress-chips .chips-caption { font-size: 13px; font-weight: 800; color: #64748b; }
.orbit-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; font-weight: 900; font-size: 13px; color: var(--chip); background: #f8fafc; border: 1px solid #e2e8f0; background: color-mix(in srgb, var(--chip) 10%, white); border-color: color-mix(in srgb, var(--chip) 28%, white); }

/* v1.3 — overlay tính toán */
.calc-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(circle at 50% 32%, rgba(59,130,246,.12), transparent 36%), rgba(248, 250, 252, .46); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.calc-overlay.hidden { display: none; }
.calc-card { display: grid; justify-items: center; gap: 18px; padding: 34px 44px; border-radius: 30px; background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.16)); border: 1px solid rgba(255,255,255,.58); box-shadow: 0 30px 90px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.46); backdrop-filter: blur(22px) saturate(1.12); -webkit-backdrop-filter: blur(22px) saturate(1.12); }
.calc-card p { margin: 0; font-weight: 900; color: #26374f; font-size: 15px; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.calc-orbit { position: relative; width: 132px; height: 132px; }
.calc-core { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #0891b2); box-shadow: 0 10px 26px rgba(37,99,235,.45); display: grid; place-items: center; color: #fff; font-weight: 950; font-size: 13px; letter-spacing: .02em; }
.calc-dot { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; color: #fff; font-weight: 950; font-size: 12px; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(15,23,42,.22); animation: calcSpin 2.6s linear infinite; }
.calc-dot.d-o { background: linear-gradient(135deg, #3b82f6, #60a5fa); animation-delay: 0s; }
.calc-dot.d-r { background: linear-gradient(135deg, #8b5cf6, #a78bfa); animation-delay: -.52s; }
.calc-dot.d-b { background: linear-gradient(135deg, #06b6d4, #67e8f9); animation-delay: -1.04s; }
.calc-dot.d-i { background: linear-gradient(135deg, #ef4444, #f97316); animation-delay: -1.56s; }
.calc-dot.d-t { background: linear-gradient(135deg, #22c55e, #86efac); animation-delay: -2.08s; }
@keyframes calcSpin { from { transform: rotate(0deg) translateX(52px) rotate(0deg); } to { transform: rotate(360deg) translateX(52px) rotate(-360deg); } }

/* v1.3 — sửa cơ quan */
.inline-edit-btn { border: none; background: transparent; cursor: pointer; font-size: 13px; padding: 0 2px; opacity: .7; }
.inline-edit-btn:hover { opacity: 1; }
.inst-edit-input { width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 14px; font-family: inherit; }
.inst-edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.small-btn { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.edited-tag { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; padding: 1px 8px; border-radius: 999px; font-weight: 800; font-size: 11px; }

/* v1.3 — hint tốc độ hero */
.dash-hero-speed-hint { margin-top: 8px; font-size: 12.5px; color: rgba(226,232,240,.85); font-weight: 600; line-height: 1.45; }
.table-wrap { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.table-wrap.compact { max-height: 380px; }
table { width: 100%; border-collapse: collapse; min-width: 960px; background: #fff; }
th, td { padding: 10px 12px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: top; font-size: 14px; }
th { position: sticky; top: 0; background: #f8fafc; z-index: 1; color: #334155; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td input[type="checkbox"] { width: auto; }
.work-title { font-weight: 800; color: #1e293b; }
.work-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.review-actions { justify-content: center; margin-top: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.bars { display: grid; gap: 12px; margin-top: 12px; }
.bar-row { display: grid; gap: 6px; }
.bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 900; color: #334155; }
.bar-track { height: 12px; border-radius: 999px; background: #edf2f7; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1d4ed8, #0891b2); min-width: 2px; }
.bar-fill.warn { background: linear-gradient(90deg, #f59e0b, #b45309); }
.bar-fill.bad { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.bar-fill.good { background: linear-gradient(90deg, #22c55e, #15803d); }
.network-section { margin-top: 28px; }
.networks { align-items: stretch; }
.network-card { overflow: hidden; }
.card-headline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.graph-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.graph-buttons { display: flex; gap: 6px; flex-shrink: 0; }
.graph-control { width: 30px; height: 30px; border-radius: 10px !important; padding: 0 !important; background: #eaf1ff; color: #1e3a8a; border: 1px solid #c7d8ff !important; font-weight: 950; }
.graph { width: 100%; height: min(430px, 62vh); min-height: 320px; background: linear-gradient(180deg, #fbfdff, #f3f7fd); border: 1px solid #e6edf7; border-radius: 18px; touch-action: none; cursor: grab; }
.graph.dragging { cursor: grabbing; }
.node-label { font-size: 11px; fill: #334155; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.center-label { font-size: 13px; font-weight: 950; fill: #1e3a8a; }
.edge { stroke-linecap: round; opacity: .62; }
.edge:hover { opacity: .98; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.swatch.self { background: #b91c1c; }
.swatch.coauthor { background: #f97316; }
.swatch.institution { background: #7c3aed; }
.swatch.independent { background: #15803d; }
.swatch.unknown { background: #94a3b8; }
.mini-list { display: grid; gap: 8px; margin-top: 10px; }
.mini-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf2f7; }
.mini-item:last-child { border-bottom: 0; }
.mini-main { font-weight: 850; }
.mini-sub { color: var(--muted); font-size: 12px; }
.mini-value { font-weight: 950; color: var(--blue); }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.method-card.wide { grid-column: 1 / -1; }
.method-card h3 { margin-bottom: 8px; }
.contact-panel { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90)); }
.contact-card { min-height: 210px; }
.contact-label { color: #64748b; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin-bottom: 8px; }
.contact-card h3 { font-size: clamp(18px, 2.4vw, 22px); }
.contact-card a { text-decoration: none; color: #0f172a; }
.empty-state { text-align: center; max-width: 780px; margin-left: auto; margin-right: auto; }
.empty-icon { font-size: 44px; margin-bottom: 10px; }
footer { text-align: center; color: var(--muted); padding: 28px 14px calc(46px + var(--safe-bottom)); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topnav { grid-column: 1 / -1; justify-content: flex-start; order: 3; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav-link { white-space: nowrap; }
  .hero, .two-col, .method-grid, .quick-grid, .contact-grid { grid-template-columns: 1fr; }
  .orbit-card { min-height: 320px; max-width: 520px; width: 100%; margin: 0 auto; }
  .search-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  main { width: min(100% - 16px, 1240px); margin-top: calc(var(--topbar-h) + 12px); }
  .panel { border-radius: 18px; padding: 16px; }
  .topbar { padding: 10px; gap: 10px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .brand-title { font-size: 15px; max-width: 230px; }
  .brand-subtitle { font-size: 12px; max-width: 230px; }
  .language-switch { align-self: start; }
  .nav-link { font-size: 13px; padding: 7px 9px; }
  h1 { font-size: clamp(40px, 16vw, 60px); }
  h2 { font-size: 28px; }
  .orbit-card { min-height: 300px; }
  .ring-o { --size: 155px; }
  .ring-r { --size: 190px; }
  .ring-b { --size: 225px; }
  .ring-i { --size: 255px; }
  .ring-t { --size: 278px; }
  .satellite { width: 40px; height: 40px; margin-left: -20px; top: -20px; }
  .orbit-center { width: 102px; height: 102px; }
  table { min-width: 900px; }
  .table-wrap { max-height: 58vh; }
  .score-value { font-size: 31px; }
  .graph { min-height: 300px; height: 360px; }
  .graph-tools { flex-direction: column; align-items: flex-start; }
  .review-actions { display: grid; grid-template-columns: 1fr; }
  .review-actions button { width: 100%; }
}
@media (max-width: 380px) {
  .brand-title, .brand-subtitle { max-width: 190px; }
  .orbit-card { min-height: 275px; }
  .ring-t { --size: 252px; }
}

/* ===== v0.5 Dashboard hero and Research Map tab ===== */
.dash-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
  min-height: 300px;
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: 28px;
  border-radius: 32px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 78% 18%, rgba(125, 211, 252, .34), transparent 30%),
    radial-gradient(circle at 22% 82%, rgba(59, 130, 246, .22), transparent 34%),
    linear-gradient(135deg, #173b78 0%, #0f6092 48%, #0f8a9b 100%);
  box-shadow: 0 24px 70px rgba(29, 78, 216, .20);
}
.dash-hero-card::after {
  content: '';
  position: absolute;
  inset: auto auto -80px -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.dash-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,.20), transparent 48%, rgba(255,255,255,.06));
  pointer-events: none;
}
.dash-hero-copy { position: relative; z-index: 2; min-width: 0; }
.dash-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e0f2fe;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 14px;
}
.dash-hero-kicker::before { content: ''; width: 44px; height: 1px; background: #bae6fd; opacity: .9; }
.dash-hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: .96;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.dash-hero-copy p { color: rgba(248,250,252,.82); font-size: 17px; margin-top: 16px; }
.dash-hero-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: rgba(248,250,252,.90);
  font-weight: 750;
  letter-spacing: .02em;
  max-width: 760px;
}
.dash-hero-note span { flex:0 0 auto; width: 10px; height: 10px; border-radius: 999px; background: #2dd4bf; box-shadow: 0 0 0 5px rgba(45,212,191,.18); margin-top:.48em; }
.dash-orbit-score {
  position: relative;
  width: 330px;
  height: 290px;
  justify-self: center;
  z-index: 2;
}
.dash-score-circle {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 168px; height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.66), rgba(219,234,254,.23)), rgba(15, 23, 42, .24);
  border: 1px solid rgba(255,255,255,.36);
  box-shadow: inset 0 -18px 45px rgba(15,23,42,.16), 0 22px 58px rgba(15,23,42,.22);
  z-index: 5;
}
.dash-score-circle small {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15,23,42,.36);
  color: #e0f2fe;
  font-weight: 900;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: 10px;
}
.dash-score-circle strong { color: #fff7d6; font-size: 54px; line-height: 1; letter-spacing: -.055em; }
.dash-fixed-ring, .dash-letter-track {
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.dash-fixed-ring { border: 1px solid rgba(226, 242, 255, .24); box-shadow: inset 0 0 38px rgba(255,255,255,.03); }
.dash-fixed-1 { width: 202px; height: 202px; }
.dash-fixed-2 { width: 226px; height: 226px; }
.dash-fixed-3 { width: 252px; height: 252px; }
.dash-fixed-4 { width: 280px; height: 280px; }
.dash-fixed-5 { width: 314px; height: 314px; }
.dash-letter-track {
  --size: 256px;
  --dur: 16s;
  --start: 0deg;
  --neg-start: 0deg;
  width: var(--size);
  height: var(--size);
  animation: dashTrackSpin var(--dur) linear infinite;
  transform: translate(-50%, -50%) rotate(var(--start));
}
.dash-letter-track b {
  position: absolute;
  left: 50%; top: -17px;
  width: 34px; height: 34px;
  margin-left: -17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(15,23,42,.22);
  animation: dashLetterCounter var(--dur) linear infinite;
  transform: rotate(var(--neg-start));
}
.dash-track-o { --size: 218px; --dur: 12s; --start: -90deg; --neg-start: 90deg; }
.dash-track-r { --size: 238px; --dur: 16s; --start: -18deg; --neg-start: 18deg; }
.dash-track-b { --size: 258px; --dur: 20s; --start: 54deg; --neg-start: -54deg; }
.dash-track-i { --size: 286px; --dur: 18s; --start: 126deg; --neg-start: -126deg; }
.dash-track-t { --size: 314px; --dur: 24s; --start: 198deg; --neg-start: -198deg; }
.dash-track-o b { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.dash-track-r b { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.dash-track-b b { background: linear-gradient(135deg, #06b6d4, #67e8f9); }
.dash-track-i b { background: linear-gradient(135deg, #ef4444, #f97316); }
.dash-track-t b { background: linear-gradient(135deg, #22c55e, #86efac); }
@keyframes dashTrackSpin { from { transform: translate(-50%, -50%) rotate(var(--start)); } to { transform: translate(-50%, -50%) rotate(calc(var(--start) + 360deg)); } }
@keyframes dashLetterCounter { from { transform: rotate(var(--neg-start)); } to { transform: rotate(calc(var(--neg-start) - 360deg)); } }

.map-page { --map-ink:#0f172a; --map-muted:#64748b; --map-accent:#0891b2; --map-accent2:#2563eb; --map-line:#dbe4f1; --map-soft:#eaf6ff; --pine:#0f172a; --brass:#0891b2; }
.map-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  background:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,.10), transparent 32%),
    radial-gradient(circle at 92% 10%, rgba(8,145,178,.10), transparent 30%),
    linear-gradient(135deg, #ffffff, #f1f8ff);
  border-color: var(--map-line);
}
.map-hero h2 { color: var(--pine); font-size: clamp(30px, 4vw, 50px); overflow-wrap: anywhere; }
.map-profile-meta { color: var(--map-muted); font-weight: 700; margin-top: 6px; }
.map-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.map-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--map-ink);
  background: rgba(255,255,255,.86);
  border: 1px solid var(--map-line);
  font-size: 13px;
  font-weight: 800;
}
.map-badges span.confidence-badge {
  color: #075985;
  background: linear-gradient(135deg, #dff6ff, #eaf1ff);
  border-color: #bae6fd;
  box-shadow: 0 10px 24px rgba(8,145,178,.10);
}
.map-badges span.confidence-badge b { margin: 0 3px 0 5px; }
.map-grid-main { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, .85fr); gap: 18px; margin-bottom: 18px; }
.map-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.map-card, .compass-question-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--map-line);
  border-radius: 26px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
  padding: clamp(18px, 2.4vw, 26px);
}
.map-card h3 { color: var(--map-ink); letter-spacing: -.035em; }
.map-card p { color: var(--map-muted); }
.territory-subline { color: var(--map-muted); font-size: 14px; margin: 5px 0 0; }
.map-card-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; min-width: 0; }
.map-card-head > div { min-width: 0; }
.map-card-head.compact { margin-bottom: 4px; }
.map-toggle { display: flex; padding: 4px; border-radius: 999px; border: 1px solid var(--map-line); background: #f8fafc; flex: none; }
.map-toggle button {
  border: 0; background: transparent; border-radius: 999px; padding: 8px 12px; color: #475569; font-weight: 900; font-size: 13px; cursor: pointer;
}
.map-toggle button.active { color: #fff; background: linear-gradient(135deg, #2563eb, #0891b2); box-shadow: 0 10px 24px rgba(37,99,235,.16); }
.echart { width: 100%; max-width: 100%; min-width: 0; min-height: 320px; overflow: hidden; }
.map-chart { min-height: 570px; }
.gauge-chart { min-height: 250px; }
.depth-chart, .role-chart { min-height: 285px; }
.map-note {
  margin-top: 12px;
  color: #075985;
  background: #eff6ff;
  border-left: 4px solid var(--map-accent2);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
}
.map-note:empty { display: none; }
.big-stat {
  border-radius: 20px;
  background: radial-gradient(circle at 85% 12%, rgba(8,145,178,.16), transparent 36%), linear-gradient(135deg, #e0f7ff, #eff6ff);
  border: 1px solid #bae6fd;
  padding: 18px;
  margin: 12px 0 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.big-stat strong { display: block; color: #0284c7; font-size: 42px; letter-spacing: -.06em; line-height: 1; }
.big-stat span, .mini-stat-grid span { display: block; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: #475569; font-size: 12px; margin-top: 8px; }
.big-stat small, .mini-stat-grid small { display: block; color: var(--map-muted); margin-top: 4px; }
.mini-stat-grid { display: grid; gap: 12px; }
.mini-stat-grid > div { border: 1px solid #dbeafe; border-radius: 18px; background: linear-gradient(135deg, #ffffff, #f8fbff); padding: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.mini-stat-grid > div:nth-child(1) { background: linear-gradient(135deg, #eff6ff, #ffffff); border-color: #bfdbfe; }
.mini-stat-grid > div:nth-child(2) { background: linear-gradient(135deg, #ecfeff, #ffffff); border-color: #a5f3fc; }
.mini-stat-grid > div:nth-child(3) { background: linear-gradient(135deg, #f5f3ff, #ffffff); border-color: #ddd6fe; }
.mini-stat-grid > div:nth-child(4) { background: linear-gradient(135deg, #fff7ed, #ffffff); border-color: #fed7aa; }
.mini-stat-grid b { color: #0f766e; font-size: 26px; }
.mini-stat-grid > div:nth-child(1) b { color: #2563eb; }
.mini-stat-grid > div:nth-child(2) b { color: #0891b2; }
.mini-stat-grid > div:nth-child(3) b { color: #7c3aed; }
.mini-stat-grid > div:nth-child(4) b { color: #ea580c; }
.direction-layout { display: grid; grid-template-columns: minmax(160px, .82fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.window-label { display: flex; justify-content: space-between; color: #334155; font-weight: 800; }
.direction-slider-row { margin-top: 10px; padding: 14px 16px; border-radius: 18px; background: #f8fafc; border: 1px solid var(--map-line); }
#directionWindow { width: 100%; accent-color: #0891b2; margin: 12px 0 0; }
.direction-lists { display: grid; gap: 10px; }
.direction-row { border: 1px solid var(--map-line); border-radius: 16px; padding: 11px 12px; background: rgba(255,255,255,.86); }
.direction-row b { display: block; color: var(--map-ink); margin-bottom: 4px; }
.direction-row span { color: var(--map-muted); }
.direction-empty { color: var(--map-muted); font-weight: 700; }
.adventure-label {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #0f172a;
  background: #eaf6ff;
  border-left: 4px solid #0891b2;
}
.compass-question-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 52%, #2563eb 100%);
  color: #f8fafc;
  margin-top: 18px;
  margin-bottom: 22px;
  box-shadow: 0 16px 38px rgba(8,145,178,.16);
}
.compass-question-card::after {
  content: '✦'; position: absolute; right: 28px; top: 10px; color: rgba(255,255,255,.16); font-size: 140px; line-height: 1;
}
.compass-question-card .eyebrow { color: #ecfeff; }
.compass-question-card p { position: relative; z-index: 1; color: #f8fafc; font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; font-style: italic; max-width: 980px; }
.tone-map { background: linear-gradient(135deg, #ffffff, #eef6ff) !important; border-color: #dbe4f1 !important; }
.tone-map h3 { color: #0f172a; }
.tone-map p { color: #64748b; }
@media (max-width: 980px) {
  .dash-hero-card { grid-template-columns: 1fr; text-align: left; }
  .dash-orbit-score { width: min(330px, 100%); height: 280px; }
  .map-grid-main, .map-grid-two { grid-template-columns: 1fr; }
  .map-hero { grid-template-columns: 1fr; }
  .map-badges { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .dash-hero-card { padding: 22px; min-height: auto; border-radius: 24px; }
  .dash-hero-copy h1 { font-size: 38px; }
  .dash-orbit-score { height: 250px; transform: scale(.84); transform-origin: center; margin: -14px auto -24px; }
  .map-card-head { display: block; }
  .map-toggle { margin-top: 12px; width: 100%; justify-content: center; }
  .map-chart { min-height: 430px; }
  .direction-layout { grid-template-columns: 1fr; }
  .gauge-chart { min-height: 230px; }
  .map-badges span { width: 100%; justify-content: center; }
}

/* v1.0.2 support and community feedback */
.support-card {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 24px;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(circle at 92% 8%, rgba(20,184,166,.13), transparent 28%),
    linear-gradient(135deg, #ffffff, #eef7ff);
  box-shadow: var(--soft-shadow);
}
.support-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #dff6ff, #ecfeff);
  color: #0891b2;
  font-size: 28px;
  font-weight: 900;
}
.support-card h3 { margin: 4px 0 8px; color: #0f172a; }
.support-card p { color: #475569; margin: 0; }
.support-card .support-thanks { margin-top: 10px; color: #0369a1; font-weight: 800; }
.small-note { color: #64748b; font-weight: 650; }
.feedback-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 18px; align-items: start; }
.feedback-form, .mini-db-card, .published-feedback {
  border: 1px solid #dbe4f1;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--soft-shadow);
  padding: clamp(18px, 2.2vw, 24px);
}
.feedback-form label { display: grid; gap: 7px; color: #334155; font-weight: 850; margin-bottom: 14px; }
.feedback-form input, .feedback-form select, .feedback-form textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 16px; padding: 12px 13px;
  background: #fff; color: #0f172a; font: inherit; font-weight: 650;
}
.feedback-form textarea { resize: vertical; min-height: 160px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent-line { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 9px !important; font-weight: 750 !important; }
.consent-line input { width: auto; margin-top: .35em; }
.privacy-line { margin: 0 0 14px; color: #64748b; font-size: 13px; }
.no-margin { margin: 0; }
.compact-status { margin-top: 12px; }
.mini-db-card h3 { margin-top: 0; }
.mini-db-card p { color: #64748b; }
.mini-db-card code { display: block; white-space: normal; word-break: break-word; background: #eff6ff; border: 1px solid #bfdbfe; color: #0f172a; border-radius: 16px; padding: 12px; font-size: 12px; line-height: 1.55; }
.published-feedback { margin-top: 18px; }
.feedback-list, .feedback-admin-list { display: grid; gap: 12px; }
.feedback-card { border: 1px solid #dbe4f1; border-radius: 18px; padding: 14px; background: #ffffff; }
.feedback-card.admin-card { background: #f8fafc; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 6px; color: #64748b; font-size: 13px; }
.feedback-meta strong { color: #0f172a; }
.feedback-meta span { margin-left: auto; }
.feedback-category { display: inline-flex; margin: 9px 0; padding: 5px 9px; border-radius: 999px; background: #e0f2fe; color: #0369a1; font-size: 12px; font-weight: 900; }
.feedback-card p { margin: 4px 0 0; color: #334155; font-weight: 650; }
.public-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 850; color: #0f766e; }
.empty-feedback { color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 16px; padding: 14px; font-weight: 700; }
.admin-review-box { margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
.admin-review-box summary { cursor: pointer; color: #1d4ed8; font-weight: 900; }
.admin-review-box > p { color: #64748b; }
@media (max-width: 760px) { .feedback-grid, .form-row.two { grid-template-columns: 1fr; } .support-card { grid-template-columns: 1fr; } }

/* v1.0.4 inherited official polish */
.top-works-card { margin-top: 32px; }
.public-feedback-grid { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.public-only-feedback { max-width: 980px; }
.feedback-panel .section-head { margin-bottom: 16px; }
@media (max-width: 760px) { .top-works-card { margin-top: 24px; } }


/* v1.0.4 mobile and map polish */
.map-toggle {
  gap: 0;
  overflow: hidden;
}
.map-toggle button {
  flex: 1 1 0;
  min-width: 128px;
  text-align: center;
}
#topWorksTable td {
  font-size: 13px;
}
#topWorksTable .work-title {
  font-size: 13.5px;
  line-height: 1.42;
  font-weight: 760;
  letter-spacing: -.01em;
  max-width: 560px;
}
#topWorksTable .work-sub {
  font-size: 11.5px;
}
.top-works-card {
  margin-top: 44px;
  clear: both;
}
@media (max-width: 760px) {
  .top-works-card { margin-top: 36px; }
  #topWorksTable td { font-size: 12.5px; }
  #topWorksTable .work-title { font-size: 12.75px; line-height: 1.38; font-weight: 740; }
  #topWorksTable .work-sub { font-size: 11px; }
}
@media (max-width: 640px) {
  .dash-hero-card {
    overflow: hidden;
  }
  .dash-orbit-score {
    width: min(300px, 100%);
    height: 305px;
    transform: none;
    margin: -4px auto 2px;
  }
  .dash-score-circle {
    width: 140px;
    height: 140px;
  }
  .dash-score-circle strong {
    font-size: 44px;
  }
  .dash-score-circle small {
    font-size: 9px;
    padding: 4px 9px;
  }
  .dash-fixed-1 { width: 184px; height: 184px; }
  .dash-fixed-2 { width: 206px; height: 206px; }
  .dash-fixed-3 { width: 228px; height: 228px; }
  .dash-fixed-4 { width: 250px; height: 250px; }
  .dash-fixed-5 { width: 270px; height: 270px; }
  .dash-track-o { --size: 194px; }
  .dash-track-r { --size: 216px; }
  .dash-track-b { --size: 236px; }
  .dash-track-i { --size: 254px; }
  .dash-track-t { --size: 270px; }
  .dash-letter-track b {
    width: 31px;
    height: 31px;
    margin-left: -15.5px;
    top: -15.5px;
    font-size: 12px;
  }
  .map-toggle {
    padding: 3px;
  }
  .map-toggle button {
    min-width: 0;
    padding: 10px 8px;
  }
  .map-chart { min-height: 455px; }
}
@media (max-width: 380px) {
  .dash-orbit-score { height: 292px; width: min(286px, 100%); }
  .dash-fixed-1 { width: 170px; height: 170px; }
  .dash-fixed-2 { width: 190px; height: 190px; }
  .dash-fixed-3 { width: 210px; height: 210px; }
  .dash-fixed-4 { width: 228px; height: 228px; }
  .dash-fixed-5 { width: 244px; height: 244px; }
  .dash-track-o { --size: 178px; }
  .dash-track-r { --size: 198px; }
  .dash-track-b { --size: 216px; }
  .dash-track-i { --size: 230px; }
  .dash-track-t { --size: 244px; }
}

/* v1.0.4 final mobile polish */
@media (max-width: 640px) {
  #page-home .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  #page-home .hero-copy { display: contents; }
  #page-home .hero .eyebrow { order: 1; }
  #page-home .hero h1 { order: 2; }
  #page-home .hero p { order: 3; }
  #page-home .hero .warning-text { order: 4; }
  #page-home .hero .orbit-card {
    order: 5;
    min-height: 268px;
    max-width: 340px;
    margin: -8px auto 2px;
    transform: translateY(-4px) scale(.92);
    transform-origin: center;
  }
  #page-home .hero .hero-actions {
    order: 6;
    margin-top: 6px;
    justify-content: center;
  }
  #page-home .hero .hero-actions button { flex: 1 1 160px; }
  #page-home .orbit-center { width: 92px; height: 92px; font-size: 14px; }
  #page-home .ring-o { --size: 145px; }
  #page-home .ring-r { --size: 176px; }
  #page-home .ring-b { --size: 207px; }
  #page-home .ring-i { --size: 235px; }
  #page-home .ring-t { --size: 260px; }
  #page-home .satellite { width: 36px; height: 36px; margin-left: -18px; top: -18px; font-size: 13px; }

  #topWorksTable td { font-size: 12px; }
  #topWorksTable .work-title { font-size: 11.85px; line-height: 1.34; font-weight: 720; }
  #topWorksTable .work-sub { font-size: 10.5px; }
  .top-works-card h3 { font-size: 22px; line-height: 1.18; letter-spacing: -.035em; }
}
@media (max-width: 380px) {
  #page-home .hero .orbit-card { max-width: 310px; min-height: 250px; transform: translateY(-6px) scale(.88); }
  #page-home .ring-t { --size: 244px; }
}


/* v1.3.2 — thông báo thiếu dữ liệu tiến trình */
.progress-empty-notice { display: flex; gap: 12px; align-items: flex-start; padding: 22px 20px; border-radius: 18px; background: linear-gradient(135deg, #f0fdf4, #f0f9ff); border: 1px dashed #bbf7d0; color: #166534; font-weight: 700; font-size: 15px; line-height: 1.6; }
.progress-empty-notice.hidden { display: none; }

/* v1.3.2 — responsive tab Tiến trình theo thiết bị */
@media (max-width: 980px) {
  #progressOverallChart.map-chart { min-height: 300px; }
  #progressChart.map-chart { min-height: 340px; }
}
@media (max-width: 640px) {
  #progressPanel .map-card-head { display: block; }
  .progress-delta-chip { margin-top: 10px; }
  .progress-delta-chip .delta-chip { max-width: 100%; width: 100%; box-sizing: border-box; }
  #progressOverallChart.map-chart { min-height: 260px; }
  #progressChart.map-chart { min-height: 300px; }
  .progress-narrative { font-size: 14px; padding: 12px 14px; }
  .progress-chips { gap: 6px; }
  .progress-chips .chips-caption { width: 100%; }
  .orbit-chip { font-size: 12.5px; padding: 4px 10px; }
}
@media (max-width: 380px) {
  #progressOverallChart.map-chart { min-height: 230px; }
  #progressChart.map-chart { min-height: 270px; }
  .progress-empty-notice { font-size: 14px; }
}

/* v1.4 — Lớp định danh ORCID + Crossref */
.verify-panel { margin: 14px 0 4px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #f8fafc, #f0f9ff); border: 1px solid #dbeafe; }
.verify-panel.hidden { display: none; }
.verify-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.v-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-weight: 850; font-size: 13px; border: 1px solid transparent; }
.v-chip.v-green { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.v-chip.v-yellow { background: #fefce8; border-color: #fde047; color: #a16207; }
.v-chip.v-gray { background: #f8fafc; border-color: #e2e8f0; color: #64748b; }
.v-chip.v-blue { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.v-crossref { font-size: 13.5px; color: #475569; font-weight: 700; margin-bottom: 8px; }
.v-orcid-only { margin: 8px 0; font-size: 13.5px; color: #334155; }
.v-orcid-only summary { cursor: pointer; font-weight: 850; color: #1d4ed8; }
.v-orcid-only p { color: #64748b; margin: 8px 0; }
.v-orcid-only ul { margin: 6px 0 4px 18px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.v-orcid-only code { background: #eef2ff; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.v-note { font-size: 13px; color: #64748b; font-weight: 600; margin: 6px 0 0; line-height: 1.5; }
.v-note.warn { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 10px 14px; margin: 0; }
.v-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-weight: 850; font-size: 11px; white-space: nowrap; border: 1px solid transparent; }
.v-badge.vb-green { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.v-badge.vb-yellow { background: #fefce8; border-color: #fde047; color: #a16207; }
.v-badge.vb-soft { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.v-badge.vb-warn { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.v-badge.vb-gray { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
#worksTable tr.row-check { background: #fefce8; }
#worksTable tr.row-check:hover { background: #fef9c3; }
.verify-btn { border-color: #bfdbfe !important; color: #1d4ed8 !important; }
@media (max-width: 640px) {
  .verify-summary { gap: 6px; }
  .v-chip { font-size: 12px; padding: 5px 10px; }
}


/* v1.4.1 — progress charts responsive and contained on desktop/mobile/tablet */
#progressPanel { min-width: 0; max-width: 100%; overflow-x: hidden; }
#progressPanel .map-card { min-width: 0; max-width: 100%; overflow: hidden; }
#progressOverallChart.map-chart, #progressChart.map-chart {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: clamp(300px, 46vh, 500px);
  min-height: 300px;
}
#progressChart.map-chart { height: clamp(340px, 52vh, 540px); min-height: 340px; }
@media (max-width: 760px) {
  #progressOverallChart.map-chart { height: 310px; min-height: 310px; }
  #progressChart.map-chart { height: 350px; min-height: 350px; }
}
@media (max-width: 420px) {
  #progressOverallChart.map-chart { height: 288px; min-height: 288px; }
  #progressChart.map-chart { height: 330px; min-height: 330px; }
}

/* v1.4.4 — SCImago Q 2025 venue badges */
.v-chip.v-q { background: #ecfdf5; border-color: #86efac; color: #166534; }
.v-badge.q-badge { letter-spacing: .01em; box-shadow: inset 0 -1px 0 rgba(0,0,0,.10); }
.v-badge.q-q1 { background: #00a65a; border-color: #008f4d; color: #fff; }
.v-badge.q-q2 { background: #f2c94c; border-color: #d4a90f; color: #3f3200; }
.v-badge.q-q3 { background: #f2994a; border-color: #d97706; color: #3b1f00; }
.v-badge.q-q4 { background: #eb5757; border-color: #c92a2a; color: #fff; }
.v-badge.q-unknown { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; }
.venue-q-line { margin-top: 5px; }
.venue-q-line .q-badge { font-size: 11px; padding: 2px 9px; }

/* v1.6 official — Evidence Passport, ORBIT Signature Card, Research Trajectory */
.orbit-export-actions {
  margin: 14px 0 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(14,165,233,.20);
  background: linear-gradient(135deg, rgba(240,249,255,.96), rgba(240,253,244,.94));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.orbit-export-actions.hidden { display: none; }
.orbit-export-actions h3 { margin: 0 0 6px; letter-spacing: -.03em; color: #0f172a; }
.orbit-export-actions p { margin: 0; color: #475569; line-height: 1.55; max-width: 760px; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.trajectory-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 10px;
}
.trajectory-stat {
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(135deg, #fff, rgba(248,250,252,.9));
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(15,23,42,.055);
  position: relative;
  overflow: hidden;
}
.trajectory-stat::after { display: none; }
.trajectory-stat.tone-blue, .trajectory-stats .trajectory-stat:nth-child(1) {
  background: linear-gradient(135deg, rgba(239,246,255,.98), rgba(219,234,254,.74));
  border-color: rgba(147,197,253,.62);
  color: #2563eb;
}
.trajectory-stat.tone-teal, .trajectory-stats .trajectory-stat:nth-child(2) {
  background: linear-gradient(135deg, rgba(240,253,250,.98), rgba(204,251,241,.72));
  border-color: rgba(94,234,212,.58);
  color: #0d9488;
}
.trajectory-stat.tone-violet, .trajectory-stats .trajectory-stat:nth-child(3) {
  background: linear-gradient(135deg, rgba(250,245,255,.98), rgba(237,233,254,.76));
  border-color: rgba(196,181,253,.62);
  color: #7c3aed;
}
.progress-context-stats .trajectory-stat:nth-child(1) {
  background: linear-gradient(135deg, rgba(239,246,255,.98), rgba(219,234,254,.74));
  border-color: rgba(147,197,253,.62);
  color: #2563eb;
}
.progress-context-stats .trajectory-stat:nth-child(2) {
  background: linear-gradient(135deg, rgba(240,253,250,.98), rgba(204,251,241,.72));
  border-color: rgba(94,234,212,.58);
  color: #0d9488;
}
.progress-context-stats .trajectory-stat:nth-child(3) {
  background: linear-gradient(135deg, rgba(255,251,235,.98), rgba(254,243,199,.74));
  border-color: rgba(252,211,77,.62);
  color: #d97706;
}
.trajectory-stat .label { font-size: 12px; font-weight: 900; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.trajectory-stat .value { margin-top: 4px; font-size: 24px; font-weight: 950; color: #0f172a; letter-spacing: -.04em; }
.trajectory-stat .hint { margin-top: 3px; font-size: 12px; color: #64748b; line-height: 1.35; }
.trajectory-card { margin-bottom: 18px; }
.trajectory-chart {
  height: clamp(480px, 58vw, 700px);
  min-height: 500px;
  border-radius: 24px;
  border: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
  touch-action: none;
}
.route-map-title {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 3;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(186,230,253,.70);
  color: #075985;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 9px 20px rgba(15,23,42,.065);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.route-map-svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; background: transparent; }
.route-map-svg.dragging { cursor: grabbing; }
.route-spine { fill: none; stroke: rgba(148,163,184,.26); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 5 11; }
.route-main-line {
  fill: none;
  stroke: url(#routeGradient);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .96;
}
.route-main-line.route-shadow { stroke: rgba(15,23,42,.12); stroke-width: 13; filter: url(#routeSoftShadow); }
.route-field-line { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .46; stroke-dasharray: none; }
.route-main-field { stroke-width: 8; opacity: .98; }
.route-field-lane { pointer-events: none; }
.route-station { cursor: pointer; outline: none; }
.route-station-core { filter: drop-shadow(0 10px 16px rgba(15,23,42,.16)); stroke: rgba(255,255,255,.92); stroke-width: 3; }
.route-station-inner { pointer-events: none; }
.route-station-label { text-anchor: middle; font-size: 17px; font-weight: 950; fill: #0f172a; paint-order: stroke; stroke: rgba(255,255,255,.94); stroke-width: 5px; stroke-linejoin: round; }
.route-station-year { text-anchor: middle; font-size: 12px; font-weight: 950; fill: #475569; letter-spacing: .04em; paint-order: stroke; stroke: rgba(255,255,255,.88); stroke-width: 3px; }
.route-field-tag { font-size: 13px; font-weight: 900; fill: rgba(51,65,85,.82); paint-order: stroke; stroke: rgba(255,255,255,.96); stroke-width: 4px; stroke-linejoin: round; }
.route-badge-new {
  font-size: 11px;
  dominant-baseline: middle;
  font-weight: 950;
  fill: #075985;
  paint-order: stroke;
  stroke: rgba(255,255,255,.92);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.route-badge-new { fill: #0f766e; }
.route-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(186,230,253,.70);
  box-shadow: 0 9px 20px rgba(15,23,42,.065);
  backdrop-filter: blur(10px);
}
.route-controls button {
  border: 0;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eff6ff;
  color: #075985;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.route-controls button[data-route-zoom="reset"] { padding-inline: 12px; }
.route-controls button:hover { background: #dbeafe; transform: translateY(-1px); }
.route-tooltip {
  position: fixed;
  z-index: 9999;
  width: min(310px, calc(100vw - 24px));
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(15,23,42,.94);
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 18px 38px rgba(15,23,42,.24);
  pointer-events: none;
}
.route-tooltip.is-mobile {
  position: absolute;
  left: 12px !important;
  right: 12px;
  top: auto !important;
  bottom: 12px;
  width: auto;
  max-height: min(46vh, 300px);
  overflow: auto;
  pointer-events: auto;
}
.route-tooltip b { color: #fff; }
.route-tip-new { color: #67e8f9; font-weight: 900; }
.route-empty {
  height: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #64748b;
  font-weight: 800;
  padding: 22px;
}
.progress-context-card { background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,249,255,.72)); }
.progress-context-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) {
  .orbit-export-actions { display: block; }
  .export-buttons { justify-content: flex-start; margin-top: 14px; }
  .export-buttons button { width: 100%; }
  .trajectory-stats, .progress-context-stats { grid-template-columns: 1fr; }
  .trajectory-chart { height: 460px; min-height: 420px; }
  .route-controls { top: 9px; right: 9px; }
  .route-station-label { font-size: 13px; stroke-width: 4px; }
  .route-station-year { font-size: 9px; stroke-width: 2.4px; }
  .route-field-tag { font-size: 13px; }
  .route-map-title { font-size: 13px; top: 10px; left: 10px; }
  .route-controls { transform: scale(.96); transform-origin: top right; }
}


@media (max-width: 560px) {
  .route-station-label { font-size: 12px; stroke-width: 3.6px; }
  .route-station-year { font-size: 8px; stroke-width: 2.2px; }
  .route-badge-new { font-size: 9px; stroke-width: 4px; }
  .trajectory-chart { height: 500px; min-height: 460px; }
}
body.modal-open { overflow: hidden; }
.signature-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 18%, rgba(14,165,233,.20), transparent 42%), rgba(2,6,23,.66);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.signature-modal.hidden { display: none; }
.signature-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  box-shadow: 0 36px 120px rgba(2,6,23,.46);
  color: #f8fafc;
  padding: 20px;
}
.signature-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 14px;
}
.signature-kicker {
  font-size: 12px;
  font-weight: 950;
  color: #67e8f9;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.signature-dialog h3 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.02em; }
.signature-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #f8fafc;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}
.signature-close:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.signature-preview-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(2,6,23,.60);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  min-height: 300px;
  display: grid;
  place-items: center;
}
.signature-preview-wrap::before {
  content: 'Generating preview...';
  position: absolute;
  color: rgba(226,232,240,.78);
  font-weight: 800;
  letter-spacing: .02em;
}
.signature-preview-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}
.signature-modal.is-busy .signature-preview-wrap img { opacity: .38; }
.signature-style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.signature-style-row > span {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #bae6fd;
}
.signature-style-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.signature-style-buttons button {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #e2e8f0;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.signature-style-buttons button:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.signature-style-buttons button.active {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: white;
  border-color: rgba(255,255,255,.36);
  box-shadow: 0 12px 26px rgba(34,211,238,.22);
}
.signature-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.signature-actions .primary-btn { min-width: 180px; }
@media (max-width: 760px) {
  .signature-modal { padding: 12px; }
  .signature-dialog { width: calc(100vw - 16px); padding: 14px; border-radius: 24px; }
  .signature-dialog h3 { font-size: 20px; }
  .signature-style-row { align-items: flex-start; flex-direction: column; }
  .signature-style-buttons { width: 100%; justify-content: flex-start; }
  .signature-actions .primary-btn { width: 100%; }
}

/* v1.6 official — glass loading, responsive live Route Map, and ASCI-light signature modal */
.calc-overlay {
  background:
    radial-gradient(circle at 22% 18%, rgba(59,130,246,.08), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(20,184,166,.08), transparent 34%),
    rgba(248, 250, 252, .18) !important;
  backdrop-filter: blur(12px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.12) !important;
}
.calc-card {
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.07)) !important;
  border: 1px solid rgba(255,255,255,.52) !important;
  box-shadow: 0 28px 84px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.62), inset 0 -1px 0 rgba(255,255,255,.16) !important;
  backdrop-filter: blur(26px) saturate(1.25) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.25) !important;
}
.calc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 10%, rgba(255,255,255,.26), transparent 42%);
  pointer-events: none;
}
.calc-card { position: relative; }
.calc-card > * { position: relative; z-index: 1; }
.calc-card p { color: #1f334e !important; text-shadow: 0 1px 0 rgba(255,255,255,.62) !important; }

.trajectory-chart.is-compact .route-station-label { font-size: 13px; stroke-width: 4px; }
.trajectory-chart.is-compact .route-station-year { font-size: 9px; stroke-width: 2.4px; }
.trajectory-chart.is-compact .route-badge-new { font-size: 9px; stroke-width: 4px; }
.trajectory-chart.is-compact .route-field-line { stroke-width: 5.6px; }
.trajectory-chart.is-compact .route-main-field { stroke-width: 8.5px; }
.route-field-line { filter: drop-shadow(0 4px 8px rgba(15,23,42,.08)); }

.signature-modal {
  background:
    radial-gradient(circle at 12% 14%, rgba(37,99,235,.14), transparent 34%),
    radial-gradient(circle at 90% 74%, rgba(20,184,166,.12), transparent 34%),
    rgba(241, 248, 252, .46) !important;
  backdrop-filter: blur(18px) saturate(1.10) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.10) !important;
}
.signature-dialog {
  width: min(1180px, calc(100vw - 30px)) !important;
  border-radius: 32px !important;
  border: 1px solid rgba(186,230,253,.72) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(219,234,254,.74), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(240,249,255,.72)) !important;
  box-shadow: 0 32px 110px rgba(15,23,42,.24), inset 0 1px 0 rgba(255,255,255,.75) !important;
  color: #0f172a !important;
  padding: 20px !important;
}
.signature-dialog-head { padding: 6px 8px 14px !important; }
.signature-kicker { color: #0e7490 !important; }
.signature-dialog h3 { color: #0f172a !important; }
.signature-close {
  width: 40px !important;
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(186,230,253,.76) !important;
  background: rgba(255,255,255,.66) !important;
  color: #0f172a !important;
  font-size: 28px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.08) !important;
}
.signature-close:hover { background: #ffffff !important; color: #075985 !important; }
.signature-preview-wrap {
  min-height: min(58vh, 560px) !important;
  background:
    linear-gradient(135deg, rgba(248,250,252,.86), rgba(240,249,255,.68)) !important;
  border: 1px solid rgba(186,230,253,.70) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 18px 44px rgba(15,23,42,.10) !important;
}
.signature-preview-wrap::before { display: none !important; }
.signature-preview-status {
  color: #334155;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(186,230,253,.64);
}
.signature-preview-wrap.has-preview .signature-preview-status { display: none; }
.signature-preview-wrap:not(.has-preview) img { display: none; }
.signature-preview-wrap img {
  max-height: min(58vh, 560px);
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(15,23,42,.18);
}
.signature-style-row {
  background: rgba(255,255,255,.70) !important;
  border: 1px solid rgba(186,230,253,.68) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70) !important;
}
.signature-style-row > span { color: #075985 !important; }
.signature-style-buttons button {
  background: rgba(239,246,255,.88) !important;
  color: #0f172a !important;
  border: 1px solid rgba(186,230,253,.72) !important;
}
.signature-style-buttons button:hover { background: #ffffff !important; }
.signature-style-buttons button.active {
  background: linear-gradient(135deg, #22d3ee, #2563eb) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow: 0 12px 28px rgba(14,165,233,.22) !important;
}
.signature-actions .primary-btn:disabled {
  opacity: .55;
  cursor: wait;
  filter: grayscale(.12);
}
@media (max-width: 760px) {
  .signature-preview-wrap { min-height: 280px !important; }
  .signature-preview-wrap img { max-height: 46vh; }
  .signature-close { width: 38px !important; height: 38px !important; }
}

/* v1.6 official — transparent route canvas and refined signature cards */
.route-map-svg .route-viewport { isolation: isolate; }
.route-field-line { stroke-linecap: round; stroke-linejoin: round; }
.route-main-field { opacity: .95; }
.route-station-halo { filter: blur(1px); }


/* v1.6 official — vertical Research Route Tree and fixed signature export */
.trajectory-card {
  border: 1px solid rgba(186, 230, 253, .72) !important;
  box-shadow: 0 18px 45px rgba(15,23,42,.06) !important;
}
.trajectory-chart {
  min-height: 720px !important;
  height: clamp(720px, 82vh, 980px) !important;
  border: 0 !important;
  background: transparent !important;
  overflow: hidden;
}
.route-map-svg {
  background: transparent !important;
}
.route-tree-trunk {
  stroke-width: 9.5px !important;
  opacity: .96 !important;
  filter: drop-shadow(0 7px 12px rgba(15,23,42,.10));
}
.route-tree-branch {
  stroke-width: 5.8px !important;
  opacity: .56 !important;
  filter: drop-shadow(0 5px 8px rgba(15,23,42,.07));
}
.route-tree-label {
  dominant-baseline: central;
}
.trajectory-chart.is-compact .route-tree-trunk { stroke-width: 8.5px !important; }
.trajectory-chart.is-compact .route-tree-branch { stroke-width: 5.4px !important; }
.trajectory-chart.is-vertical-tree .route-station-label {
  font-size: 16px;
}
.trajectory-chart.is-vertical-tree.is-compact .route-station-label {
  font-size: 18px;
}
.trajectory-chart.is-vertical-tree .route-station-year {
  font-size: 11.5px;
}
@media (max-width: 760px) {
  .trajectory-chart { min-height: 760px !important; height: 820px !important; }
}

.signature-modal {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important;
  overflow: hidden !important;
}
.signature-dialog {
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.signature-dialog-head {
  flex: 0 0 auto !important;
  align-items: center !important;
}
.signature-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-align: center !important;
  padding: 0 !important;
  font-size: 26px !important;
}
.signature-preview-wrap {
  flex: 1 1 auto !important;
  min-height: 260px !important;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 620px) !important;
}
.signature-preview-wrap img {
  max-height: min(62vh, 620px) !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}
.signature-style-row,
.signature-actions {
  flex: 0 0 auto !important;
}
.signature-actions {
  margin-top: 12px !important;
  padding-bottom: 2px !important;
}
.signature-actions .primary-btn {
  min-height: 46px !important;
}
@media (max-width: 760px) {
  .signature-dialog {
    max-height: calc(100vh - 18px) !important;
  }
  .signature-preview-wrap {
    min-height: 190px !important;
    max-height: 42vh !important;
  }
  .signature-preview-wrap img {
    max-height: 42vh !important;
  }
}


/* v1.6 official — return to horizontal Route Map, fix signature modal fit/close, add Route Map child border */
.signature-modal.hidden { display: none !important; visibility: hidden !important; pointer-events: none !important; }
.signature-modal {
  overflow: hidden !important;
  padding: 12px !important;
}
.signature-dialog {
  width: min(1120px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.signature-dialog-head { flex: 0 0 auto !important; }
.signature-close {
  display: inline-grid !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer !important;
  z-index: 3 !important;
}
.signature-preview-wrap {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: min(48vh, 500px) !important;
  min-height: 240px !important;
  max-height: min(48vh, 500px) !important;
  aspect-ratio: 16 / 9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.signature-preview-wrap img {
  width: auto !important;
  height: auto !important;
  max-width: 92% !important;
  max-height: 92% !important;
  object-fit: contain !important;
}
.signature-style-row {
  flex: 0 0 auto !important;
  margin-top: 10px !important;
  padding: 10px 14px !important;
}
.signature-actions {
  flex: 0 0 auto !important;
  margin-top: 10px !important;
  padding-bottom: 0 !important;
}
.signature-actions .primary-btn {
  min-height: 42px !important;
}
.trajectory-chart {
  height: clamp(480px, 58vw, 700px) !important;
  min-height: 500px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(186,230,253,.72) !important;
  background: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66), 0 12px 30px rgba(15,23,42,.045) !important;
  position: relative !important;
  overflow: hidden !important;
}
.trajectory-chart.is-vertical-tree { min-height: 500px !important; height: clamp(480px, 58vw, 700px) !important; }
.route-map-svg { background: transparent !important; }
.route-tree-trunk, .route-tree-branch { display: none !important; }
@media (max-width: 760px) {
  .signature-dialog { max-height: calc(100vh - 18px) !important; }
  .signature-preview-wrap {
    height: min(40vh, 360px) !important;
    min-height: 190px !important;
    max-height: min(40vh, 360px) !important;
  }
  .signature-preview-wrap img { max-height: 90% !important; max-width: 94% !important; }
  .trajectory-chart { height: 500px !important; min-height: 460px !important; }
}


/* v1.6 official — signature refinement */
.signature-close { display:flex !important; align-items:center !important; justify-content:center !important; line-height:1 !important; cursor:pointer !important; z-index:6 !important; }
.signature-dialog { overflow:hidden !important; }
.signature-preview-wrap { display:flex !important; align-items:center !important; justify-content:center !important; }
.signature-preview-wrap img { max-width: 92% !important; max-height: min(52vh, 560px) !important; object-fit: contain !important; }
.trajectory-card, .trajectory-chart { border: 1px solid rgba(186,230,253,.72) !important; }


/* v1.6 official — preview containment and final signature card refinements */
.signature-dialog {
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.signature-preview-wrap {
  flex: 1 1 auto !important;
  min-height: 240px !important;
  height: clamp(260px, 44vh, 430px) !important;
  max-height: clamp(260px, 44vh, 430px) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  box-sizing: border-box !important;
}
.signature-preview-wrap img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
.signature-style-row,
.signature-actions { flex: 0 0 auto !important; }
.signature-close { display:flex !important; align-items:center !important; justify-content:center !important; line-height:1 !important; cursor:pointer !important; }
@media (max-width: 720px) {
  .signature-preview-wrap {
    height: 240px !important;
    max-height: 240px !important;
  }
  .signature-preview-wrap img { max-width: 100% !important; max-height: 100% !important; }
}


/* v1.6 — loading overlay, citation sample label, milestone anchors */
.profile-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(226, 238, 248, .44);
  backdrop-filter: blur(12px);
}
.profile-loading-overlay.hidden { display: none !important; }
.profile-loading-card {
  width: min(380px, 92vw);
  min-height: 270px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.66);
  background: linear-gradient(135deg, rgba(255,255,255,.46), rgba(240,249,255,.22));
  box-shadow: 0 34px 90px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.profile-loading-orbit {
  position: relative;
  width: 154px;
  height: 154px;
  animation: profileOrbitSpin 7.5s linear infinite;
}
.profile-loading-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid; place-items: center;
  color: white; font-weight: 950;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 40px rgba(37,99,235,.34);
}
.profile-loading-orbit span {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff; font-weight: 950;
  box-shadow: 0 12px 26px rgba(15,23,42,.18);
  animation: profileOrbitCounter 7.5s linear infinite;
}
.profile-loading-orbit .pl-o { left: 58%; top: 4%; background: #4B8DF8; }
.profile-loading-orbit .pl-r { right: 0; top: 45%; background: #9A72F8; }
.profile-loading-orbit .pl-b { left: 12%; bottom: 2%; background: #38C7DF; }
.profile-loading-orbit .pl-i { left: 0; top: 44%; background: #FF7A3C; }
.profile-loading-orbit .pl-t { left: 25%; top: 0; background: #52DA83; }
.profile-loading-text { font-weight: 900; color: #1e293b; text-align: center; padding: 0 22px; }
@keyframes profileOrbitSpin { to { transform: rotate(360deg); } }
@keyframes profileOrbitCounter { to { transform: rotate(-360deg); } }
.mini-list-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 0 0 8px;
  margin: -2px 0 4px;
  border-bottom: 1px solid rgba(226,232,240,.92);
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .035em;
}
@media (max-width: 560px) {
  .profile-loading-card { min-height: 240px; }
  .profile-loading-orbit { width: 134px; height: 134px; }
  .profile-loading-orbit span { width: 32px; height: 32px; }
  .profile-loading-core { width: 66px; height: 66px; }
}


/* v1.6 official — profile loading reuses the dashboard calculation loader exactly. */
.profile-loading-overlay { display: none !important; }


/* v1.7.14 — Feedback public reload fix; Route Map visible-field slider retained. */
.route-field-slider {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(186,230,253,.72);
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.route-field-slider label {
  flex: 0 0 auto;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
}
.route-field-slider output { color: #075985; font-weight: 950; }
.route-field-slider input[type="range"] { flex: 1 1 auto; min-width: 90px; accent-color: #0284c7; }
@media (max-width: 760px) {
  .route-field-slider { left: 10px; right: 10px; bottom: 10px; flex-direction: column; align-items: stretch; gap: 7px; padding: 8px 10px; }
  .route-field-slider label { font-size: 11px; }
}
