:root {
  --ink: #07164c;
  --ink-soft: #30456f;
  --muted: #657798;
  --blue: #1378ff;
  --blue-deep: #075dd8;
  --blue-soft: rgba(19, 120, 255, 0.12);
  --line: rgba(255, 255, 255, 0.22);
  --surface: rgba(238, 247, 255, 0.28);
  --surface-strong: rgba(255, 255, 255, 0.36);
  --danger: #f04545;
  --success: #19a86b;
  --warning: #e28b00;
  --shadow: 0 18px 50px rgba(18, 45, 92, 0.22);
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #d6e4f2;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.locked {
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.bg {
  position: fixed;
  inset: 0;
}

.bg {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 13, 40, 0.17), rgba(228, 242, 255, 0.06)),
    url("./assets/background.png") center / cover no-repeat;
}

.bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(225, 240, 255, 0.14);
}

.foreground-scene {
  position: fixed;
  right: clamp(-58px, -2.8vw, -24px);
  bottom: -28px;
  width: clamp(840px, 92vw, 1480px);
  aspect-ratio: 1916 / 821;
  z-index: 8;
  pointer-events: none;
  background: url("./assets/foreground-scene-20260923e.png") center bottom / contain no-repeat;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
}

body.locked .access-gate {
  display: grid;
}

