:root {
  color-scheme: light;
  --ink: #12251f;
  --ink-soft: #31423c;
  --paper: #f3f0e8;
  --paper-deep: #e8e3d7;
  --card: #fffdf7;
  --line: rgba(18, 37, 31, .16);
  --muted: #718079;
  --acid: #c8f169;
  --acid-deep: #9aca3c;
  --coral: #ff725e;
  --blue: #3877d6;
  --success: #287a52;
  --warning: #a46114;
  --danger: #ad3c3c;
  --serif: "Noto Serif SC", "Songti SC", STSong, serif;
  --sans: "Work Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 18px 50px rgba(18, 37, 31, .09);
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }
html { scroll-behavior: smooth; }
html.auth-open,
html.auth-open body { overflow: hidden; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(200, 241, 105, .24), transparent 24rem),
    linear-gradient(rgba(18, 37, 31, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 37, 31, .026) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
  font-family: var(--sans);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 28px;
  color: #f7f5ee;
  background: rgba(18, 37, 31, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px);
}
.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.brand-mark { width: 35px; height: 35px; position: relative; display: block; transform: rotate(-8deg); }
.brand-mark i { position: absolute; width: 9px; bottom: 3px; border-radius: 10px 10px 2px 2px; background: var(--acid); }
.brand-mark i:nth-child(1) { left: 1px; height: 15px; }
.brand-mark i:nth-child(2) { left: 13px; height: 25px; }
.brand-mark i:nth-child(3) { left: 25px; height: 32px; }
.brand strong, .brand small { display: block; }
.brand strong { font: 500 14px/1 var(--mono); letter-spacing: .12em; }
.brand small { margin-top: 5px; color: rgba(255, 255, 255, .57); font-size: 10px; letter-spacing: .18em; }

