:root {
  --ink: #111210;
  --muted: #6e706a;
  --teal: #171815;
  --teal-deep: #0b0c0c;
  --teal-soft: #eee7db;
  --orange: #d7a14a;
  --orange-soft: #f4e7d1;
  --paper: #f5f2ec;
  --panel: #fffdf8;
  --line: #d9d2c6;
  --cream: #fffaf0;
  --gold: #d7a14a;
  --gold-bright: #efb75b;
  --shadow: 0 22px 60px rgba(24, 19, 12, 0.09);
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.boot-screen {
  min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(circle at 50% 35%, #edf7f4, var(--paper) 42%);
}
.boot-screen p { color: var(--muted); }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px;
  color: white; background: linear-gradient(145deg, var(--orange), #ff9850); font-weight: 800;
  box-shadow: 0 10px 24px rgba(242, 104, 34, .24);
}
.brand-mark.light { background: rgba(255,255,255,.13); box-shadow: none; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; font-size: 20px; }
.wordmark.inverse { color: white; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-copy { padding: clamp(42px, 7vw, 110px); background: var(--teal-deep); color: white; position: relative; overflow: hidden; }
.login-copy::after { content: ""; position: absolute; width: 34vw; height: 34vw; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -12vw; bottom: -14vw; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 12px; color: #7c8b87; }
.login-copy .kicker { margin-top: 100px; color: #90c4bd; }
.login-copy h1 { max-width: 820px; margin: 18px 0 24px; font-family: "Prata", serif; font-size: clamp(48px, 6vw, 94px); line-height: 1.02; font-weight: 400; }
.lead { max-width: 720px; font-size: clamp(18px, 1.5vw, 24px); line-height: 1.6; color: #d1e4df; }
.value-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.value-list span { padding: 10px 15px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; color: #ddede9; }
.login-card { align-self: center; margin: clamp(28px, 6vw, 88px); padding: clamp(30px, 4vw, 58px); background: white; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); position: relative; }
.card-number { position: absolute; right: 30px; top: 24px; font-family: "Prata", serif; font-size: 56px; color: #e7ebe8; }
.login-card h2 { margin: 18px 0 14px; font-family: "Prata", serif; font-size: 38px; font-weight: 400; }
.login-card > p:not(.kicker):not(.privacy-note) { color: var(--muted); line-height: 1.65; }
.login-steps { margin: 32px 0; display: grid; gap: 20px; }
.login-steps div { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center; }
.login-steps b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); }
.privacy-note { padding-top: 22px; border-top: 1px solid var(--line); color: #83908c; font-size: 13px; line-height: 1.55; }

.platform-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 28px 20px; background: var(--teal-deep); color: #dcebe7; display: flex; flex-direction: column; z-index: 20; }
.sidebar-caption { margin: 16px 8px 30px; color: #8fb2ac; font-size: 12px; line-height: 1.45; }
.sidebar nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; color: #b9d0cb; font-weight: 600; font-size: 14px; }
.nav-link > span { width: 22px; text-align: center; font-size: 18px; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.11); }
.nav-link.active { box-shadow: inset 3px 0 var(--orange); }
.sidebar-foot { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.05); }
.sidebar-foot p { margin: 0 0 5px; color: #8fb2ac; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-foot strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.sidebar-foot button { margin: 14px 0 0; padding: 0; border: 0; background: transparent; color: #d3e2df; cursor: pointer; font-size: 12px; text-decoration: underline; }
.workspace { grid-column: 2; min-width: 0; padding: 0 clamp(24px, 4vw, 64px) 90px; }
.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar p { margin: 0 0 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.topbar strong { font-size: 14px; }
.profile-chip { display: flex; align-items: center; gap: 10px; }
.profile-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-soft); color: var(--teal); font-weight: 800; }
.profile-chip div { display: grid; }
.profile-chip b { font-size: 13px; }
.profile-chip small { color: var(--muted); font-size: 11px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.sidebar-close, .sidebar-backdrop { display: none; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 48px 0 30px; }
.dashboard-head h1, .section-hero h1 { margin: 8px 0 0; font-family: "Prata", serif; font-weight: 400; font-size: clamp(34px, 4vw, 58px); line-height: 1.1; }
.dashboard-head > div > p:last-child { max-width: 680px; margin: 15px 0 0; color: var(--muted); line-height: 1.6; }
.primary-action { display: inline-flex; align-items: center; gap: 30px; padding: 15px 18px 15px 22px; background: var(--teal); color: white; border-radius: 12px; font-weight: 700; font-size: 13px; box-shadow: 0 12px 24px rgba(7,84,90,.16); }
.primary-action span { font-size: 20px; }
.welcome-hero { margin-top: 46px; padding: clamp(28px, 4vw, 58px); overflow: hidden; border-radius: 28px; background: var(--teal-deep); color: white; position: relative; }
.welcome-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -180px; top: -230px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018); pointer-events: none; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy .kicker { color: #8fc3bb; }
.welcome-copy h1 { max-width: 760px; margin: 13px 0 18px; font-family: "Prata", serif; font-size: clamp(42px, 5vw, 76px); font-weight: 400; line-height: 1.04; }
.welcome-intro-row { display: flex; align-items: center; justify-content: space-between; gap: 34px; }
.welcome-lead { max-width: 820px; margin: 0; color: #c8ddd8; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.65; }
.welcome-tour-button { color: white; border-color: rgba(255,255,255,.68); background: rgba(255,255,255,.06); }
.welcome-choice-title { position: relative; z-index: 1; margin-top: 42px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.14); }
.welcome-choice-title .eyebrow { color: #8fc3bb; }
.welcome-choice-title h2 { margin: 8px 0; font-family: "Prata", serif; font-size: clamp(29px, 3vw, 42px); font-weight: 400; }
.welcome-choice-title p { max-width: 780px; margin: 0; color: #bfd5d0; line-height: 1.6; }
.welcome-entry-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: stretch; margin-top: 24px; }
.welcome-entry { min-height: 270px; padding: 27px; display: grid; grid-template-rows: auto auto 1fr auto; color: var(--ink); border: 1px solid white; border-radius: 18px; background: white; box-shadow: 0 18px 44px rgba(1,35,37,.18); }
.entry-kind { display: flex; align-items: center; gap: 10px; color: var(--teal); }
.entry-kind span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--teal); font-size: 19px; }
.entry-kind b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.entry-or { align-self: center; color: #a8c5bf; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.welcome-entry h2 { margin: 18px 0 10px; font-family: "Prata", serif; font-size: clamp(24px, 2vw, 31px); font-weight: 400; }
.welcome-entry p { margin: 0; color: var(--muted); line-height: 1.6; }
.welcome-entry a { margin-top: 25px; display: flex; align-items: center; justify-content: space-between; color: var(--teal); font-weight: 800; }
.welcome-entry a b { font-size: 22px; }
.welcome-choice-note { position: relative; z-index: 1; max-width: 900px; margin: 22px 0 0; color: #a9cbc4; font-size: 13px; line-height: 1.55; }
.system-flow { margin-top: 24px; padding: clamp(26px, 3vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, #fff, #f2f8f5); }
.system-flow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.system-flow-head > div { flex: 1; min-width: 0; }
.system-flow-head h2 { margin: 9px 0; font-family: "Prata", serif; font-size: clamp(27px, 2.7vw, 39px); font-weight: 400; }
.system-flow-head p { max-width: 980px; margin: 0; color: var(--muted); line-height: 1.6; }
.tour-start-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 20px; padding: 13px 16px 13px 18px; border: 1px solid var(--teal); border-radius: 11px; color: var(--teal); background: white; font-weight: 800; cursor: pointer; }
.tour-start-button span { font-size: 18px; }
.system-flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.system-flow-grid > a { min-height: 205px; padding: 23px; display: grid; grid-template-rows: auto 1fr auto; background: white; transition: transform .18s ease, background .18s ease; }
.system-flow-grid > a:hover { position: relative; z-index: 1; transform: translateY(-2px); background: #f8fcfa; }
.system-flow-grid > a > b { display: block; margin: 0 0 12px; color: var(--ink); font-family: "Prata", serif; font-size: 23px; font-weight: 400; }
.system-flow-grid > a p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.system-flow-grid > a > span { align-self: end; margin-top: 22px; color: var(--teal); font-size: 11px; font-weight: 800; }
.system-flow.compact { padding: 28px; }
.system-flow.compact .system-flow-head h2 { font-size: 29px; }
.system-flow.compact .system-flow-grid > a { min-height: 170px; }
.system-assistant-note { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding: 14px 17px; border-radius: 13px; color: #cce0dc; background: var(--teal-deep); }
.system-assistant-note > span { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--orange); font-size: 10px; font-weight: 800; }
.system-assistant-note p { margin: 0; font-size: 12px; line-height: 1.5; }
.system-assistant-note b { color: white; }

.platform-tour-layer { position: fixed; inset: 0; z-index: 1000; }
.tour-scrim { position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: default; }
.tour-spotlight { position: fixed; z-index: 1001; border: 2px solid #ff8b4a; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(5,27,29,.76), 0 8px 30px rgba(0,0,0,.18); pointer-events: none; transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.tour-tooltip { position: fixed; z-index: 1002; max-width: 360px; padding: 22px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 22px 70px rgba(0,0,0,.28); }
.tour-tooltip::before { content: ""; position: absolute; width: 14px; height: 14px; background: white; transform: rotate(45deg); }
.tour-tooltip[data-placement="right"]::before { left: -7px; top: 32px; }
.tour-tooltip[data-placement="left"]::before { right: -7px; top: 32px; }
.tour-tooltip[data-placement="below"]::before { left: 32px; top: -7px; }
.tour-tooltip-top { display: flex; align-items: center; justify-content: space-between; color: var(--orange); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tour-tooltip-top button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: #f1f4f2; font-size: 20px; cursor: pointer; }
.tour-tooltip h2 { margin: 15px 0 8px; font-family: "Prata", serif; font-size: 27px; font-weight: 400; }
.tour-tooltip p { margin: 0; color: var(--muted); line-height: 1.58; }
.tour-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.tour-actions button { padding: 11px 14px; border: 0; border-radius: 10px; color: white; background: var(--teal); font-weight: 800; cursor: pointer; }
.tour-actions button.quiet { color: var(--teal); border: 1px solid var(--line); background: white; }
.tour-actions button:disabled { opacity: .35; cursor: default; }
.tour-skip-link { width: 100%; margin-top: 11px; padding: 5px; border: 0; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.work-formats { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.work-formats h2 { margin: 8px 0; font-family: "Prata", serif; font-size: 27px; font-weight: 400; }
.work-formats p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.work-formats .primary-action { flex: 0 0 auto; }
.ready-head { align-items: flex-start; }
.ready-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.ready-entry { min-height: 330px; padding: 28px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 1fr auto; gap: 0 18px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 12px 35px rgba(24,53,50,.05); }
.ready-entry > div { align-self: start; }
.ready-entry h2 { margin: 9px 0 12px; font-family: "Prata", serif; font-size: clamp(25px, 2.3vw, 34px); font-weight: 400; }
.ready-entry p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.65; }
.ready-entry > a { grid-column: 1 / -1; align-self: end; justify-content: space-between; margin-top: 28px; }
.ready-entry.dark { color: white; background: var(--teal-deep); border-color: transparent; }
.ready-entry.dark p:not(.eyebrow) { color: #bcd3ce; }
.ready-entry.dark .eyebrow { color: #8fb8b1; }
.orange-action { background: var(--orange); box-shadow: 0 12px 24px rgba(242,104,34,.18); }
.dashboard-guide { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.dashboard-guide > summary { padding: 20px 24px; cursor: pointer; color: var(--teal); font-weight: 800; list-style-position: inside; }
.dashboard-guide[open] > summary { border-bottom: 1px solid var(--line); }
.dashboard-guide .system-flow { margin: 0; border: 0; border-radius: 0 0 18px 18px; box-shadow: none; }
.request-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-left: 3px solid var(--orange); background: var(--orange-soft); border-radius: 0 13px 13px 0; }
.request-banner div { display: grid; gap: 4px; }
.request-banner span { color: #9a572f; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.request-banner strong { font-size: 15px; }
.request-banner a { color: #a24816; font-size: 13px; font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 22px; }
.panel { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 35px rgba(24,53,50,.05); }
.panel.wide { grid-column: 1 / -1; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title > div { display: flex; align-items: center; gap: 11px; }
.panel-title h2 { margin: 0; font-size: 18px; }
.panel-title > a { color: var(--teal); font-size: 12px; font-weight: 800; }
.panel-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--teal); }
.panel-icon.orange { background: var(--orange); }
.maturity-body { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.maturity-body p, .next-panel p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.progress-ring { --progress: 0deg; flex: 0 0 auto; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--orange) var(--progress), #edf0ed 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: white; }
.progress-ring span { position: relative; z-index: 1; font-weight: 800; }
.next-panel { background: var(--teal-deep); color: white; border-color: transparent; }
.next-panel p { color: #c3d8d4; margin-top: 20px; }
.text-action { display: inline-block; margin-top: 24px; color: #ff9b63; font-size: 13px; font-weight: 800; }
.status-tag { padding: 7px 10px; border-radius: 999px; color: var(--teal); background: var(--teal-soft); font-size: 11px; font-weight: 800; }
.route-track { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr; align-items: center; margin-top: 26px; }
.route-track > i { height: 1px; background: var(--line); }
.route-stage { padding: 16px; border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 4px; }
.route-stage b { color: var(--orange); font-family: "Prata", serif; font-size: 24px; font-weight: 400; }
.route-stage span { font-weight: 800; font-size: 13px; }
.route-stage small { color: var(--muted); font-size: 10px; }
.route-stage.active { border-color: #9fc7bf; background: #f5fbf9; }
.ai-assistant { position: fixed; right: 28px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border: 0; border-radius: 999px; color: white; background: var(--teal); box-shadow: 0 14px 34px rgba(7,84,90,.25); cursor: pointer; z-index: 30; }
.ai-assistant span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); font-size: 11px; font-weight: 800; }
.ai-assistant b { font-size: 12px; }
.section-hero { padding: 50px 0 30px; max-width: 900px; }
.section-hero > a { color: var(--teal); font-size: 13px; font-weight: 800; }
.section-hero .kicker { margin-top: 35px; }
.section-hero > p:last-child { max-width: 720px; color: var(--muted); line-height: 1.65; }
.screen-tour-button { position: absolute; right: 0; top: 42px; display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--teal); background: var(--panel); font-size: 12px; font-weight: 800; cursor: pointer; }
.screen-tour-button span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #0b0c0c; background: var(--gold-bright); }
.phase-panel { max-width: 900px; padding: 38px; background: linear-gradient(145deg, white, #f5faf7); }
.phase-label { color: var(--orange); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 800; }
.phase-panel h2 { margin: 12px 0; font-family: "Prata", serif; font-size: 30px; font-weight: 400; }
.phase-panel p { color: var(--muted); line-height: 1.65; }
.phase-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.phase-facts span { padding: 8px 12px; border-radius: 999px; color: var(--teal); background: var(--teal-soft); font-size: 12px; font-weight: 700; }

.login-action { margin-top: 8px; justify-content: space-between; }
.notice { margin-top: 20px; padding: 13px 16px; border: 1px solid #add3c9; border-radius: 12px; color: var(--teal); background: #f0faf6; font-size: 13px; font-weight: 700; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 800; }
.orange-text { color: var(--orange); }
.next-panel small { display: block; margin-top: 8px; color: #91b5af; line-height: 1.45; }
.constraint-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; border-left: 3px solid var(--orange); }
.constraint-panel h2 { margin: 8px 0; font-family: "Prata", serif; font-size: 27px; font-weight: 400; }
.constraint-panel p { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.6; }
.constraint-score { flex: 0 0 100px; display: grid; text-align: center; }
.constraint-score b { color: var(--orange); font-family: "Prata", serif; font-size: 36px; font-weight: 400; }
.constraint-score span { color: var(--muted); font-size: 10px; }
.current-tool-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.current-tool-panel h2 { margin: 7px 0; font-family: "Prata", serif; font-weight: 400; }
.current-tool-panel p { margin: 0; color: var(--muted); }
.current-tool-panel > div:last-child { min-width: 110px; display: grid; gap: 8px; text-align: right; }
.current-tool-panel > div:last-child b { color: var(--orange); font-family: "Prata", serif; font-size: 34px; font-weight: 400; }
.stat-strip, .memory-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.stat-strip > div, .memory-summary > div { padding: 16px; border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 4px; }
.stat-strip b, .memory-summary b { font-family: "Prata", serif; font-size: 25px; font-weight: 400; color: var(--teal); }
.stat-strip span, .memory-summary span { color: var(--muted); font-size: 11px; }

.architecture-summary, .diagnostic-intro { display: flex; align-items: center; gap: 28px; max-width: 950px; }
.architecture-summary h2, .diagnostic-intro h2 { margin: 7px 0; font-family: "Prata", serif; font-size: 27px; font-weight: 400; }
.architecture-summary p, .diagnostic-intro p { margin: 0; color: var(--muted); line-height: 1.55; }
.layer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.layer-card { position: relative; min-height: 235px; padding: 24px; overflow: hidden; display: grid; grid-template-columns: 54px 1fr; gap: 8px 14px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 10px 30px rgba(24,53,50,.045); }
.layer-card.current { border-color: #f4a477; box-shadow: inset 0 0 0 1px #ffd3b9, 0 14px 34px rgba(242,104,34,.08); }
.layer-card.current::after { content: "следующий"; position: absolute; top: 18px; right: 18px; padding: 5px 8px; border-radius: 999px; color: #a64813; background: var(--orange-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.layer-order { grid-row: 1 / 4; color: #d3ddd9; font-family: "Prata", serif; font-size: 36px; }
.layer-card-main h2 { margin: 6px 0 9px; font-size: 19px; }
.layer-card.current .layer-card-main h2 { padding-right: 70px; }
.layer-card-main p { margin: 0; min-height: 42px; color: var(--muted); line-height: 1.45; font-size: 12px; }
.layer-progress { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: end; }
.layer-progress b { color: var(--teal); font-size: 19px; }
.layer-progress span { color: var(--muted); font-size: 10px; }
.layer-progress i, .score-block i { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: #edf1ef; }
.layer-progress em, .score-block em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #ffab62); }
.layer-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.layer-toggle { grid-column: 2; justify-self: start; padding: 7px 0; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.layer-toggle span { margin-left: 8px; color: var(--orange); }
.layer-card.expanded { grid-column: 1 / -1; }
.layer-details { grid-column: 1 / -1; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.layer-details-intro { margin-bottom: 14px; }
.layer-details-intro p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.architecture-domain { border-top: 1px solid var(--line); }
.architecture-domain summary { padding: 16px 2px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.architecture-domain summary span { display: grid; gap: 4px; }
.architecture-domain summary small { color: var(--muted); font-size: 10px; }
.architecture-domain summary strong { color: var(--orange); }
.architecture-subdomains { display: grid; gap: 8px; padding: 0 0 16px; }
.architecture-subdomain { padding: 13px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; border-radius: 12px; background: #f6f3ed; }
.architecture-subdomain div b { font-size: 13px; }
.architecture-subdomain p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.architecture-subdomain > small { grid-column: 2; color: #7c511b; }
.layer-tools-link { display: inline-block; margin-top: 16px; color: var(--teal); font-size: 12px; font-weight: 800; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #6e7774; background: #edf1ef; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.ready, .status-pill.covered, .status-pill.analyzed { color: #19795e; background: #e3f6ed; }
.status-pill.in_progress, .status-pill.review, .status-pill.link_added { color: #a74b14; background: var(--orange-soft); }

.diagnostic-list { display: grid; gap: 10px; margin-top: 20px; }
.diagnostic-row { display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.diagnostic-row > div:first-child { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.class-badge { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--teal); font-weight: 800; }
.diagnostic-row h3 { margin: 0; font-size: 15px; }
.diagnostic-row p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; font-size: 11px; }
.score-block { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: center; }
.score-block b { color: var(--orange); font-family: "Prata", serif; font-size: 23px; font-weight: 400; }
.score-block i { grid-column: 2; }
.score-block span { grid-column: 2; color: var(--muted); font-size: 9px; }

.diagnostic-principle { max-width: 1080px; display: grid; grid-template-columns: 42px 1fr; gap: 18px; align-items: start; background: linear-gradient(145deg, #f3faf7, white); }
.diagnostic-principle h2 { margin: 0 0 10px; font-family: "Prata", serif; font-size: 26px; font-weight: 400; }
.diagnostic-principle p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.diagnostic-principle p b { color: var(--ink); }
.diagnostic-principle small { display: block; margin-top: 10px; color: #87928e; line-height: 1.5; }
.diagnostic-level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.diagnostic-level-card { min-height: 575px; padding: 24px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 12px 35px rgba(24,53,50,.05); }
.diagnostic-level-card.basic { background: linear-gradient(160deg, white 55%, #f4faf8); }
.diagnostic-level-card.deep { background: linear-gradient(160deg, white 55%, #fff7ef); }
.diagnostic-level-top { display: flex; justify-content: space-between; align-items: center; }
.diagnostic-level-mark { color: #cfd9d5; font-family: "Prata", serif; font-size: 36px; }
.diagnostic-level-card h2 { margin: 8px 0 12px; font-family: "Prata", serif; font-size: 30px; font-weight: 400; line-height: 1.2; }
.diagnostic-level-card > div > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.diagnostic-scope-copy b { color: var(--ink); }
.diagnostic-when, .diagnostic-result { padding-top: 15px; border-top: 1px solid var(--line); }
.diagnostic-when summary { display: flex; justify-content: space-between; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.diagnostic-when b, .diagnostic-result b { color: var(--teal); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.diagnostic-when p, .diagnostic-result p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.diagnostic-when ul { margin: 10px 0 0; padding-left: 19px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.diagnostic-complete { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 28px; border-color: var(--gold); }
.diagnostic-complete h2 { margin: 8px 0; font-family: "Prata", serif; font-weight: 400; }
.diagnostic-complete p { margin: 0; max-width: 720px; color: var(--muted); line-height: 1.55; }
.diagnostic-complete > div:last-child { display: grid; gap: 12px; min-width: 220px; }
.diagnostic-when li + li { margin-top: 5px; }
.diagnostic-note { margin: 0; padding: 14px; border-radius: 11px; color: #6f7774; background: #f2f5f3; font-size: 13px; line-height: 1.55; }
.diagnostic-note b { color: var(--ink); }
.diagnostic-card-progress { margin-top: auto; display: grid; gap: 8px; }
.diagnostic-card-progress span { color: var(--muted); font-size: 10px; }
.diagnostic-card-progress strong { color: var(--ink); font-size: 13px; line-height: 1.5; }
.diagnostic-card-progress i { height: 5px; overflow: hidden; border-radius: 99px; background: #edf1ef; }
.diagnostic-card-progress em { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.diagnostic-start { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; color: white; background: var(--teal); font-size: 12px; font-weight: 800; }
.diagnostic-level-card.deep .diagnostic-start { background: var(--orange); }
.diagnostic-results-head { margin: 50px 0 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.diagnostic-results-head h2 { margin: 7px 0; font-family: "Prata", serif; font-size: 32px; font-weight: 400; }
.diagnostic-results-head p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.55; }
.diagnostic-results-head > a { color: var(--teal); font-size: 12px; font-weight: 800; }
.empty-diagnostic { padding: 50px; border: 1px dashed #bccbc5; border-radius: 18px; text-align: center; background: #f7faf8; }
.empty-diagnostic h2 { margin: 0; font-family: "Prata", serif; font-size: 28px; font-weight: 400; }
.empty-diagnostic p { margin: 10px 0 24px; color: var(--muted); }
.diagnostic-detail-hero { padding-bottom: 22px; }
.diagnostic-level-progress { max-width: 900px; display: flex; align-items: center; gap: 28px; }
.diagnostic-level-progress h2 { margin: 7px 0; font-family: "Prata", serif; font-size: 28px; font-weight: 400; }
.diagnostic-level-progress p { margin: 0; color: var(--muted); line-height: 1.55; }
.diagnostic-scope { margin-top: 22px; }
.scope-heading h2 { margin: 7px 0; font-family: "Prata", serif; font-size: 28px; font-weight: 400; }
.scope-heading p { margin: 0; color: var(--muted); }
.scope-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.scope-tab { min-height: 68px; padding: 11px 13px; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; cursor: pointer; }
.scope-tab > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--teal); font-size: 10px; font-weight: 800; }
.scope-tab b { font-size: 11px; line-height: 1.3; }
.scope-tab small { color: var(--muted); font-size: 9px; }
.scope-tab.active { border-color: #f39b68; background: var(--orange-soft); box-shadow: inset 0 0 0 1px #ffd3b9; }
.diagnostic-domain-picker { margin: 18px 0 0; padding: 20px; border-radius: 16px; background: var(--teal-deep); }
.diagnostic-domain-picker .eyebrow { color: #8db4ae; }
.diagnostic-domain-picker > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.domain-tab { padding: 9px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: #d5e5e1; background: rgba(255,255,255,.06); cursor: pointer; }
.domain-tab b { font-size: 10px; }
.domain-tab span { color: #83aaa4; font-size: 9px; }
.domain-tab.active { color: white; border-color: var(--orange); background: rgba(242,104,34,.18); }
.diagnostic-question-list { display: grid; gap: 10px; margin-top: 20px; }
.diagnostic-question { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; }
.diagnostic-question.answered { border-color: #a8cec4; }
.diagnostic-question summary { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.diagnostic-question summary::-webkit-details-marker { display: none; }
.diagnostic-question summary > div { min-width: 0; display: grid; grid-template-columns: 35px 1fr; gap: 12px; align-items: start; }
.question-number { color: #cbd6d2; font-family: "Prata", serif; font-size: 21px; }
.diagnostic-question summary b { display: block; font-size: 14px; }
.diagnostic-question summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.question-score { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--orange); background: var(--orange-soft); font-size: 11px; font-weight: 800; }
.maturity-options { padding: 0 20px 20px; display: grid; gap: 8px; }
.maturity-options > p { margin: 0 0 6px 47px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.maturity-option { width: 100%; padding: 13px; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; text-align: left; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fbfcfb; cursor: pointer; }
.maturity-option > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--teal); background: var(--teal-soft); font-weight: 800; }
.maturity-option p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.maturity-option > b { color: #19795e; font-size: 10px; }
.maturity-option:hover, .maturity-option.selected { border-color: #75aa9e; background: #f1faf6; }
.maturity-option:disabled { opacity: .6; cursor: wait; }
.diagnostic-help { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.diagnostic-help h2 { margin: 7px 0; font-family: "Prata", serif; font-size: 25px; font-weight: 400; }
.diagnostic-help p { margin: 0; color: var(--muted); }
.diagnostic-loading { max-width: 780px; }
.diagnostic-loading h2 { font-family: "Prata", serif; font-weight: 400; }
.diagnostic-loading p { color: var(--muted); }

.tool-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.tool-toolbar label { flex: 1; max-width: 640px; display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tool-toolbar input, .tool-toolbar select, .profile-form input, .profile-form textarea { width: 100%; padding: 13px 15px; border: 1px solid #ccd7d2; border-radius: 11px; color: var(--ink); background: white; font: inherit; outline: none; }
.tool-toolbar input:focus, .tool-toolbar select:focus, .profile-form input:focus, .profile-form textarea:focus { border-color: #7fb3aa; box-shadow: 0 0 0 3px rgba(7,84,90,.08); }
.tool-toolbar b { color: var(--muted); font-size: 12px; }
.tool-status-filter { flex: 0 0 190px !important; }
.tool-continue { margin-bottom: 34px; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 30px; align-items: center; border-color: #efb087; background: linear-gradient(120deg, white 0%, #fff9f4 100%); }
.tool-continue h2, .tool-empty-start h2, .tools-section-head h2 { margin: 8px 0; font-family: "Prata", serif; font-weight: 400; }
.tool-continue h2 { max-width: 900px; font-size: clamp(25px, 3vw, 38px); line-height: 1.25; }
.tool-continue p, .tool-empty-start p, .tools-section-head p { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.55; }
.tool-continue-progress { display: grid; gap: 8px; justify-items: end; }
.tool-continue-progress > b { color: var(--orange); font-family: "Prata", serif; font-size: 48px; font-weight: 400; }
.tool-continue-progress > span { color: var(--muted); font-size: 11px; }
.tool-continue-progress .primary-action { margin-top: 8px; }
.tool-continue-progress i { font-style: normal; }
.tool-empty-start { margin-bottom: 34px; background: #f5f8f6; }
.tool-empty-start h2 { font-size: 28px; }
.tools-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.tools-section-head h2 { font-size: clamp(26px, 3vw, 38px); }
.tools-section-head > b { min-width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-size: 13px; }
.tool-recommendations, .my-tools-section, .tool-library { margin-top: 42px; }
.tool-recommendation-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.tool-recommendation-grid > .empty-state { grid-column: 1 / -1; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { min-height: 285px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.tool-card.workspace-card { min-height: 325px; }
.tool-card.recommended { background: #f7fbf9; }
.tool-card.recommended.primary { border-color: #ee9a68; background: linear-gradient(145deg, #fff 0%, #fff5ed 100%); box-shadow: 0 16px 35px rgba(242,104,34,.09); }
.tool-card-meta { min-height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool-card h2 { margin: 7px 0 10px; font-size: 17px; line-height: 1.3; }
.tool-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 11px; }
.tool-reason { margin-top: 15px; padding: 12px 13px; display: grid; gap: 5px; border-left: 2px solid var(--orange); color: #79533d; background: #fff5ed; font-size: 10px; line-height: 1.45; }
.tool-reason b { color: #a64a18; }
.tool-state { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; color: #66736e; background: #edf1ef; font-size: 9px; font-weight: 800; }
.tool-state.in_progress { color: #95601f; background: #fff1d7; }
.tool-state.completed { color: #167653; background: #e2f6ec; }
.tool-state.needs_update { color: #a34c1f; background: #ffeadf; }
.tool-location { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #70807a; font-size: 10px; line-height: 1.4; }
.tool-location i { color: #b8c3bf; font-style: normal; }
.tool-location b { color: var(--teal); }
.tool-location.compact { margin-top: 12px; }
.tool-result { display: grid; gap: 5px; padding-top: 14px; border-top: 1px solid var(--line); }
.tool-result b { color: var(--teal); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.tool-result span { color: var(--muted); line-height: 1.4; font-size: 10px; }
.tool-card > a { color: var(--orange); font-size: 12px; font-weight: 800; }
.my-tools-section, .tool-library { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 12px 35px rgba(24,53,50,.05); }
.my-tools-list { display: grid; gap: 8px; }
.my-tool-row { padding: 17px 18px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.my-tool-row h3 { margin: 8px 0 0; font-size: 14px; }
.my-tool-row > div:last-child { display: grid; grid-template-columns: 38px 1fr; gap: 7px 10px; align-items: center; }
.my-tool-row > div:last-child > b { color: var(--orange); font-size: 13px; }
.my-tool-row > div:last-child > i { height: 5px; overflow: hidden; border-radius: 999px; background: #e6ece9; }
.my-tool-row > div:last-child > i em { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.my-tool-row > div:last-child > span { grid-column: 1 / -1; justify-self: end; color: var(--teal); font-size: 10px; font-weight: 800; }
.tool-empty-inline { padding: 24px; border: 1px dashed #b9c8c2; border-radius: 14px; color: var(--muted); background: #f7faf8; text-align: center; }
.tool-library .tool-toolbar { margin: 0 0 24px; padding: 18px; border-radius: 15px; background: #f4f8f6; }
.tool-breadcrumb { margin-bottom: 16px; padding: 13px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-radius: 12px; color: var(--muted); background: var(--teal-soft); font-size: 10px; }
.tool-breadcrumb i { color: #8ca49e; font-style: normal; }
.tool-breadcrumb b { color: var(--teal); }
.tool-hierarchy-level, .tool-selected-results, .tool-search-results { padding: 22px 0; border-top: 1px solid var(--line); }
.hierarchy-caption { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.hierarchy-caption > span { color: var(--orange); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hierarchy-caption p { flex: 1; margin: 0; color: var(--muted); font-size: 11px; }
.hierarchy-caption > b { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-size: 10px; }
.tool-class-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.tool-class-card { min-height: 175px; padding: 18px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 1fr auto; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; cursor: pointer; }
.tool-class-card > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--teal); font-weight: 800; }
.tool-class-card b { font-size: 13px; line-height: 1.35; }
.tool-class-card p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.tool-class-card small { grid-column: 1 / -1; color: #86938e; font-size: 9px; }
.tool-class-card.active { border-color: var(--orange); background: #fff7f1; box-shadow: inset 0 0 0 1px #ffd5bc; }
.tool-class-card.active > span { background: var(--orange); }
.tool-layer-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tool-layer-picker button, .tool-domain-picker button, .tool-subdomain-picker button { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; cursor: pointer; }
.tool-layer-picker button b, .tool-domain-picker button b, .tool-subdomain-picker button b { font-size: 11px; line-height: 1.35; }
.tool-layer-picker button span, .tool-domain-picker button span, .tool-subdomain-picker button span { flex: 0 0 auto; color: #8b9893; font-size: 9px; }
.tool-layer-picker button.active, .tool-domain-picker button.active, .tool-subdomain-picker button.active { color: white; border-color: var(--teal); background: var(--teal); }
.tool-layer-picker button.active span, .tool-domain-picker button.active span, .tool-subdomain-picker button.active span { color: #aed0ca; }
.tool-domain-picker, .tool-subdomain-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-domain-picker button, .tool-subdomain-picker button { max-width: 330px; }
.tool-selected-results .tool-grid, .tool-search-results .tool-grid { margin-top: 5px; }
.tool-workspace-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.tool-purpose h2 { max-width: 760px; font-family: "Prata", serif; font-size: 25px; font-weight: 400; line-height: 1.35; }
.tool-purpose p, .tool-progress-panel p { color: var(--muted); line-height: 1.55; }
.tool-progress-number { margin: 14px 0 6px; color: var(--orange); font-family: "Prata", serif; font-size: 54px; }
.fill-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.fill-mode-card { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; background: white; }
.fill-mode-card > span { color: var(--orange); font-size: 11px; font-weight: 800; }
.fill-mode-card h2 { margin: 10px 0; font-family: "Prata", serif; font-size: 26px; font-weight: 400; }
.fill-mode-card p { min-height: 70px; color: var(--muted); line-height: 1.55; }
.fill-mode-card button { border: 0; cursor: pointer; }
.fill-mode-card .secondary { color: var(--teal); border: 1px solid var(--teal); background: white; }
.quiet-link { margin-top: 14px; color: var(--muted); font-size: 11px; }
.document-link-form { margin-top: 16px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: end; }
.document-link-form h2 { margin: 7px 0; font-family: "Prata", serif; font-weight: 400; }
.document-link-form p { margin: 0; color: var(--muted); line-height: 1.5; }
.document-link-form label { display: flex; gap: 8px; }
.document-link-form input { flex: 1; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; font: inherit; }
.document-link-form button { padding: 12px 16px; border: 0; border-radius: 11px; color: white; background: var(--teal); font-weight: 800; cursor: pointer; }
.document-link-form small { grid-column: 2; color: var(--muted); }
.saved-answers { margin-top: 16px; }
.saved-answers h2 { font-family: "Prata", serif; font-weight: 400; }
.saved-answers > div { padding: 14px 0; border-top: 1px solid var(--line); }
.saved-answers p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.tool-unavailable { color: #9aa5a1; font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 48px; border: 1px dashed #bccbc5; border-radius: 18px; text-align: center; background: #f7faf8; }
.empty-state h2 { margin: 0 0 8px; font-family: "Prata", serif; font-weight: 400; }
.empty-state p { max-width: 550px; margin: 0 auto 22px; color: var(--muted); line-height: 1.55; }
.empty-state .primary-action { margin: 0 auto; }

.memory-summary { grid-template-columns: repeat(3, 1fr); margin: 0 0 20px; }
.document-list { display: grid; gap: 10px; }
.document-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 15px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.document-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--teal); font-size: 20px; }
.document-row h3 { margin: 0 0 5px; font-size: 14px; }
.document-row p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.document-row small { color: #9ba5a1; font-size: 9px; }
.document-row > a { color: var(--teal); font-size: 11px; font-weight: 800; }

.profile-form { max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-form .full { grid-column: 1 / -1; }
.profile-form textarea { resize: vertical; min-height: 120px; }
.form-actions { display: flex; align-items: center; gap: 16px; }
.form-actions button { border: 0; cursor: pointer; }
.form-actions button:disabled { opacity: .55; cursor: wait; }
.form-actions > span { color: var(--muted); font-size: 12px; }

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-copy { min-height: 58vh; }
  .login-copy .kicker { margin-top: 60px; }
  .login-card { margin: -50px 18px 40px; z-index: 2; }
  .platform-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .sidebar.open, .sidebar.tour-open { transform: translateX(0); }
  .workspace { grid-column: 1; padding: 0 20px 90px; }
  .mobile-menu { display: block; }
  .topbar { justify-content: flex-start; gap: 16px; }
  .profile-chip { margin-left: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .welcome-entry-grid, .ready-entry-grid { grid-template-columns: 1fr; }
  .entry-or { justify-self: center; }
  .system-flow-head { flex-direction: column; }
  .welcome-intro-row { align-items: flex-start; flex-direction: column; }
  .system-flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-formats { align-items: flex-start; flex-direction: column; }
  .panel.wide { grid-column: auto; }
  .route-track { grid-template-columns: 1fr 1fr; gap: 10px; }
  .route-track > i { display: none; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-recommendation-grid { grid-template-columns: 1fr 1fr; }
  .tool-recommendation-grid .primary { grid-column: 1 / -1; }
  .tool-class-grid { grid-template-columns: 1fr 1fr; }
  .tool-layer-picker { grid-template-columns: 1fr 1fr; }
  .tool-continue { grid-template-columns: 1fr; }
  .tool-continue-progress { justify-items: start; }
  .tool-workspace-grid, .fill-mode-grid, .document-link-form { grid-template-columns: 1fr; }
  .document-link-form small { grid-column: 1; }
  .layer-grid { grid-template-columns: 1fr; }
  .diagnostic-level-grid { grid-template-columns: 1fr; }
  .diagnostic-level-card { min-height: auto; }
  .scope-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .login-copy { padding: 34px 24px 84px; }
  .login-copy h1 { font-size: 46px; }
  .login-card { padding: 28px 24px; }
  .profile-chip div { display: none; }
  .dashboard-head { display: grid; padding-top: 32px; }
  .welcome-hero { margin-top: 24px; padding: 28px 20px; border-radius: 20px; }
  .welcome-copy h1 { font-size: 43px; }
  .welcome-entry-grid { margin-top: 28px; }
  .welcome-entry { min-height: auto; }
  .system-flow, .system-flow.compact { padding: 22px 16px; }
  .system-flow-grid { grid-template-columns: 1fr; }
  .system-flow-grid > a, .system-flow.compact .system-flow-grid > a { min-height: auto; }
  .system-flow-head h2 { font-size: 27px; }
  .tour-start-button { width: 100%; justify-content: space-between; }
  .tour-tooltip { left: 14px !important; right: 14px; bottom: 14px; top: auto !important; width: auto !important; max-width: none; }
  .tour-tooltip::before { display: none; }
  .ready-entry { min-height: auto; padding: 22px; grid-template-columns: 38px 1fr; }
  .primary-action { width: 100%; justify-content: space-between; }
  .request-banner { align-items: flex-start; }
  .maturity-body { align-items: flex-start; }
  .route-track { grid-template-columns: 1fr; }
  .ai-assistant b { display: none; }
  .ai-assistant { right: 16px; bottom: 16px; padding-right: 9px; }
  .stat-strip, .memory-summary { grid-template-columns: 1fr 1fr; }
  .constraint-panel, .architecture-summary, .diagnostic-intro { align-items: flex-start; }
  .constraint-score { flex-basis: 75px; }
  .diagnostic-row { grid-template-columns: 1fr; }
  .diagnostic-results-head, .diagnostic-help { align-items: stretch; flex-direction: column; }
  .diagnostic-level-progress { align-items: flex-start; }
  .scope-tabs { grid-template-columns: 1fr; }
  .diagnostic-question summary { align-items: flex-start; }
  .maturity-options { padding: 0 12px 12px; }
  .maturity-options > p { margin-left: 0; }
  .maturity-option { grid-template-columns: 30px 1fr; }
  .maturity-option > b { grid-column: 2; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-toolbar { align-items: stretch; flex-direction: column; }
  .tool-status-filter { flex-basis: auto !important; max-width: none !important; }
  .tool-recommendation-grid, .tool-class-grid, .tool-layer-picker { grid-template-columns: 1fr; }
  .tool-recommendation-grid .primary { grid-column: auto; }
  .my-tools-section, .tool-library { padding: 22px 16px; }
  .tools-section-head { flex-direction: column; }
  .my-tool-row { grid-template-columns: 1fr; }
  .my-tool-row > div:last-child > span { justify-self: start; }
  .tool-class-card { min-height: auto; }
  .document-row { grid-template-columns: 42px 1fr; }
  .document-row > .status-pill, .document-row > a { grid-column: 2; justify-self: start; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form .full { grid-column: auto; }
}

/* Book visual system: seledchik.ru/books/business-assembly */
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 85% -10%, rgba(215, 161, 74, .08), transparent 28%),
    var(--paper);
}

button,
input,
select,
textarea { font-family: "Inter", Arial, sans-serif; }

.workspace h1,
.workspace h2,
.workspace h3,
.login-shell h1,
.login-shell h2,
.tour-tooltip h2 {
  font-family: "Inter Tight", "Inter", Arial, sans-serif !important;
  letter-spacing: -.035em;
}

.dashboard-head h1,
.section-hero h1,
.welcome-copy h1,
.login-copy h1 {
  font-weight: 900;
  line-height: .96;
}

.kicker,
.eyebrow,
.phase-label {
  color: #8c7147;
  letter-spacing: .14em;
}

.brand-mark {
  color: #0b0c0c;
  background: linear-gradient(135deg, var(--gold-bright), #c48734);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(165, 111, 35, .24);
}

.brand-mark.light {
  color: #0b0c0c;
  background: var(--gold-bright);
}

.boot-screen {
  color: var(--cream);
  background: var(--teal-deep);
}

.boot-screen p { color: #b8b1a5; }

.sidebar {
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(215, 161, 74, .05), transparent 24%),
    var(--teal-deep);
  border-right: 1px solid rgba(215, 161, 74, .28);
}

.sidebar-caption,
.sidebar-foot p { color: #a49d91; }

.nav-link {
  color: #c5beb2;
  border: 1px solid transparent;
  border-radius: 999px;
}

.nav-link:hover {
  color: var(--cream);
  border-color: rgba(215, 161, 74, .2);
  background: rgba(255, 250, 240, .045);
}

.nav-link.active {
  color: #0b0c0c;
  border-color: var(--gold-bright);
  background: var(--gold-bright);
  box-shadow: none;
}

.sidebar-foot {
  border-color: rgba(215, 161, 74, .25);
  border-radius: 16px;
  background: rgba(255, 250, 240, .04);
}

.sidebar-foot button { color: #d8c8ab; }

.workspace { background: transparent; }

.topbar {
  border-color: rgba(116, 96, 66, .22);
}

.profile-chip > span {
  color: #0b0c0c;
  background: var(--gold-bright);
  border-radius: 50%;
}

.dashboard-head h1,
.section-hero h1 {
  font-size: clamp(42px, 5vw, 76px);
}

.primary-action,
.orange-action {
  color: #0b0c0c;
  background: linear-gradient(135deg, var(--gold-bright), #d2943e);
  border: 1px solid #bd7f2e;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(166, 111, 34, .2);
}

.primary-action:hover,
.orange-action:hover { filter: brightness(1.035); }

.welcome-hero,
.ready-entry.dark,
.next-panel,
.system-assistant-note {
  color: var(--cream);
  background: var(--teal-deep);
  border-color: rgba(215, 161, 74, .36);
}

.welcome-hero {
  border: 1px solid rgba(215, 161, 74, .46);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(11, 12, 12, .14);
}

.welcome-hero::after {
  border-color: rgba(215, 161, 74, .22);
  box-shadow: 0 0 0 60px rgba(215, 161, 74, .03), 0 0 0 120px rgba(215, 161, 74, .018);
}

.welcome-copy .kicker,
.welcome-choice-title .eyebrow { color: var(--gold-bright); }

.welcome-copy h1 { color: var(--cream); }
.welcome-lead,
.welcome-choice-title p { color: #d2cbc0; }

.welcome-tour-button {
  color: var(--cream);
  border-color: rgba(215, 161, 74, .7);
  background: rgba(215, 161, 74, .08);
  border-radius: 999px;
}

.tour-start-button.welcome-tour-button {
  color: var(--cream);
  border-color: var(--gold-bright);
  background: rgba(215, 161, 74, .08);
}

.tour-start-button.welcome-tour-button:hover {
  color: #0b0c0c;
  background: var(--gold-bright);
}

.welcome-choice-title { border-color: rgba(215, 161, 74, .28); }

.welcome-entry,
.ready-entry,
.panel,
.phase-panel,
.architecture-summary,
.diagnostic-intro,
.diagnostic-level-card,
.tool-card,
.tool-continue,
.tool-recommendation-card,
.my-tools-section,
.tool-library,
.tool-class-card,
.tool-layer-section,
.tool-domain-section,
.tool-subdomain-section,
.fill-mode-card,
.document-link-form,
.saved-answers,
.empty-state {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 42px rgba(37, 29, 18, .055);
}

.welcome-entry { border-color: rgba(215, 161, 74, .42); }

.entry-kind,
.welcome-entry a,
.panel-title > a,
.section-hero > a,
.document-row > a,
.text-action { color: #8a5a1d; }

.entry-kind span,
.panel-icon {
  color: #0b0c0c;
  background: var(--gold-bright);
}

.system-flow {
  border-color: var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--panel), #eee8dd);
}

.tour-start-button {
  color: var(--ink);
  border-color: var(--gold);
  border-radius: 999px;
  background: transparent;
}

.system-flow-grid {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--line);
}

.system-flow-grid > a { background: var(--panel); }
.system-flow-grid > a:hover { background: #f3eadb; }
.system-flow-grid > a > span { color: #8a5a1d; }

.system-assistant-note > span,
.ai-assistant span { color: #0b0c0c; background: var(--gold-bright); }

.request-banner {
  border-left-color: var(--gold);
  background: var(--orange-soft);
}

.request-banner span,
.request-banner a { color: #7c511b; }

.panel,
.dashboard-guide,
.route-stage,
.stat-strip > div,
.memory-summary > div,
.document-row,
.diagnostic-row,
.diagnostic-question,
.tool-workspace-row,
.my-tool-row {
  border-color: var(--line);
}

.progress-ring {
  background: conic-gradient(var(--gold) var(--progress), #e6dfd4 0);
}

.progress-ring::after { background: var(--panel); }

.status-tag,
.phase-facts span,
.status-pill {
  color: #654317;
  background: #f1e3cb;
}

.route-stage.active {
  border-color: var(--gold);
  background: #fbf3e7;
}

.ai-assistant {
  color: #0b0c0c;
  background: linear-gradient(135deg, var(--gold-bright), #d2943e);
  border: 1px solid #bd7f2e;
  box-shadow: 0 14px 34px rgba(155, 101, 26, .24);
}

.ai-assistant { width: 52px; height: 52px; padding: 10px; justify-content: center; }
.ai-assistant b { position: absolute; right: 62px; width: max-content; padding: 9px 12px; border-radius: 9px; color: var(--cream); background: var(--teal-deep); opacity: 0; transform: translateX(8px); pointer-events: none; transition: .16s ease; }
.ai-assistant:hover b, .ai-assistant:focus-visible b { opacity: 1; transform: translateX(0); }
.ai-assistant span { flex: 0 0 auto; }
.artifact-section { margin-top: 36px; }
.artifact-list { display: grid; gap: 10px; }
.artifact-row { padding: 18px; display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: start; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.artifact-row h3 { margin: 0; }
.artifact-row p { margin: 6px 0; color: var(--muted); line-height: 1.5; font-size: 12px; }
.artifact-row small { color: var(--muted); }

.section-hero { position: relative; max-width: 1040px; padding-right: 210px; }

.section-hero::after {
  content: "";
  display: block;
  width: 76px;
  height: 3px;
  margin-top: 26px;
  background: var(--gold);
}

.constraint-panel { border-left-color: var(--gold); }

.tour-spotlight {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 9999px rgba(8, 9, 9, .8), 0 8px 30px rgba(0,0,0,.28);
}

.tour-tooltip {
  border-color: rgba(215, 161, 74, .65);
  border-radius: 14px;
  background: var(--panel);
}

.tour-tooltip::before { background: var(--panel); }
.tour-tooltip-top { color: #9b651e; }

.tour-actions button {
  color: #0b0c0c;
  background: var(--gold-bright);
  border-radius: 999px;
}

.tour-actions button.quiet {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.login-copy {
  color: var(--cream);
  background: var(--teal-deep);
  border-right: 1px solid rgba(215, 161, 74, .3);
}

.login-copy::after {
  border-color: rgba(215, 161, 74, .2);
  box-shadow: 0 0 0 70px rgba(215, 161, 74, .03), 0 0 0 140px rgba(215, 161, 74, .018);
}

.login-copy .kicker { color: var(--gold-bright); }
.login-copy h1 { color: var(--cream); text-transform: uppercase; }
.lead { color: #d3ccc0; }
.value-list span { border-color: rgba(215, 161, 74, .32); color: #e5dccd; }

.login-card {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 16px;
}

.card-number { color: #e7decf; }
.login-steps b { color: #0b0c0c; background: var(--gold-bright); }

input,
select,
textarea,
.tool-search input,
.tool-status-filter {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(215, 161, 74, .38);
  outline-offset: 1px;
}

@media (max-width: 920px) {
  .sidebar { border-right: 1px solid rgba(215, 161, 74, .28); z-index: 60; }
  .sidebar-close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.1); font-size: 26px; cursor: pointer; }
  .sidebar-backdrop { position: fixed; inset: 0; display: block; border: 0; background: rgba(8,9,9,.58); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 55; }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 620px) {
  .dashboard-head h1,
  .section-hero h1 { font-size: 44px; }

  .welcome-copy h1 { font-size: 46px; }
  .welcome-hero { border-radius: 16px; }
  .section-hero { padding-right: 0; }
  .screen-tour-button { position: static; margin-top: 18px; }
  .layer-card.expanded { padding: 20px 16px; }
  .architecture-subdomain { grid-template-columns: 1fr; }
  .architecture-subdomain > small { grid-column: 1; }
  .diagnostic-complete { align-items: stretch; flex-direction: column; }
  .diagnostic-level-card { min-height: auto; }
  .artifact-row { grid-template-columns: 38px 1fr; }
  .artifact-row > .status-pill { grid-column: 2; justify-self: start; }
  .ai-assistant { right: 14px; bottom: 14px; }
  .ai-assistant b { display: none; }
}