.access-panel {
  width: min(430px, 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.access-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 24px rgba(18, 45, 92, 0.16);
}

.access-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.access-kicker {
  margin: 4px 0 -10px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-panel h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.access-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.access-error {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 720;
}

/* Password page only: keep the workflow interface untouched. */
body.locked {
  color: #12213c;
  background: #172944;
}

body.locked::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(108deg, rgba(8, 23, 48, 0.82) 0%, rgba(12, 32, 61, 0.58) 52%, rgba(8, 23, 48, 0.74) 100%),
    radial-gradient(ellipse at 50% 15%, rgba(69, 135, 210, 0.28), transparent 58%);
}

body.locked .bg {
  z-index: 0;
  background: url("./assets/background.png") center / cover no-repeat;
  filter: saturate(0.72) brightness(0.76);
}

body.locked .access-gate {
  z-index: 2;
  padding: 24px;
}

body.locked .access-panel {
  width: min(440px, 100%);
  gap: 17px;
  padding: clamp(28px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 30px 90px rgba(3, 15, 36, 0.36);
  backdrop-filter: blur(20px) saturate(112%);
  -webkit-backdrop-filter: blur(20px) saturate(112%);
}

body.locked .access-logo {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: #eaf2fd;
  box-shadow: 0 8px 22px rgba(18, 45, 92, 0.12);
}

body.locked .access-kicker {
  margin: 5px 0 -11px;
  color: #38618f;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

body.locked .access-panel h2 {
  color: #132544;
  font-size: clamp(24px, 5vw, 29px);
  letter-spacing: 0;
}

body.locked .access-copy {
  color: #586a83;
  font-size: 15px;
}

body.locked .access-panel label {
  display: grid;
  gap: 8px;
  color: #243b5d;
  font-size: 14px;
  font-weight: 700;
}

body.locked .access-panel input[name="password"] {
  width: 100%;
  height: 52px;
  border: 1px solid #c9d5e4;
  border-radius: 10px;
  padding: 0 14px;
  color: #12213c;
  background: #fff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

body.locked .access-panel input[name="password"]:focus-visible {
  border-color: #2677db;
  box-shadow: 0 0 0 4px rgba(38, 119, 219, 0.14);
}

body.locked .access-panel .primary-button {
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(19, 120, 255, 0.2);
}

body.locked .access-panel .primary-button:hover {
  filter: brightness(1.04);
}

body.locked .access-panel .primary-button:focus-visible {
  outline: 3px solid rgba(19, 120, 255, 0.34);
  outline-offset: 3px;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1880px, calc(100vw - 56px));
  margin: 28px auto;
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(245, 251, 255, 0.28), rgba(214, 232, 250, 0.1));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(128%);
  -webkit-backdrop-filter: blur(16px) saturate(128%);
}

.topbar {
  min-height: 94px;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(360px, 460px) auto;
  align-items: center;
  gap: 28px;
  padding: 18px 24px;
}

.brand,
.profile,
.mascot-card,
.stage-nav-item,
.metric-card,
.tool-card,
.artifact-row,
.pm-action {
  display: flex;
  align-items: center;
}

.logo-mark {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a79ff, #2aa4ff);
  box-shadow: inset -10px -12px 24px rgba(8, 61, 160, 0.25), 0 10px 22px rgba(19, 120, 255, 0.28);
  overflow: hidden;
}

.logo-mark img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.brand {
  gap: 18px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.brand p,
.version,
.section-subtitle,
.module-lead,
.small-note,
.tool-purpose,
.hint {
  color: var(--ink-soft);
}

.brand p {
  margin: 5px 0 0;
  font-size: 16px;
}

.search-box {
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 13px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(242, 248, 255, 0.24);
}

.search-box span {
  font-size: 28px;
  color: #12306c;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-box .search-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--blue-deep);
  background: rgba(207, 224, 246, 0.28);
  font-size: 22px;
  font-weight: 760;
  text-align: center;
}

.profile,
.mascot-card {
  gap: 14px;
  white-space: nowrap;
}

.mascot-card {
  min-width: 224px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 2px 4px;
  color: #eef6ff;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mascot-card p {
  margin: 0;
  line-height: 1.35;
  font-size: 14px;
  text-shadow: 0 1px 8px rgba(9, 24, 58, 0.42);
}

.mascot-card strong {
  font-size: 15px;
}

.mascot-avatar {
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: url("./assets/top-avatar-20260923c.png") center / contain no-repeat;
  box-shadow: none;
}

.avatar,
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  background: rgba(234, 244, 255, 0.6);
  color: var(--blue-deep);
}

.icon-button {
  border-radius: 12px;
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: 270px minmax(720px, 1fr) 430px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.sidebar,
.main-panel,
.right-card {
  border-radius: var(--radius-lg);
}

.sidebar {
  min-height: calc(100vh - 154px);
  padding: 24px 14px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
}

#stageNav {
  display: grid;
  gap: 10px;
}

.stage-nav-item {
  width: 100%;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 11px;
  gap: 14px;
  padding: 0 18px;
  color: #12245a;
  background: transparent;
  text-align: left;
  font-weight: 720;
}

.stage-nav-item:hover,
.stage-nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid rgba(19, 120, 255, 0.35);
}

.stage-nav-item.active {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(232, 244, 255, 0.52);
  color: var(--blue-deep);
  box-shadow: inset 5px 0 0 var(--blue);
}

.stage-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.stage-code {
  width: 38px;
  font-variant-numeric: tabular-nums;
}

.version {
  margin-top: auto;
  padding: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.main-panel,
.right-panel {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 169, 198, 0.46) rgba(255, 255, 255, 0.1);
  overscroll-behavior-y: contain;
}

.main-panel {
  min-height: calc(100vh - 154px);
  padding: 26px;
}

.main-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
  width: 10px;
}

.main-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.main-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(176, 201, 224, 0.74), rgba(126, 158, 190, 0.5));
}

.main-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(159, 191, 220, 0.86), rgba(111, 146, 180, 0.62));
}

.right-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.right-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(250, 253, 255, 0.28), rgba(222, 237, 253, 0.12));
  box-shadow: 0 12px 30px rgba(18, 45, 92, 0.16);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
  padding: 18px;
}

