:root {
  --navy: #111b43;
  --navy-2: #24356e;
  --blue: #0758ce;
  --cyan: #2d88ee;
  --gold: #0758ce;
  --gold-2: #123eab;
  --ink: #1a2438;
  --muted: #6d7788;
  --line: #e4eaf1;
  --bg: #f7f8f4;
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 52px rgba(35, 44, 77, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
}

body {
  --mx: 50%;
  --my: 18%;
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 6%, rgba(7, 88, 206, 0.16), transparent 30%),
    radial-gradient(circle at 84% 0%, rgba(49, 88, 201, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfbf7 0%, #f4f7f8 46%, #faf9f3 100%);
  min-height: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(7, 88, 206, 0.22), transparent 24%),
    radial-gradient(circle at calc(100% - var(--mx)) calc(var(--my) + 18%), rgba(70, 183, 200, 0.18), transparent 28%),
    linear-gradient(115deg, transparent 16%, rgba(255, 255, 255, 0.5) 34%, transparent 52%);
  filter: blur(36px);
  opacity: 0.72;
  animation: backgroundFlow 15s ease-in-out infinite alternate;
}

body::after {
  z-index: 0;
  background:
    linear-gradient(105deg, transparent 0 28%, rgba(7, 88, 206, 0.09) 38%, transparent 50% 100%),
    linear-gradient(75deg, transparent 0 46%, rgba(49, 88, 201, 0.08) 55%, transparent 68% 100%);
  mix-blend-mode: multiply;
  opacity: 0.56;
  transform: translateX(-12%);
  animation: lightSweep 18s linear infinite;
}

@keyframes backgroundFlow {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1.5%, 0) scale(1.05); }
}

@keyframes lightSweep {
  to { transform: translateX(12%); }
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.auth-view,
.client-view {
  min-height: 100vh;
  padding: 34px;
}

.client-view {
  height: 100vh;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.auth-view {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
}

.auth-card img {
  width: 168px;
  display: block;
  margin-bottom: 18px;
  filter: drop-shadow(0 16px 24px rgba(17, 27, 67, 0.14));
}

.auth-card > span,
.client-header span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h1,
.client-header h1 {
  margin: 10px 0 12px;
  color: var(--navy);
  font-size: 34px;
}

.auth-card p,
.client-header p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form,
.client-form {
  display: grid;
  gap: 14px;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: grid;
}

.compact-auth {
  margin-top: 0;
  padding-top: 0;
}

.compact-auth b {
  color: var(--navy);
  font-size: 14px;
  letter-spacing: 0;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.auth-links.auth-panel {
  display: none;
}

.auth-links.auth-panel.active {
  display: flex;
}

.auth-links button,
.auth-panel-head button {
  min-height: 36px;
  border: 1px solid rgba(204, 212, 224, 0.78);
  border-radius: 8px;
  padding: 0 12px;
  color: #667085;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-weight: 800;
}

.auth-links button {
  flex: 1;
}

.auth-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-panel-head button {
  min-height: 32px;
  font-size: 12px;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.auth-form label,
.client-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form input,
.client-form input,
.client-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-form input:focus,
.client-form input:focus,
.client-form textarea:focus {
  border-color: rgba(7, 88, 206, 0.72);
  box-shadow: 0 0 0 4px rgba(7, 88, 206, 0.12);
}

.auth-form button,
.client-form button,
.client-header button,
.client-actions button,
#refreshClients,
#backToClients {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-form button:hover,
.client-form button:hover,
.client-header button:hover,
.client-actions button:hover,
#refreshClients:hover,
#backToClients:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(238, 127, 34, 0.16);
}

.auth-form em,
.client-form em {
  min-height: 18px;
  color: #b54708;
  font-size: 12px;
  font-style: normal;
}

.client-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.client-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 22px 24px;
}

.client-header img {
  width: 126px;
  display: block;
  margin: 0;
}

.client-header h1 {
  margin-bottom: 0;
  font-size: 30px;
}

.brand-settings-hotspot {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: default;
  user-select: none;
}

.brand-settings-copy {
  min-width: 0;
}

.brand-settings-copy h1 {
  margin: 5px 0 0;
}

.client-header button,
#refreshClients {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(7, 88, 206, 0.24);
}

.client-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.client-header .ghost-action {
  color: #667085;
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(204, 212, 224, 0.72);
  box-shadow: none;
}

.client-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 22px;
}

.client-form-panel,
.client-list-panel {
  padding: 24px;
}

.client-form-panel {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}


.settings-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.api-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 26px;
}

.api-status-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 104px;
  padding: 16px 17px;
  border: 1px solid rgba(204, 212, 224, .72);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 24px rgba(35, 44, 77, .05);
}

.api-status-grid span {
  color: #8a93a3;
  font-size: 12px;
  font-weight: 700;
}

.api-status-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.api-status-grid strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.25;
}

.api-status-grid .ok {
  border-color: rgba(47, 185, 128, .3);
  background: linear-gradient(145deg, rgba(239, 252, 247, .96), rgba(255, 255, 255, .84));
}

