:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --ink: #1a202c;
  --muted: #4a5568;
  --subtle: #718096;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-ink: #134e4a;
  --quote: #0f766e;
  --shared: #1d4ed8;
  --item: #b45309;
  --review: #6d28d9;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.header {
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
  color: white;
  padding: 28px 40px;
}
.header h1 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.header p { margin: 0; opacity: .88; font-size: 13px; max-width: 940px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 12px 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.legend .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #edf2f7;
}
.legend .pill .sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.preflow {
  padding: 24px 24px 8px;
}
.info-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 0 auto 18px;
}
.info-block h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-block p,
.info-block li {
  font-size: 14px;
  color: #2d3748;
}
.info-block ul {
  margin: 10px 0 0;
  padding-left: 20px;
}
.timeline-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.milestone {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}
.milestone::after {
  content: '→';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}
.timeline-flow .milestone:last-child::after {
  display: none;
}
.milestone .date {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.milestone .name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.milestone .sub {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.open-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.open-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}
.open-card .kicker {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
}
.open-card .name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.open-card .sub {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.flow { padding: 24px 24px 80px; }

.lane {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 18px auto;
  padding: 18px 18px 22px 24px;
}
.lane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.lane-head .stripe { width: 6px; height: 22px; border-radius: 3px; }
.lane-head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.lane-head .count { font-size: 11px; color: var(--subtle); }

.node-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  row-gap: 28px;
}
.node {
  position: relative;
  flex: 0 0 auto;
  width: 212px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.node:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .1), 0 2px 6px rgba(15, 23, 42, .06);
  border-color: var(--accent);
  text-decoration: none;
}
.node-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
}
.node-num {
  flex: 0 0 auto;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.node-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wireframe-slot {
  position: relative;
  margin: 10px 12px;
  aspect-ratio: 9 / 16;
  background: #f7fafc;
  border: 1.5px dashed #cbd5e0;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wireframe-slot::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: #e2e8f0;
}
.wireframe-slot .ph-label {
  color: var(--subtle);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 10px;
}
.wireframe-slot.has-wf {
  background: #ecfeff;
  border: 1.5px solid #99f6e4;
}
.wireframe-slot.has-wf::before { background: #99f6e4; }
.wireframe-slot .wf-stack {
  position: absolute;
  inset: 22px 14px 36px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wireframe-slot .wf-stripe {
  height: 10px;
  border-radius: 3px;
  background: #99f6e4;
}
.wireframe-slot .wf-stripe.short { width: 60%; background: #ccfbf1; }
.wireframe-slot.has-wf .wf-chip {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  background: #0f766e;
  color: #fff;
  padding: 4px 0;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}

.connector {
  flex: 0 0 auto;
  align-self: center;
  width: 28px;
  height: 36px;
  position: relative;
}
.connector::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 7px;
  height: 2px;
  background: #cbd5e0;
  transform: translateY(-50%);
}
.connector::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-left-color: #a0aec0;
  transform: translateY(-50%);
}

.lane-drop {
  position: relative;
  height: 42px;
  margin: -4px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lane-drop::before {
  content: '';
  width: 2px;
  height: 100%;
  background: #cbd5e0;
}
.lane-drop::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top-color: #a0aec0;
}
.lane-drop .drop-label {
  position: absolute;
  left: calc(50% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  background: var(--bg);
  padding: 0 6px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 40px 80px;
}
.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.detail-nav .crumbs a { color: var(--muted); }
.detail-nav .pn a { margin-left: 14px; }
.detail-nav .wf-cta {
  background: #0f766e;
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.detail-nav .wf-cta:hover {
  background: #134e4a;
  text-decoration: none;
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-top: 10px;
}
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.detail h1 { margin: 0 0 8px; font-size: 22px; color: var(--accent-ink); }
.detail h2 {
  margin: 22px 0 6px;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail h3 { margin: 18px 0 4px; font-size: 13px; color: var(--accent-ink); }
.detail p, .detail li { font-size: 14px; color: #2d3748; }
.detail ul, .detail ol { padding-left: 20px; }
.detail code {
  background: #edf2f7;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

.mock-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.mock-phone {
  margin: 0 auto;
  width: 320px;
  max-width: 100%;
  background: #0f172a;
  border-radius: 32px;
  padding: 10px;
}
.mock-screen {
  background: #f4f6fa;
  border-radius: 24px;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mock-status {
  height: 22px;
  padding: 4px 16px 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: #0f172a;
}
.mock-top {
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.mock-top .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-ink);
}
.mock-top .sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.mock-body { padding: 12px; display: grid; gap: 10px; }
.mock-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}
.mock-card .kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.mock-card .name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3px;
}
.mock-card .meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 5px;
}
.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
}
.mock-row:first-child { border-top: 0; padding-top: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 700;
}
.badge.pending {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge.empty {
  background: #f1f5f9;
  color: #64748b;
}
.stub-lines { display: grid; gap: 7px; margin-top: 10px; }
.stub-lines span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
}
.stub-lines span.short { width: 62%; }

.callout {
  background: #ecfeff;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 12px 14px;
  color: #115e59;
  font-size: 13px;
}

@media (max-width: 720px) {
  .header, .legend, .container { padding-left: 18px; padding-right: 18px; }
  .flow { padding-left: 12px; padding-right: 12px; }
}