@media (min-width: 1381px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page-shell {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
  }

  .workspace {
    height: calc(100vh - 166px);
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  .sidebar,
  .main-panel,
  .right-panel {
    height: 100%;
    min-height: 0;
  }

  .sidebar,
  .right-panel {
    position: static;
  }

  .sidebar {
    overflow: hidden;
  }

  .main-panel,
  .right-panel {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .right-panel {
    padding-bottom: clamp(180px, 26vh, 320px);
  }
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.page-title > div {
  flex: 1;
  min-width: 0;
}

.page-title h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 1.12;
  font-weight: 780;
}

.stage-method-inline {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 14px;
  margin-bottom: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(19, 120, 255, 0.1);
  color: rgba(7, 93, 216, 0.78);
  font-size: 18px;
  font-weight: 760;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.42;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(19, 120, 255, 0.12);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow-x: auto;
  margin: 12px 0;
}

.tab-button {
  min-height: 50px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #233963;
  font-weight: 700;
  padding: 0 18px;
  white-space: nowrap;
}

.tab-button.active {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
  background: rgba(232, 244, 255, 0.46);
}

.hero-card,
.section-card,
.overview-note,
.upload-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(240, 248, 255, 0.17);
  border-radius: var(--radius);
}

.hero-card {
  min-height: 190px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.hero-card h3 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 780;
}

.module-lead {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.72;
  white-space: pre-line;
}

.hero-visual {
  min-height: 140px;
  border-radius: 18px;
  position: relative;
  background:
    radial-gradient(circle at 65% 62%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.12) 42%, transparent 43%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(123, 184, 255, 0.22));
  overflow: hidden;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 12px;
  background: linear-gradient(180deg, #7db6ff, #1378ff);
  bottom: 32px;
  width: 24px;
}

.quiet-edit-dot {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 93, 216, 0.14);
  box-shadow: inset 0 0 0 1px rgba(7, 93, 216, 0.16);
  opacity: 0.58;
}

.quiet-edit-dot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: rgba(7, 93, 216, 0.72);
}

.quiet-edit-dot:hover,
.quiet-edit-dot:focus-visible {
  opacity: 1;
  background: rgba(7, 93, 216, 0.2);
  outline: 3px solid rgba(144, 177, 208, 0.28);
  outline-offset: 3px;
}

.hero-visual::before {
  height: 62px;
  left: 70px;
  box-shadow: 44px -28px 0 #4898ff, 88px -48px 0 #197dff;
}

.hero-visual::after {
  right: 38px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(19, 120, 255, 0.76) 0 28%, rgba(255, 255, 255, 0.78) 28% 100%);
}

.section-card,
.upload-card {
  padding: 20px;
  margin-top: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title h3,
.right-card h3 {
  margin: 0;
  font-size: 24px;
}

.section-title h3 {
  border-left: 6px solid var(--blue);
  padding-left: 14px;
}

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

.tool-card {
  min-height: 128px;
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.19);
  position: relative;
}

.tool-card.missing {
  border-style: dashed;
  background: rgba(245, 250, 255, 0.17);
}

.tool-icon {
  flex: 0 0 58px;
  height: 58px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--blue-deep);
  background: var(--blue-soft);
  font-weight: 900;
  font-size: 22px;
  overflow: hidden;
}

.tool-card.missing .tool-icon {
  color: var(--blue-deep);
  background: rgba(19, 120, 255, 0.1);
}

.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card h4 {
  margin: 4px 34px 6px 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 720;
}

.tool-body {
  min-width: 0;
  padding-right: 46px;
}

.tool-purpose {
  margin: 0 0 12px;
  line-height: 1.62;
}

.tool-output {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--blue-deep);
  background: rgba(19, 120, 255, 0.1);
  font-weight: 700;
  text-decoration: none;
}

.tool-open-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(19, 120, 255, 0.46);
  border-radius: 10px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 8px 18px rgba(19, 120, 255, 0.12);
  font-size: 0;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tool-open-arrow::before {
  content: "→";
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.tool-open-arrow:hover {
  transform: translateX(2px);
  border-color: rgba(19, 120, 255, 0.8);
  background: rgba(19, 120, 255, 0.12);
}

.tool-open-arrow:focus-visible {
  outline: 3px solid rgba(19, 120, 255, 0.25);
  outline-offset: 3px;
}

.tool-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #0c1d52;
  font-size: 22px;
  line-height: 1;
}

.add-tool {
  min-height: 128px;
  border: 2px dashed rgba(19, 120, 255, 0.28);
  border-radius: 12px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.28);
  font-weight: 900;
  font-size: 18px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.upload-grid label,