.api-status-grid .ok strong { color: #17865b; }

.api-status-grid .warn {
  border-color: rgba(7, 88, 206, .36);
  background: linear-gradient(145deg, rgba(255, 249, 233, .98), rgba(255, 255, 255, .86));
}

.api-status-grid .warn strong { color: #b36a12; }

.api-settings-form {
  padding: 20px;
  border: 1px solid rgba(204, 212, 224, .68);
  border-radius: 14px;
  background: rgba(250, 251, 252, .72);
}

.api-form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(204, 212, 224, .62);
}

.api-form-heading span {
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.api-form-heading h3 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 18px;
}

.api-form-heading small {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.client-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  font: inherit;
}

.client-form select:focus {
  border-color: rgba(7, 88, 206, .72);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(7, 88, 206, .1);
}

#apiSettingsForm #apiKeyHint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 900px) {
  .api-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .api-status-grid { grid-template-columns: 1fr; }
  .api-form-heading { align-items: start; flex-direction: column; }
  .api-form-heading small { text-align: left; }
}

.optional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.version-metrics {
  padding: 18px;
  border: 1px solid rgba(49, 88, 201, .18);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(245, 248, 255, .92), rgba(255, 255, 255, .82));
}

.version-metrics[data-version-metrics="international"] {
  border-color: rgba(70, 183, 200, .22);
  background: linear-gradient(145deg, rgba(241, 252, 252, .9), rgba(255, 255, 255, .84));
}

.version-metrics-title {
  margin-bottom: 14px;
}

.version-metrics-title span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.version-metrics-title h3 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 17px;
}

.version-metrics-title b {
  margin-left: 5px;
  color: #c46e12;
  font-size: 11px;
}

.metric-auto-note {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 13px 14px;
  border: 1px dashed rgba(49, 88, 201, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .58);
}

.metric-auto-note strong {
  color: var(--navy);
  font-size: 13px;
}

.metric-auto-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.version-field {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(7, 88, 206, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(7, 88, 206, 0.08));
}

.version-field legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.version-field legend b {
  color: var(--gold-2);
}

.version-field label {
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(204, 212, 224, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.version-field label:hover {
  transform: translateY(-1px);
  border-color: rgba(238, 127, 34, 0.42);
  box-shadow: 0 10px 22px rgba(35, 44, 77, 0.08);
}

.version-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-2);
}

.version-field span {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions button[type="button"] {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(204, 212, 224, 0.9);
}

.keyword-confirmation {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(49, 88, 201, 0.16);
  border-radius: 8px;
  background: rgba(49, 88, 201, 0.04);
}

.keyword-confirmation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.keyword-confirmation-head strong,
.keyword-confirmation-head span {
  display: block;
}

.keyword-confirmation-head span,
.keyword-candidate small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.keyword-confirmation-head b {
  color: var(--blue);
  font-size: 12px;
}

.keyword-candidates {
  display: grid;
  gap: 8px;
}

.keyword-candidate {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px !important;
}

.keyword-candidate > input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 auto;
  accent-color: var(--blue);
}

.keyword-preview-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(49, 88, 201, 0.28);
  border-radius: 8px;
  background: rgba(49, 88, 201, 0.04);
}

.keyword-preview-action button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy-2));
  cursor: pointer;
  font-weight: 800;
}

.keyword-preview-action span {
  color: var(--muted);
  font-size: 12px;
}

.optional-client-details {
  overflow: hidden;
  border: 1px solid rgba(204, 212, 224, 0.78);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.optional-client-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
}

.optional-client-details summary::-webkit-details-marker {
  display: none;
}

.optional-client-details summary span {
  display: grid;
  gap: 3px;
}

.optional-client-details summary strong {
  color: var(--navy);
}

.optional-client-details summary small {
  color: var(--muted);
}

.optional-client-details summary b {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 13px;
}

.optional-client-details[open] summary {
  border-bottom: 1px solid rgba(204, 212, 224, 0.7);
}

.optional-client-details[open] summary b {
  font-size: 0;
}

.optional-client-details[open] summary b::after {
  content: "收起资料";
  font-size: 13px;
}

.optional-client-fields {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.keyword-candidate > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.keyword-candidate small {
  margin: 0;
  text-align: right;
}

.client-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.client-list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.client-list-tools input {
  flex: 1;
  min-width: 0;
}

.client-list-tools select,
.client-list-tools button,
.client-list-tools input {
  min-height: 40px;
  border: 1px solid rgba(204, 212, 224, 0.9);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
}

.client-list-tools select,
.client-list-tools button {
  flex: 0 0 auto;
}

.client-list-tools button {
  cursor: pointer;
  font-weight: 800;
}

#backupClients {
  border-color: rgba(7, 88, 206, 0.32);
  background: rgba(7, 88, 206, 0.1);
}

.client-list-tools span {
  flex: 0 0 auto;
  color: #707a8d;
  font-size: 13px;
  white-space: nowrap;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none !important;
}

.client-empty,
.client-item {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.client-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.client-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(35, 44, 77, 0.08);
}

.client-item strong,
.client-item span,
.client-item small {
  display: block;
}

.client-item strong {
  color: var(--navy);
  font-size: 19px;
}

.client-item span {
  margin-top: 6px;
  color: #40506a;
}

.client-item small {
  margin-top: 6px;
  color: var(--muted);
}

.client-version-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.client-version-badges:empty {
  display: none;
}