.tabs { height: 78px; display: flex; align-items: stretch; }
.tabs button {
  position: relative;
  min-width: 104px;
  padding: 0 18px;
  border: 0;
  color: rgba(255, 255, 255, .56);
  background: transparent;
  font-size: 13px;
  transition: color .25s ease, background .25s ease;
}
.tabs button span { margin-right: 7px; color: rgba(200, 241, 105, .48); font: 400 9px var(--mono); }
.tabs button::after { content: ""; position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.tabs button:hover, .tabs button.active { color: #fff; background: rgba(255, 255, 255, .035); }
.tabs button.active::after { transform: scaleX(1); }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
.system-status { justify-self: end; display: flex; align-items: center; gap: 10px; }
.status-light { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255, 114, 94, .12); }
.system-status.online .status-light { background: var(--acid); box-shadow: 0 0 0 5px rgba(200, 241, 105, .12), 0 0 18px rgba(200, 241, 105, .6); }
.system-status strong, .system-status small { display: block; }
.system-status strong { font-size: 11px; font-weight: 600; }
.system-status small { margin-top: 2px; color: rgba(255, 255, 255, .48); font: 9px var(--mono); }

.auth-loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.auth-loading .brand-mark { transform: scale(1.25) rotate(-8deg); }
.auth-loading small { font: 9px var(--mono); letter-spacing: .12em; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr); }
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  overscroll-behavior: contain;
  isolation: isolate;
  background: var(--paper);
  animation: panel-in .25s ease both;
}
.auth-close { position: fixed; top: 20px; right: 22px; z-index: 82; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255,253,247,.88); font-size: 21px; line-height: 1; }
.auth-close:hover { background: var(--acid); }
.auth-story { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(55px, 9vw, 145px); color: #f7f5ee; background: var(--ink); overflow: hidden; }
.auth-story::before { content: ""; position: absolute; width: 38vw; height: 38vw; right: -12vw; top: -13vw; border: 1px solid rgba(200, 241, 105, .2); border-radius: 50%; box-shadow: 0 0 0 5vw rgba(200, 241, 105, .025), 0 0 0 10vw rgba(200, 241, 105, .02); }
.auth-story::after { content: "ROUTE / 01"; position: absolute; right: 4vw; bottom: 3vw; color: rgba(255,255,255,.06); font: 500 clamp(52px, 8vw, 120px)/1 var(--mono); writing-mode: vertical-rl; }
.auth-story .eyebrow { color: var(--acid); }
.auth-story h1 { position: relative; margin: 12px 0 24px; font: 700 clamp(48px, 6vw, 86px)/1.08 var(--serif); letter-spacing: -.05em; }
.auth-story h1 em { color: var(--acid); font-style: normal; }
.auth-story > p { position: relative; max-width: 530px; color: rgba(255,255,255,.58); font-size: 15px; }
.auth-ledger { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 600px; margin-top: 72px; border-top: 1px solid rgba(255,255,255,.15); }
.auth-ledger span { padding: 21px 18px 0 0; }
.auth-ledger span + span { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.15); }
.auth-ledger b, .auth-ledger small { display: block; }
.auth-ledger b { color: var(--acid); font: 500 27px var(--mono); }
.auth-ledger small { margin-top: 4px; color: rgba(255,255,255,.46); font-size: 10px; }
.auth-card { align-self: center; width: min(460px, calc(100% - 56px)); margin: 50px auto; padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line); border-radius: 3px 34px 3px 3px; background: rgba(255,253,247,.92); box-shadow: var(--shadow); }
.auth-card-head { margin-bottom: 31px; }
.auth-card-head > span { color: var(--success); font: 500 9px var(--mono); letter-spacing: .14em; }
.auth-card-head h2 { margin: 10px 0 7px; font: 700 27px/1.3 var(--serif); }
.auth-card-head p { margin: 0; color: var(--muted); font-size: 11px; }
.auth-context { display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; padding: 10px 12px; border-left: 3px solid var(--acid-deep); color: var(--ink-soft); background: rgba(200,241,105,.16); font-size: 10px; }
.auth-context i { color: var(--success); font: 500 11px var(--mono); font-style: normal; }
.auth-card .field + .field { margin-top: 18px; }
.verification-field > div { display: grid; grid-template-columns: minmax(0, 1fr) 106px; }
.verification-field > div input { min-width: 0; }
.verification-field > div button { border: 1px solid var(--ink); color: var(--acid); background: var(--ink); font-size: 10px; }
.verification-field > div button:disabled { opacity: .48; }
.auth-submit { width: 100%; justify-content: space-between; margin-top: 26px; }
.auth-switch { width: 100%; margin-top: 16px; border: 0; color: var(--success); background: transparent; font-size: 11px; }
.account-trigger { justify-self: end; min-width: 210px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 6px 0; border: 0; color: #fff; background: transparent; text-align: right; }
.account-trigger strong, .account-trigger small { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-trigger strong { font-size: 10px; }
.account-trigger small { margin-top: 2px; color: rgba(255,255,255,.5); font: 8px var(--mono); }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; order: 2; border: 1px solid rgba(200,241,105,.45); border-radius: 50%; color: var(--acid); font: 500 12px var(--mono); }
.guest-auth-trigger { justify-self: end; display: flex; align-items: center; gap: 13px; min-height: 40px; padding: 0 15px; border: 1px solid rgba(200,241,105,.46); color: #fff; background: rgba(200,241,105,.06); font-size: 11px; }
.guest-auth-trigger i { color: var(--acid); font: 500 14px var(--mono); font-style: normal; }
.guest-auth-trigger:hover { color: var(--ink); background: var(--acid); }
.guest-auth-trigger:hover i { color: var(--ink); }
.account-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgba(18,37,31,.46); backdrop-filter: blur(4px); animation: panel-in .2s ease both; }
.account-panel { position: relative; width: min(520px, 100%); height: 100%; padding: 45px clamp(24px, 5vw, 48px); overflow: auto; color: var(--ink); background: var(--card); box-shadow: -22px 0 60px rgba(18,37,31,.2); }
.account-panel .inspector-close { color: var(--ink); border-color: var(--line); }
.account-panel > h2 { margin: 8px 40px 5px 0; overflow-wrap: anywhere; font: 700 24px var(--serif); }
.account-panel > p { color: var(--muted); font-size: 11px; }
.quota-board { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 30px 0; }
.quota-board > div { padding: 17px; border: 1px solid var(--line); background: var(--paper); }
.quota-board span, .quota-board small { display: block; color: var(--muted); font-size: 9px; }
.quota-board strong { display: inline-block; margin: 8px 5px 8px 0; font: 500 28px var(--mono); }
.quota-board i { height: 4px; display: block; background: var(--paper-deep); overflow: hidden; }
.quota-board i b { height: 100%; display: block; background: var(--acid-deep); }
.admin-analytics { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.admin-analytics > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.admin-analytics header strong, .admin-analytics header small { display: block; }
.admin-analytics header strong { font: 700 16px var(--serif); }
.admin-analytics header small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.admin-analytics header button { padding: 6px 9px; border: 1px solid var(--line); background: transparent; font-size: 9px; }
.analytics-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.analytics-metrics > div { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(243,240,232,.62); }
.analytics-metrics span, .analytics-metrics small { display: block; color: var(--muted); font-size: 8px; }
.analytics-metrics strong { display: block; margin: 5px 0 2px; overflow: hidden; color: var(--ink); font: 500 24px/1 var(--mono); text-overflow: ellipsis; }
.analytics-trend { margin-top: 15px; padding: 12px 11px 9px; border: 1px solid var(--line); background: var(--ink); }
.analytics-legend { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.58); font-size: 8px; }
.analytics-legend span { display: flex; align-items: center; gap: 5px; }
.analytics-legend i { width: 7px; height: 7px; display: block; }
.analytics-legend i.views { background: var(--acid); }
.analytics-legend i.plans { background: var(--coral); }
.analytics-legend small { margin-left: auto; color: rgba(255,255,255,.36); font: 400 8px var(--mono); }
.analytics-bars { height: 92px; display: flex; align-items: stretch; gap: 4px; margin-top: 12px; overflow: hidden; }
.analytics-day { min-width: 0; flex: 1; display: grid; grid-template-rows: 1fr auto; gap: 5px; }
.analytics-day > span { display: flex; align-items: flex-end; justify-content: center; gap: 1px; min-height: 0; }
.analytics-day > span i { width: min(5px, 42%); min-height: 0; display: block; transition: height .35s ease; }
.analytics-day > span i.views { background: var(--acid); }
.analytics-day > span i.plans { background: var(--coral); }
.analytics-day > small { overflow: hidden; color: rgba(255,255,255,.3); font: 400 6px var(--mono); text-align: center; white-space: nowrap; }
.analytics-empty { padding: 24px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-size: 9px; }
.admin-users { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.admin-users > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-users header strong, .admin-users header small { display: block; }
.admin-users header small { color: var(--muted); font-size: 9px; }
.admin-users header button, .admin-user-row > button { padding: 6px 9px; border: 1px solid var(--line); background: transparent; font-size: 9px; }
.admin-user-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px auto; align-items: end; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-user-row > div strong, .admin-user-row > div small { display: block; overflow: hidden; text-overflow: ellipsis; }
.admin-user-row > div strong { font-size: 10px; }
.admin-user-row > div small { color: var(--muted); font-size: 8px; }
.admin-user-row label { color: var(--muted); font-size: 8px; }
.admin-user-row input { width: 100%; margin-top: 3px; padding: 5px; border: 1px solid var(--line); background: #fff; }
.account-logout { width: 100%; margin-top: 30px; }

.contact-trigger { position: fixed; top: 52%; right: 0; z-index: 19; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 15px 9px 12px; border: 0; color: var(--acid); background: var(--ink); box-shadow: -7px 9px 24px rgba(18,37,31,.18); transform: translateY(-50%); transition: padding .2s ease, background .2s ease; }
.contact-trigger:hover { padding-right: 14px; background: var(--success); }
.contact-trigger span { writing-mode: vertical-rl; font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.contact-trigger i { font: 400 12px var(--mono); font-style: normal; }
.contact-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(18,37,31,.68); backdrop-filter: blur(7px); animation: panel-in .22s ease both; }
.contact-card { position: relative; width: min(850px, 100%); min-height: 510px; display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 3px 34px 3px 3px; background: var(--card); box-shadow: 0 35px 90px rgba(0,0,0,.32); animation: contact-card-in .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes contact-card-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.contact-close { position: absolute; top: 17px; right: 17px; z-index: 2; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255,253,247,.8); font-size: 20px; line-height: 1; }
.contact-close:hover { color: var(--ink); background: var(--acid); }
.contact-copy { position: relative; display: flex; flex-direction: column; padding: 62px 54px 45px; color: #f7f5ee; background: var(--ink); overflow: hidden; }
.contact-copy::after { content: "TALK"; position: absolute; right: -12px; bottom: -25px; color: rgba(255,255,255,.035); font: 500 110px var(--mono); transform: rotate(-90deg); }
.contact-copy .eyebrow { color: var(--acid); }
.contact-copy h2 { position: relative; margin: 10px 0 17px; font: 700 36px/1.24 var(--serif); letter-spacing: -.035em; }
.contact-copy h2 em { color: var(--acid); font-style: normal; }
.contact-copy > p { position: relative; max-width: 440px; margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.contact-copy ol { position: relative; margin: 36px 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.14); }
.contact-copy li { display: grid; grid-template-columns: 37px minmax(0,1fr); gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 11px; }
.contact-copy li b { color: var(--acid); font: 500 9px var(--mono); }
.contact-copy > small { position: relative; margin-top: auto; color: rgba(255,255,255,.38); font-size: 9px; }
.contact-qr-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 58px 40px 40px; text-align: center; background: linear-gradient(135deg, #fffdf7, #eeeadf); }
.qr-index { align-self: flex-start; margin-bottom: 20px; color: var(--success); font: 500 8px var(--mono); letter-spacing: .14em; }
.qr-frame { position: relative; width: min(250px, 100%); aspect-ratio: 1; display: grid; place-items: center; padding: 15px; background: #fff; border: 1px solid var(--line); box-shadow: 9px 10px 0 var(--acid-deep); }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 26px; height: 26px; border-color: var(--ink); }
.qr-frame::before { top: 7px; left: 7px; border-top: 3px solid; border-left: 3px solid; }
.qr-frame::after { right: 7px; bottom: 7px; border-right: 3px solid; border-bottom: 3px solid; }
.qr-frame img { width: 100%; height: 100%; display: block; object-fit: contain; }
.qr-placeholder { display: grid; justify-items: center; gap: 9px; color: var(--muted); }
.qr-placeholder > span { width: 80px; height: 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transform: rotate(4deg); }
.qr-placeholder i { border: 8px solid var(--ink); background: var(--acid); }
.qr-placeholder i:nth-child(4) { border-width: 3px; background: repeating-linear-gradient(45deg,var(--ink) 0 3px,var(--acid) 3px 6px); }
.qr-placeholder strong { font: 700 15px var(--serif); }
.qr-placeholder small { font-size: 9px; }
.contact-qr-side > strong { margin-top: 28px; font: 700 16px var(--serif); }
.contact-qr-side > small { margin-top: 5px; color: var(--muted); font-size: 9px; }

main { min-height: calc(100vh - 78px); }
.workspace { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 62px 0 88px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; margin-bottom: 32px; }
.page-heading > div:first-child { max-width: 760px; }
.eyebrow { display: block; margin-bottom: 13px; color: var(--success); font: 500 10px/1.2 var(--mono); letter-spacing: .12em; }
.page-heading h1 { margin: 0; font: 700 clamp(34px, 5vw, 62px)/1.08 var(--serif); letter-spacing: -.035em; }
.page-heading h1 em { color: var(--success); font-style: normal; }
.page-heading p { max-width: 650px; margin: 15px 0 0; color: var(--muted); font-size: 14px; }

.workflow-steps { flex: 0 0 360px; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: route; }
.workflow-steps span { position: relative; min-height: 76px; padding: 14px 10px 12px 16px; border-top: 1px solid var(--line); color: var(--muted); transition: .3s ease; }
.workflow-steps span::before { content: ""; position: absolute; top: -2px; left: 0; width: 0; height: 3px; background: var(--ink); transition: width .45s ease; }
.workflow-steps span + span { border-left: 1px solid var(--line); }
.workflow-steps b, .workflow-steps i { display: block; }
.workflow-steps b { margin-bottom: 9px; font: 500 10px var(--mono); }
.workflow-steps i { font-size: 12px; font-style: normal; font-weight: 500; }
.workflow-steps span.active { color: var(--ink); background: rgba(255, 253, 247, .5); }
.workflow-steps span.active::before { width: 100%; background: var(--acid-deep); }
.workflow-steps span.done { color: var(--success); }
.workflow-steps span.done::before { width: 100%; background: var(--success); }

.stage-panel {
  position: relative;
  padding: clamp(24px, 5vw, 56px);
  background: rgba(255, 253, 247, .94);
  border: 1px solid rgba(18, 37, 31, .13);
  border-radius: 3px 34px 3px 3px;
  box-shadow: var(--shadow);
  animation: panel-in .55s cubic-bezier(.2, .8, .2, 1) both;
}
.stage-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 86px; height: 4px; background: var(--acid-deep); }
@keyframes panel-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.plan-tools { display: flex; justify-content: flex-end; margin: -16px 0 18px; }
.plan-tools-actions { display: flex; align-items: center; gap: 6px; }
.plan-tool-button { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-soft); background: transparent; font-size: 10px; font-weight: 600; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.plan-tool-button i { color: var(--success); font: 500 12px/1 var(--mono); font-style: normal; }
.plan-tool-button.create { background: rgba(200, 241, 105, .13); }
.plan-tool-button:hover { border-color: rgba(18, 37, 31, .42); color: var(--ink); background: rgba(200, 241, 105, .22); }
.panel-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.panel-kicker > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; color: var(--acid); background: var(--ink); font: 500 11px var(--mono); }
.panel-kicker strong, .panel-kicker small { display: block; }
.panel-kicker strong { font: 700 18px var(--serif); }
.panel-kicker small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.field > span { font-weight: 600; }
.field > span small { margin-left: 8px; color: var(--muted); font: 400 9px var(--mono); letter-spacing: .1em; }
.field input, .field textarea, .field select, .question-group > input,
.contract-section > input, .knowledge-row select {
  width: 100%;
  border: 1px solid rgba(18, 37, 31, .22);
  border-radius: 2px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, .66);
  outline: none;
  transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus, .question-group > input:focus,
.contract-section > input:focus, .knowledge-row select:focus { border-color: var(--success); background: #fff; box-shadow: 0 0 0 4px rgba(40, 122, 82, .1); }
.field textarea { resize: vertical; min-height: 118px; }
.hero-input textarea { min-height: 174px; padding: 22px; border: 0; border-left: 3px solid var(--ink); border-radius: 0; background: #f1eee5; font: 600 clamp(18px, 2.4vw, 26px)/1.65 var(--serif); }
.hero-input textarea::placeholder { color: #92988f; opacity: .75; }
.hero-input textarea:focus { border-color: var(--acid-deep); box-shadow: inset 5px 0 0 rgba(200, 241, 105, .18); }
.input-hint { align-self: flex-end; color: var(--muted); font-size: 10px; font-weight: 400 !important; }
.prompt-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.prompt-examples > span { margin-right: 4px; color: var(--muted); font-size: 11px; }
.prompt-examples button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-soft); background: transparent; font-size: 11px; transition: .2s ease; }
.prompt-examples button i { margin-left: 5px; font-style: normal; }
.prompt-examples button:hover { border-color: var(--ink); background: var(--ink); color: var(--acid); transform: translateY(-2px); }

.question-list { margin-top: 28px; border-top: 1px solid var(--line); }
.question-group { padding: 22px 0; border-bottom: 1px solid var(--line); }
.question-title { margin-bottom: 12px; font: 600 15px var(--serif); }
.choice-list { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-list label { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); background: #f8f5ec; font-size: 12px; transition: .2s ease; }
.choice-list label:has(input:checked) { border-color: var(--ink); color: var(--acid); background: var(--ink); }
.choice-list input { accent-color: var(--acid-deep); }

.actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 26px; }
.panel-actions { justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); }
.privacy-note { color: var(--muted); font-size: 10px; }
.primary, .secondary { min-height: 45px; padding: 10px 17px; border-radius: 2px; font-weight: 600; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-width: 150px; border: 1px solid var(--ink); color: #fff; background: var(--ink); box-shadow: 6px 6px 0 var(--acid-deep); }
.primary i { color: var(--acid); font: 400 18px var(--mono); font-style: normal; }
.primary:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--acid-deep); }
.secondary { border: 1px solid rgba(18, 37, 31, .28); color: var(--ink); background: transparent; }
.secondary:hover { border-color: var(--ink); background: var(--paper-deep); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none !important; box-shadow: none !important; }

.notice { margin: 20px 0 0; padding: 14px 16px; border-left: 3px solid; font-size: 12px; }
.notice ul { margin: 6px 0 0; padding-left: 19px; }
.notice.neutral { border-color: var(--blue); background: rgba(56, 119, 214, .08); }
.notice.warning { border-color: var(--warning); color: #704311; background: #fff2d8; }
.contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contract-section { margin-top: 30px; }
.contract-section h2, .generate-ready h2, .plan-header h2 { margin: 0 0 13px; font: 700 19px var(--serif); }
.contract-section > input { margin-bottom: 8px; }
.knowledge-header, .knowledge-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 120px; gap: 12px; align-items: center; }
.knowledge-header { padding: 9px 12px; color: rgba(255, 255, 255, .62); background: var(--ink); font: 500 9px var(--mono); letter-spacing: .08em; }
.knowledge-row { min-height: 68px; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 12px; transition: background .2s ease; }
.knowledge-row:hover { background: rgba(200, 241, 105, .1); }
.knowledge-row strong, .knowledge-row small { display: block; }
.knowledge-row strong { font-family: var(--serif); font-size: 14px; }
.knowledge-row small { margin-top: 3px; color: var(--muted); }

.generation-panel { border-radius: 3px 34px 3px 3px; }
.generate-ready { min-height: 160px; display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 10px 4px; }
.generate-ready h2 { margin: 8px 0; font-size: clamp(27px, 4vw, 42px); }
.generate-ready p { max-width: 680px; margin: 0; color: var(--muted); }
.task-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.task-progress-head > div:first-child { flex: 1; }
.task-progress-head strong, .task-progress-head small { display: block; }
.task-progress-head strong { font: 700 20px var(--serif); }
.task-progress-head small { margin-top: 5px; color: var(--muted); font: 400 10px var(--mono); }
.loading-pulse { width: 10px; height: 10px; display: inline-block; margin-right: 9px; border: 2px solid rgba(40, 122, 82, .25); border-top-color: var(--success); border-radius: 50%; vertical-align: 0; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.progress-orbit { --progress: 0deg; width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--acid-deep) var(--progress), var(--paper-deep) 0); position: relative; }
.progress-orbit::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }
.progress-orbit span { position: relative; z-index: 1; font: 500 12px var(--mono); }
.progress-orbit span::after { content: "%"; font-size: 7px; }

.generation-skeleton { margin: 20px 0; padding: 20px; border: 1px solid var(--line); background: #f8f5ed; }
.skeleton-line, .skeleton-grid span { display: block; background: linear-gradient(90deg, #e8e4da 25%, #f5f2eb 50%, #e8e4da 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; }
.skeleton-line { width: 62%; height: 11px; margin-bottom: 11px; border-radius: 20px; }
.skeleton-line.wide { width: 84%; height: 16px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.skeleton-grid span { min-height: 58px; border-radius: 2px; }
@keyframes skeleton-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.task-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 22px 0 0; }
.task-stages > div { position: relative; min-height: 68px; display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); color: #9aa19c; font-size: 11px; }
.task-stages > div::after { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 3px; background: var(--acid-deep); transition: width .5s ease; }
.task-stages > div + div { border-left: 1px solid var(--line); }
.task-stages .active { color: var(--ink); background: rgba(200, 241, 105, .12); }
.task-stages .active::after, .task-stages .done::after { width: 100%; }
.task-stages .done { color: var(--success); }
.stage-dot { width: 9px; height: 9px; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; }
.task-stages .active .stage-dot { background: var(--acid-deep); animation: dot-pulse 1.5s infinite; }
.task-stages .done .stage-dot { background: var(--success); }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 6px rgba(154, 202, 60, .15); } }
.task-error { display: flex; flex-direction: column; gap: 3px; margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--danger); color: #842f2f; background: #ffe8e3; font-size: 12px; }

.progressive-section { margin-top: 34px; padding-top: 27px; border-top: 1px solid var(--line); }
.progressive-section > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 17px; }
.progressive-section h2 { margin: 0; font: 700 23px var(--serif); }
.progressive-section header p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.progressive-section > header > span { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); font: 400 9px var(--mono); }
.graph-commandbar {
  position: sticky;
  top: 88px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 18px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .94);
  backdrop-filter: blur(12px);
}
.graph-view-switch { display: flex; align-items: center; gap: 3px; padding: 3px; background: var(--paper-deep); }
.graph-view-switch button { min-height: 34px; padding: 7px 12px; border: 0; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; transition: .2s ease; }
.graph-view-switch button.active { color: var(--acid); background: var(--ink); }
.graph-view-switch button:disabled { color: #a7ada8; background: transparent; }
.graph-filters { display: flex; align-items: center; gap: 7px; }
.graph-search { min-width: 190px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); background: #fff; }
.graph-search > span { color: var(--success); font: 500 18px var(--mono); transform: rotate(-20deg); }
.graph-search input { width: 100%; min-height: 34px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.graph-filters select { min-height: 36px; padding: 0 28px 0 9px; border: 1px solid var(--line); outline: 0; color: var(--ink-soft); background: #fff; font-size: 11px; }
.graph-reset { min-height: 34px; padding: 0 9px; border: 0; color: var(--danger); background: transparent; font-size: 10px; }
.knowledge-map-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 520px; border: 1px solid var(--line); background: #ece9df; overflow: hidden; }
.knowledge-map-layout.inspecting { grid-template-columns: minmax(0, 1fr) 310px; }
.map-stage { min-width: 0; background: #eeebe2; }
.map-guide { min-height: 41px; display: flex; align-items: center; gap: 14px; padding: 8px 13px; border-bottom: 1px solid var(--line); color: var(--muted); background: rgba(255, 253, 247, .8); font-size: 9px; }
.map-guide span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-guide i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.map-guide i.core { background: var(--acid-deep); }
.map-guide i.route { background: var(--ink); }
.map-guide i.deferred { border: 1px dashed var(--muted); background: transparent; }
.map-guide small { margin-left: auto; font: 400 8px var(--mono); }
.map-scroll { max-height: 690px; min-height: 475px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--success) var(--paper-deep); }
.map-scroll:focus-visible { outline: 3px solid rgba(56, 119, 214, .35); outline-offset: -3px; }
.knowledge-map-canvas { display: block; font-family: var(--sans); }
.map-grid-line { fill: none; stroke: rgba(18, 37, 31, .045); stroke-width: 1; }
.map-arrow { fill: rgba(40, 122, 82, .52); }
.map-column-headings text { fill: var(--muted); font: 500 9px var(--mono); letter-spacing: .08em; }
.map-lane rect { fill: rgba(255, 253, 247, .54); stroke: rgba(18, 37, 31, .09); }
.map-lane > text { fill: var(--ink); font: 700 12px var(--serif); }
.map-lane .lane-count { fill: var(--muted); font: 400 7px var(--mono); letter-spacing: .08em; }
.map-edges path { fill: none; stroke: rgba(40, 122, 82, .37); stroke-width: 1.2; transition: opacity .2s ease, stroke .2s ease, stroke-width .2s ease; }
.map-edges path.active { stroke: var(--success); stroke-width: 2.3; }
.map-edges path.dimmed { opacity: .08; }
.map-node { cursor: pointer; outline: none; transition: opacity .2s ease; }
.map-node > rect { fill: #fffdf7; stroke: rgba(18, 37, 31, .23); stroke-width: 1; filter: drop-shadow(0 3px 5px rgba(18, 37, 31, .05)); transition: fill .2s ease, stroke .2s ease, stroke-width .2s ease; }
.map-node > circle { fill: #849088; }
.map-node .node-title { fill: var(--ink); font: 600 10px var(--serif); }
.map-node .node-meta-svg { fill: var(--muted); font: 400 6.5px var(--mono); letter-spacing: .06em; }
.map-node:hover > rect, .map-node:focus-visible > rect { stroke: var(--success); stroke-width: 2; }
.map-node.core > circle { fill: var(--acid-deep); }
.map-node.route > rect { fill: #eaf5cf; stroke: var(--success); }
.map-node.route > circle { fill: var(--ink); }
.map-node.deferred > rect { fill: #f4f1e9; stroke: #89928d; stroke-dasharray: 4 3; }
.map-node.selected > rect { fill: var(--ink); stroke: var(--acid); stroke-width: 3; filter: drop-shadow(5px 6px 0 var(--acid-deep)); }
.map-node.selected .node-title { fill: #fff; }
.map-node.selected .node-meta-svg { fill: rgba(255, 255, 255, .58); }
.map-node.selected > circle { fill: var(--acid); }
.map-node.dimmed { opacity: .23; }
.map-empty { min-height: 475px; display: grid; place-items: center; color: var(--muted); font: 600 15px var(--serif); }
.node-inspector { position: relative; max-height: 731px; overflow: auto; padding: 24px 20px 30px; border-left: 1px solid var(--line); color: #eef3ef; background: var(--ink); animation: inspector-in .25s ease both; }
@keyframes inspector-in { from { opacity: 0; transform: translateX(14px); } }
.inspector-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; color: #fff; background: transparent; font: 300 19px/1 var(--sans); }
.inspector-close:hover { color: var(--ink); background: var(--acid); }
.inspector-index { color: var(--acid); font: 400 8px var(--mono); letter-spacing: .1em; }
.node-inspector > h3 { margin: 12px 32px 8px 0; font: 700 23px/1.3 var(--serif); }
.inspector-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.inspector-meta span { padding: 3px 6px; border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .68); font: 400 7px var(--mono); }
.node-inspector > p { margin: 19px 0; color: rgba(255, 255, 255, .7); font-size: 11px; }
.node-inspector section { padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, .13); }
.node-inspector section > strong { display: block; margin-bottom: 8px; color: var(--acid); font: 500 9px var(--mono); letter-spacing: .08em; }
.node-inspector ul { margin: 0; padding-left: 17px; color: rgba(255, 255, 255, .76); font-size: 10px; }
.node-inspector li + li { margin-top: 5px; }
.dependency-flow > div + div { margin-top: 10px; }
.dependency-flow small { display: block; margin-bottom: 5px; color: rgba(255, 255, 255, .45); font-size: 8px; }
.dependency-flow button { margin: 0 5px 5px 0; padding: 5px 7px; border: 1px solid rgba(200, 241, 105, .28); color: #eff7df; background: rgba(200, 241, 105, .07); font-size: 9px; }
.dependency-flow button:hover { color: var(--ink); background: var(--acid); }
.search-term-list { display: flex; flex-wrap: wrap; gap: 5px; }
.search-term-list span { padding: 5px 7px; color: var(--ink); background: var(--acid); font-size: 8px; }
.graph-outline { animation: panel-in .35s ease both; }
.graph-domain { margin-top: 22px; }
.graph-domain h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 15px var(--serif); }
.graph-domain h3::before { content: ""; width: 16px; height: 4px; background: var(--acid-deep); }
.graph-domain h3 small { color: var(--muted); font: 400 9px var(--mono); }
.graph-node { border-bottom: 1px solid var(--line); }
.graph-node:first-of-type { border-top: 1px solid var(--line); }
.graph-node summary { min-height: 49px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 11px; cursor: pointer; transition: background .2s ease; }
.graph-node summary:hover, .graph-node[open] summary { background: rgba(200, 241, 105, .12); }
.graph-node summary::marker { color: var(--success); }
.node-meta { color: var(--muted); font: 400 9px var(--mono); }
.graph-node > p { margin: 13px 14px; color: var(--ink-soft); font-size: 12px; }
.graph-node dl { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 7px 13px; margin: 0; padding: 0 14px 16px; font-size: 11px; }
.graph-node dt { color: var(--success); font-weight: 600; }
.graph-node dd { margin: 0; overflow-wrap: anywhere; }
.module-decisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-decision { min-height: 150px; padding: 18px; border: 1px solid var(--line); background: #f7f3e9; transition: transform .2s ease, box-shadow .2s ease; }
.module-decision:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(18, 37, 31, .07); }
.module-decision header { display: flex; justify-content: space-between; gap: 16px; }
.module-decision header strong { font-family: var(--serif); }
.module-decision header span, .module-decision small { color: var(--muted); font: 400 9px var(--mono); }
.module-decision p { margin: 15px 0; font-size: 12px; }
.tradeoffs { margin-top: 15px; padding: 14px 16px; border-left: 3px solid var(--warning); background: #fff2d8; font-size: 12px; }
.tradeoffs ul { margin: 6px 0 0; padding-left: 19px; }
.deferred-learning { margin-top: 13px; border: 1px solid var(--line); padding: 13px 15px; font-size: 12px; }
.deferred-learning summary { cursor: pointer; font-weight: 600; }
.deferred-learning p { margin: 11px 0 3px; }
.deferred-learning small { color: var(--muted); }
.topic-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.topic-progress > header { grid-column: 1 / -1; }
.topic-result { min-width: 0; padding: 16px; border: 1px solid var(--line); background: #f8f5ed; }
.topic-result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topic-result-head strong { font-family: var(--serif); }
.topic-result > small { display: block; margin: 6px 0; color: var(--warning); }
.topic-resource { display: block; margin-top: 9px; padding-left: 10px; border-left: 2px solid var(--acid-deep); color: var(--ink); text-decoration: none; font-size: 11px; }
.topic-resource:hover span { color: var(--success); }
.topic-resource span, .topic-resource small { display: block; }
.topic-resource small { color: var(--muted); }

.result-status { display: flex; justify-content: space-between; margin: 25px 0 0; padding: 15px 17px; border-left: 4px solid var(--success); color: #fff; background: var(--ink); }
.result-status.completed_with_gaps { border-color: var(--coral); }
.coverage-summary { margin: 22px 0; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
.coverage-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.coverage-row:nth-child(odd) { border-right: 1px solid var(--line); }
.coverage-row strong, .coverage-row small { display: block; }
.coverage-row strong { font-family: var(--serif); font-size: 13px; }
.coverage-row small { color: var(--muted); font-size: 10px; }
.coverage-status { width: 74px; flex: 0 0 auto; text-align: center; padding: 4px 7px; border-radius: 100px; font: 500 9px var(--mono); }
.coverage-status.sufficient { color: #215f42; background: #dff0b8; }
.coverage-status.weak { color: #7b4a0b; background: #ffdfa5; }
.coverage-status.missing { color: #8e3232; background: #ffd5cc; }
.plan-header { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin: 35px 0 15px; }
.plan-header h2 { max-width: 780px; font-size: 25px; }
.shared-plan-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 22px; padding: 18px 20px; color: #fff; background: var(--ink); border-left: 5px solid var(--acid); }
.shared-plan-banner div > span, .shared-plan-banner div > strong, .shared-plan-banner div > small { display: block; }
.shared-plan-banner div > span { margin-bottom: 6px; color: var(--acid); font: 500 8px var(--mono); letter-spacing: .14em; }
.shared-plan-banner div > strong { font: 700 16px var(--serif); }
.shared-plan-banner div > small { margin-top: 4px; color: rgba(255,255,255,.56); font-size: 10px; }
.shared-plan-banner button { flex: 0 0 auto; min-height: 39px; padding: 8px 13px; border: 1px solid var(--acid); color: var(--ink); background: var(--acid); font-size: 10px; font-weight: 700; }
.shared-plan-banner button i { margin-left: 9px; font-style: normal; }
.share-backdrop { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 24px; background: rgba(18,37,31,.72); backdrop-filter: blur(7px); animation: panel-in .22s ease both; }
.share-card { position: relative; width: min(590px, 100%); padding: clamp(30px, 6vw, 56px); border-top: 5px solid var(--acid-deep); border-radius: 3px 30px 3px 3px; background: var(--card); box-shadow: 0 35px 90px rgba(0,0,0,.3); }
.share-close { position: absolute; top: 16px; right: 17px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font-size: 20px; }
.share-close:hover { background: var(--acid); }
.share-card h2 { margin: 10px 42px 14px 0; font: 700 34px/1.2 var(--serif); letter-spacing: -.03em; }
.share-card h2 em { color: var(--success); font-style: normal; }
.share-card > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 11px; }
.share-loading { min-height: 118px; display: grid; place-content: center; justify-items: center; gap: 13px; margin-top: 24px; color: var(--muted); font-size: 11px; }
.share-loading i { width: 25px; height: 25px; border: 3px solid var(--paper-deep); border-top-color: var(--success); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.share-error { margin-top: 24px; padding: 15px 16px; border-left: 3px solid var(--coral); background: #fff0ec; }
.share-error strong, .share-error span { display: block; }
.share-error strong { color: var(--danger); font: 700 14px var(--serif); }
.share-error span { margin: 5px 0 12px; color: var(--muted); font-size: 10px; }
.share-error button { min-height: 36px; }
.share-link-field { display: block; margin-top: 28px; }
.share-link-field span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.share-link-field input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); font: 400 10px var(--mono); outline: none; }
.share-link-field input:focus { border-color: var(--success); box-shadow: 0 0 0 4px rgba(40,122,82,.1); }
.share-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 12px; }
.share-actions .primary, .share-actions .secondary { width: 100%; }
.share-revoke { margin-top: 22px; padding: 0; border: 0; border-bottom: 1px solid rgba(173,60,60,.35); color: var(--danger); background: transparent; font-size: 9px; }
.plan-step { position: relative; margin-bottom: 16px; border: 1px solid var(--line); background: rgba(255, 253, 247, .7); overflow: hidden; transition: box-shadow .2s ease; }
.plan-step:hover { box-shadow: 0 13px 32px rgba(18, 37, 31, .08); }
.plan-step > header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 15px; align-items: start; padding: 18px; }
.step-id { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 50%; color: var(--acid); background: var(--ink); font: 500 9px var(--mono); }
.plan-step h3 { margin: 0; font: 700 17px var(--serif); }
.plan-step header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.step-time { white-space: nowrap; padding: 5px 8px; border: 1px solid var(--line); font: 400 9px var(--mono); }
.criteria { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 18px; border-top: 1px solid var(--line); background: #f3f0e7; }
.criteria span { padding: 4px 8px; border-left: 2px solid var(--blue); color: #285995; background: #e8eff8; font-size: 10px; }
.resource-list { border-top: 1px solid var(--line); }
.resource-assessment, .search-result { display: flex; gap: 14px; padding: 14px 18px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: background .2s ease, padding-left .2s ease; }
.resource-assessment:last-child, .search-result:last-child { border-bottom: 0; }
.resource-assessment:hover, .search-result:hover { padding-left: 23px; background: rgba(200, 241, 105, .12); }
.resource-assessment img, .search-result img { width: 124px; height: 70px; object-fit: cover; flex: 0 0 auto; filter: saturate(.85); background: var(--paper-deep); }
.resource-assessment strong, .resource-assessment small, .search-result strong, .search-result small { display: block; }
.resource-assessment strong, .search-result strong { font: 600 13px var(--serif); }
.resource-assessment small, .search-result small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.gap-note { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--warning); background: #fff2d8; font-size: 11px; }

.search-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; border-radius: 2px; }
.search-results, .history-list { margin-top: 20px; border: 1px solid var(--line); background: rgba(255, 253, 247, .8); box-shadow: var(--shadow); }
.history-row { width: 100%; min-height: 92px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 17px 20px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; transition: background .2s ease, padding-left .2s ease; }
.history-row:last-child { border-bottom: 0; }
.history-row:hover { padding-left: 27px; background: rgba(200, 241, 105, .14); }
.history-main strong, .history-main span { display: block; }
.history-main strong { font: 700 17px var(--serif); }
.history-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.history-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font: 400 9px var(--mono); white-space: nowrap; }
.empty-state { padding: 65px 20px; border: 1px dashed rgba(18, 37, 31, .3); color: var(--muted); background: rgba(255, 253, 247, .55); text-align: center; font-family: var(--serif); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: min(430px, calc(100vw - 48px)); padding: 14px 17px; border-left: 4px solid var(--coral); color: #fff; background: var(--ink); box-shadow: 0 18px 45px rgba(18, 37, 31, .25); font-size: 12px; animation: toast-in .3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

.share-missing-body { min-width: 320px; }
.share-missing-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr); }
.share-missing-code { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 68px); color: #fff; background: var(--ink); overflow: hidden; }
.share-missing-code::after { content: ""; position: absolute; width: 42vw; height: 42vw; right: -22vw; bottom: -15vw; border: 1px solid rgba(200,241,105,.19); border-radius: 50%; box-shadow: 0 0 0 6vw rgba(200,241,105,.025), 0 0 0 12vw rgba(200,241,105,.018); }
.share-missing-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.share-missing-brand strong, .share-missing-brand small { display: block; }
.share-missing-brand strong { font: 500 14px var(--mono); letter-spacing: .12em; }
.share-missing-brand small { margin-top: 5px; color: rgba(255,255,255,.52); font-size: 9px; letter-spacing: .16em; }
.share-missing-code > div { position: relative; z-index: 1; }
.share-missing-code > div span, .share-missing-code > div strong, .share-missing-code > div small { display: block; }
.share-missing-code > div span { color: var(--acid); font: 500 9px var(--mono); letter-spacing: .16em; }
.share-missing-code > div strong { margin: 13px 0 3px; color: var(--acid); font: 500 clamp(105px, 17vw, 230px)/.82 var(--mono); letter-spacing: -.1em; }
.share-missing-code > div small { color: rgba(255,255,255,.38); font: 400 10px var(--mono); letter-spacing: .18em; }
.share-missing-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(44px, 9vw, 130px); }
.share-missing-copy h1 { margin: 12px 0 22px; font: 700 clamp(40px, 5.5vw, 72px)/1.12 var(--serif); letter-spacing: -.045em; }
.share-missing-copy h1 em { color: var(--success); font-style: normal; }
.share-missing-copy > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 13px; }
.share-missing-reasons { max-width: 620px; margin-top: 40px; border-top: 1px solid var(--line); }
.share-missing-reasons span { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; min-height: 47px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.share-missing-reasons b { color: var(--success); font: 500 9px var(--mono); }
.share-missing-actions { display: flex; align-items: center; gap: 20px; margin-top: 34px; }
.share-missing-primary { min-height: 46px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 10px 16px; color: #fff; background: var(--ink); box-shadow: 6px 6px 0 var(--acid-deep); text-decoration: none; font-size: 11px; font-weight: 700; }
.share-missing-primary i { color: var(--acid); font: 400 17px var(--mono); font-style: normal; }
.share-missing-secondary { color: var(--muted); font-size: 10px; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 900px) {
  .share-missing-page { grid-template-columns: 1fr; }
  .share-missing-code { min-height: 34vh; padding: 28px; }
  .share-missing-code > div strong { font-size: 96px; }
  .share-missing-copy { padding: 48px 28px 70px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-gate { display: block; }
  .auth-story { min-height: 44vh; padding: 70px 8vw; }
  .auth-story h1 { font-size: clamp(44px, 9vw, 70px); }
  .auth-ledger { margin-top: 38px; }
  .topbar { grid-template-columns: 1fr auto; backdrop-filter: none; }
  .topbar-actions { grid-column: 2; }
  .tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 25; height: 62px; justify-content: center; color: #fff; background: var(--ink); box-shadow: 0 -8px 24px rgba(18, 37, 31, .14); }
  .tabs button { flex: 1; min-width: 0; max-width: 180px; }
  .system-status { display: none; }
  main { padding-bottom: 62px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 28px; }
  .workflow-steps { flex-basis: auto; width: 100%; }
  .module-decisions { grid-template-columns: 1fr; }
  .graph-commandbar { top: 76px; align-items: stretch; flex-direction: column; }
  .graph-filters { width: 100%; }
  .graph-search { flex: 1; }
  .knowledge-map-layout.inspecting { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 680px) {
  .share-missing-actions { align-items: stretch; flex-direction: column; }
  .share-missing-primary { width: 100%; }
  .share-missing-secondary { text-align: center; }
  .contact-trigger { top: auto; right: 14px; bottom: 75px; flex-direction: row; padding: 10px 13px; transform: none; }
  .contact-trigger span { writing-mode: horizontal-tb; letter-spacing: .05em; }
  .contact-backdrop { padding: 13px; align-items: end; }
  .contact-card { max-height: calc(100vh - 26px); min-height: 0; grid-template-columns: 1fr; overflow: auto; border-radius: 3px 25px 3px 3px; }
  .contact-copy { padding: 42px 25px 28px; }
  .contact-copy h2 { font-size: 28px; }
  .contact-copy ol { margin: 24px 0; }
  .contact-qr-side { padding: 31px 30px 39px; }
  .qr-index { margin-bottom: 13px; }
  .qr-frame { width: 210px; }
  .auth-story { min-height: auto; padding: 52px 24px 44px; }
  .auth-story h1 { font-size: 42px; }
  .auth-ledger { margin-top: 28px; }
  .auth-ledger span { padding-right: 8px; }
  .auth-ledger span + span { padding-left: 8px; }
  .auth-ledger b { font-size: 20px; }
  .auth-card { width: calc(100% - 28px); margin: 20px auto 34px; padding: 27px 21px; }
  .account-trigger strong { display: none; }
  .account-trigger { min-width: 0; margin-left: auto; }
  .guest-auth-trigger { min-width: 0; margin-left: auto; padding: 0 11px; }
  .topbar-actions { min-width: 0; margin-left: auto; gap: 8px; }
  .account-avatar { order: 0; }
  .quota-board { grid-template-columns: 1fr; }
  .admin-user-row { grid-template-columns: minmax(0, 1fr) 60px 60px; }
  .admin-user-row > button { grid-column: 1 / -1; }
  .topbar { min-height: 67px; padding: 0 18px; display: flex; }
  .brand-mark { transform: scale(.86) rotate(-8deg); transform-origin: left; }
  .workspace { width: min(100% - 28px, 1180px); padding: 40px 0 72px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 37px; }
  .page-heading p { margin-top: 11px; }
  .workflow-steps span { min-height: 65px; padding: 11px 7px; }
  .workflow-steps i { font-size: 10px; }
  .stage-panel { padding: 22px 16px 27px; border-radius: 2px 22px 2px 2px; }
  .panel-kicker { margin-bottom: 22px; }
  .hero-input textarea { min-height: 190px; padding: 17px; font-size: 18px; }
  .input-hint, .privacy-note { align-self: flex-start; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .panel-actions .primary { width: 100%; }
  .contract-grid, .search-tools { grid-template-columns: 1fr; }
  .knowledge-header { display: none; }
  .knowledge-row { grid-template-columns: minmax(0, 1fr) 74px; }
  .knowledge-row select { grid-column: 1 / -1; }
  .generate-ready, .plan-header { align-items: stretch; flex-direction: column; }
  .plan-tools { margin: -5px 0 15px; }
  .plan-tools-actions { flex-wrap: wrap; justify-content: flex-end; }
  .shared-plan-banner { align-items: stretch; flex-direction: column; }
  .shared-plan-banner button { width: 100%; }
  .share-backdrop { padding: 13px; align-items: end; }
  .share-card { max-height: calc(100vh - 26px); overflow: auto; padding: 33px 22px 27px; border-radius: 3px 24px 3px 3px; }
  .share-card h2 { font-size: 28px; }
  .share-actions { grid-template-columns: 1fr; }
  .generate-ready .primary { width: 100%; }
  .task-progress-head { flex-wrap: wrap; }
  .task-progress-head .progress-orbit { order: -1; }
  .task-stages { grid-template-columns: 1fr; }
  .task-stages > div { min-height: 42px; border-left: 0 !important; border-bottom: 1px solid var(--line); }
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .graph-node summary { grid-template-columns: 1fr; gap: 3px; }
  .graph-node dl { grid-template-columns: 1fr; gap: 2px; }
  .graph-node dd { margin-bottom: 7px; }
  .graph-commandbar { position: relative; top: auto; padding: 8px; }
  .graph-view-switch { display: grid; grid-template-columns: repeat(3, 1fr); }
  .graph-view-switch button { padding: 7px 5px; font-size: 10px; }
  .graph-filters { display: grid; grid-template-columns: minmax(0, 1fr) 105px auto; }
  .graph-search { min-width: 0; }
  .knowledge-map-layout.inspecting { grid-template-columns: 1fr; }
  .map-guide { flex-wrap: wrap; }
  .map-guide small { width: 100%; margin-left: 0; }
  .map-scroll { min-height: 430px; max-height: 540px; }
  .node-inspector { max-height: none; border-top: 1px solid rgba(255, 255, 255, .12); border-left: 0; }
  .topic-progress, .coverage-summary { grid-template-columns: 1fr; }
  .coverage-row:nth-child(odd) { border-right: 0; }
  .plan-step > header { grid-template-columns: 42px minmax(0, 1fr); }
  .step-time { grid-column: 2; justify-self: start; }
  .resource-assessment img, .search-result img { width: 92px; height: 55px; }
  .history-row { grid-template-columns: 1fr; gap: 10px; }
  .history-meta { flex-wrap: wrap; white-space: normal; }
  .tabs button span { display: block; margin: 0 0 2px; }
}