.modal label,
.project-select label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(111, 142, 184, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: rgba(19, 120, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(19, 120, 255, 0.12);
}

.upload-grid .wide {
  grid-column: 1 / -1;
}

.archive-upload-placeholder {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 16px;
  text-align: left;
  border: 1px dashed rgba(112, 130, 154, 0.34);
  border-radius: 12px;
  color: rgba(48, 69, 111, 0.72);
  background: rgba(232, 237, 244, 0.46);
}

.archive-upload-placeholder strong {
  font-size: 16px;
}

.archive-upload-placeholder span {
  color: rgba(82, 102, 132, 0.72);
  line-height: 1.5;
}

.archive-upload-placeholder input {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(19, 120, 255, 0.22);
  padding: 0 16px;
  font-weight: 900;
}

.primary-button {
  color: white;
  border-color: var(--blue);
  background: linear-gradient(180deg, #2388ff, #0a70f0);
  box-shadow: 0 10px 22px rgba(19, 120, 255, 0.22);
}

.secondary-button {
  color: var(--blue-deep);
  background: rgba(233, 244, 255, 0.82);
}

.ghost-button {
  color: #233963;
  background: rgba(255, 255, 255, 0.42);
}

.danger-button {
  color: var(--danger);
  border-color: rgba(240, 69, 69, 0.25);
  background: rgba(255, 243, 243, 0.86);
}

.right-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.artifact-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.artifact-row {
  gap: 10px;
  min-height: 52px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.artifact-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: var(--blue);
  border: 0;
  box-shadow: none;
  outline: none;
}

.artifact-row input[type="checkbox"]:focus,
.artifact-row input[type="checkbox"]:focus-visible,
.artifact-row input[type="checkbox"]:active {
  box-shadow: none;
  outline: none;
}

.artifact-name {
  flex: 1;
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(25, 168, 107, 0.12);
  font-weight: 900;
  white-space: nowrap;
}

.status.pending {
  color: var(--warning);
  background: rgba(226, 139, 0, 0.12);
}

.status.archived {
  color: #496487;
  background: rgba(104, 132, 165, 0.14);
}

.row-delete {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(240, 69, 69, 0.18);
  border-radius: 9px;
  color: var(--danger);
  background: rgba(255, 243, 243, 0.66);
  font-weight: 900;
  cursor: pointer;
}

.row-delete:hover,
.row-delete:focus-visible {
  border-color: rgba(240, 69, 69, 0.38);
  background: rgba(255, 232, 232, 0.82);
}

.artifact-check {
  display: contents;
}

.instruction-box {
  min-height: 220px;
}

.counter {
  margin-top: 8px;
  text-align: right;
  color: var(--muted);
  font-weight: 800;
}

.pm-actions,
.metric-grid,
.flow-grid,
.overview-note-grid {
  display: grid;
  gap: 12px;
}

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

.pm-action {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-height: 58px;
  border: 1px solid rgba(19, 120, 255, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(238, 247, 255, 0.52);
  color: var(--blue-deep);
  text-align: center;
}

.pm-action strong {
  font-size: 15px;
  font-weight: 900;
}

.pm-action span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.pm-action.primary {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #2388ff, #0a70f0);
  color: white;
}

.pm-action.primary span {
  color: rgba(255, 255, 255, 0.82);
}

.pm-action.danger {
  color: var(--danger);
  border-color: rgba(240, 69, 69, 0.26);
  background: rgba(255, 243, 243, 0.62);
}

.pm-action.danger span {
  color: rgba(135, 45, 54, 0.68);
}

.overview-hero,
.overview-flow-panel,
.overview-platform-panel {
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius);
  background: rgba(240, 248, 255, 0.45);
}

.overview-hero {
  min-height: 164px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 26px;
  margin-bottom: 14px;
  position: relative;
}

.overview-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.05;
}

.overview-copy p {
  max-width: 850px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
}

.overview-flow-panel {
  padding: 22px;
}

.overview-flow-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.overview-flow-title h3,
.overview-platform-panel h3 {
  margin: 0;
  border-left: 6px solid var(--blue);
  padding-left: 14px;
  font-size: 25px;
}

.overview-flow-title span {
  color: var(--blue-deep);
  font-weight: 900;
}

.flow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.flow-card {
  position: relative;
  min-height: 240px;
  padding: 24px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.flow-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 34px;
  font-weight: 900;
  z-index: 1;
}

.flow-num {
  display: block;
  font-size: clamp(52px, 6vw, 86px);
  line-height: 0.9;
  color: rgba(19, 120, 255, 0.74);
  font-weight: 900;
  letter-spacing: 0;
}

.flow-card h3 {
  margin: 22px 0 10px;
  font-size: 26px;
}

.flow-method {
  display: block;
  margin: -4px 0 14px;
  color: rgba(7, 93, 216, 0.76);
  font-size: 18px;
  font-weight: 900;
}

.flow-card p,
.overview-note p,
.small-note,
.project-table td,
.project-table th {
  line-height: 1.55;
}

.iteration-note {
  margin: 14px 0 0;
  border: 1px dashed rgba(19, 120, 255, 0.42);
  background: rgba(232, 244, 255, 0.42);
  border-radius: 11px;
  padding: 14px 16px;
  color: var(--blue-deep);
  font-weight: 900;
}

.overview-platform-panel {
  display: grid;
  padding: 22px;
  margin-top: 14px;
}

.overview-platform-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.overview-role-column,
.overview-method-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.overview-role-cards {
  display: grid;
  gap: 12px;
}

.overview-role-card {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.38);
}