.client-version-badges b {
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--navy);
  font-size: 12px;
  background: rgba(49, 88, 201, 0.08);
  border: 1px solid rgba(49, 88, 201, 0.14);
}

.client-version-badges b:last-child {
  background: rgba(7, 88, 206, 0.12);
  border-color: rgba(7, 88, 206, 0.22);
}

.client-version-badges b[data-tone="active"] {
  color: #14745a;
  background: rgba(24, 160, 116, 0.09);
  border-color: rgba(24, 160, 116, 0.2);
}

.client-version-badges b[data-tone="warning"] {
  color: #a85c0c;
  background: rgba(7, 88, 206, 0.13);
  border-color: rgba(7, 88, 206, 0.28);
}

.client-version-badges b[data-tone="expired"] {
  color: #b42318;
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.18);
}

.client-validation {
  width: fit-content;
  max-width: 100%;
  margin-top: 8px !important;
  padding: 5px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.client-validation.warning {
  color: #9a5a12;
  background: rgba(7, 88, 206, 0.11);
}

.client-validation.error {
  color: #b42318;
  background: rgba(217, 45, 32, 0.08);
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.client-actions button {
  min-height: 34px;
  color: var(--navy);
  background: rgba(49, 88, 201, 0.08);
}

.client-actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy-2));
}

.client-actions button:last-child {
  color: #b42318;
  background: rgba(244, 63, 94, 0.08);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  color: #172033;
  background:
    linear-gradient(160deg, rgba(7, 88, 206, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(245, 248, 250, 0.86) 58%, rgba(232, 237, 246, 0.9) 100%);
  border-right: 1px solid rgba(204, 212, 224, 0.66);
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px 25px;
  height: 260px;
  background: radial-gradient(circle, rgba(49, 88, 201, 0.14), transparent 66%);
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  gap: 0;
  align-items: center;
  min-height: 76px;
  z-index: 1;
}

.brand-mark {
  display: grid;
  place-items: center start;
  width: 168px;
  height: 74px;
  overflow: visible;
}

.brand img {
  width: 158px;
  max-width: none;
  filter: drop-shadow(0 10px 18px rgba(17, 27, 67, 0.14));
}

.brand > span:last-child {
  display: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 4px;
  color: #707a8d;
  font-size: 12px;
}

.nav {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 36px;
  z-index: 1;
}

.nav a {
  position: relative;
  padding: 13px 14px;
  border-radius: 8px;
  color: #5e697c;
  font-size: 14px;
  overflow: hidden;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: translateX(-110%);
  transition: transform 0.42s ease;
}

.nav a:hover,
.nav a.active {
  color: #162044;
  background: linear-gradient(135deg, rgba(7, 88, 206, 0.2), rgba(49, 88, 201, 0.08));
}

.nav a:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 26px rgba(35, 44, 77, 0.08);
}

.nav a:hover::after {
  transform: translateX(110%);
}

.sidebar-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(210, 217, 228, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  z-index: 1;
}

.sidebar-card span,
.sidebar-card small {
  display: block;
  color: #707a8d;
  font-size: 12px;
}

.sidebar-card strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.sidebar-card button {
  width: 100%;
  margin-top: 14px;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.mobile-back-button {
  display: none;
}

.mobile-report-bar,
.mobile-report-brand {
  display: none;
}

.panel {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(7, 88, 206, 0.16), transparent 25%),
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.32), transparent 55% 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.panel:hover {
  transform: translateY(-3px);
  border-color: rgba(7, 88, 206, 0.28);
  box-shadow: 0 22px 62px rgba(35, 44, 77, 0.13);
}

.panel:hover::before {
  opacity: 1;
}

.reveal-on-scroll {
  opacity: 0;
  filter: blur(5px);
  transition:
    opacity 0.48s ease,
    filter 0.48s ease,
    transform 0.48s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, filter, transform;
}

.reveal-on-scroll:not(.is-visible) {
  transform: translate3d(0, 18px, 0);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  filter: blur(0);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  min-height: 330px;
  padding: 34px 38px;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 16%, rgba(49, 88, 201, 0.18), transparent 34%),
    radial-gradient(circle at 8% 18%, rgba(7, 88, 206, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 246, 249, 0.82));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(49, 88, 201, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 88, 201, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18), #000 62%, rgba(0, 0, 0, 0.28));
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -150px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 27, 67, 0.08), transparent 68%);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.topline {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(49, 88, 201, 0.14);
  border-radius: 999px;
  color: #566176;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(245, 163, 0, 0.18);
}

.version-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 18px;
  padding: 5px;
  border: 1px solid rgba(49, 88, 201, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 36px rgba(30, 49, 92, 0.08);
  backdrop-filter: blur(12px);
}

.version-switch button {
  min-width: 86px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.version-switch button:hover {
  transform: translateY(-1px);
  color: #14213d;
}

.version-switch button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 255, 0.92));
  color: #14213d;
  box-shadow: 0 10px 22px rgba(30, 49, 92, 0.12);
}

