:root {
  --ink: #17213d;
  --muted: #6f7c94;
  --line: #b9c6d9;
  --surface: #ffffff;
  --page: #f4f7fb;
  --navy: #13284f;
  --blue: #3468d4;
  --purple: #7052bd;
  --green: #1f9479;
  --orange: #e48723;
  --teal: #168b9d;
  --rose: #b75b79;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 0%, rgba(52, 104, 212, .15), transparent 34rem),
    radial-gradient(circle at 3% 24%, rgba(112, 82, 189, .08), transparent 26rem),
    var(--page);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

button, input { font: inherit; }

button { color: inherit; }

.shell {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 64px) 28px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 6px 2px 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -.055em;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 10px 14px;
  border: 1px solid #cfe2dc;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #286b5d;
  font-size: 13px;
  font-weight: 700;
}

.status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #29ad8e;
  box-shadow: 0 0 0 4px rgba(41,173,142,.12);
}

.toolbar {
  position: sticky;
  z-index: 30;
  top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid rgba(207,217,232,.9);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 40px rgba(27,43,75,.09);
  backdrop-filter: blur(16px);
}

.tabs, .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search {
  position: relative;
  order: 3;
  flex: 1 0 100%;
  width: 100%;
  max-width: none;
}

.search-field {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 7px 0 11px;
  border: 1px solid #dbe3ee;
  border-radius: 11px;
  background: #f8faff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-field:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 113, 197, .12);
}

.search-icon {
  flex: 0 0 auto;
  margin-right: 7px;
  color: #6f7c91;
  font-size: 21px;
  line-height: 1;
  transform: rotate(-18deg);
}

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

.search-field input::placeholder { color: #8a96a8; }
.search-field input::-webkit-search-cancel-button { display: none; }

.toolbar .search-clear {
  min-height: 26px;
  width: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7b8799;
  font-size: 18px;
  line-height: 1;
}

.toolbar .search-clear:hover { background: #e9eef6; }

.search-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: auto;
  left: 0;
  width: min(520px, 100%);
  max-height: min(520px, calc(100vh - 170px));
  overflow: auto;
  padding: 7px;
  border: 1px solid #d5deea;
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 50px rgba(25, 42, 76, .18);
}

.search-summary {
  margin: 0;
  padding: 7px 9px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.toolbar .search-result {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 3px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.toolbar .search-result:hover,
.toolbar .search-result:focus-visible {
  background: #eef4ff;
  outline: none;
}

.search-result-meta {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.search-result strong { font-size: 13px; }
.search-result small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-hit {
  position: relative;
  z-index: 5;
  outline: 3px solid rgba(255, 145, 29, .72);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(255, 145, 29, .14), 0 14px 30px rgba(25, 42, 76, .15) !important;
}

.toolbar button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.toolbar button:hover {
  border-color: #9eafd0;
  background: #f8faff;
}

.tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.tab.is-active:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.zoom-control input { width: 110px; accent-color: var(--blue); }
.zoom-control output { min-width: 34px; color: var(--ink); }

.map-card {
  overflow: hidden;
  border: 1px solid #d8e1ed;
  border-radius: 26px;
  background:
    linear-gradient(rgba(39,68,114,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,68,114,.035) 1px, transparent 1px),
    rgba(255,255,255,.94);
  background-size: 28px 28px;
  box-shadow: 0 26px 74px rgba(25,42,76,.1);
}

.map-scroll {
  min-height: 680px;
  max-height: calc(100vh - 235px);
  overflow: auto;
  padding: 42px 28px 64px;
}

.tree-stage {
  width: max-content;
  min-width: 100%;
  transform-origin: top center;
}

.tree {
  width: max-content;
  min-width: 100%;
  padding: 0 18px;
}

.tree ul {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 34px 0 0;
  list-style: none;
}

.tree > ul { padding-top: 0; }

.tree li {
  position: relative;
  flex: 0 0 auto;
  padding: 34px 8px 0;
  text-align: center;
}

.tree > ul > li { padding-top: 0; }

.tree li::before,
.tree li::after {
  content: "";
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 34px;
  border-top: 2px solid var(--line);
}

.tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid var(--line);
}

.tree li:only-child::before,
.tree li:only-child::after { display: none; }

.tree li:only-child { padding-top: 0; }

.tree li:first-child::before,
.tree li:last-child::after { border: 0; }

.tree li:last-child::before {
  border-right: 2px solid var(--line);
  border-radius: 0 9px 0 0;
}

.tree li:first-child::after {
  border-radius: 9px 0 0 0;
}

.tree ul ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 34px;
  border-left: 2px solid var(--line);
}

.node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  max-width: 220px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 8px 22px rgba(29,44,76,.09);
  cursor: default;
  transition: transform .16s ease, box-shadow .16s ease;
}

.node.has-children { cursor: pointer; }

.node.has-children:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(29,44,76,.14);
}