.overview-role-card h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.25;
}

.overview-role-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.overview-platform-lines {
  display: grid;
  gap: 10px;
}

.overview-platform-lines p {
  margin: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.overview-platform-lines strong {
  color: rgba(7, 93, 216, 0.82);
  font-weight: 900;
  white-space: nowrap;
}

.overview-platform-lines span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.overview-note-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.overview-note {
  padding: 18px;
}

.overview-note h3 {
  margin: 0 0 8px;
}

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

.metric-card {
  min-height: 132px;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.52);
}

.metric-value {
  display: block;
  color: var(--blue);
  font-size: 32px;
  font-weight: 900;
  margin: 4px 0;
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}

.project-table th,
.project-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(108, 140, 180, 0.18);
  background: rgba(255, 255, 255, 0.34);
}

.project-table th {
  color: #30456f;
  background: rgba(223, 237, 254, 0.52);
}

.project-select {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.modal {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 0;
  color: var(--ink);
  background: rgba(242, 249, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.modal::backdrop {
  background: rgba(7, 22, 76, 0.28);
  backdrop-filter: blur(4px);
}

.modal form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.modal-head,
.modal-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
}

.modal-actions {
  grid-template-columns: auto 1fr auto;
}

.modal-actions .primary-button:only-child {
  grid-column: 3;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result-group {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(240, 248, 255, 0.46);
  border-radius: var(--radius);
  padding: 18px;
}

.search-result-group h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.search-result-list {
  display: grid;
  gap: 10px;
}

.search-result {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(560px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 12px;
  color: white;
  background: rgba(7, 22, 76, 0.9);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
  z-index: 20;
  overflow-wrap: anywhere;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty {
  padding: 16px;
  border-radius: 10px;
  border: 1px dashed rgba(19, 120, 255, 0.34);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.32);
}

.hide {
  display: none !important;
}

@media (max-width: 1380px) {
  .page-shell {
    width: calc(100vw - 28px);
  }

  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-panel {
    grid-column: 2;
    position: static;
  }

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

  .overview-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .overview-platform-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .foreground-scene {
    width: min(112vw, 760px);
    right: -42px;
    bottom: -16px;
    opacity: 0.9;
  }

  .page-shell {
    width: calc(100vw - 18px);
    margin: 9px auto;
  }

  .workspace,
  .hero-card,
  .upload-grid,
  .flow-grid,
  .overview-hero,
  .overview-note-grid,
  .metric-grid,
  .project-select {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

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

  .stage-nav-item {
    min-height: 58px;
    padding: 0 12px;
  }

  .main-panel,
  .right-panel {
    grid-column: 1;
  }

  .tool-grid,
  .pm-actions {
    grid-template-columns: 1fr;
  }

  .flow-card:not(:last-child)::after {
    content: "↓";
    right: 50%;
    top: auto;
    bottom: -24px;
    transform: translateX(50%);
  }

  .tabs {
    grid-auto-columns: minmax(150px, 1fr);
  }

  .page-title {
    flex-direction: column;
    gap: 10px;
  }

  .page-title p {
    white-space: normal;
  }

  .overview-platform-lines p {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