.hero h1 {
  margin: 26px 0 12px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.hero h1 small {
  display: block;
  margin-top: 14px;
  color: #667085;
  font-size: 18px;
  font-weight: 600;
}

.hero p {
  margin: 0;
  color: #3f4a5f;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta span {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #667085;
  font-size: 13px;
}

.hero-meta b {
  color: #172033;
}

.service-cycle-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  max-width: 650px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(49, 88, 201, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.service-cycle-copy {
  display: grid;
  gap: 3px;
}

.service-cycle-copy > span,
.service-cycle-copy small,
.service-cycle-numbers span {
  color: #667085;
  font-size: 12px;
}

.service-cycle-copy strong {
  color: #14745a;
  font-size: 16px;
}

.service-cycle-card[data-tone="warning"] .service-cycle-copy strong { color: #a85c0c; }
.service-cycle-card[data-tone="expired"] .service-cycle-copy strong { color: #b42318; }
.service-cycle-card[data-tone="pending"] .service-cycle-copy strong { color: var(--blue); }

.service-cycle-numbers {
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-cycle-numbers span {
  display: grid;
  gap: 2px;
  text-align: right;
}

.service-cycle-numbers b {
  color: var(--navy);
  font-size: 14px;
}

.service-cycle-progress {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(49, 88, 201, 0.1);
}

.service-cycle-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #23a47b);
  transition: width 0.45s ease;
}

.system-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(7, 88, 206, 0.3);
  border-radius: 10px;
  color: #7d4b12;
  background: rgba(255, 249, 235, 0.94);
}

.system-notice strong {
  color: #9a5a12;
}

.system-notice span + span::before {
  content: "·";
  margin-right: 12px;
  opacity: 0.55;
}

.system-notice[data-level="error"] {
  border-color: rgba(217, 45, 32, 0.25);
  color: #8f241c;
  background: rgba(255, 242, 241, 0.96);
}

.system-notice[data-level="error"] strong {
  color: #b42318;
}

.hero-platforms {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-platform {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 0;
  color: #3f4a5f;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  animation: orbitFloat 4.8s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: filter 0.18s ease, scale 0.18s ease;
}

.hero-platform:hover,
.hero-platform.is-hovered {
  filter: saturate(1.12) drop-shadow(0 16px 20px rgba(35, 44, 77, 0.18));
  scale: 1.16;
}

.hero-platform i {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
}

.hero-platform img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(35, 44, 77, 0.16));
}

.hero-platform .custom-logo {
  width: 44px;
  height: 44px;
  overflow: visible;
  filter: drop-shadow(0 10px 12px rgba(35, 44, 77, 0.16));
}

.local-logo {
  display: grid;
  place-items: center;
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 255, 0.78)),
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--logo-color) 28%, transparent), transparent 58%);
  color: var(--logo-color);
  border: 1px solid color-mix(in srgb, var(--logo-color) 24%, rgba(255, 255, 255, 0.62));
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(30, 49, 92, 0.14);
}

.hero-platform .local-logo {
  width: 42px;
  height: 42px;
}

.hero-platform b {
  display: none;
}

@keyframes orbitFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 286px;
}

.hero-visual > img {
  position: absolute;
  top: 14px;
  right: -12px;
  width: 240px;
  opacity: 0.1;
  filter: drop-shadow(0 20px 35px rgba(17, 27, 67, 0.16));
}

.radar {
  position: relative;
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px solid rgba(49, 88, 201, 0.16);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(49, 88, 201, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 18px 44px rgba(35, 44, 77, 0.08);
  z-index: 1;
}

.radar span {
  position: absolute;
  border: 1px solid rgba(245, 163, 0, 0.32);
  border-radius: 50%;
}

.radar span:nth-child(1) { inset: 26px; }
.radar span:nth-child(2) { inset: 54px; }
.radar span:nth-child(3) { inset: 82px; }

.radar b {
  color: #172033;
  font-size: 34px;
  letter-spacing: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 138px;
  padding: 20px;
  transform-style: preserve-3d;
}

.metric-card:hover i {
  transform: translateY(-3px) rotate(-4deg) scale(1.06);
  box-shadow: 0 16px 28px rgba(35, 44, 77, 0.14);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card span {
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 32px;
  line-height: 1;
}

.metric-card small {
  font-size: 12px;
}

.metric-card em {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #167647;
  background: #ecfdf3;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.metric-card i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 8px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.metric-card svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-blue i { background: linear-gradient(135deg, #2f70ff, #36c5dc); }
.tone-gold i { background: linear-gradient(135deg, var(--gold), var(--gold-2)); }
.tone-violet i { background: linear-gradient(135deg, #7c6cf2, #3e58d8); }
.tone-rose i { background: linear-gradient(135deg, #ff7784, #ffb199); }
.tone-teal i { background: linear-gradient(135deg, #24b894, #46b7c8); }

.charts-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.growth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.ecosystem-card,
.term-card,
.trend-panel {
  padding: 24px;
}

.ecosystem-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.96fr) minmax(260px, 1.04fr) minmax(190px, 0.96fr);
  gap: 28px;
  align-items: center;
  min-height: 326px;
  margin-top: 22px;
}

.ecosystem-map::before {
  content: "";
  position: absolute;
  inset: 34px 18%;
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(49, 88, 201, 0.18) 10%, transparent 33% 67%, rgba(7, 88, 206, 0.18) 90%, transparent 96% 100%),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(49, 88, 201, 0.08) 38px, transparent 40px);
  mask-image: linear-gradient(90deg, transparent, #000 15% 85%, transparent);
  pointer-events: none;
}

.eco-column {
  display: grid;
  gap: 11px;
  position: relative;
  z-index: 2;
}

.eco-node {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(155, 171, 197, 0.32);
  border-radius: 8px;
  color: #40506a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(246, 250, 255, 0.72)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 26px rgba(35, 44, 77, 0.05);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.eco-node::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(7, 88, 206, 0.05), rgba(49, 88, 201, 0.28));
}

.eco-column-left .eco-node::before {
  left: calc(100% + 2px);
}

.eco-column-right .eco-node::before {
  right: calc(100% + 2px);
  transform: rotate(180deg);
}

.eco-node:hover,
.eco-node.is-hovered {
  transform: translateY(-3px) scale(1.012);
  border-color: rgba(7, 88, 206, 0.5);
  box-shadow: 0 12px 26px rgba(35, 44, 77, 0.08);
}

.eco-node > span:not(.eco-logo) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, var(--gold));
}

.eco-node .eco-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent;
  animation: logoBreath 4.8s ease-in-out infinite;
  animation-delay: calc(var(--lane, 0) * -0.42s);
}

.eco-node .eco-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(35, 44, 77, 0.14));
}

.eco-node .eco-logo .custom-logo {
  width: 38px;
  height: 38px;
  overflow: visible;
  filter: drop-shadow(0 8px 10px rgba(35, 44, 77, 0.14));
}

.eco-node .eco-logo .local-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.eco-node b,
.eco-node em {
  font-size: 13px;
}

.eco-node em {
  color: #172033;
  font-style: normal;
  font-weight: 800;
}

.eco-node.search-side span {
  background: transparent;
}

.eco-core {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 262px;
  padding: clamp(18px, 3vw, 30px) clamp(8px, 2vw, 18px);
  border: 0;
  border-radius: 0;
  text-align: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(7, 88, 206, 0.18), transparent 34%),
    radial-gradient(circle at 74% 32%, rgba(70, 183, 200, 0.18), transparent 34%),
    radial-gradient(circle at 50% 70%, rgba(141, 120, 223, 0.14), transparent 34%);
  box-shadow: none;
  overflow: visible;
}