.node .label {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.node .annotation {
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  opacity: .68;
}

.node .count {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(23,33,61,.09);
  font-size: 10px;
  font-weight: 800;
}

.node.is-collapsed::after {
  content: "+";
  position: absolute;
  left: 50%;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.node.depth-0 {
  min-width: 180px;
  min-height: 58px;
  padding: 14px 20px;
  background: var(--navy);
  color: #fff;
}

.node.depth-0 .label { font-size: 20px; }
.node.depth-0 .count { background: rgba(255,255,255,.16); }

.node.depth-1 {
  min-width: 170px;
  background: #dce7ff;
  color: #244b9b;
}

.node.branch-0 { background: #ede8ff; color: #59429a; }
.node.branch-1 { background: #e1f4ee; color: #16715e; }
.node.branch-2 { background: #fff0df; color: #9a5816; }
.node.branch-3 { background: #def2f5; color: #147181; }
.node.branch-4 { background: #f8e7ee; color: #8d3f5c; }

.node.depth-2.branch-0 { background: var(--purple); color: #fff; }
.node.depth-2.branch-1 { background: var(--green); color: #fff; }
.node.depth-2.branch-2 { background: var(--orange); color: #fff; }
.node.depth-2.branch-3 { background: var(--teal); color: #fff; }
.node.depth-2.branch-4 { background: var(--rose); color: #fff; }

.node.depth-2 .count { background: rgba(255,255,255,.18); }

.tree li[hidden] { display: none; }
.tree ul[hidden] { display: none; }

.tree.is-workflow {
  width: min(1400px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 0 18px;
}

.tree.is-calendar {
  width: min(1400px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 0 18px;
}

.work-calendar {
  display: grid;
  gap: 18px;
  width: 100%;
  text-align: left;
}

.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 10px 14px;
  border-left: 4px solid var(--orange);
}

.calendar-heading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
}

.calendar-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.calendar-top-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-manage-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--orange);
  border-radius: 9px;
  background: #fff8ef;
  color: #98520d;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.calendar-manage-link:hover { background: #fff0df; }

.calendar-view-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: #f4f7fb;
}

.calendar-view-toggle button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.calendar-view-toggle button.is-active {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 1px 5px rgba(44, 59, 82, .12);
}

.calendar-navigation {
  display: flex;
  gap: 6px;
}

.calendar-navigation button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d5deea;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.calendar-navigation button:hover {
  border-color: var(--orange);
  background: #fff8ef;
}

.calendar-recurring {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.calendar-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fff;
}

.calendar-rule span {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.calendar-rule.color-blue span { background: #eaf1ff; color: #244b9b; }
.calendar-rule.color-orange span { background: #fff0df; color: #9a5816; }
.calendar-rule.color-green span { background: #e8f5f0; color: #246c5b; }
.calendar-rule.color-purple span { background: #f0ebff; color: #5b3e9d; }
.calendar-rule.color-rose span { background: #fbeaf0; color: #963c60; }
.calendar-rule strong { font-size: 13px; }

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 8px;
  min-width: 980px;
}

.calendar-month {
  display: grid;
  gap: 7px;
  min-width: 980px;
}

.calendar-month-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 7px;
}

.calendar-month-weekdays span {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-month-day {
  min-height: 138px;
  padding: 9px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
}

.calendar-month-day.is-outside {
  background: rgba(241, 244, 249, .66);
  opacity: .5;
}

.calendar-month-day.is-today {
  border-color: var(--orange);
  box-shadow: inset 0 3px 0 var(--orange);
}

.calendar-month-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e7ecf3;
}

.calendar-month-day header strong { font-size: 13px; }
.calendar-month-day header span { color: var(--muted); font-size: 10px; }

.calendar-month-day .calendar-event {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 6px 7px;
}

.calendar-month-day .calendar-event time { font-size: 10px; }
.calendar-month-day .calendar-event strong { font-size: 10px; }

.calendar-day {
  min-height: 220px;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: rgba(255,255,255,.9);
}

.calendar-day.is-today {
  border-color: var(--orange);
  box-shadow: inset 0 3px 0 var(--orange);
}

.calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e7ecf3;
}

.calendar-day header strong { font-size: 12px; }
.calendar-day header span { color: var(--muted); font-size: 11px; }

.calendar-event {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
}

.calendar-event time { font-size: 11px; font-weight: 900; }
.calendar-event strong { font-size: 12px; line-height: 1.35; }
.calendar-event.color-blue { background: #eaf1ff; color: #244b9b; }
.calendar-event.color-orange { background: #fff0df; color: #9a5816; }
.calendar-event.color-green { background: #e8f5f0; color: #246c5b; }
.calendar-event.color-purple { background: #f0ebff; color: #5b3e9d; }
.calendar-event.color-rose { background: #fbeaf0; color: #963c60; }

.sop-workflow {
  --sop-accent: var(--green);
  --sop-soft: #e8f5f0;
  display: grid;
  gap: 18px;
  width: 100%;
  text-align: left;
}

.sop-workflow.theme-customer { --sop-accent: var(--blue); --sop-soft: #eaf1ff; }
.sop-workflow.theme-academy { --sop-accent: var(--purple); --sop-soft: #f0ebff; }
.sop-workflow.theme-market { --sop-accent: var(--orange); --sop-soft: #fff0df; }
.sop-workflow.theme-operations { --sop-accent: var(--rose); --sop-soft: #fbeaf0; }

.sop-selector {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: rgba(239,243,249,.92);
}

.sop-tab {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sop-tab:hover { border-color: #aebbd0; }
.sop-tab.theme-finance { color: #16715e; }
.sop-tab.theme-customer { color: #244b9b; }
.sop-tab.theme-academy { color: #59429a; }
.sop-tab.theme-market { color: #9a5816; }
.sop-tab.theme-operations { color: #91445f; }
.sop-tab.theme-finance.is-active { background: var(--green); color: #fff; }
.sop-tab.theme-customer.is-active { background: var(--blue); color: #fff; }
.sop-tab.theme-academy.is-active { background: var(--purple); color: #fff; }
.sop-tab.theme-market.is-active { background: var(--orange); color: #fff; }
.sop-tab.theme-operations.is-active { background: var(--rose); color: #fff; }

.workflow-heading {
  padding: 8px 4px 10px 14px;
  border-left: 4px solid var(--sop-accent);
}

.workflow-heading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
}

.workflow-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.responsibility-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cddaf2;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(234,241,255,.96), rgba(255,255,255,.92));
  box-shadow: 0 12px 30px rgba(40,75,140,.07);
}

.responsibility-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.responsibility-kicker {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sop-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.responsibility-context {
  color: #49617f;
  font-size: 13px;
  font-weight: 800;
}

.responsibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.responsibility-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 86px;
  padding: 12px 14px;
  border: 1px solid rgba(72,105,162,.2);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  color: #244b9b;
  text-align: left;
  cursor: pointer;
}

.responsibility-card:hover {
  border-color: #7897cf;
  background: #f7f9ff;
}

.responsibility-card.is-active {
  border-color: #244b9b;
  background: #244b9b;
  color: #fff;
}

.responsibility-page-name {
  font-size: 14px;
  line-height: 1.3;
}

.responsibility-owner {
  color: #5f7190;
  font-size: 11px;
  line-height: 1.4;
}

.responsibility-open {
  color: #7183a0;
  font-size: 10px;
  font-weight: 800;
}

.responsibility-card.is-active .responsibility-owner,
.responsibility-card.is-active .responsibility-open {
  color: rgba(255,255,255,.82);
}

.responsibility-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cbd8ee;
  border-radius: 14px;
  background: #fff;
}

.responsibility-detail-panel[hidden] { display: none; }

.responsibility-detail-panel h4 {
  margin: 0;
  color: #244b9b;
  font-size: 14px;
}

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

.responsibility-item {
  padding: 10px 12px;
  border: 1px solid #e2e9f4;
  border-radius: 11px;
  background: #f8faff;
}

.responsibility-item strong {
  display: block;
  margin-bottom: 5px;
  color: #415778;
  font-size: 11px;
}

.responsibility-item ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 17px;
  color: #5f6f85;
  font-size: 11px;
  line-height: 1.45;
}

.responsibility-copy {
  justify-self: start;
  padding: 7px 10px;
  border: 1px solid #b9c9e6;
  border-radius: 9px;
  background: #f5f8ff;
  color: #244b9b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.responsibility-copy:hover { background: #eaf1ff; }

.workflow-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sop-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.workflow-section-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dce4ef;
}

.workflow-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  gap: 18px;
}

.workflow-lanes[data-count="4"] {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.sop-workflow.theme-academy .workflow-lanes[data-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sop-workflow.theme-academy .workflow-lane {
  padding: 16px 14px;
}

.sop-workflow.theme-academy .workflow-lane:first-child {
  --sop-accent: var(--teal);
  --sop-soft: #e6f5f7;
  background: linear-gradient(180deg, rgba(22,139,157,.08), rgba(255,255,255,.94) 140px);
}

.sop-workflow.theme-academy .workflow-lane h3 {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin-bottom: 12px;
}

.sop-workflow.theme-academy .workflow-steps {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.sop-workflow.theme-academy .workflow-step {
  min-height: 62px;
  gap: 4px;
  padding: 9px 8px;
}

.sop-workflow.theme-academy .workflow-step strong {
  font-size: 13px;
}

.sop-workflow.theme-academy .workflow-step-wrap:not(:last-child)::after {
  bottom: -22px;
  font-size: 17px;
}

.workflow-lane {
  padding: 20px;
  border: 1px solid #dce4ef;
  border-top: 4px solid var(--sop-accent);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 32px rgba(29,44,76,.06);
}

.workflow-lane h3 {
  margin: 0 0 18px;
  color: var(--sop-accent);
  font-size: 16px;
  text-align: center;
}

.workflow-steps {
  display: grid;
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
  gap: 34px;
}

.workflow-step-wrap {
  position: relative;
  min-width: 0;
}

.workflow-step-wrap:not(:last-child)::after {
  content: "↓";
  position: absolute;
  right: 50%;
  bottom: -29px;
  transform: translateX(50%);
  color: #9aabc2;
  font-size: 20px;
  font-weight: 700;
}

.workflow-step {
  display: grid;
  align-content: center;
  gap: 7px;
  width: 100%;
  min-height: 92px;
  padding: 13px;
  border: 1px solid #dbe4ef;
  border-radius: 13px;
  background: #f9fbfe;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 6px 16px rgba(27,43,75,.05);
}

button.workflow-step {
  cursor: pointer;
}

button.workflow-step:hover,
button.workflow-step.is-active {
  border-color: var(--sop-accent);
  background: var(--sop-soft);
}

.step-number {
  color: var(--sop-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.workflow-step strong {
  font-size: 14px;
}

.step-more {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.workflow-detail {
  margin-top: 10px;
  padding: 14px 16px;
  border-left: 3px solid var(--sop-accent);
  border-radius: 0 10px 10px 0;
  background: var(--sop-soft);
  font-size: 12px;
}

.workflow-detail ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-detail li::before {
  content: "✓";
  margin-right: 6px;
  color: var(--sop-accent);
  font-weight: 800;
}

.workflow-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--sop-accent) 20%, transparent);
}

.copy-note-button {
  padding: 7px 12px;
  border: 1px solid var(--sop-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--sop-accent);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.copy-note-button:hover,
.copy-note-button:focus-visible {
  background: var(--sop-accent);
  color: #fff;
}

.password-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(13, 27, 54, .28);
}

.password-dialog::backdrop {
  background: rgba(11, 23, 48, .58);
  backdrop-filter: blur(5px);
}

.salary-password-form {
  display: grid;
  gap: 13px;
  padding: 30px;
}

.password-lock {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff0df;
  font-size: 22px;
}

.salary-password-form h2 {
  margin: 3px 0 0;
  font-size: 24px;
}

.salary-password-form > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.salary-password-form label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.salary-password-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cdd8e7;
  border-radius: 10px;
  outline: none;
}

.salary-password-form input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(228, 135, 35, .13);
}

.salary-password-form .password-error {
  color: #b33d3d;
  font-weight: 700;
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.password-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d5deea;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.password-cancel { background: #fff; }

.password-submit {
  border-color: var(--navy) !important;
  background: var(--navy);
  color: #fff;
}

.password-actions button:disabled {
  cursor: wait;
  opacity: .65;
}

.hint {
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid #e4e9f1;
  background: rgba(248,250,253,.9);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px 0;
  color: #7b8799;
  font-size: 12px;
}

@media (max-width: 760px) {
  .shell { padding-top: 22px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 16px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .tabs { order: 0; }
  .site-search { order: 1; width: 100%; max-width: none; }
  .actions { order: 2; }
  .search-results { max-height: 62vh; }
  .actions { flex-wrap: wrap; }
  .actions > button { flex: 1; }
  .zoom-control { width: 100%; }
  .zoom-control input { flex: 1; }
  .map-scroll { min-height: 620px; max-height: none; padding: 32px 16px 52px; }
  .tree.is-workflow { width: 100%; padding: 0; }
  .tree.is-calendar { width: 100%; padding: 0; }
  .calendar-heading { align-items: flex-start; flex-direction: column; }
  .calendar-controls { width: 100%; justify-items: stretch; }
  .calendar-top-controls { align-items: stretch; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .calendar-view-toggle,
  .calendar-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-recurring { grid-template-columns: 1fr; }
  .sop-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-heading h2 { font-size: 21px; }
  .responsibility-heading { align-items: flex-start; flex-direction: column; }
  .responsibility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .responsibility-detail-grid { grid-template-columns: 1fr; }
  .workflow-lanes,
  .workflow-lanes[data-count="4"] { grid-template-columns: 1fr; }
  .sop-workflow.theme-academy .workflow-lanes[data-count="4"] { grid-template-columns: 1fr; }
  .workflow-lane { padding: 16px; }
  .workflow-steps { grid-template-columns: 1fr; gap: 28px; }
  .workflow-step { min-height: 72px; }
  .workflow-step-wrap:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -25px;
    transform: translateX(50%);
  }
  .workflow-detail ul { display: grid; gap: 6px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .node { transition: none; }
}

@media print {
  body { background: #fff; }
  .toolbar, .status, footer, .hint { display: none; }
  .shell { width: 100%; padding: 0; }
  .hero { padding: 0 0 18px; }
  .map-card { border: 0; box-shadow: none; }
  .map-scroll { max-height: none; overflow: visible; padding: 0; }
  .tree-stage { zoom: .65 !important; }
}
