:root {
  --ink: #132721;
  --muted: #63736d;
  --subtle: #899891;
  --line: #dbe5df;
  --surface: #ffffff;
  --surface-alt: #f4f8f5;
  --canvas: var(--world-page-background, #f4f3ee);
  --green: #176847;
  --green-dark: #103f2d;
  --green-soft: #e4f2e9;
  --lime: #dbeccc;
  --amber: #a46013;
  --amber-bg: #fff1dd;
  --red: #ae4231;
  --red-bg: #fdefed;
  --blue: #356a88;
  --blue-bg: #e8f1f6;
  --shadow: 0 16px 42px rgba(14, 43, 34, 0.07);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--world-font-sans);
  line-height: 1.6;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dt, dd { margin: 0; }

.site-header {
  height: 70px;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(22, 70, 53, 0.08);
  background: rgba(247, 250, 248, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-area, .header-actions { display: flex; align-items: center; gap: 14px; }
.brand {
  font-family: var(--world-font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .11em;
}
.brand-divider { width: 1px; height: 20px; background: var(--line); }
.product-name { font-weight: 600; font-size: 15px; }
.beta-pill {
  border: 1px solid #bad8c8;
  color: var(--green);
  border-radius: 30px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.mode-chip {
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

main { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 46px) 62px; }
.hero {
  display: grid;
  grid-template-columns: minmax(380px, 1.05fr) minmax(350px, .95fr);
  align-items: center;
  gap: clamp(34px, 7vw, 88px);
  min-height: 527px;
  padding: 50px 0 34px;
}
.eyebrow {
  color: var(--green);
  text-transform: uppercase;
  font: 700 11px/1.5 var(--world-font-sans);
  letter-spacing: .19em;
  margin-bottom: 15px;
}
.hero h1 {
  font-size: clamp(35px, 4.1vw, 51px);
  line-height: 1.26;
  letter-spacing: -.055em;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 span { color: inherit; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.asset-title {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 590px);
  max-width: 100%;
  isolation: isolate;
}
.asset-map-preview {
  width: 100%;
  margin: 0;
  padding: clamp(19px, 2.3vw, 25px) clamp(16px, 2.2vw, 22px) clamp(17px, 2vw, 22px);
  border-radius: var(--radius-xl);
  border: 1px solid #e5ede8;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.asset-map-caption {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 17px;
}
.asset-map-caption small {
  color: var(--green);
  font: 700 10px/1.5 var(--world-font-sans);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.asset-map-caption strong {
  color: var(--ink);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.45;
  letter-spacing: -.03em;
}
.asset-map-canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 170px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.2;
}
.asset-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.asset-link {
  fill: none;
  stroke: rgba(23, 104, 71, .34);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: assetLinkDraw .66s cubic-bezier(.25,.75,.26,1) var(--link-delay, .42s) forwards;
}
.link-customer { --link-delay: .43s; }
.link-sales { --link-delay: .50s; }
.link-summary { --link-delay: .58s; }
.link-report { --link-delay: .64s; }
.similar-link {
  fill: none;
  stroke: rgba(164, 96, 19, .58);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 3 5;
  opacity: 0;
  animation: similarLinkShow .35s ease-out .73s forwards;
}
.asset-card {
  position: absolute;
  min-width: 100px;
  height: 44px;
  padding: 7px 10px 7px 30px;
  border-radius: 9px;
  border: 1px solid #dae7e0;
  background: var(--surface);
  box-shadow: 0 9px 22px rgba(14, 43, 34, .07);
  opacity: 0;
  transform: translate(var(--from-x), var(--from-y)) scale(.96);
  animation: assetCardEnter .48s cubic-bezier(.15,.8,.24,1) var(--delay) forwards;
}
.asset-card::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 12px;
  height: 17px;
  border-radius: 2px;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
}
.asset-card::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 15px;
  width: 6px;
  height: 1px;
  background: var(--icon-border);
  box-shadow: 0 4px 0 var(--icon-border), 0 8px 0 var(--icon-border);
}
.asset-card small {
  display: block;
  margin-bottom: 3px;
  color: var(--subtle);
  font: 700 8px/1 var(--world-font-sans);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.asset-card strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.asset-card.excel {
  --icon-bg: #e8f3ed;
  --icon-border: #298057;
}
.asset-card.sheets {
  --icon-bg: #e4f2e9;
  --icon-border: #176847;
}
.asset-card.duplicate {
  border-style: dashed;
  border-color: #ead6ba;
  background: #fffdf8;
}
.asset-customer {
  left: 0;
  top: 17px;
  --from-x: -19px;
  --from-y: -11px;
  --delay: .05s;
}
.asset-sales {
  right: 5px;
  top: 10px;
  --from-x: 21px;
  --from-y: -13px;
  --delay: .12s;
}
.asset-copy {
  right: 0;
  top: 63px;
  min-width: 132px;
  --from-x: 28px;
  --from-y: -1px;
  --delay: .20s;
}
.asset-summary {
  left: 1px;
  bottom: 7px;
  --from-x: -20px;
  --from-y: 13px;
  --delay: .17s;
}
.asset-report {
  right: 5px;
  bottom: 5px;
  --from-x: 21px;
  --from-y: 13px;
  --delay: .25s;
}
.asset-hub {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 106px;
  height: 52px;
  transform: translate(-50%, -50%) scale(.94);
  border-radius: 12px;
  border: 1px solid #bbdccb;
  background: var(--green-soft);
  box-shadow: 0 12px 24px rgba(23,104,71,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: assetHubEnter .46s cubic-bezier(.15,.8,.24,1) .48s forwards;
}
.asset-hub small {
  color: var(--green);
  font: 700 8px/1 var(--world-font-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.asset-hub strong {
  color: var(--green-dark);
  font: 700 11px/1 var(--world-font-sans);
  letter-spacing: .08em;
}
.similar-tag {
  position: absolute;
  right: 105px;
  top: 71px;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 9px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-3px);
  animation: similarTagShow .38s ease-out .80s forwards;
}
.title-line {
  display: block;
  opacity: 0;
  transform: translateY(9px);
  animation: titleLineEnter .54s cubic-bezier(.2,.75,.25,1) .62s forwards;
}
.hero h1 .title-context {
  font-size: .76em;
  font-weight: 600;
  letter-spacing: -.045em;
  margin-bottom: .06em;
}
.hero h1 .title-object {
  animation-delay: .75s;
}
.hero h1 .title-accent {
  color: var(--green);
  animation-delay: .88s;
}
@keyframes assetCardEnter {
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes assetHubEnter {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes assetLinkDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes similarLinkShow {
  to { opacity: 1; }
}
@keyframes similarTagShow {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes titleLineEnter {
  to { opacity: 1; transform: translateY(0); }
}
.hero-text {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}
.primary-button, .secondary-button {
  border-radius: 10px;
  padding: 13px 21px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-button { background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(23,104,71,.16); }
.primary-button:hover { background: #125b3e; transform: translateY(-1px); }
.secondary-button { background: var(--surface); color: var(--green-dark); border-color: var(--line); }
.secondary-button:hover { background: #eff6f2; transform: translateY(-1px); }
.compact { padding: 9px 15px; font-size: 13px; }

.dashboard {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid #e4ede8;
  box-shadow: var(--shadow);
  padding: 31px;
}
.dashboard-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.dashboard-heading h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.04em; }
.dashboard-heading .mode-chip { display: inline-flex; margin-top: 12px; }
.caption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.report-actions { display: flex; gap: 10px; }
.dashboard-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-alt);
  margin-bottom: 27px;
  overflow-x: auto;
}
.tab {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  padding: 10px 15px;
}
.tab.active { background: #fff; color: var(--green-dark); box-shadow: 0 3px 10px rgba(12, 46, 35, .06); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.metric {
  background: var(--surface-alt);
  padding: 17px 18px;
  border-radius: var(--radius-md);
  min-height: 97px;
}
.metric .label { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.metric .value { font: 700 29px/1 var(--world-font-sans); letter-spacing: -.04em; }
.metric .unit { font: 500 12px/1 var(--world-font-sans); color: var(--muted); margin-left: 5px; }
.metric.attention { background: #fff8ef; }
.metric.attention .value { color: var(--amber); }
.metric.critical { background: var(--red-bg); }
.metric.critical .value { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 14px; }
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-height: 260px;
}
.card.wide { min-height: 286px; }
.section-label { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; margin-bottom: 6px; text-transform: uppercase; }
.card h3, .panel-controls h3 { font-size: 17px; letter-spacing: -.03em; line-height: 1.45; margin-bottom: 16px; }
.card-title-row { display: flex; justify-content: space-between; align-items: flex-start; }
.tag {
  display: inline-flex; align-items: center; border-radius: 14px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.tag.risk { background: var(--amber-bg); color: var(--amber); }
.tag.critical { background: var(--red-bg); color: var(--red); }
.tag.stable { background: var(--green-soft); color: var(--green); }
.tag.neutral { background: var(--blue-bg); color: var(--blue); }
.issue-list { display: flex; flex-direction: column; gap: 9px; }
.issue-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  border-radius: 11px; background: var(--surface-alt); padding: 11px 12px;
}
.issue-severity { width: 7px; height: 37px; border-radius: 4px; background: var(--amber); }
.issue-severity.high { background: var(--red); }
.issue-copy strong { display: block; font-size: 13px; margin-bottom: 1px; }
.issue-copy span { color: var(--muted); font-size: 11px; }
.issue-link { color: var(--green); border: 0; background: transparent; font-size: 12px; font-weight: 600; }
.canonical-list, .hub-list { display: flex; flex-direction: column; gap: 10px; }
.canonical-row, .hub-row {
  border-radius: 10px; background: var(--surface-alt); padding: 11px 12px;
}
.canonical-row strong, .hub-row strong { display: block; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.canonical-row span, .hub-row span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.panel-controls { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 20px; }
.panel-controls h3 { margin-bottom: 0; font-size: 20px; }
.panel-note { color: var(--muted); font-size: 12px; align-self: flex-end; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; padding-top: 16px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.sheets { background: var(--green); }
.legend-dot.excel { background: var(--blue); }
.legend-line { display: inline-block; width: 17px; border-top: 2px dashed var(--red); }
.graph-shell {
  display: grid; grid-template-columns: minmax(510px, 1fr) 274px; gap: 18px;
  border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 16px;
  background: #fbfdfb;
}
#dependencyGraph { width: 100%; height: 440px; display: block; }
.node-detail {
  border-left: 1px solid var(--line); padding: 17px 0 17px 18px;
}
.empty-detail { color: var(--muted); font-size: 13px; margin-top: 15px; }
.detail-title { font-size: 16px; font-weight: 700; margin: 10px 0 12px; letter-spacing: -.02em; }
.detail-type { margin-bottom: 13px; }
.detail-grid { display: flex; flex-direction: column; gap: 9px; margin-top: 13px; }
.detail-grid dt { font-size: 11px; color: var(--muted); }
.detail-grid dd { font-size: 13px; font-weight: 500; }
.detail-link-list { margin: 16px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.detail-link-list li { padding: 7px 0; border-bottom: 1px solid #edf3ef; }
.group-list { display: flex; flex-direction: column; gap: 14px; }
.group-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px;
  display: grid; grid-template-columns: 240px 1fr 180px; gap: 20px; align-items: start;
}
.group-card h4 { font-size: 16px; line-height: 1.4; margin: 0 0 8px; }
.group-sub { color: var(--muted); font-size: 12px; }
.group-assets { display: flex; flex-direction: column; gap: 8px; }
.group-asset {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-radius: 10px; background: var(--surface-alt); padding: 10px 12px; font-size: 13px;
}
.group-asset.candidate { border: 1px solid #cfe4d7; background: #f1f8f4; }
.group-asset .score { color: var(--muted); font-size: 11px; white-space: nowrap; }
.group-decision { font-size: 12px; color: var(--muted); }
.group-decision strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 8px; }
.group-decision button { margin-top: 13px; border: 0; color: var(--green); background: transparent; font-weight: 600; padding: 0; font-size: 12px; }
.filter-row { display: flex; gap: 10px; }
.search-input, .select-input {
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
  padding: 10px 13px; font-size: 13px; outline: 0;
}
.search-input { width: 260px; }
.select-input { min-width: 148px; }
.search-input:focus, .select-input:focus { border-color: #8cb7a3; box-shadow: 0 0 0 3px rgba(23,104,71,.08); }
.asset-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.asset-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.asset-table th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 12px;
  background: var(--surface-alt); padding: 12px 15px; border-bottom: 1px solid var(--line);
}
.asset-table td { padding: 13px 15px; border-bottom: 1px solid #edf3ef; vertical-align: middle; }
.asset-table tr:last-child td { border-bottom: 0; }
.file-name { font-weight: 600; display: block; }
.file-path { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.file-type { display: inline-flex; border-radius: 15px; font-size: 11px; font-weight: 600; padding: 4px 9px; }
.file-type.sheets { color: var(--green); background: var(--green-soft); }
.file-type.excel { color: var(--blue); background: var(--blue-bg); }

.site-footer {
  max-width: 1280px; padding: 0 clamp(20px, 4vw, 46px) 34px; margin: 0 auto;
  display: flex; justify-content: space-between; color: var(--muted); font-size: 12px;
}

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .asset-map-preview { max-width: 610px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: 1 / -1; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .graph-shell { grid-template-columns: 1fr; }
  .node-detail { border-left: 0; border-top: 1px solid var(--line); padding: 15px 0 0; }
  .group-card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-header { height: auto; min-height: 64px; flex-wrap: wrap; padding-block: 12px; gap: 12px; }
  .mode-chip { display: none; }
  .hero h1 { font-size: 33px; }
  .dashboard { padding: 18px; }
  .dashboard-heading, .panel-controls { flex-direction: column; }
  .report-actions { width: 100%; }
  .report-actions button { flex: 1; }
  .dashboard-grid, .metrics, .two-column-report { grid-template-columns: 1fr; }
  .table-controls .filter-row { width: 100%; flex-direction: column; }
  .search-input { width: 100%; }
  .asset-table { min-width: 700px; }
  .site-footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 680px) {
  .asset-map-preview { padding: 17px 13px 14px; }
  .asset-map-caption { margin-bottom: 13px; }
  .asset-map-canvas { height: 152px; }
  .asset-card {
    min-width: 86px;
    height: 40px;
    padding: 6px 7px 6px 26px;
  }
  .asset-card::before { left: 8px; top: 10px; width: 11px; height: 15px; }
  .asset-card::after { left: 11px; top: 14px; width: 5px; }
  .asset-card strong { font-size: 10px; }
  .asset-copy { min-width: 114px; }
  .asset-hub { width: 94px; height: 46px; }
  .similar-tag { display: none; }
}
@media (max-width: 410px) {
  .hero h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .asset-card, .similar-link, .similar-tag, .title-line {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .asset-hub {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: none;
  }
  .asset-link {
    stroke-dashoffset: 0;
    animation: none;
  }
}



/* v004 diagnostic risk controls */
.diagnostic-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  padding: 16px 18px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fbfdfb;
}
.threshold-control { display: flex; align-items: center; gap: 32px; }
.threshold-control h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.threshold-field { width: min(350px, 38vw); }
.threshold-field label {
  display: block; margin-bottom: 7px; color: var(--green-dark); font-size: 12px; font-weight: 700;
}
.threshold-field input[type="range"] {
  accent-color: var(--green); width: 100%; cursor: pointer;
}
.range-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-top: 2px; }
.toolbar-note { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric { min-height: 91px; padding: 15px 14px; }
.metric .value { font-size: 27px; }
.tag.sensitive { background: #f4efff; color: #6440a0; }
.tag.dormant { background: #f1f2f0; color: #65716d; }
.legend-mark {
  width: 16px; height: 16px; border-radius: 7px; display: inline-grid; place-items: center;
}
.legend-mark.sensitive { background: #f4efff; }
.legend-mark.sensitive::after { content: "P"; color: #6440a0; font-size: 9px; font-weight: 700; }
.legend-mark.departed { background: var(--red-bg); }
.legend-mark.departed::after { content: "!"; color: var(--red); font-size: 10px; font-weight: 700; }
.graph-shell { grid-template-columns: minmax(500px, 1fr) 370px; }
#dependencyGraph { height: 470px; }
.node-detail { min-height: 470px; }
.detail-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin: 9px 0 12px; }
.detail-title-row .detail-title { margin: 0; max-width: 185px; }
.file-open-link {
  color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap;
  text-decoration: none; padding-top: 4px;
}
.file-link-disabled { color: var(--muted); font-size: 11px; }
.asset-tag-stack { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 14px; }
.detail-grid { border-bottom: 1px solid #edf3ef; padding-bottom: 14px; margin-bottom: 14px; }
.detail-grid dd { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-state {
  display: inline-flex; border-radius: 10px; padding: 2px 7px; font-size: 10px; font-weight: 700;
  color: var(--muted); background: var(--surface-alt);
}
.mini-state.active { background: var(--green-soft); color: var(--green); }
.mini-state.departed { background: var(--red-bg); color: var(--red); }
.mini-state.external { background: var(--amber-bg); color: var(--amber); }
.sensitive-detail {
  border: 1px solid #e5dcf2; border-radius: 11px; padding: 11px; margin: 13px 0;
  background: #fcfaff;
}
.sensitive-detail h4, .ref-section h4 {
  font-size: 12px; margin: 0 0 8px; color: var(--ink);
}
.sensitive-detail div { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: 11px; }
.sensitive-detail strong { color: #6440a0; }
.sensitive-detail span, .sensitive-detail p { color: var(--muted); }
.sensitive-detail p { font-size: 10px; margin-top: 8px; }
.ref-section { margin-top: 15px; }
.ref-card { border: 1px solid var(--line); border-radius: 10px; padding: 9px; margin-bottom: 8px; background: #fff; }
.ref-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; margin-bottom: 7px; }
.ref-head .file-open-link, .missing-ref { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.missing-ref { color: var(--red); }
.formula-row { display: grid; grid-template-columns: auto auto; gap: 4px 6px; align-items: center; margin-top: 6px; }
.cell-ref { background: var(--surface-alt); border-radius: 5px; padding: 3px 5px; font-size: 10px; font-weight: 700; }
.formula-kind { color: var(--muted); font-size: 10px; }
.formula-row code {
  grid-column: 1 / -1; display: block; overflow-x: auto; padding: 6px; border-radius: 6px;
  background: #f6f8f6; color: #44554f; font-size: 10px; white-space: nowrap;
}
.detail-notice {
  margin-top: 12px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark);
  padding: 9px; font-size: 11px; line-height: 1.7;
}
.filter-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.risk-chip-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.risk-chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 6px 10px; border-radius: 16px; font-size: 11px; font-weight: 600;
}
.risk-chip.active { background: var(--green-soft); color: var(--green-dark); border-color: #c8dfd1; }
.table-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 190px; }
.table-tags .tag { padding: 3px 7px; font-size: 10px; }
.file-select {
  border: 0; background: transparent; padding: 0; color: var(--ink);
  font-weight: 600; text-align: left; font-size: 13px;
}
.file-select:hover { color: var(--green); }
.table-alert { color: var(--red); font-weight: 700; }
.empty-table { color: var(--muted); text-align: center; padding: 36px !important; }
.report-metrics { grid-template-columns: repeat(2, 1fr); }
.report-risk-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.risk-table-row { display: grid; grid-template-columns: 1.25fr 1.2fr .85fr; gap: 10px; padding: 12px 14px; font-size: 12px; border-bottom: 1px solid #edf3ef; }
.risk-table-row:last-child { border-bottom: 0; }
.risk-table-row.header { background: var(--surface-alt); font-weight: 600; color: var(--muted); }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .diagnostic-toolbar { align-items: flex-start; }
  .threshold-control { align-items: flex-start; flex-direction: column; gap: 10px; }
  .threshold-field { width: min(390px, 44vw); }
}
@media (max-width: 1040px) {
  .graph-shell { grid-template-columns: 1fr; }
  .node-detail { min-height: 0; }
}
@media (max-width: 680px) {
  .diagnostic-toolbar { flex-direction: column; }
  .threshold-field { width: 100%; }
  .filter-stack { align-items: stretch; width: 100%; }
  .risk-chip-row { justify-content: flex-start; }
  .asset-table { min-width: 940px; }
  .risk-table-row { grid-template-columns: 1fr; gap: 5px; }
}

.toolbar-disclaimer {
  width: 100%; text-align: right; color: var(--muted); font-size: 10px; margin-top: 2px;
}
@media (max-width: 680px) {
  .toolbar-disclaimer { text-align: left; }
}


/* v005 Exposure & Decision */
.tag.critical { background: var(--red-bg); color: var(--red); }
.tag.shared { background: #fde9e6; color: #a53526; }
.decision-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.6fr) minmax(270px, .8fr);
  gap: 15px;
  margin-top: 15px;
}
.matrix-card { min-height: 390px; }
.risk-matrix {
  display: block;
  width: 100%;
  height: 310px;
  margin-top: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
  border-radius: 12px;
}
.matrix-axis { stroke: #9fb3aa; stroke-width: 1.2; }
.matrix-grid { stroke: #e4ece7; stroke-dasharray: 4 5; }
.matrix-critical-zone { fill: #fff4f1; }
.matrix-axis-label { font: 500 11px var(--world-font-sans); fill: #63736d; }
.matrix-zone-label { font: 700 10px var(--world-font-sans); fill: #ae4231; }
.matrix-point { cursor: pointer; }
.matrix-point circle { stroke: #fff; stroke-width: 3; }
.matrix-point text { font: 600 10px var(--world-font-sans); fill: #44554f; }
.matrix-point.watch circle { fill: #bd7e2d; }
.matrix-point.high circle { fill: #a46013; }
.matrix-point.urgent circle { fill: #ae4231; }
.matrix-point:hover text { fill: var(--green-dark); }
.matrix-point:hover circle { stroke: #e4f2e9; stroke-width: 5; }
.coverage-card { min-height: 390px; }
.coverage-score {
  display: flex; align-items: baseline; gap: 9px; padding-top: 20px; margin-bottom: 10px;
}
.coverage-score strong { font: 700 40px/1 var(--world-font-sans); letter-spacing: -.06em; color: var(--green-dark); }
.coverage-score span { color: var(--muted); font-size: 12px; }
.coverage-bar { height: 7px; border-radius: 8px; background: #e9efeb; overflow: hidden; margin-bottom: 19px; }
.coverage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.coverage-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 18px; }
.coverage-counts div { background: var(--surface-alt); border-radius: 9px; padding: 9px 8px; text-align: center; }
.coverage-counts strong { display: block; font: 700 20px/1.1 var(--world-font-sans); }
.coverage-counts span { color: var(--muted); font-size: 10px; }
.coverage-warning {
  padding: 8px 0; border-top: 1px solid #edf3ef; display: flex; flex-direction: column; gap: 2px; font-size: 11px;
}
.coverage-warning strong { font-weight: 600; }
.coverage-warning span { color: var(--amber); }

.action-queue { display: grid; gap: 12px; }
.action-card {
  border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 17px 18px 16px;
}
.action-card.urgent { border-left: 4px solid var(--red); }
.action-card.high { border-left: 4px solid var(--amber); }
.action-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.action-title { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.action-header p { color: var(--muted); font-size: 12px; }
.recommendation, .detail-recommendation {
  color: var(--green-dark); font-size: 12px; line-height: 1.7; padding: 10px 12px; background: var(--green-soft); border-radius: 9px; margin: 10px 0 13px;
}
.workflow-fields { display: grid; grid-template-columns: 1fr 1fr 165px; gap: 10px; }
.workflow-fields label, .memo-field, .detail-workflow label {
  display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600;
}
.workflow-fields input, .workflow-fields select, .memo-field textarea,
.detail-workflow input, .detail-workflow select, .detail-workflow textarea {
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  padding: 8px 9px; font-size: 12px; min-height: 37px;
}
.memo-field { margin-top: 10px; }
.memo-field textarea, .detail-workflow textarea { min-height: 55px; resize: vertical; }
.canonical-button {
  border: 1px solid #b8d8c7; background: #fff; color: var(--green);
  border-radius: 8px; padding: 8px 11px; font-size: 11px; font-weight: 700; margin-top: 10px;
}
.canonical-button.selected { background: var(--green); border-color: var(--green); color: #fff; }
.asset-detail-tabs {
  display: flex; gap: 4px; margin: 13px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #edf3ef;
}
.asset-detail-tabs button {
  border: 0; border-radius: 14px; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 5px 9px;
}
.asset-detail-tabs button.active { background: var(--green-soft); color: var(--green-dark); }
.sharing-detail h4 { margin: 13px 0 8px; font-size: 12px; }
.sharing-risk-line { display: flex; flex-wrap: wrap; gap: 5px; }
.permission-table {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.permission-row {
  display: grid; grid-template-columns: 1fr .8fr .55fr; gap: 7px; padding: 8px 9px;
  border-bottom: 1px solid #edf3ef; font-size: 11px;
}
.permission-row:last-child { border-bottom: 0; }
.permission-row span { color: var(--muted); }
.detail-workflow { display: grid; gap: 9px; }
.workflow-state {
  display: inline-flex; margin-left: 6px; color: var(--muted); font-size: 10px; font-weight: 600;
}

.comparison-card {
  border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 18px; margin-bottom: 13px;
}
.comparison-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 14px; }
.comparison-head h4 { margin: 2px 0 3px; font-size: 16px; }
.comparison-grid { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.comparison-row {
  display: grid;
  grid-template-columns: 115px repeat(var(--member-count, 3), minmax(142px, 1fr));
  gap: 0;
  border-bottom: 1px solid #edf3ef;
  min-width: 560px;
}
.comparison-row:last-child { border-bottom: 0; }
.comparison-row > * { padding: 9px 10px; font-size: 11px; border-right: 1px solid #edf3ef; }
.comparison-row > *:last-child { border-right: 0; }
.comparison-row > span:first-child { color: var(--muted); font-weight: 600; background: #fbfdfb; }
.comparison-row.head { background: var(--surface-alt); }
.comparison-row.head strong { font-size: 11px; }
.comparison-row.actions .canonical-button { margin: 0; padding: 6px 8px; }
.comparison-reason { margin-top: 12px; color: var(--muted); font-size: 12px; }


@media (max-width: 1080px) {
  .decision-grid { grid-template-columns: 1fr; }
  .coverage-card { min-height: 0; }
  .workflow-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .matrix-card { min-height: 0; }
  .risk-matrix { height: 260px; }
  .workflow-fields { grid-template-columns: 1fr; }
  .action-header { flex-direction: column; }
  .permission-row { grid-template-columns: 1fr; }
}



.risk-grade { border-radius: 13px; padding: 14px 20px; text-align: center; min-width: 94px; background: var(--amber-bg); color: var(--amber); }
.risk-grade strong { display: block; font: 700 30px/1 var(--world-font-sans); }
.risk-grade span { font-size: 11px; font-weight: 600; }
.summary-prose { color: #394a44; font-size: 14px; line-height: 2; }
.summary-section { margin-bottom: 0; }
.summary-risk-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

/* v006 unified diagnostic summary */
.unified-brief {
  margin-top: 15px;
  padding: 26px 27px 23px;
}
.unified-brief-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 17px;
}
.unified-brief-header h3 {
  margin-top: 4px;
  font-size: 21px;
  letter-spacing: -.04em;
}
.summary-output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 21px;
}
.summary-output-grid .report-section { margin: 0; }
.summary-output-grid h4, .summary-scope-note h4 {
  font-size: 14px;
  margin-bottom: 10px;
}
.summary-output-grid .risk-table-row {
  grid-template-columns: 1.1fr 1fr 1.15fr;
  padding: 10px 11px;
  font-size: 11px;
}
.summary-scope-note {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 17px;
}
.summary-scope-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
@media (max-width: 920px) {
  .summary-output-grid { grid-template-columns: 1fr; }
}



/* Risk awareness: privacy / security -> diagnostic action */
.risk-stage {
  margin: 0 0 clamp(32px, 5vw, 50px);
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid #e9dfd2;
  border-radius: var(--radius-xl);
  background: linear-gradient(140deg, #fffdf9 0%, #faf6ef 100%);
  scroll-margin-top: 92px;
}
.risk-stage__intro {
  display: grid;
  grid-template-columns: minmax(350px, .92fr) minmax(330px, .8fr);
  justify-content: space-between;
  gap: clamp(22px, 4vw, 56px);
  align-items: end;
  margin-bottom: 21px;
}
.risk-stage__intro h2 {
  max-width: 650px;
  color: var(--ink);
  font-size: clamp(25px, 3.1vw, 36px);
  letter-spacing: -.055em;
  line-height: 1.43;
}
.risk-stage__lead {
  max-width: 485px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.risk-alert {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid #efd9bc;
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  background: var(--amber-bg);
}
.risk-alert svg {
  flex: none;
  width: 25px;
  height: 25px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.risk-alert strong {
  display: block;
  color: #75430d;
  font-size: 13px;
  margin-bottom: 2px;
}
.risk-alert p {
  color: #7c603b;
  font-size: 12px;
  line-height: 1.65;
}
.risk-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.risk-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: clamp(17px, 2vw, 22px);
  border: 1px solid #e4e1d8;
  border-radius: 16px;
  background: var(--surface);
}
.risk-card--featured { grid-column: span 3; min-height: 225px; }
.risk-card--compact { grid-column: span 2; min-height: 185px; }
.risk-card--privacy { border-color: #eccac2; background: linear-gradient(140deg, #fff 0%, #fff9f8 100%); }
.risk-card--security { border-color: #edd9b9; background: linear-gradient(140deg, #fff 0%, #fffaf1 100%); }
.risk-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}
.risk-card__top > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.risk-card small {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}
.risk-card--privacy small { color: var(--red); }
.risk-card--security small { color: var(--amber); }
.risk-card__icon {
  flex: none;
  width: 43px;
  height: 43px;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.risk-card--privacy .risk-card__icon { color: var(--red); }
.risk-card--security .risk-card__icon { color: var(--amber); }
.risk-card__icon .icon-shield,
.risk-card__icon .icon-file,
.risk-card__icon .icon-alert { stroke: currentColor; fill: none; }
.risk-card__icon .icon-alert { fill: var(--amber-bg); }
.risk-card__icon .icon-mark { stroke: currentColor; fill: none; stroke-width: 2.25; }
.risk-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--red);
  background: var(--red-bg);
  font-size: 10px;
  font-weight: 700;
}
.risk-card--security .risk-tag { color: var(--amber); background: var(--amber-bg); }
.risk-card h3 {
  color: var(--ink);
  font-size: clamp(16px, 1.65vw, 18px);
  letter-spacing: -.035em;
  line-height: 1.5;
}
.risk-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  flex: 1;
}
.risk-capability {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}
.risk-card--privacy .risk-capability { color: #873529; background: #fceceb; }
.risk-card--security .risk-capability { color: #80500e; background: #fff0d8; }
.risk-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: clamp(16px, 2vw, 20px);
  border: 1px solid #cfe2d7;
  border-radius: 15px;
  background: #f4faf6;
}
.risk-bridge div { display: grid; gap: 4px; }
.risk-bridge strong { color: var(--green-dark); font-size: 15px; line-height: 1.6; }
.risk-bridge p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.risk-bridge .primary-button { flex: none; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 980px) {
  .risk-stage__intro { grid-template-columns: 1fr; }
  .risk-card--compact { grid-column: span 3; }
}
@media (max-width: 680px) {
  .risk-stage { padding: 20px 15px; }
  .risk-grid { grid-template-columns: 1fr; }
  .risk-card--featured, .risk-card--compact { grid-column: auto; min-height: auto; }
  .risk-bridge { flex-direction: column; align-items: stretch; }
  .risk-bridge .primary-button { width: 100%; text-align: center; }
}

/* WORLD flow layout: hero -> connection -> diagnostic result */
.connection-stage {
  margin: 12px 0 46px;
  padding: clamp(23px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.7);
}
.connection-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  margin-bottom: 21px;
}
.connection-heading h2 { font-size: clamp(23px, 2.4vw, 29px); letter-spacing: -.045em; line-height: 1.42; }
.connection-heading > p { max-width: 485px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.connection-card {
  display: flex; align-items: center; justify-content: space-between; gap: 25px;
  padding: clamp(18px, 2vw, 24px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface);
}
.connection-detail { display: grid; gap: 6px; min-width: 0; }
.connection-detail strong { color: var(--green-dark); font-size: 17px; }
.connection-detail > span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.connection-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.connection-chips small { padding: 5px 10px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 600; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 9px; flex: none; align-items: center; max-width: 470px; }
.file-dropzone { display: grid; gap: 9px; min-width: min(100%, 435px); padding: 15px; border: 1px dashed #bbd8ca; border-radius: 14px; background: var(--surface-alt); transition: background .16s ease, border-color .16s ease; }
.file-dropzone.is-dragging { border-color: var(--green); background: var(--green-soft); }
.file-picker-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.dropzone-note { color: var(--subtle); text-align: center; font-size: 12px; }
.connector-roadmap { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 17px; padding: clamp(17px, 2vw, 21px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.connector-roadmap > div:first-child { display: grid; gap: 5px; max-width: 570px; }
.connector-roadmap strong { color: var(--green-dark); font-size: 16px; }
.connector-roadmap span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.connector-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.connector-actions button { color: var(--muted); }
.connector-actions small { margin-left: 6px; padding: 2px 5px; border-radius: 999px; background: var(--surface-alt); font-size: 10px; }
.connection-availability { flex-basis: 100%; margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.connection-availability.is-pending { color: var(--amber); }
.connection-availability.is-success { color: var(--green); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; transform: none; box-shadow: none; opacity: .68; }
.secondary-button:disabled:hover { background: var(--surface); transform: none; }
.connection-guide { margin-top: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.connection-guide summary { padding: 14px 17px; cursor: pointer; list-style: none; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.connection-guide summary::-webkit-details-marker { display: none; }
.connection-guide summary::after { content: "＋"; float: right; color: var(--green); }
.connection-guide[open] summary::after { content: "−"; }
.connection-guide__body { padding: 0 17px 17px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.connection-guide__body ol { margin: 4px 0 14px; padding-left: 21px; }
.connection-guide__body p { margin: 10px 0 0; }
.connection-guide__body a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dashboard { scroll-margin-top: 92px; }
@media (max-width: 900px) {
  .connection-heading, .connection-card, .connector-roadmap { flex-direction: column; align-items: stretch; }
  .connector-actions { justify-content: flex-start; }
  .connection-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .connection-actions button, .connection-actions .file-picker-button, .connector-actions button { width: 100%; }
}

@media print {
  body { background: #fff; }
  .site-header, .hero, .connection-stage, .dashboard-heading .report-actions, .dashboard-tabs, .site-footer,
  .diagnostic-toolbar, #tab-actions, .issue-link { display: none !important; }
  main { padding: 0; max-width: none; }
  .dashboard { box-shadow: none; border: 0; padding: 0; }
  .tab-panel { display: none !important; }
  #tab-summary { display: block !important; }
  .decision-grid { display: grid !important; }
  .unified-brief { break-before: page; box-shadow: none; }
  .card { box-shadow: none; }
}

/* Migration Coordination Board / Beta */
.migration-panel-head {
  align-items: flex-start;
  margin-bottom: 18px;
}
.panel-lead {
  max-width: 660px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.migration-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.local-storage-note {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 600;
}
.migration-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(125px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
.migration-metric {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.migration-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.migration-metric strong {
  color: var(--green-dark);
  font-size: 28px;
  line-height: 1;
}
.migration-metric small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
}
.migration-layout {
  display: grid;
  grid-template-columns: minmax(320px, .96fr) minmax(390px, 1.04fr);
  gap: 14px;
  margin-bottom: 14px;
}
.migration-layout.secondary {
  grid-template-columns: minmax(400px, 1.1fr) minmax(350px, .9fr);
}
.migration-layout .card, .migration-progress-card {
  padding: clamp(18px, 2.2vw, 23px);
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0;
}
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button.danger { color: var(--red); }
.migration-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 9px 0 13px;
}
.migration-help code {
  background: var(--surface-alt);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 11px;
}
.migration-asset-picker {
  display: grid;
  gap: 7px;
  max-height: 362px;
  overflow: auto;
  padding-right: 4px;
}
.migration-asset-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-alt);
}
.migration-asset-row input { accent-color: var(--green); }
.migration-asset-name {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.migration-asset-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.migration-asset-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.migration-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 15px;
}
.migration-fields label,
.stakeholder-form label,
.message-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.migration-fields label.wide { grid-column: 1 / -1; }
.migration-fields input,
.stakeholder-form input,
.stakeholder-form select,
.message-card input,
.message-card select,
.message-card textarea,
.migration-progress-row select,
.migration-progress-row input,
.inline-status select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  font-size: 13px;
}
.migration-fields input:focus,
.stakeholder-form input:focus,
.stakeholder-form select:focus,
.message-card input:focus,
.message-card select:focus,
.message-card textarea:focus,
.migration-progress-row select:focus,
.migration-progress-row input:focus,
.inline-status select:focus {
  outline: 2px solid rgba(23, 104, 71, .2);
  border-color: var(--green);
}
.csv-import-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--green);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.stakeholder-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
  padding: 13px;
  margin-bottom: 15px;
}
.stakeholder-form button { grid-column: 1 / -1; justify-self: start; }
.stakeholder-asset-assignments {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  padding: 9px 10px 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.stakeholder-asset-assignments legend {
  color: var(--muted);
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
}
.stakeholder-asset-assignments label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-weight: 500;
}
.stakeholder-list {
  display: grid;
  gap: 9px;
  max-height: 410px;
  overflow: auto;
}
.stakeholder-entry {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.stakeholder-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.stakeholder-entry-head div { display: grid; gap: 2px; }
.stakeholder-entry-head strong { font-size: 14px; }
.stakeholder-entry-head small { color: var(--muted); font-size: 11px; }
.stakeholder-entry-head a { color: var(--green); font-size: 12px; }
.inline-status {
  display: grid;
  grid-template-columns: auto minmax(130px, 160px);
  align-items: center;
  gap: 9px;
  margin: 5px 0 9px;
}
.assignment-detail {
  border-top: 1px solid #edf3ef;
  padding-top: 8px;
}
.assignment-detail summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
.assignment-detail div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.assignment-detail label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
}
.message-card {
  display: grid;
  align-content: start;
  gap: 11px;
}
.message-card h3 { margin-bottom: 4px; }
.message-card textarea {
  resize: vertical;
  min-height: 278px;
  line-height: 1.7;
  font-size: 12px;
}
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.migration-feedback {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}
.migration-feedback.success { color: var(--green); }
.migration-progress-card { margin-top: 15px; }
.migration-progress-table {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.migration-progress-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(138px, .7fr) minmax(138px, .8fr) minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid #edf3ef;
}
.migration-progress-row:last-child { border-bottom: 0; }
.migration-progress-row.head {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.migration-progress-row div { display: grid; gap: 3px; min-width: 0; }
.migration-progress-row strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.migration-progress-row small { color: var(--muted); font-size: 10px; }
@media (max-width: 1060px) {
  .migration-layout, .migration-layout.secondary { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .migration-metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .migration-fields, .stakeholder-form { grid-template-columns: 1fr; }
  .migration-progress-table { border: 0; gap: 10px; overflow: visible; }
  .migration-progress-row.head { display: none; }
  .migration-progress-row { grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 12px; }
  .migration-head-actions { justify-content: flex-start; }
}


/* FileScope phased workspace: import -> results -> migration */
.workspace-main { max-width: 1280px; margin: 0 auto; padding: clamp(32px, 5vw, 46px) clamp(20px, 4vw, 46px) 64px; }
.workspace-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.workspace-intro h1 { margin-bottom: 8px; font-size: clamp(29px, 3.2vw, 38px); line-height: 1.35; letter-spacing: -.055em; }
.workspace-intro > div > p:last-child { max-width: 690px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.workspace-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: clamp(24px, 4vw, 35px); }
.workspace-step { position: relative; display: flex; align-items: center; gap: 13px; min-height: 69px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--surface); text-align: left; }
.workspace-step:not(:last-child)::after { content: ""; position: absolute; z-index: 2; right: -10px; top: 50%; width: 10px; height: 1px; background: var(--line); }
.workspace-step small { display: block; color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.workspace-step strong { display: block; font-size: 14px; font-weight: 700; }
.workspace-step.active { color: var(--green-dark); border-color: #bbdac9; background: var(--green-soft); }
.workspace-step.active small { color: var(--green); }
.workspace-step:disabled { cursor: not-allowed; opacity: .58; }
.workspace-screen[hidden] { display: none !important; }
.workspace-screen > .connection-stage, .workspace-screen > .dashboard { margin-top: 0; }
.workspace-screen .connection-stage { padding-top: 0; }
.results-next-step { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-top: 20px; padding: 19px 20px; border: 1px solid #cfe2d7; border-radius: 16px; background: #f4faf6; }
.results-next-step strong { color: var(--green-dark); font-size: 14px; line-height: 1.7; }
.results-next-step .primary-button { flex: none; }
.workspace-screen-heading { margin: 0 0 14px; }
.migration-workspace { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 760px) {
  .workspace-intro { flex-direction: column; align-items: stretch; }
  .workspace-steps { grid-template-columns: 1fr; }
  .workspace-step:not(:last-child)::after { display: none; }
  .results-next-step { flex-direction: column; align-items: stretch; }
  .results-next-step .primary-button { width: 100%; }
}

@media print {
  .world-shell-header, .world-shell-footer, .workspace-intro, .workspace-steps, .results-next-step, .workspace-screen-heading { display: none !important; }
  .workspace-main { padding: 0; max-width: none; }
  .workspace-screen[data-workspace-panel="results"] { display: block !important; }
}


/* Google Drive Picker OAuth and guided import flow */
.setup-guide { display: grid; grid-template-columns: minmax(240px, 330px) 1fr; gap: clamp(20px, 3vw, 32px); margin-bottom: clamp(25px, 4vw, 34px); padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
.setup-guide__summary h2 { margin: 7px 0 12px; font-size: clamp(21px, 2.2vw, 27px); letter-spacing: -.045em; }
.guide-next-action { padding: 12px 14px; border-left: 3px solid var(--green); border-radius: 0 10px 10px 0; background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 600; line-height: 1.75; }
.guide-steps { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: flex; flex-direction: column; gap: 9px; min-height: 112px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: var(--surface-alt); transition: border-color .16s ease, background .16s ease; }
.guide-marker { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--subtle); font-size: 12px; font-weight: 800; }
.guide-steps strong { display: block; margin-bottom: 4px; color: inherit; font-size: 13px; line-height: 1.5; }
.guide-steps small { color: var(--subtle); font-size: 11px; line-height: 1.55; }
.guide-steps li.is-current { border-color: #a4d0bb; background: var(--green-soft); color: var(--green-dark); }
.guide-steps li.is-current .guide-marker { border-color: var(--green); color: var(--green); }
.guide-steps li.is-complete { border-color: #b6dcca; background: #f1faf5; color: var(--green-dark); }
.guide-steps li.is-complete .guide-marker { border-color: var(--green); color: #fff; background: var(--green); }
.import-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: clamp(19px, 3vw, 25px) 0; }
.import-method { display: grid; gap: 8px; min-height: 122px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: var(--surface); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
button.import-method:hover { border-color: #9ac8b1; box-shadow: 0 8px 23px rgba(13, 54, 42, .07); transform: translateY(-1px); }
.import-method.is-selected { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.import-method.is-disabled { color: var(--muted); background: var(--surface-alt); }
.method-label { display: inline-flex; justify-self: start; padding: 4px 8px; border-radius: 999px; background: #eef3ef; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.method-label.green { background: var(--green-soft); color: var(--green); }
.method-label.muted { color: var(--subtle); }
.import-method strong { color: var(--green-dark); font-size: 16px; }
.import-method small { color: var(--muted); font-size: 12px; line-height: 1.65; }
.source-panel { margin-top: 10px; }
.source-panel[hidden] { display: none !important; }
.cloud-import-card { align-items: stretch; flex-direction: column; gap: 18px; }
.google-connection-detail { max-width: none; }
.google-flow { display: grid; grid-template-columns: 1.34fr .76fr; gap: 13px; }
.google-safety, .google-actions { padding: clamp(16px, 2vw, 20px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface-alt); }
.google-safety h3 { margin: 0 0 13px; color: var(--green-dark); font-size: 16px; }
.safety-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 16px; }
.safety-columns > div { padding: 12px; border-radius: 11px; background: #fff; }
.safety-columns strong { display: block; margin-bottom: 8px; color: var(--green-dark); font-size: 12px; }
.safety-columns ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.55; }
.safety-columns li::before { content: "✓"; margin-right: 6px; color: var(--green); font-weight: 800; }
.safety-columns > div:last-child li::before { content: "—"; color: var(--subtle); }
.google-actions { display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.google-actions button { width: 100%; }
.google-actions button:disabled { opacity: .52; cursor: not-allowed; }
.connector-limit { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.demo-shortcut { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.connection-guide__body h3 { margin: 14px 0 5px; color: var(--green-dark); font-size: 13px; }
@media (max-width: 940px) {
  .setup-guide, .google-flow { grid-template-columns: 1fr; }
  .guide-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .import-methods { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .guide-steps { grid-template-columns: 1fr; }
  .guide-steps li { min-height: auto; flex-direction: row; align-items: center; }
  .safety-columns { grid-template-columns: 1fr; }
  .demo-shortcut { flex-direction: column; align-items: stretch; }
}


/* Google Drive folder-first diagnostic beta */
.folder-preview {
  width: 100%;
  margin-top: 14px;
  padding: clamp(16px, 2.2vw, 21px);
  border: 1px solid #cfe2d7;
  border-radius: 15px;
  background: #f4faf6;
}
.folder-preview[hidden] { display: none !important; }
.folder-preview__heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 13px; }
.folder-preview__heading h3 { margin: 3px 0 7px; color: var(--green-dark); font-size: 18px; letter-spacing: -.03em; }
.folder-preview__name { color: var(--muted); font-size: 13px; font-weight: 600; }
.folder-preview__count { flex: none; border-radius: 999px; padding: 7px 13px; background: var(--green-soft); color: var(--green); font-size: 13px; }
.folder-file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; list-style: none; margin: 0 0 15px; padding: 0; }
.folder-file-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.folder-file-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12px; }
.folder-file-list small { flex: none; color: var(--green); font-size: 10px; font-weight: 700; }
.folder-preview__actions { display: flex; gap: 10px; margin-bottom: 11px; }
.folder-preview .connector-limit code { font-size: 11px; }
@media (max-width: 720px) {
  .folder-file-list { grid-template-columns: 1fr; }
  .folder-preview__actions { flex-direction: column; }
}