.eco-core::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(49, 88, 201, 0.12);
  border-radius: 999px;
  box-shadow:
    inset 0 0 36px rgba(255, 255, 255, 0.48),
    0 0 0 32px rgba(255, 255, 255, 0.16);
  opacity: 0.85;
}

.eco-core::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(246, 178, 60, 0.28), rgba(104, 215, 238, 0.16), rgba(126, 140, 255, 0.22), rgba(240, 152, 200, 0.14), rgba(246, 178, 60, 0.28));
  filter: blur(28px);
  animation: coreLightSpin 12s linear infinite;
  opacity: 0.72;
}

.flow-noodles {
  position: relative;
  z-index: 2;
  width: clamp(220px, 32vw, 390px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  filter: drop-shadow(0 22px 36px rgba(102, 84, 255, 0.15));
  overflow: visible;
  contain: paint;
}

.silk-strands {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
  animation: silkFloat 9s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.silk-halo path,
.silk-line,
.silk-shine {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.silk-halo path {
  stroke: url(#silkRibbon);
  stroke-width: 34;
  filter: url(#silkHalo);
  opacity: 0.24;
  animation: silkBreath 5.8s ease-in-out infinite alternate;
}

.silk-halo path:nth-child(2) {
  stroke: url(#silkReverse);
  stroke-width: 42;
  opacity: 0.13;
  animation-delay: -2.4s;
}

.silk-line {
  stroke: url(#silkRibbon);
  stroke-width: var(--silk-width, 2.8);
  filter: url(#silkBlur);
  opacity: var(--silk-opacity, 0.38);
  mix-blend-mode: multiply;
  animation: silkBreath var(--silk-pulse, 5.2s) ease-in-out infinite alternate;
}

.silk-main {
  --silk-width: 3.9;
  --silk-opacity: 0.48;
}

.silk-thin {
  --silk-width: 1.8;
  --silk-opacity: 0.36;
  stroke: url(#silkReverse);
}

.silk-ghost {
  --silk-width: 8;
  --silk-opacity: 0.16;
  stroke: url(#silkReverse);
}

.silk-accent {
  --silk-width: 3.2;
  --silk-opacity: 0.62;
  stroke: url(#silkAccent);
}

.silk-delay-1 {
  --silk-offset: -82;
  --silk-pulse: 6.2s;
  animation-direction: reverse, alternate;
}

.silk-delay-2 {
  --silk-offset: -168;
  --silk-pulse: 4.8s;
}

.silk-delay-3 {
  --silk-offset: -246;
  animation-direction: reverse, alternate;
}

.silk-delay-4 {
  --silk-offset: -318;
}

.silk-shine {
  stroke: url(#silkShine);
  stroke-width: 7;
  stroke-dasharray: 64 360;
  filter: url(#silkBlur);
  opacity: 0.62;
  animation: silkShineMove 4.8s linear infinite;
}

.silk-shine-alt {
  stroke-width: 4;
  stroke-dasharray: 38 420;
  opacity: 0.46;
  animation-duration: 6.2s;
  animation-direction: reverse;
}

@keyframes silkBreath {
  from { opacity: 0.28; }
  to { opacity: var(--silk-opacity, 0.5); }
}

@keyframes silkFloat {
  0% { transform: translate3d(-2px, 1px, 0) scale(0.992) rotate(-0.35deg); }
  50% { transform: translate3d(2px, -1px, 0) scale(1.006) rotate(0.25deg); }
  100% { transform: translate3d(-1px, -2px, 0) scale(1.012) rotate(-0.15deg); }
}

@keyframes silkShineMove {
  to { stroke-dashoffset: -424; }
}

@keyframes coreLightSpin {
  to { transform: rotate(360deg); }
}

@keyframes logoBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.05); }
}

.term-cloud {
  position: relative;
  min-height: 360px;
  margin-top: 22px;
  overflow: hidden;
  perspective: 900px;
  background:
    radial-gradient(circle at 18% 78%, rgba(7, 88, 206, 0.13), transparent 18%),
    radial-gradient(circle at 50% 82%, rgba(7, 88, 206, 0.16), transparent 20%),
    radial-gradient(circle at 82% 76%, rgba(70, 183, 200, 0.13), transparent 20%),
    radial-gradient(circle at 50% 42%, rgba(70, 183, 200, 0.08), transparent 24%),
    radial-gradient(circle at 32% 52%, rgba(7, 88, 206, 0.09), transparent 28%),
    radial-gradient(circle at 74% 38%, rgba(70, 183, 200, 0.12), transparent 30%);
}

.term-cloud::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(49, 88, 201, 0.08);
  border-radius: 999px;
  opacity: 0.72;
  transform: rotate(-5deg);
}

.term-cloud::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 44px;
  width: min(760px, 88%);
  height: 122px;
  border: 1px solid rgba(7, 88, 206, 0.1);
  border-radius: 999px;
  opacity: 0.8;
  transform: translateX(-50%) rotate(2deg);
  box-shadow: 0 0 42px rgba(7, 88, 206, 0.08);
}

.term-bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  min-height: 44px;
  max-width: min(360px, 72vw);
  border: 1px solid rgba(7, 88, 206, 0.28);
  border-radius: 999px;
  padding: 0 18px;
  color: #152044;
  background:
    linear-gradient(135deg, rgba(7, 88, 206, 0.18), rgba(49, 88, 201, 0.06)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(35, 44, 77, 0.07);
  cursor: pointer;
  font-size: var(--size);
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) translate(0, 34px) scale(0.34);
  transform-origin: center;
  filter: blur(12px);
  animation: termFountain 8.6s cubic-bezier(0.17, 0.84, 0.31, 1) infinite;
  animation-delay: var(--delay);
  transition: box-shadow 0.18s ease;
  will-change: transform, opacity, filter;
}

.term-bubble:hover,
.term-bubble.is-hovered {
  animation-play-state: paused;
  box-shadow: 0 16px 34px rgba(35, 44, 77, 0.12);
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.62), calc(var(--dy) * 0.62)) scale(1.18);
}

@keyframes termFountain {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: translate(-50%, -50%) translate(0, 42px) scale(0.26);
  }
  12% {
    opacity: 0.26;
    filter: blur(9px);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.12), calc(var(--dy) * 0.12 + 28px)) scale(0.46);
  }
  28% {
    opacity: 0.92;
    filter: blur(1.5px);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.36), calc(var(--dy) * 0.36 + 8px)) scale(0.86);
  }
  46% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.68), calc(var(--dy) * 0.68)) scale(1.14);
  }
  68% {
    opacity: 0.68;
    filter: blur(0.8px);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 0.92), calc(var(--dy) * 0.92 - 6px)) scale(1.28);
  }
  86% {
    opacity: 0.18;
    filter: blur(3px);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 1.08), calc(var(--dy) * 1.08 - 14px)) scale(1.38);
  }
  100% {
    opacity: 0;
    filter: blur(5px);
    transform: translate(-50%, -50%) translate(calc(var(--dx) * 1.16), calc(var(--dy) * 1.16 - 22px)) scale(1.48);
  }
}

.trend-panel {
  margin-top: 22px;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.trend-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #5e697c;
  font-size: 12px;
}

.trend-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(70px, 1fr));
  gap: 18px;
  min-height: 300px;
  margin-top: 28px;
  padding: 10px 8px 0;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(#eef2f7 1px, transparent 1px);
  background-size: 100% 52px;
}

.trend-day {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-width: 0;
  text-align: center;
}

.trend-bars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  height: 250px;
}

.trend-bars span {
  width: 12px;
  border-radius: 6px 6px 0 0;
  background: var(--bar);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.trend-bars span:hover,
.trend-bars span.is-hovered {
  transform: translateY(-5px);
  filter: saturate(1.12);
}

.trend-day small {
  color: #667085;
  font-size: 12px;
}

.chart-card {
  min-width: 0;
  min-height: 460px;
  padding: 24px;
}

.chart-card:hover .section-title span,
.ecosystem-card:hover .section-title span,
.term-card:hover .section-title span,
.trend-panel:hover .section-title span,
.keyword-panel:hover .section-title span {
  text-shadow: 0 0 18px rgba(7, 88, 206, 0.28);
}

.section-title span {
  display: inline-flex;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.section-title.inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.donut-wrap {
  display: grid;
  gap: 22px;
  place-items: center;
  margin-top: 24px;
}

.donut-chart {
  width: min(300px, 100%);
}

.donut-chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.donut-chart circle {
  transition: 0.45s ease;
}

.donut-segment {
  cursor: pointer;
  outline: none;
  transition: stroke-dasharray 0.95s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease, filter 0.28s ease;
  shape-rendering: geometricPrecision;
}

.donut-segment:hover,
.donut-segment.is-hovered {
  opacity: 0.9;
  filter: drop-shadow(0 7px 10px rgba(28, 38, 70, 0.14));
}

.donut-border {
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 3.5;
  filter: drop-shadow(0 1px 0 rgba(226, 232, 240, 0.72));
}

.donut-chart text:first-of-type {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.donut-chart text:last-of-type {
  fill: var(--ink);
  font-size: 25px;
  font-weight: 900;
}

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  width: 100%;
}

.legend-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.legend-item:hover,
.legend-item.is-hovered {
  background: rgba(7, 88, 206, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(35, 44, 77, 0.06);
}

.legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

.legend-item b {
  color: #344054;
  font-weight: 700;
}

.legend-item em {
  font-style: normal;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.platform-pills span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #4b5565;
  font-size: 12px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.platform-pills span:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 10px 20px rgba(35, 44, 77, 0.08);
}

.platform-pills i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.platform-pills img,
.platform-pills .custom-logo,
.platform-pills .local-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(46px, 1fr));
  gap: 16px;
  align-items: end;
  min-height: 330px;
  margin-top: 36px;
  padding: 10px 8px 0;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(#eef2f7 1px, transparent 1px);
  background-size: 100% 54px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.bar-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  height: 330px;
  min-width: 0;
  text-align: center;
}

.bar-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.bar-track span {
  position: relative;
  display: block;
  width: min(64px, 76%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bar), #fff 16%), var(--bar));
  box-shadow: 0 14px 26px color-mix(in srgb, var(--bar), transparent 72%);
  transform: scaleY(0);
  transform-origin: bottom;
  opacity: 0;
  cursor: pointer;
  transition: transform 0.72s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.42s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

.bar-chart.is-visible .bar-track span {
  transform: scaleY(1);
  opacity: 1;
}

.bar-chart.is-visible .bar-item:nth-child(2) .bar-track span { transition-delay: 0.05s; }
.bar-chart.is-visible .bar-item:nth-child(3) .bar-track span { transition-delay: 0.1s; }
.bar-chart.is-visible .bar-item:nth-child(4) .bar-track span { transition-delay: 0.15s; }
.bar-chart.is-visible .bar-item:nth-child(5) .bar-track span { transition-delay: 0.2s; }
.bar-chart.is-visible .bar-item:nth-child(6) .bar-track span { transition-delay: 0.25s; }
.bar-chart.is-visible .bar-item:nth-child(7) .bar-track span { transition-delay: 0.3s; }
.bar-chart.is-visible .bar-item:nth-child(8) .bar-track span { transition-delay: 0.35s; }
.bar-chart.is-visible .bar-item:nth-child(9) .bar-track span { transition-delay: 0.4s; }
.bar-chart.is-visible .bar-item:nth-child(10) .bar-track span { transition-delay: 0.45s; }
.bar-chart.is-visible .bar-item:nth-child(11) .bar-track span { transition-delay: 0.5s; }

.bar-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 42%);
  opacity: 0;
  transform: translateY(20%);
}

.bar-chart.is-visible .bar-track span::after {
  animation: chartSheen 1.15s ease both;
}

.bar-track span:hover,
.bar-track span.is-hovered {
  transform: scaleY(1) translateY(-8px);
  filter: saturate(1.08);
  box-shadow: 0 20px 32px color-mix(in srgb, var(--bar), transparent 62%);
}

@keyframes chartSheen {
  0% { opacity: 0; transform: translateY(34%); }
  35% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-28%); }
}

.bar-track b {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  color: #344054;
  font-size: 12px;
}

.bar-item small {
  color: #59657a;
  font-size: 12px;
  white-space: nowrap;
}

.keyword-panel {
  min-width: 0;
  margin-top: 22px;
  padding: 24px;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.report-tabs button {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: #4b5565;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  overflow: hidden;
  transition: 0.18s ease;
}

.report-tabs button::after,
.filters button::after,
.evidence-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: translateX(-120%);
  transition: transform 0.38s ease;
}

.report-tabs button span {
  color: #8a93a3;
  font-size: 12px;
}

.report-tabs button.active,
.report-tabs button:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--navy-2));
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(49, 88, 201, 0.18);
}

.report-tabs button:hover::after,
.filters button:hover::after,
.evidence-btn:hover::after {
  transform: translateX(120%);
}

.report-tabs button.active span,
.report-tabs button:hover span {
  color: rgba(255, 255, 255, 0.72);
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 88, 206, 0.22);
  border-radius: 8px;
  color: #7a5b1b;
  background: rgba(7, 88, 206, 0.1);
  font-size: 13px;
  line-height: 1.6;
}

.notice strong {
  color: #a56010;
  white-space: nowrap;
}

.table-head {
  align-items: center;
}

.search {
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.search span {
  color: var(--muted);
  font-size: 12px;
}

.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.search input:focus {
  border-color: rgba(245, 163, 0, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 163, 0, 0.12);
}

.filters {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.filters div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters span {
  width: 42px;
  color: var(--muted);
  font-size: 13px;
}

.filters button {
  position: relative;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: #4b5565;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: 0.18s ease;
}

.filters button:hover,
.filters button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(238, 127, 34, 0.16);
}

.table-wrap {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

th,
td {
  padding: 17px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #475467;
  transition: background 0.18s ease, color 0.18s ease;
}

tbody tr {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

tbody tr:hover {
  transform: translateX(3px);
  box-shadow: inset 3px 0 0 rgba(7, 88, 206, 0.7);
}

tbody tr:hover td {
  background: rgba(7, 88, 206, 0.045);
}

td strong {
  color: #1d2939;
}

.platform-tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.platform-tag {
  color: var(--tag);
  background: color-mix(in srgb, var(--tag), #fff 88%);
}

.status.ok {
  color: #067647;
  background: #ecfdf3;
}

.status.warn {
  color: #b54708;
  background: #fffaeb;
}

.evidence-btn {
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  color: #2355c4;
  background: rgba(49, 88, 201, 0.08);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.evidence-btn:hover {
  transform: translateY(-2px);
  background: rgba(49, 88, 201, 0.12);
  box-shadow: 0 10px 20px rgba(49, 88, 201, 0.12);
}

.empty {
  text-align: center;
  color: var(--muted);
}

.insight-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 18px;
  margin: 22px 0 12px;
}

.insight-card {
  padding: 24px;
}

.insight-card:hover h2,
.insight-card:hover h3 {
  color: var(--navy);
}

.insight-card.primary:hover h2 {
  color: #fff;
  text-shadow: 0 0 24px rgba(7, 88, 206, 0.22);
}

.insight-card span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
}

.insight-card h2,
.insight-card h3 {
  margin: 10px 0 12px;
}

.insight-card h2 {
  max-width: 720px;
  font-size: 26px;
  line-height: 1.34;
}

.insight-card h3 {
  font-size: 21px;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.insight-card.primary {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 88, 206, 0.26), transparent 42%),
    linear-gradient(135deg, #111b43, #24356e);
}

.chart-tooltip {
  position: fixed;
  z-index: 1000;
  width: min(300px, calc(100vw - 32px));
  padding: 14px 15px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 88, 206, 0.18), transparent 44%),
    rgba(17, 27, 67, 0.94);
  box-shadow: 0 18px 42px rgba(17, 27, 67, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.chart-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.chart-tooltip strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.chart-tooltip p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.insight-card.primary p,
.insight-card.primary span {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    height: auto;
  }

  .nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
  }

  .sidebar-card {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charts-layout,
  .growth-layout,
  .client-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 10px 16px 16px;
  }

  .sidebar {
    display: none;
  }

  .mobile-report-bar {
    position: sticky;
    top: 8px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
    margin: 0 0 10px;
    padding: 6px 8px 6px 10px;
    border: 1px solid rgba(204, 212, 224, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(17, 27, 67, 0.1);
    backdrop-filter: blur(14px);
  }

  .mobile-report-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
  }

  .mobile-report-brand img {
    display: block;
    width: 72px;
    height: auto;
  }

  .mobile-report-brand span {
    overflow: hidden;
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-back-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    width: auto;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--navy-2));
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
  }

  .auth-view,
  .client-view {
    padding: 16px;
  }

  .auth-card,
  .client-form-panel,
  .client-list-panel {
    padding: 20px;
  }

  .client-header {
    display: grid;
    gap: 18px;
    padding: 18px 20px;
  }

  .client-header img {
    width: 126px;
  }

  .client-header h1 {
    margin-top: 7px;
    font-size: 27px;
  }

  .client-header-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .client-header-actions button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .client-list-panel .section-title.inline {
    display: flex;
    align-items: center;
  }

  .client-list-tools input {
    flex-basis: 100%;
  }

  .client-list-tools span {
    margin-left: auto;
  }

  .client-item {
    display: grid;
    padding: 15px;
  }

  .client-item strong {
    font-size: 17px;
  }

  .keyword-candidate {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .keyword-candidate small {
    grid-column: 2;
    text-align: left;
  }

  .optional-grid {
    grid-template-columns: 1fr;
  }

  .client-actions {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }

  .hero-platforms {
    inset: 4px 0 0;
  }

  .hero-visual {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 300px;
  }

  .radar {
    width: 170px;
    height: 170px;
  }

  .hero-meta {
    display: grid;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .section-title.inline,
  .table-head {
    display: grid;
  }

  .search {
    min-width: 0;
  }

  .legend {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    grid-template-columns: repeat(8, minmax(64px, 72px));
    overflow-x: auto;
  }

  .ecosystem-map {
    grid-template-columns: 1fr;
  }

  .eco-core {
    min-height: clamp(190px, 48vw, 280px);
  }

  .flow-noodles {
    width: min(100%, 390px);
  }

  .ecosystem-map::before,
  .eco-node::before {
    display: none;
  }

  .trend-chart {
    grid-template-columns: repeat(8, 76px);
    overflow-x: auto;
  }

  .chart-card {
    min-height: auto;
  }
}
