:root {
    color-scheme: light;
    --bg: #ededed;
    --paper: #ffffff;
    --paper-soft: #f5f5f2;
    --ink: #090a0a;
    --ink-soft: #292b2a;
    --muted: #686b69;
    --muted-2: #929492;
    --line: #d1d3d1;
    --line-strong: #b9bcb9;
    --green: #252bd8;
    --green-dark: #171b78;
    --green-soft: #e9eaff;
    --cobalt: #252bd8;
    --cobalt-dark: #111566;
    --mint: #52b98f;
    --lime: #dced72;
    --lime-soft: #f2f7d4;
    --blue: #6f5ac7;
    --blue-soft: #eeeafd;
    --orange: #c76b3d;
    --orange-soft: #f8e9e0;
    --rose: #b75162;
    --rose-soft: #f7e7ea;
    --shadow-sm: 0 4px 14px rgba(9, 10, 10, 0.035);
    --shadow-md: 0 16px 42px rgba(9, 10, 10, 0.1);
    --radius: 3px;
    --radius-sm: 2px;
    --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
    font-family: Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(24, 116, 94, 0.2); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { display: none; }
[hidden] { display: none !important; }

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(460px, 1.05fr) minmax(440px, 0.95fr);
    background: var(--paper);
    transition: opacity 260ms var(--ease), visibility 260ms var(--ease);
}
.auth-screen.hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.auth-showcase {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #14201b;
    color: #f3f6f2;
    padding: 42px 48px;
}
.auth-showcase::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 92%);
}
.auth-showcase::after {
    position: absolute;
    right: -110px;
    bottom: -120px;
    width: 430px;
    height: 430px;
    content: "";
    border: 1px solid rgba(220, 237, 114, 0.24);
    border-radius: 50%;
}
.auth-showcase-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.66); font-size: 13px; font-weight: 650; }
.mini-logo, .brand-logo { display: grid; place-items: center; background: var(--lime); color: #162019; font-family: Georgia, "Songti SC", serif; font-weight: 800; }
.mini-logo { width: 36px; height: 36px; border-radius: var(--radius-sm); font-size: 19px; }
.auth-insight { position: relative; z-index: 2; width: min(620px, 90%); margin: 18vh auto 0; }
.auth-insight > p { margin: 0 0 18px; color: var(--lime); font-size: 13px; font-weight: 750; }
.auth-insight h2 { margin: 0; font-size: 58px; line-height: 1.12; letter-spacing: 0; font-weight: 680; }
.auth-evidence { display: flex; gap: 10px; margin-top: 30px; }
.auth-evidence span { min-height: 32px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; display: inline-flex; align-items: center; padding: 0 12px; color: rgba(255,255,255,.72); font-size: 12px; }
.auth-orbit { position: absolute; right: -30px; top: -74px; width: 174px; height: 174px; border: 1px solid rgba(220,237,114,.18); border-radius: 50%; animation: orbitSpin 16s linear infinite; }
.auth-orbit::before, .auth-orbit::after { position: absolute; inset: 28px; content: ""; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.auth-orbit::after { inset: 59px; background: var(--lime); border: 0; box-shadow: 0 0 36px rgba(220,237,114,.24); }
.auth-orbit span, .auth-orbit i, .auth-orbit b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.auth-orbit span { top: 11px; left: 72px; }.auth-orbit i { right: 18px; bottom: 30px; background: #7f9ef6; }.auth-orbit b { left: 15px; bottom: 35px; background: #dc8055; }
.auth-trace { position: absolute; z-index: 2; left: 48px; bottom: 42px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.54); font-size: 12px; }
.auth-trace i { width: 46px; height: 1px; background: rgba(255,255,255,.2); }
.auth-entry { min-height: 100vh; display: grid; place-items: center; padding: 50px; overflow-y: auto; }
.auth-entry-inner { width: min(430px, 100%); }
.mobile-auth-brand { display: none; align-items: center; gap: 10px; margin-bottom: 40px; }
.auth-entry .overline { margin-bottom: 14px; color: var(--green); }
.auth-entry h1 { margin: 0; font-size: 48px; line-height: 1.12; letter-spacing: 0; }
.auth-lead { margin: 20px 0 30px; color: var(--muted); line-height: 1.75; }
.demo-button { width: 100%; min-height: 52px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-weight: 720; box-shadow: var(--shadow-sm); transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.demo-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.demo-button svg { color: var(--lime); }
.auth-divider { position: relative; height: 44px; display: grid; place-items: center; color: var(--muted-2); font-size: 12px; }
.auth-divider::before { position: absolute; left: 0; right: 0; height: 1px; content: ""; background: var(--line); }
.auth-divider span { position: relative; background: var(--paper); padding: 0 10px; }
.auth-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.auth-form input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); color: var(--ink); padding: 0 13px; }
.secondary-auth-button { grid-column: 1 / -1; min-height: 46px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-weight: 700; }
.secondary-auth-button:hover { background: var(--paper-soft); }
.secondary-auth-button.cloud-register-button {
    border-color: transparent;
    background: #2d3944;
    color: #fff;
    box-shadow: 0 10px 24px rgba(45,57,68,.16), inset 0 1px rgba(255,255,255,.12);
}
.secondary-auth-button.cloud-register-button:hover { background: #26313b; color: #fff; }
.auth-message { min-height: 20px; margin: 12px 0 0; color: var(--muted-2); font-size: 12px; line-height: 1.55; }
.auth-message.error { color: var(--rose); }
body.auth-locked .app-shell { display: none; }

.app-shell { display: grid; grid-template-columns: 242px minmax(640px, 1fr) 326px; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    border-right: 1px solid var(--line);
    background: #f7f8f4;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 14px;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.brand { color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 36px; height: 36px; border-radius: var(--radius-sm); font-size: 18px; box-shadow: inset 0 0 0 1px rgba(21,25,22,.08); }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.icon-button { position: relative; width: 36px; height: 36px; flex: none; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); display: grid; place-items: center; transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease); }
.icon-button:hover { border-color: var(--line); background: var(--paper); color: var(--ink); }
.sidebar-close, .mobile-menu { display: none; }
.workspace-switcher { width: 100%; min-height: 58px; margin: 22px 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; grid-template-columns: 34px minmax(0,1fr) 16px; align-items: center; gap: 10px; padding: 0 10px; text-align: left; box-shadow: var(--shadow-sm); }
.workspace-switcher .workspace-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.workspace-switcher > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.workspace-switcher small { color: var(--muted-2); font-size: 9px; text-transform: uppercase; }
.workspace-switcher strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher svg { width: 14px; transform: rotate(90deg); color: var(--muted-2); }
.main-nav { display: grid; gap: 5px; }
.nav-item { position: relative; width: 100%; min-height: 42px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 11px; text-align: left; transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.nav-item::before { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 4px 4px 0; content: ""; background: var(--green); transform: scaleY(0); transition: transform 160ms var(--ease); }
.nav-item:hover { background: rgba(255,255,255,.72); color: var(--ink); transform: translateX(2px); }
.nav-item.active { background: var(--paper); color: var(--ink); box-shadow: 0 4px 14px rgba(19,28,23,.05); font-weight: 700; }
.nav-item.active::before { transform: scaleY(1); }
.nav-item svg { width: 17px; }
.nav-item em { min-width: 23px; height: 21px; border-radius: 999px; background: #e9ece7; color: var(--muted); display: grid; place-items: center; padding: 0 6px; font-size: 10px; font-style: normal; }
.nav-item b { border-radius: 3px; background: var(--lime-soft); color: #687526; padding: 3px 5px; font-size: 8px; letter-spacing: .05em; }
.nav-label { margin: 28px 11px 8px; color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-spacer { flex: 1; min-height: 18px; }
.engine-status { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 8px; }
.engine-status div { display: flex; align-items: center; gap: 7px; }
.engine-status strong { font-size: 11px; }
.engine-status p { margin: 6px 0 0 14px; color: var(--muted-2); font-size: 9px; }
.status-dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #39a978; box-shadow: 0 0 0 4px rgba(57,169,120,.12); }
.profile-row { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr) 36px; align-items: center; gap: 9px; margin-top: 12px; padding: 0 4px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1e2b25; color: var(--lime); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.profile-row > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.profile-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-row small { color: var(--muted-2); font-size: 9px; }
.profile-menu { position: absolute; z-index: 60; left: 2px; right: 2px; bottom: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-md); padding: 6px; }
.profile-menu button, .profile-menu label { width: 100%; min-height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); display: flex; align-items: center; gap: 8px; padding: 0 9px; font-size: 11px; }
.profile-menu button:hover, .profile-menu label:hover { background: var(--paper-soft); }
.profile-menu svg { width: 15px; color: var(--muted); }
.profile-menu input { display: none; }

.main-stage { min-width: 0; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 20; height: 70px; border-bottom: 1px solid rgba(203,209,203,.8); background: rgba(243,244,240,.9); backdrop-filter: blur(18px); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 12px; }
.breadcrumb svg { width: 12px; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.search-trigger { width: 196px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.74); color: var(--muted); display: grid; grid-template-columns: 17px 1fr auto; align-items: center; gap: 8px; padding: 0 9px; text-align: left; }
.search-trigger svg { width: 15px; }
.search-trigger span { font-size: 11px; }
kbd { border: 1px solid var(--line); border-radius: 4px; background: var(--paper-soft); color: var(--muted-2); padding: 2px 5px; font-family: inherit; font-size: 9px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 2px solid var(--bg); border-radius: 50%; background: var(--orange); }
.primary-button, .outline-button, .ghost-button, .text-button { min-height: 42px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; font-weight: 700; transition: transform 170ms var(--ease), box-shadow 170ms var(--ease), background 170ms var(--ease); }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: #fff; box-shadow: 0 7px 18px rgba(21,25,22,.13); }
.primary-button svg { color: var(--lime); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21,25,22,.2); }
.primary-button.compact { min-height: 36px; padding: 0 12px; font-size: 11px; }
.primary-button.compact svg { width: 15px; }
.outline-button { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.outline-button:hover { background: var(--paper-soft); transform: translateY(-1px); }
.ghost-button { border: 0; background: transparent; color: var(--muted); }
.text-button { min-height: 34px; border: 0; background: transparent; color: var(--green); padding: 0; font-size: 11px; }
.text-button svg { width: 14px; }

.view-stack { max-width: 1180px; margin: 0 auto; padding: 44px 38px 72px; }
.app-view { display: none; animation: viewIn 330ms var(--ease) both; }
.app-view.active { display: block; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-heading h1 { max-width: 780px; margin: 0; font-size: 42px; line-height: 1.12; letter-spacing: 0; font-weight: 680; }
.page-heading > div > p:last-child { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.overline { margin: 0 0 9px; color: var(--green); display: flex; align-items: center; gap: 9px; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.heading-actions { flex: none; display: flex; gap: 8px; }
.compact-heading { align-items: center; }
.compact-heading h1 { font-size: 36px; }

.focus-board { position: relative; min-height: 360px; overflow: hidden; border-radius: var(--radius); background: #18231e; color: #f7faf6; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); box-shadow: var(--shadow-md); }
.focus-board::before { position: absolute; inset: 0; content: ""; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(90deg, transparent, black); }
.focus-copy { position: relative; z-index: 2; align-self: center; padding: 42px; }
.section-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--lime); font-size: 10px; font-weight: 780; letter-spacing: .08em; }
.confidence { height: 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: rgba(255,255,255,.64); display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; letter-spacing: 0; }
.confidence i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.confidence strong { color: #fff; }
.focus-copy h2 { max-width: 660px; margin: 26px 0 16px; font-size: 35px; line-height: 1.22; letter-spacing: 0; font-weight: 640; }
.focus-copy > p { max-width: 650px; margin: 0; color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.8; }
.evidence-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 16px; margin-top: 28px; color: rgba(255,255,255,.48); font-size: 10px; }
.evidence-row button { min-height: 32px; border: 1px solid rgba(220,237,114,.32); border-radius: 999px; background: rgba(220,237,114,.08); color: var(--lime); display: flex; align-items: center; gap: 6px; padding: 0 11px; }
.evidence-row button:hover { background: rgba(220,237,114,.14); }
.evidence-row svg { width: 13px; }
.focus-visual { position: relative; min-height: 360px; }
.core-node { position: absolute; z-index: 3; left: 50%; top: 50%; width: 130px; height: 130px; border: 1px solid rgba(220,237,114,.4); border-radius: 50%; background: #22322b; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: translate(-50%,-50%); box-shadow: 0 0 0 18px rgba(220,237,114,.035), 0 0 0 38px rgba(220,237,114,.025); animation: corePulse 4s ease-in-out infinite; }
.core-node svg { width: 24px; height: 24px; color: var(--lime); }
.core-node strong { margin-top: 8px; font-size: 12px; }
.core-node span { margin-top: 3px; color: rgba(255,255,255,.42); font-size: 8px; }
.signal-node { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.65); font-size: 9px; }
.signal-node i { width: 8px; height: 8px; border-radius: 50%; background: #7f9ef6; box-shadow: 0 0 0 6px rgba(127,158,246,.08); }
.node-a { left: 10%; top: 22%; }.node-b { right: 8%; top: 31%; }.node-c { right: 17%; bottom: 18%; }.node-c i { background: var(--lime); box-shadow: 0 0 0 6px rgba(220,237,114,.08); }
.connector { position: absolute; z-index: 1; height: 1px; background: rgba(255,255,255,.14); transform-origin: left; }
.line-a { left: 24%; top: 31%; width: 31%; transform: rotate(23deg); }.line-b { left: 61%; top: 50%; width: 24%; transform: rotate(-32deg); }.line-c { left: 58%; top: 59%; width: 27%; transform: rotate(32deg); }

.metric-band { min-height: 116px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; grid-template-columns: repeat(3, .72fr) 1.35fr; box-shadow: var(--shadow-sm); }
.metric-item { position: relative; min-width: 0; display: grid; align-content: center; padding: 18px 22px; }
.metric-item + .metric-item::before { position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; content: ""; background: var(--line); }
.metric-item > span { color: var(--muted); font-size: 10px; }
.metric-item strong { margin-top: 6px; font-size: 28px; line-height: 1; }
.metric-item small { margin-top: 6px; color: var(--green); font-size: 9px; }
.chart-metric { grid-template-columns: 112px minmax(0,1fr); align-items: center; align-content: center; gap: 10px; }
.chart-metric > span { align-self: start; margin-top: 7px; }
.mini-bars { height: 64px; display: flex; align-items: end; gap: 7px; }
.mini-bars div { flex: 1; min-width: 6px; height: var(--height); border-radius: 3px 3px 0 0; background: #dce1dc; transition: height 420ms var(--ease), background 180ms var(--ease); }
.mini-bars div.active { background: var(--green); }
.mini-bars div:hover { background: var(--lime); }

.overview-columns { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(270px,.82fr); gap: 14px; margin-top: 14px; }
.content-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); padding: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head .overline { margin-bottom: 5px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-count { border-radius: 999px; background: var(--paper-soft); color: var(--muted); padding: 6px 9px; font-size: 9px; }
.signal-list { display: grid; }
.signal-row { min-width: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 15px 2px; cursor: pointer; transition: background 160ms var(--ease); }
.signal-row:hover { background: var(--paper-soft); }
.signal-row:first-child { border-top: 0; }
.signal-type { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; }
.signal-type svg { width: 15px; }
.signal-type.idea { background: var(--lime-soft); color: #6c7924; }.signal-type.diary { background: var(--blue-soft); color: var(--blue); }.signal-type.review { background: var(--orange-soft); color: var(--orange); }.signal-type.task { background: var(--green-soft); color: var(--green); }
.signal-copy { min-width: 0; }
.signal-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.signal-copy p { margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.signal-meta { display: grid; justify-items: end; gap: 6px; color: var(--muted-2); font-size: 9px; }
.signal-meta em { border-radius: 999px; background: var(--paper-soft); color: var(--muted); padding: 4px 7px; font-style: normal; }
.action-list { display: grid; gap: 7px; }
.action-row { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-soft); display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 10px; padding: 12px; }
.action-check { width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.action-check svg { width: 13px; opacity: 0; }
.action-row.done .action-check { border-color: var(--green); background: var(--green); color: #fff; }.action-row.done .action-check svg { opacity: 1; }.action-row.done strong { color: var(--muted); text-decoration: line-through; }
.action-row strong { display: block; font-size: 11px; line-height: 1.45; }
.action-row p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.action-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }

.library-toolbar { min-height: 62px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; grid-template-columns: minmax(210px,1fr) auto auto; align-items: center; gap: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.inline-search { min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-soft); display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 8px; padding: 0 11px; }
.inline-search svg { width: 15px; color: var(--muted); }
.inline-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.filter-tabs { display: flex; gap: 3px; }
.filter-tabs button { min-height: 34px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); padding: 0 10px; font-size: 10px; }
.filter-tabs button:hover, .filter-tabs button.active { background: var(--green-soft); color: var(--green); font-weight: 700; }
#sortSelect { height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--muted); padding: 0 9px; font-size: 10px; }
.library-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 2px 10px; }
.library-summary strong { font-size: 12px; }.library-summary span { color: var(--muted); font-size: 10px; }
.library-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.library-item { position: relative; min-height: 104px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(0,1fr) 136px 82px; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; transition: background 160ms var(--ease); }
.library-item:first-child { border-top: 0; }
.library-item:hover { background: var(--paper-soft); }
.library-item .signal-type { width: 40px; height: 40px; }
.library-copy { min-width: 0; }
.library-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.library-copy p { margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.library-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.library-tags span { border-radius: 999px; background: var(--paper-soft); color: var(--muted); padding: 4px 7px; font-size: 8px; }
.library-time { color: var(--muted-2); font-size: 9px; text-align: right; }
.empty-panel { min-height: 280px; display: grid; place-items: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-panel svg { width: 30px; height: 30px; margin-bottom: 10px; }

.insight-hero { min-height: 196px; border: 1px solid #cfd7cf; border-radius: var(--radius); background: #edf2e8; display: grid; grid-template-columns: minmax(0,1fr) 140px; align-items: center; gap: 30px; padding: 32px 40px; }
.insight-hero > div:first-child > span { color: var(--green); font-size: 10px; font-weight: 750; }
.insight-hero h2 { max-width: 730px; margin: 12px 0 0; font-size: 28px; line-height: 1.4; font-weight: 600; }
.confidence-ring { --score: 86; width: 112px; height: 112px; justify-self: end; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), #d7ded6 0); display: grid; place-items: center; position: relative; }
.confidence-ring::before { position: absolute; inset: 8px; border-radius: 50%; content: ""; background: #edf2e8; }
.confidence-ring strong, .confidence-ring span { position: relative; z-index: 1; grid-area: 1/1; }.confidence-ring strong { margin-top: -13px; font-size: 26px; }.confidence-ring span { margin-top: 30px; color: var(--muted); font-size: 8px; }
.insight-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.insight-card { position: relative; min-height: 280px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: flex; flex-direction: column; padding: 22px; box-shadow: var(--shadow-sm); transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.insight-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.insight-card::before { position: absolute; left: 0; top: 22px; width: 3px; height: 42px; border-radius: 0 3px 3px 0; content: ""; background: var(--accent, var(--green)); }
.insight-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.insight-card-head span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.insight-card-head em { border-radius: 999px; background: var(--paper-soft); color: var(--green); padding: 5px 7px; font-size: 8px; font-style: normal; }
.insight-card h3 { margin: 24px 0 12px; font-size: 18px; line-height: 1.42; }
.insight-card > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.insight-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; }
.insight-card footer button { min-height: 30px; border: 0; background: transparent; color: var(--green); padding: 0; font-size: 9px; }
.insight-card footer span { color: var(--muted-2); font-size: 8px; }
.assumption-section { margin-top: 28px; }
.assumption-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.assumption-row { min-height: 74px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) 106px auto; align-items: center; gap: 18px; padding: 13px 18px; }
.assumption-row:first-child { border-top: 0; }
.assumption-row strong { display: block; font-size: 11px; }.assumption-row p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.assumption-status { color: var(--orange); font-size: 9px; }
.assumption-actions { display: flex; gap: 5px; }
.assumption-actions button { min-height: 30px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding: 0 9px; color: var(--muted); font-size: 9px; }
.assumption-actions button:hover { border-color: var(--green); color: var(--green); }

.action-progress { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 22px; box-shadow: var(--shadow-sm); }
.action-progress > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.action-progress span { color: var(--muted); font-size: 10px; }.action-progress strong { font-size: 28px; }
.progress-track { height: 8px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: #ecefeb; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 500ms var(--ease); }
.action-progress p { margin: 10px 0 0; color: var(--muted); font-size: 9px; }
.action-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.action-board > section { min-height: 430px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.52); padding: 16px; }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 12px; color: var(--muted); font-size: 10px; }
.board-head em { min-width: 23px; height: 22px; border-radius: 999px; background: var(--paper); display: grid; place-items: center; font-style: normal; }
.board-list { display: grid; gap: 8px; }
.board-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 10px; padding: 14px; box-shadow: 0 4px 14px rgba(19,28,23,.04); }
.board-card .action-check { margin-top: 1px; }
.board-card strong { display: block; font-size: 11px; line-height: 1.45; }.board-card p { margin: 7px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }.board-card footer { display: flex; justify-content: space-between; gap: 8px; color: var(--muted-2); font-size: 8px; }
.board-card.done { opacity: .72; }.board-card.done strong { text-decoration: line-through; }

.weekly-report { border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcf8; box-shadow: var(--shadow-md); overflow: hidden; }
.weekly-report > header { min-height: 54px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.weekly-opening { padding: 48px 9%; text-align: center; }
.weekly-opening p { margin: 0 0 15px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.weekly-opening h2 { max-width: 760px; margin: 0 auto; font-family: Georgia, "Songti SC", serif; font-size: 32px; line-height: 1.52; font-weight: 500; }
.weekly-grid { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.weekly-grid section { min-height: 210px; border-bottom: 1px solid var(--line); padding: 28px; }
.weekly-grid section:nth-child(odd) { border-right: 1px solid var(--line); }
.weekly-grid span { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.weekly-grid h3 { margin: 18px 0 10px; font-size: 18px; }.weekly-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.weekly-next { background: #17231e; color: #fff; }.weekly-next span { color: var(--lime); }.weekly-next p { color: rgba(255,255,255,.6); }.weekly-next button { min-height: 34px; margin-top: 20px; border: 0; background: transparent; color: var(--lime); display: flex; align-items: center; gap: 7px; padding: 0; font-size: 9px; }.weekly-next button svg { width: 14px; }
.weekly-report > footer { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px; color: var(--muted-2); font-size: 8px; }

.method-heading { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.case-badge { flex: none; border: 1px solid #b9c49c; border-radius: 999px; background: var(--lime-soft); color: #617027; padding: 8px 11px; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.case-intro { min-height: 260px; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr); gap: 60px; align-items: center; padding: 36px 0 50px; }
.case-intro > div > span { color: var(--green); font-size: 9px; font-weight: 800; }.case-intro h2 { max-width: 720px; margin: 16px 0 0; font-size: 31px; line-height: 1.45; font-weight: 580; }
.case-intro dl { margin: 0; border-left: 1px solid var(--line); padding-left: 28px; }.case-intro dl div { padding: 12px 0; border-top: 1px solid var(--line); }.case-intro dl div:first-child { border-top: 0; }.case-intro dt { color: var(--muted); font-size: 9px; }.case-intro dd { margin: 6px 0 0; font-size: 11px; font-weight: 700; }
.case-section-title { border-top: 1px solid var(--line); display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 34px 0 22px; }.case-section-title > span { color: var(--green); font-family: Georgia,serif; font-size: 22px; }.case-section-title p { margin: 0 0 7px; color: var(--muted); font-size: 8px; letter-spacing: .1em; }.case-section-title h2 { margin: 0; font-size: 22px; }
.role-contract { min-height: 330px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; grid-template-columns: 1fr 110px 1fr; align-items: stretch; box-shadow: var(--shadow-sm); }
.role-column { padding: 32px; }.role-icon { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; }.role-icon svg { width: 21px; }.ai-role .role-icon { background: var(--green-soft); color: var(--green); }.human-role .role-icon { background: var(--orange-soft); color: var(--orange); }
.role-column > span { display: block; margin-top: 22px; color: var(--muted); font-size: 9px; }.role-column h3 { margin: 8px 0 20px; font-size: 17px; }.role-column ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }.role-column li { position: relative; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.5; }.role-column li::before { position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; content: ""; background: var(--green); }.human-role li::before { background: var(--orange); }
.contract-line { position: relative; border-left: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; }.contract-line span { color: var(--muted); font-size: 8px; }.contract-line strong { margin-top: 7px; font-size: 14px; }.contract-line i { width: 24px; height: 24px; margin-top: 12px; border: 6px solid var(--lime-soft); border-radius: 50%; background: var(--lime); }
.metric-framework { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.north-star, .guardrail { min-height: 235px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 28px; }.north-star > span, .guardrail > span { color: var(--green); font-size: 9px; font-weight: 800; }.north-star strong { display: block; margin-top: 42px; font-size: 24px; }.north-star p { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }.guardrail ul { margin: 28px 0 0; padding: 0; list-style: none; }.guardrail li { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; font-size: 10px; }.guardrail li em { color: var(--muted); font-size: 8px; font-style: normal; }
.roadmap { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }.roadmap-item { position: relative; min-height: 250px; border-left: 1px solid var(--line); padding: 26px; }.roadmap-item:first-child { border-left: 0; }.roadmap-item > span { color: var(--muted); font-size: 8px; letter-spacing: .08em; }.roadmap-item h3 { margin: 28px 0 12px; font-size: 17px; }.roadmap-item p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }.roadmap-item em { position: absolute; left: 26px; bottom: 24px; border-radius: 999px; background: var(--paper-soft); color: var(--muted); padding: 6px 9px; font-size: 8px; font-style: normal; }.roadmap-item.complete { background: #19251f; color: #fff; }.roadmap-item.complete > span { color: var(--lime); }.roadmap-item.complete p { color: rgba(255,255,255,.6); }.roadmap-item.complete em { background: var(--lime); color: #263014; }

.ai-rail { position: sticky; top: 0; z-index: 25; height: 100vh; border-left: 1px solid var(--line); background: #fafbf8; display: flex; flex-direction: column; padding: 18px; overflow-y: auto; }
.ai-rail > header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-rail > header > div { display: flex; align-items: center; gap: 9px; }.ai-rail > header > div > span:last-child { display: grid; gap: 3px; }.ai-rail > header strong { font-size: 12px; }.ai-rail > header small { color: var(--muted-2); font-size: 8px; }
.ai-mark { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--ink); color: var(--lime); display: grid; place-items: center; }.ai-mark svg { width: 16px; }
.rail-close { display: none; }
.reasoning-card { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 15px; }
.reasoning-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }.reasoning-head em { font-style: normal; }
.reasoning-steps { display: grid; gap: 13px; margin-top: 15px; }
.reasoning-steps > div { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.reasoning-steps > div:not(:last-child)::after { position: absolute; left: 10px; top: 22px; bottom: -12px; width: 1px; content: ""; background: var(--line); }
.reasoning-steps i { z-index: 1; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--green); }.reasoning-steps i svg { width: 11px; }.reasoning-steps span { display: grid; gap: 3px; }.reasoning-steps strong { font-size: 9px; }.reasoning-steps small { color: var(--muted-2); font-size: 8px; }
.reasoning-steps.analyzing > div { opacity: .4; }.reasoning-steps.analyzing > div.active { opacity: 1; }.reasoning-steps.analyzing > div.active i { border-color: var(--lime); background: var(--lime-soft); animation: stepPulse 1s ease-in-out infinite; }
.rail-insight { margin-top: 16px; border-radius: var(--radius); background: #19251f; color: #fff; padding: 18px; }
.rail-label { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .08em; }.rail-insight h2 { margin: 13px 0 9px; font-size: 16px; line-height: 1.5; }.rail-insight p { margin: 0; color: rgba(255,255,255,.56); font-size: 9px; line-height: 1.65; }.rail-insight button { width: 100%; min-height: 36px; margin-top: 16px; border: 1px solid rgba(220,237,114,.3); border-radius: var(--radius-sm); background: rgba(220,237,114,.08); color: var(--lime); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 9px; }.rail-insight button svg { width: 13px; }
.rail-evidence { margin-top: 20px; }.rail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }.rail-section-head button { border: 0; background: transparent; color: var(--green); padding: 0; font-size: 8px; }
#railEvidenceList { display: grid; gap: 7px; margin-top: 10px; }.rail-evidence-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding: 10px; cursor: pointer; }.rail-evidence-item:hover { border-color: var(--line-strong); }.rail-evidence-item strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.rail-evidence-item p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rail-spacer { flex: 1; min-height: 20px; }
.ai-composer { border-top: 1px solid var(--line); padding-top: 15px; }.ai-composer label { color: var(--muted); font-size: 8px; }.ai-composer > div { min-height: 68px; margin-top: 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; grid-template-columns: 1fr 32px; align-items: end; gap: 6px; padding: 8px; }.ai-composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font-size: 9px; line-height: 1.5; }.ai-composer button { width: 30px; height: 30px; border: 0; border-radius: var(--radius-sm); background: var(--ink); color: var(--lime); display: grid; place-items: center; }.ai-composer button svg { width: 13px; }.ai-composer > p { margin: 7px 0 0; color: var(--muted-2); font-size: 7px; }

.modal-backdrop, .drawer-backdrop, .command-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(18,24,20,.42); backdrop-filter: blur(5px); }
.modal-backdrop { display: grid; place-items: center; padding: 22px; }
.capture-modal { width: min(660px,100%); max-height: min(760px,calc(100vh - 44px)); overflow-y: auto; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); background: var(--paper); box-shadow: 0 30px 90px rgba(18,24,20,.25); animation: modalIn 220ms var(--ease); }
.capture-modal > header { min-height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 22px; }.capture-modal > header > div { display: flex; align-items: center; gap: 11px; }.capture-modal > header > div > span:last-child { display: grid; gap: 3px; }.capture-modal > header strong { font-size: 13px; }.capture-modal > header small { color: var(--muted); font-size: 9px; }
.modal-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); display: grid; place-items: center; }.modal-icon svg { width: 16px; }
#noteForm { display: grid; gap: 14px; padding: 22px; }
.capture-types { display: flex; gap: 5px; }.capture-types button { min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); padding: 0 12px; font-size: 9px; }.capture-types button:hover, .capture-types button.active { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 700; }
#noteTitle { height: 48px; border: 0; border-bottom: 1px solid var(--line); outline: 0; color: var(--ink); font-size: 19px; font-weight: 650; }
#noteContent { width: 100%; min-height: 180px; border: 0; outline: 0; resize: vertical; color: var(--ink); font-size: 13px; line-height: 1.8; }
.capture-meta { display: grid; grid-template-columns: 1fr 120px; gap: 9px; }.capture-meta input, .capture-meta select { height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-soft); color: var(--muted); padding: 0 11px; font-size: 10px; }
#noteForm footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; color: var(--muted-2); font-size: 8px; }#noteForm footer > div { display: flex; gap: 6px; }

.detail-drawer { position: fixed; z-index: 90; top: 0; right: 0; width: min(480px,100%); height: 100vh; background: var(--paper); box-shadow: -20px 0 60px rgba(18,24,20,.16); transform: translateX(102%); transition: transform 260ms var(--ease); overflow-y: auto; }.detail-drawer.open { transform: translateX(0); }.detail-drawer > header { position: sticky; top: 0; z-index: 2; min-height: 64px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }.detail-drawer > header > span { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.detail-body { padding: 30px 26px 60px; }.detail-body h2 { margin: 0; font-size: 28px; line-height: 1.3; }.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }.detail-meta span { border-radius: 999px; background: var(--paper-soft); color: var(--muted); padding: 6px 9px; font-size: 8px; }.detail-content { margin-top: 26px; color: var(--ink-soft); font-size: 12px; line-height: 1.9; white-space: pre-wrap; }.detail-divider { height: 1px; margin: 28px 0; background: var(--line); }.detail-ai { border-left: 3px solid var(--lime); background: #f6f8ec; padding: 18px; }.detail-ai span { color: var(--green); font-size: 8px; font-weight: 800; }.detail-ai p { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.75; }.detail-actions { display: flex; gap: 7px; margin-top: 24px; }.detail-actions button { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--muted); font-size: 9px; }.detail-actions button:hover { border-color: var(--green); color: var(--green); }.detail-actions button.danger:hover { border-color: var(--rose); color: var(--rose); }.detail-actions svg { width: 14px; }
.evidence-detail-list { display: grid; gap: 8px; }

.command-backdrop { display: grid; place-items: start center; padding: 12vh 20px 20px; }
.command-palette { width: min(620px,100%); max-height: 66vh; overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius); background: var(--paper); box-shadow: 0 30px 80px rgba(18,24,20,.25); animation: modalIn 190ms var(--ease); }.command-input { height: 62px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 0 18px; }.command-input svg { color: var(--muted); }.command-input input { min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: 14px; }.command-results { max-height: calc(66vh - 62px); overflow-y: auto; padding: 7px; }.command-result { width: 100%; min-height: 54px; border: 0; border-radius: var(--radius-sm); background: transparent; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; text-align: left; }.command-result:hover { background: var(--paper-soft); }.command-result > span { min-width: 0; display: grid; gap: 4px; }.command-result strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.command-result small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.command-result em { color: var(--muted-2); font-size: 8px; font-style: normal; }.command-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 28px; min-width: 160px; max-width: min(420px,calc(100vw - 28px)); min-height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: #17211c; color: #fff; display: grid; place-items: center; padding: 9px 14px; font-size: 10px; text-align: center; box-shadow: var(--shadow-md); opacity: 0; transform: translate(-50%,12px); pointer-events: none; transition: opacity 180ms var(--ease), transform 180ms var(--ease); }.toast.show { opacity: 1; transform: translate(-50%,0); }
.error-modal-backdrop { z-index: 150; }
.error-dialog { position: relative; width: min(440px,100%); border: 1px solid rgba(255,255,255,.82); border-radius: 24px; background: rgba(250,251,252,.94); box-shadow: 0 30px 90px rgba(29,29,31,.24), inset 0 1px #fff; backdrop-filter: blur(30px) saturate(165%); -webkit-backdrop-filter: blur(30px) saturate(165%); padding: 34px; animation: glassSheetIn 240ms var(--ease); }
.error-dialog-close { position: absolute; top: 18px; right: 18px; }
.error-dialog-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(177,79,92,.1); color: #b14f5c; display: grid; place-items: center; }
.error-dialog-icon svg { width: 22px; height: 22px; }
.error-dialog .overline { margin: 24px 0 8px; color: #9a5c64; }
.error-dialog h2 { margin: 0; color: #172129; font-size: 25px; line-height: 1.3; }
.error-dialog > p:not(.overline) { margin: 12px 0 0; color: #5f6b75; font-size: 13px; line-height: 1.7; }
.error-dialog-guidance { margin-top: 22px; border-left: 3px solid rgba(177,79,92,.52); background: rgba(177,79,92,.055); display: grid; gap: 6px; padding: 14px 16px; }
.error-dialog-guidance strong { color: #9a4f59; font-size: 10px; }
.error-dialog-guidance span { color: #68747e; font-size: 11px; line-height: 1.6; }
.error-dialog-primary { width: 100%; min-height: 46px; margin-top: 24px; border: 0; border-radius: 13px; background: #2d3944; color: #fff; font-weight: 750; }

/* Editorial technology system, adapted from the supplied visual reference. */
.auth-showcase { background: var(--cobalt); }
.auth-showcase::before {
    background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 62px 62px;
}
.auth-showcase::after { border-color: rgba(220,237,114,.52); }
.auth-insight h2 { max-width: 680px; font-weight: 500; }
.auth-evidence span { border-style: dashed; }
.brand-logo { border: 1px solid var(--ink); background: var(--ink); color: #fff; box-shadow: none; }
.sidebar { background: var(--paper); }
.workspace-switcher, .content-section, .metric-band, .library-list, .library-toolbar, .action-progress, .insight-card, .weekly-report { box-shadow: none; }
.workspace-switcher { border-style: dashed; }
.nav-item.active { background: var(--cobalt); color: #fff; box-shadow: none; }
.nav-item.active::before { background: var(--lime); }
.nav-item.active em { background: rgba(255,255,255,.16); color: #fff; }
.nav-item.active svg { color: var(--lime); }
.topbar { background: rgba(255,255,255,.92); }
.main-stage { background: var(--bg); }
.view-stack { max-width: 1220px; }
.page-heading h1 { font-weight: 520; }
.overline { letter-spacing: .16em; }
.primary-button { border-color: var(--ink); background: var(--ink); box-shadow: none; }
.primary-button:hover { box-shadow: 5px 5px 0 var(--cobalt); transform: translate(-2px,-2px); }
.outline-button:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.focus-board {
    --board-x: 0px;
    --board-y: 0px;
    border: 1px solid #1519a4;
    background: var(--cobalt);
    box-shadow: none;
}
.focus-board::before {
    background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: none;
}
.focus-copy { padding: 48px; }
.focus-copy h2 { font-weight: 500; }
.focus-copy > p { color: rgba(255,255,255,.74); }
.section-kicker { color: var(--lime); }
.confidence { border-style: dashed; }
.evidence-row { color: rgba(255,255,255,.62); }
.evidence-row button { border-color: rgba(255,255,255,.45); border-style: dashed; background: rgba(0,0,0,.12); }
.focus-visual { transform: translate3d(var(--board-x),var(--board-y),0); transition: transform 280ms var(--ease); }
.core-node { border-color: rgba(255,255,255,.58); background: var(--cobalt-dark); }
.signal-node i { background: var(--mint); box-shadow: 0 0 0 6px rgba(82,185,143,.16); }
.node-b i { background: var(--orange); box-shadow: 0 0 0 6px rgba(199,107,61,.15); }
.node-c i { background: var(--lime); }
.connector { border-top: 1px dashed rgba(255,255,255,.34); background: transparent; }

.metric-band { border-radius: 0; }
.metric-item + .metric-item::before { top: 0; bottom: 0; background: transparent; border-left: 1px dashed var(--line); }
.mini-bars div.active { background: var(--cobalt); }
.mini-bars div:hover { background: var(--mint); }
.content-section { border-radius: 0; }
.signal-section { overflow: hidden; padding: 0; }
.signal-section .section-head { margin: 0; padding: 22px; }
.signal-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px dashed var(--line); }
.signal-row {
    min-height: 164px;
    border: 0;
    border-right: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 18px;
    transition: background 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease);
}
.signal-row:nth-child(2n) { border-right: 0; }
.signal-row:nth-last-child(-n+2) { border-bottom: 0; }
.signal-row:hover, .signal-row.featured { background: var(--cobalt); color: #fff; }
.signal-list:hover .signal-row.featured:not(:hover) { background: var(--paper); color: var(--ink); }
.signal-row:hover { transform: translateY(-2px); }
.signal-row .signal-type { transition: background 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease); }
.signal-row:hover .signal-type, .signal-row.featured .signal-type { background: rgba(255,255,255,.13); color: var(--lime); transform: rotate(-4deg); }
.signal-list:hover .signal-row.featured:not(:hover) .signal-type { background: var(--blue-soft); color: var(--blue); transform: none; }
.signal-copy p { display: -webkit-box; overflow: hidden; color: var(--muted); white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.signal-row:hover .signal-copy p, .signal-row.featured .signal-copy p { color: rgba(255,255,255,.68); }
.signal-list:hover .signal-row.featured:not(:hover) .signal-copy p { color: var(--muted); }
.signal-meta { width: 100%; margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.signal-row:hover .signal-meta, .signal-row.featured .signal-meta { color: rgba(255,255,255,.58); }
.signal-row:hover .signal-meta em, .signal-row.featured .signal-meta em { background: rgba(255,255,255,.13); color: #fff; }
.signal-list:hover .signal-row.featured:not(:hover) .signal-meta { color: var(--muted-2); }
.signal-list:hover .signal-row.featured:not(:hover) .signal-meta em { background: var(--paper-soft); color: var(--muted); }

.library-toolbar, .library-list, .assumption-table, .action-progress, .action-board > section { border-radius: 0; }
.library-item { border-top-style: dashed; }
.library-item:hover { background: var(--green-soft); }
.filter-tabs button.active { background: var(--cobalt); color: #fff; }
.insight-hero { border-radius: 0; background: var(--paper); }
.confidence-ring::before { background: var(--paper); }
.insight-card { border-radius: 0; box-shadow: none; }
.insight-card:hover { border-color: var(--cobalt); background: var(--cobalt); color: #fff; box-shadow: none; transform: translateY(-4px); }
.insight-card:hover::before { background: var(--lime); }
.insight-card:hover > p, .insight-card:hover .insight-card-head span, .insight-card:hover footer span { color: rgba(255,255,255,.68); }
.insight-card:hover .insight-card-head em { background: rgba(255,255,255,.14); color: #fff; }
.insight-card:hover footer button { color: var(--lime); }
.assumption-table { border-style: dashed; }
.assumption-row { border-top-style: dashed; }
.progress-track span { background: var(--cobalt); }
.board-card { border-radius: 0; box-shadow: none; transition: border-color 170ms var(--ease), transform 170ms var(--ease); }
.board-card:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.weekly-report { border-radius: 0; }
.weekly-next, .roadmap-item.complete { background: var(--cobalt); }
.role-contract, .north-star, .guardrail, .roadmap { border-radius: 0; box-shadow: none; }
.rail-insight { background: var(--ink); }
.ai-mark { background: var(--cobalt); }
.toast { background: var(--ink); }

/* Apple-inspired material and interaction layer. */
:root {
    --bg: #eef1f5;
    --paper: #ffffff;
    --paper-soft: #f5f5f7;
    --ink: #1d1d1f;
    --ink-soft: #3a3a3c;
    --muted: #6e6e73;
    --muted-2: #98989d;
    --line: rgba(60, 60, 67, 0.12);
    --line-strong: rgba(60, 60, 67, 0.2);
    --green: #007aff;
    --green-dark: #0058b8;
    --green-soft: rgba(0, 122, 255, 0.1);
    --cobalt: #007aff;
    --cobalt-dark: #003f8f;
    --mint: #30b57a;
    --lime: #d8ff5f;
    --lime-soft: #f2ffd0;
    --blue: #5856d6;
    --blue-soft: rgba(88, 86, 214, 0.1);
    --orange: #ff9500;
    --orange-soft: rgba(255, 149, 0, 0.12);
    --rose: #ff375f;
    --rose-soft: rgba(255, 55, 95, 0.1);
    --shadow-sm: 0 8px 24px rgba(21, 31, 46, 0.055), 0 1px 2px rgba(21, 31, 46, 0.04);
    --shadow-md: 0 24px 70px rgba(21, 31, 46, 0.13), 0 2px 8px rgba(21, 31, 46, 0.06);
    --radius: 24px;
    --radius-sm: 15px;
    --ease: cubic-bezier(0.22, 0.82, 0.24, 1);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

body {
    background: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 42%, #e8ecf2 100%);
    background-attachment: fixed;
}
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:active, .workspace-switcher:active, .signal-row:active, .insight-card:active, .board-card:active { transform: scale(.975); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(0,122,255,.24); outline-offset: 2px; }

.auth-screen { background: #eef1f5; }
.auth-showcase {
    min-height: calc(100vh - 24px);
    margin: 12px;
    border-radius: 32px;
    background: linear-gradient(145deg,#168cff 0%,#0877e9 56%,#0062ca 100%);
    box-shadow: 0 28px 70px rgba(0,85,181,.2), inset 0 1px rgba(255,255,255,.32);
}
.auth-showcase::before { background: linear-gradient(125deg,rgba(255,255,255,.18),transparent 28%,transparent 70%,rgba(0,36,98,.15)); mask-image: none; }
.auth-showcase::after { display: none; }
.auth-showcase .mini-logo { border: 1px solid rgba(255,255,255,.34); border-radius: 11px; background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.auth-insight { width: min(640px,88%); }
.auth-insight > p { color: rgba(255,255,255,.74); }
.auth-insight h2 { font-size: 54px; font-weight: 660; }
.auth-evidence span { min-height: 36px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: rgba(255,255,255,.84); box-shadow: inset 0 1px rgba(255,255,255,.2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.auth-orbit { border-color: rgba(255,255,255,.24); }
.auth-orbit::before { border-color: rgba(255,255,255,.16); }
.auth-orbit::after { background: rgba(255,255,255,.9); box-shadow: 0 0 34px rgba(255,255,255,.28); }
.auth-entry { padding: 46px; }
.auth-entry-inner {
    width: min(450px,100%);
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 30px;
    background: rgba(255,255,255,.66);
    box-shadow: 0 24px 70px rgba(29,29,31,.12), inset 0 1px rgba(255,255,255,.95);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    padding: 32px;
}
.auth-entry h1 { font-size: 46px; font-weight: 730; }
.auth-divider span { background: transparent; }
.demo-button { min-height: 54px; border-radius: 16px; background: #007aff; box-shadow: 0 12px 28px rgba(0,122,255,.24), inset 0 1px rgba(255,255,255,.3); }
.demo-button:hover { background: #0a84ff; box-shadow: 0 16px 34px rgba(0,122,255,.29), inset 0 1px rgba(255,255,255,.36); }
.demo-button svg { color: #fff; }
.auth-form input { height: 48px; border: 0; border-radius: 14px; background: rgba(118,118,128,.09); box-shadow: inset 0 1px 2px rgba(29,29,31,.04); }
.auth-field-help { min-height: 16px; color: #8a959e; font-size: 10px; font-weight: 520; line-height: 1.45; }
.auth-field-help.error { color: #b14f5c; font-weight: 650; }
.auth-form input[aria-invalid="true"] { background: rgba(177,79,92,.07); box-shadow: inset 0 0 0 1px rgba(177,79,92,.38), 0 0 0 3px rgba(177,79,92,.06); }
.secondary-auth-button { min-height: 48px; border-color: rgba(255,255,255,.8); border-radius: 14px; background: rgba(255,255,255,.68); box-shadow: inset 0 1px #fff; }
.auth-entry-inner { position: relative; overflow: hidden; }
.auth-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 22px 0 16px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 12px;
    background: rgba(92,112,135,.09);
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(29,29,31,.05);
}
.auth-mode-switch[hidden] { display: none; }
.auth-mode-switch button {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #687480;
    font-weight: 750;
    transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.auth-mode-switch button.active {
    background: rgba(255,255,255,.88);
    color: #1f2932;
    box-shadow: 0 4px 12px rgba(29,34,40,.08), inset 0 1px #fff;
}
.auth-email-support { min-height: 30px; margin: -4px 0 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #7c8790; font-size: 9px; }
.auth-email-support[hidden] { display: none; }
.auth-email-support span { margin-right: 2px; }
.auth-email-support b { border: 1px solid rgba(79,96,110,.1); border-radius: 999px; background: rgba(255,255,255,.44); color: #536575; padding: 4px 7px; font-weight: 700; }
.auth-form label[hidden] { display: none; }
.auth-form.register-mode { grid-template-columns: 1fr; }
.auth-form.register-mode .secondary-auth-button { background: #2d3944; color: #fff; box-shadow: 0 10px 24px rgba(45,57,68,.15); }
.auth-inline-message { grid-column: 1 / -1; min-height: 18px; margin: 0; color: #4a8460; font-size: 11px; line-height: 1.5; }
.auth-inline-message[hidden] { display: none; }
.auth-inline-message.error { color: #b14f5c; }
.auth-otp-panel { display: grid; gap: 14px; margin-top: 22px; animation: authOtpIn 260ms var(--ease) both; }
.auth-otp-panel[hidden] { display: none; }
.auth-otp-panel .overline { margin: 0; color: #7a6432; }
.auth-otp-panel h2 { margin: 0; color: #172129; font-size: 28px; }
.auth-otp-panel > p:not(.overline):not(.auth-otp-message) { margin: -6px 0 2px; color: #6f7a84; font-size: 12px; }
.auth-otp-panel > p strong { color: #33414d; }
.auth-otp-back { justify-self: start; border: 0; background: transparent; color: #5f6f7c; padding: 0; font-size: 11px; font-weight: 700; }
.auth-otp-inputs { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.auth-otp-inputs input { width: 100%; aspect-ratio: 1; min-width: 0; border: 1px solid rgba(70,84,96,.14); border-radius: 10px; background: rgba(255,255,255,.62); color: #172129; text-align: center; font-size: 24px; font-weight: 760; box-shadow: inset 0 1px rgba(255,255,255,.8); }
.auth-otp-inputs input:focus { border-color: rgba(83,112,137,.55); background: rgba(255,255,255,.9); }
.auth-otp-message { min-height: 18px; margin: -4px 0 0; color: #4a8460; font-size: 11px; }
.auth-otp-message.error { color: #b14f5c; }
.auth-otp-fallback { margin: -4px 0 2px; color: #7a8791; font-size: 11px; line-height: 1.55; }
.auth-otp-panel .secondary-auth-button { width: 100%; background: #2d3944; color: #fff; box-shadow: 0 10px 24px rgba(45,57,68,.15); }
.auth-otp-resend { justify-self: center; border: 0; background: transparent; color: #506679; font-size: 11px; font-weight: 700; }
.auth-otp-resend:disabled { color: #98a2aa; }
.auth-provider-section { display: grid; gap: 7px; margin-top: 12px; }
.auth-provider-section[hidden], .auth-screen.otp-active .auth-provider-section { display: none; }
.auth-provider-divider { position: relative; height: 20px; display: grid; place-items: center; color: #8a949d; font-size: 9px; }
.auth-provider-divider::before { position: absolute; left: 0; right: 0; height: 1px; content: ""; background: rgba(80,96,110,.12); }
.auth-provider-divider span { position: relative; background: rgba(239,243,246,.72); padding: 0 9px; }
.auth-provider-button { min-height: 46px; border: 1px solid rgba(19,25,31,.92); border-radius: 13px; background: #111820; color: #fff; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 740; box-shadow: 0 9px 22px rgba(17,24,32,.13), inset 0 1px rgba(255,255,255,.12); transition: transform 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease); }
.auth-provider-button:hover { background: #202a33; box-shadow: 0 12px 28px rgba(17,24,32,.18), inset 0 1px rgba(255,255,255,.14); transform: translateY(-1px); }
.auth-provider-button:disabled { cursor: wait; opacity: .7; transform: none; }
.auth-provider-button svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.auth-provider-section > small { color: #8a949d; text-align: center; font-size: 8px; }
@media (min-width: 761px) and (max-height: 820px) {
    .auth-screen.register-active .auth-entry { padding: 14px 36px; }
    .auth-screen.register-active .auth-entry-inner { padding: 20px 28px; }
    .auth-screen.register-active .auth-entry .overline { margin-bottom: 8px; }
    .auth-screen.register-active .auth-entry h1 { font-size: 36px; line-height: 1.08; }
    .auth-screen.register-active .auth-lead { margin: 10px 0 12px; font-size: 11px; line-height: 1.55; }
    .auth-screen.register-active .auth-mode-switch { margin: 10px 0 8px; }
    .auth-screen.register-active .auth-mode-switch button { min-height: 32px; }
    .auth-screen.register-active .auth-email-support { min-height: 25px; margin-bottom: 7px; }
    .auth-screen.register-active .auth-form { gap: 6px; }
    .auth-screen.register-active .auth-form label { gap: 4px; }
    .auth-screen.register-active .auth-form input { height: 40px; }
    .auth-screen.register-active .auth-field-help { min-height: 12px; font-size: 8px; }
    .auth-screen.register-active .secondary-auth-button { min-height: 40px; }
    .auth-screen.register-active .auth-provider-section { gap: 4px; margin-top: 7px; }
    .auth-screen.register-active .auth-provider-button { min-height: 40px; }
    .auth-screen.register-active .auth-provider-section > small { display: none; }
    .auth-screen.register-active .auth-divider { height: 26px; }
    .auth-screen.register-active .demo-button { min-height: 44px; }
    .auth-screen.register-active .auth-legal { margin-top: 7px; }
}
@keyframes authOtpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.auth-success {
    position: absolute;
    z-index: 5;
    inset: 0;
    background: rgba(246,249,251,.99);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    text-align: center;
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    animation: authSuccessIn 320ms var(--ease) both;
}
.auth-success[hidden] { display: none; }
.auth-success-mark {
    width: 72px;
    height: 72px;
    border: 1px solid rgba(50,165,93,.24);
    border-radius: 50%;
    background: #32a55d;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 12px rgba(50,165,93,.09), 0 16px 36px rgba(50,165,93,.2);
    animation: authMarkSet 620ms var(--ease) both;
}
.auth-success-mark svg { width: 34px; height: 34px; stroke-width: 2.5; }
.auth-success .overline { margin: 28px 0 8px; color: #3c8d5a; }
.auth-success h2 { margin: 0; color: #172129; font-size: 30px; }
.auth-success > p:not(.overline) { max-width: 310px; margin: 12px 0 0; color: #687580; font-size: 12px; line-height: 1.7; }
.auth-success > strong { margin-top: 14px; color: #2f3c47; font-size: 12px; }
.auth-success-actions { width: 100%; display: grid; gap: 8px; margin-top: 26px; }
.auth-success-actions button { min-height: 44px; border: 0; border-radius: 12px; background: #2d3944; color: #fff; font-weight: 750; }
.auth-success-actions button + button { background: rgba(92,112,135,.09); color: #536374; }
@keyframes authSuccessIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
@keyframes authMarkSet { 0% { opacity: 0; transform: scale(.62) rotate(-18deg); } 60% { transform: scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

.app-shell { grid-template-columns: 244px minmax(640px,1fr) 324px; gap: 0; }
.sidebar {
    top: 12px;
    height: calc(100vh - 24px);
    margin: 0 0 12px 12px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 28px;
    background: rgba(248,250,252,.64);
    box-shadow: 0 18px 50px rgba(29,29,31,.08), inset 0 1px rgba(255,255,255,.8);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 18px 13px 13px;
}
.brand-row { padding: 0 7px; }
.brand-logo {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(145deg,#258cff,#0068dc);
    color: #fff;
    box-shadow: inset 0 1px rgba(255,255,255,.36), 0 8px 20px rgba(0,122,255,.2);
}
.brand strong { font-size: 15px; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 10px; }
.workspace-switcher {
    min-height: 62px;
    margin: 22px 0 16px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    background: rgba(255,255,255,.54);
    box-shadow: inset 0 1px rgba(255,255,255,.8), 0 8px 24px rgba(29,29,31,.055);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    transition: transform 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}
.workspace-switcher:hover { background: rgba(255,255,255,.78); box-shadow: inset 0 1px #fff, 0 12px 30px rgba(29,29,31,.08); transform: translateY(-1px); }
.workspace-switcher .workspace-icon { border-radius: 11px; background: rgba(0,122,255,.12); color: #007aff; }
.main-nav { gap: 4px; }
.nav-item {
    min-height: 43px;
    border-radius: 13px;
    padding: 0 12px;
    color: #5e5e63;
    transition: transform 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.nav-item::before { display: none; }
.nav-item:hover { background: rgba(255,255,255,.58); color: var(--ink); transform: translateX(2px); }
.nav-item.active { background: rgba(0,122,255,.12); color: #006de3; box-shadow: inset 0 1px rgba(255,255,255,.5); }
.nav-item.active svg { color: #007aff; }
.nav-item.active em { background: rgba(0,122,255,.12); color: #007aff; }
.nav-item em { background: rgba(118,118,128,.1); }
.nav-item b { border-radius: 999px; background: rgba(0,122,255,.1); color: #007aff; padding: 4px 7px; }
.nav-label { margin-top: 26px; letter-spacing: .08em; text-transform: none; }
.engine-status { border-color: var(--line); }
.avatar { background: linear-gradient(145deg,#353537,#151516); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.2); }
.profile-menu {
    bottom: 48px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 18px;
    background: rgba(250,250,252,.8);
    box-shadow: var(--shadow-md), inset 0 1px rgba(255,255,255,.9);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    padding: 7px;
    animation: glassMenuIn 180ms var(--ease) both;
}
.profile-menu button, .profile-menu label { border-radius: 11px; }

.main-stage { background: transparent; }
.topbar {
    top: 12px;
    height: 58px;
    margin: 12px 22px 0;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 999px;
    background: rgba(250,251,253,.66);
    box-shadow: 0 12px 34px rgba(29,29,31,.07), inset 0 1px rgba(255,255,255,.88);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    padding: 0 12px 0 20px;
    transition: background 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease);
}
.topbar.scrolled { background: rgba(250,251,253,.84); box-shadow: 0 16px 40px rgba(29,29,31,.1), inset 0 1px #fff; }
.breadcrumb { font-size: 11px; }
.search-trigger {
    width: 184px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.74);
    border-radius: 999px;
    background: rgba(118,118,128,.08);
    box-shadow: inset 0 1px rgba(255,255,255,.65);
    transition: width 240ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.search-trigger:hover { width: 204px; background: rgba(255,255,255,.72); }
.icon-button { border-radius: 50%; transition: transform 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease); }
.icon-button:hover { border-color: transparent; background: rgba(255,255,255,.7); box-shadow: 0 6px 18px rgba(29,29,31,.08), inset 0 1px #fff; }
.primary-button, .outline-button, .ghost-button { border-radius: 14px; }
.primary-button { border-color: rgba(0,122,255,.5); background: rgba(0,122,255,.92); box-shadow: 0 8px 20px rgba(0,122,255,.2), inset 0 1px rgba(255,255,255,.32); }
.primary-button svg { color: #fff; }
.primary-button:hover { background: #007aff; box-shadow: 0 12px 26px rgba(0,122,255,.27), inset 0 1px rgba(255,255,255,.4); transform: translateY(-1px); }
.primary-button.compact { border-radius: 999px; padding: 0 15px; }
.outline-button { border-color: var(--line); background: rgba(255,255,255,.7); box-shadow: inset 0 1px #fff; }
.outline-button:hover { border-color: rgba(0,122,255,.22); background: rgba(255,255,255,.94); color: #007aff; }

.view-stack { max-width: 1180px; padding: 48px 38px 76px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: 42px; font-weight: 720; letter-spacing: 0; }
.page-heading > div > p:last-child { font-size: 14px; }
.overline { color: #007aff; letter-spacing: 0; font-size: 10px; text-transform: none; }

.focus-board {
    --board-x: 0px;
    --board-y: 0px;
    min-height: 382px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 30px;
    background: linear-gradient(145deg,#1089ff 0%,#0878ed 52%,#0066d6 100%);
    box-shadow: 0 30px 70px rgba(0,94,201,.22), inset 0 1px rgba(255,255,255,.35);
    isolation: isolate;
}
.focus-board::before {
    inset: 1px;
    border-radius: 29px;
    background: linear-gradient(115deg,rgba(255,255,255,.19),transparent 28%,transparent 72%,rgba(0,35,100,.12));
    opacity: 1;
    mask-image: none;
}
.focus-copy { padding: 50px; }
.focus-copy h2 { max-width: 680px; margin-top: 30px; font-size: 36px; font-weight: 650; }
.focus-copy > p { color: rgba(255,255,255,.78); font-size: 14px; }
.section-kicker { color: rgba(255,255,255,.76); }
.confidence {
    min-height: 30px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: rgba(255,255,255,.78);
    box-shadow: inset 0 1px rgba(255,255,255,.22);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.confidence i { background: #d8ff5f; }
.evidence-row { color: rgba(255,255,255,.68); }
.evidence-row button {
    min-height: 36px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff;
    box-shadow: inset 0 1px rgba(255,255,255,.2);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    transition: transform 180ms var(--ease), background 180ms var(--ease);
}
.evidence-row button:hover { background: rgba(255,255,255,.25); transform: scale(1.035); }
.focus-visual { transform: translate3d(var(--board-x),var(--board-y),0); transition: transform 420ms var(--ease); }
.core-node {
    width: 142px;
    height: 142px;
    border: 1px solid rgba(255,255,255,.36);
    background: rgba(0,48,116,.34);
    box-shadow: 0 22px 45px rgba(0,35,95,.22), inset 0 1px rgba(255,255,255,.28), 0 0 0 18px rgba(255,255,255,.055);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    animation: glassFloat 5s ease-in-out infinite;
}
.core-node svg { color: #fff; }
.signal-node { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(0,48,116,.2); padding: 7px 10px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.connector { border-top: 1px solid rgba(255,255,255,.25); }

.metric-band, .content-section, .library-list, .action-progress, .weekly-report, .insight-card, .north-star, .guardrail, .role-contract, .roadmap {
    border: 1px solid rgba(255,255,255,.82);
    background: rgba(255,255,255,.82);
    box-shadow: var(--shadow-sm), inset 0 1px rgba(255,255,255,.94);
}
.metric-band { margin-top: 18px; border-radius: 24px; overflow: hidden; }
.metric-item + .metric-item::before { top: 20px; bottom: 20px; border-left: 0; background: var(--line); }
.mini-bars div { border-radius: 999px 999px 4px 4px; }
.mini-bars div.active { background: #007aff; }
.content-section { border-radius: 24px; }
.overview-columns { gap: 18px; margin-top: 18px; }
.signal-section { padding: 22px; }
.signal-section .section-head { padding: 0; margin-bottom: 14px; }
.signal-list { display: grid; grid-template-columns: 1fr; border-top: 0; }
.signal-row, .signal-row:nth-child(2n), .signal-row:nth-last-child(-n+2) {
    min-height: 78px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 15px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) auto;
    align-items: start;
    gap: 12px;
    margin: 0 -8px;
    padding: 13px 8px;
    background: transparent;
    color: var(--ink);
    transition: background 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.signal-row:last-child { border-bottom-color: transparent; }
.signal-row:hover, .signal-row.featured, .signal-list:hover .signal-row.featured:not(:hover) { background: rgba(0,122,255,.075); color: var(--ink); transform: translateX(3px); }
.signal-row:hover .signal-type, .signal-row.featured .signal-type, .signal-list:hover .signal-row.featured:not(:hover) .signal-type { background: rgba(0,122,255,.11); color: #007aff; transform: none; }
.signal-copy p, .signal-row:hover .signal-copy p, .signal-row.featured .signal-copy p, .signal-list:hover .signal-row.featured:not(:hover) .signal-copy p { display: block; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.signal-meta, .signal-row:hover .signal-meta, .signal-row.featured .signal-meta, .signal-list:hover .signal-row.featured:not(:hover) .signal-meta { width: auto; margin-top: 0; display: grid; color: var(--muted-2); }
.signal-row:hover .signal-meta em, .signal-row.featured .signal-meta em, .signal-list:hover .signal-row.featured:not(:hover) .signal-meta em { background: var(--paper-soft); color: var(--muted); }
.action-row { border-color: transparent; border-radius: 16px; background: rgba(118,118,128,.07); transition: transform 180ms var(--ease), background 180ms var(--ease); }
.action-row:hover { background: rgba(0,122,255,.075); transform: translateX(2px); }

.library-toolbar {
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 22px;
    background: rgba(255,255,255,.58);
    box-shadow: var(--shadow-sm), inset 0 1px #fff;
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.inline-search { border: 0; border-radius: 14px; background: rgba(118,118,128,.09); }
.filter-tabs { border-radius: 14px; background: rgba(118,118,128,.07); padding: 3px; }
.filter-tabs button { border-radius: 11px; }
.filter-tabs button.active { background: #fff; color: #007aff; box-shadow: 0 2px 8px rgba(29,29,31,.08); }
#sortSelect { border: 0; border-radius: 12px; background: rgba(118,118,128,.08); }
.library-list { border-radius: 24px; overflow: hidden; }
.library-item { border-top-style: solid; transition: background 180ms var(--ease), transform 180ms var(--ease); }
.library-item:hover { background: rgba(0,122,255,.06); transform: translateX(2px); }

.insight-hero { border-radius: 28px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-sm), inset 0 1px #fff; }
.confidence-ring { background: conic-gradient(#007aff calc(var(--score) * 1%),rgba(118,118,128,.12) 0); }
.confidence-ring::before { background: #fff; }
.insight-grid { gap: 16px; margin-top: 18px; }
.insight-card { border-radius: 24px; box-shadow: var(--shadow-sm), inset 0 1px #fff; }
.insight-card::before { left: 18px; top: 18px; width: 30px; height: 4px; border-radius: 999px; }
.insight-card:hover { border-color: rgba(0,122,255,.18); background: #fff; color: var(--ink); box-shadow: 0 22px 48px rgba(29,29,31,.1), inset 0 1px #fff; transform: translateY(-5px) scale(1.008); }
.insight-card:hover::before { background: var(--accent,var(--green)); }
.insight-card:hover > p, .insight-card:hover .insight-card-head span, .insight-card:hover footer span { color: var(--muted); }
.insight-card:hover .insight-card-head em { background: var(--paper-soft); color: #007aff; }
.insight-card:hover footer button { color: #007aff; }
.assumption-table { border: 1px solid rgba(255,255,255,.82); border-radius: 24px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-sm); overflow: hidden; }
.assumption-row { border-top-style: solid; }

.action-progress { border-radius: 24px; }
.progress-track { height: 10px; background: rgba(118,118,128,.1); }
.progress-track span { background: linear-gradient(90deg,#007aff,#45a2ff); }
.action-board { gap: 18px; margin-top: 18px; }
.action-board > section { border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(255,255,255,.52); box-shadow: inset 0 1px rgba(255,255,255,.82); }
.board-card { border-color: transparent; border-radius: 18px; box-shadow: var(--shadow-sm); }
.board-card:hover { border-color: rgba(0,122,255,.16); box-shadow: 0 14px 32px rgba(29,29,31,.08); transform: translateY(-3px); }

.weekly-report { border-radius: 28px; overflow: hidden; }
.weekly-next { background: linear-gradient(145deg,#168cff,#006bdc); }
.role-contract, .north-star, .guardrail, .roadmap { border-radius: 24px; overflow: hidden; }
.roadmap-item.complete { background: linear-gradient(145deg,#168cff,#006bdc); }
.case-badge { border-color: rgba(0,122,255,.18); background: rgba(0,122,255,.08); color: #007aff; }

.ai-rail {
    top: 12px;
    height: calc(100vh - 24px);
    margin: 0 12px 12px 0;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 28px;
    background: rgba(248,250,252,.66);
    box-shadow: 0 18px 50px rgba(29,29,31,.08), inset 0 1px rgba(255,255,255,.84);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.ai-mark { border-radius: 11px; background: linear-gradient(145deg,#258cff,#0068dc); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.35); }
.reasoning-card { border-color: rgba(255,255,255,.72); border-radius: 18px; background: rgba(255,255,255,.55); box-shadow: inset 0 1px #fff; }
.rail-insight { border-radius: 20px; background: linear-gradient(145deg,#252527,#111113); box-shadow: 0 18px 35px rgba(29,29,31,.16), inset 0 1px rgba(255,255,255,.16); }
.rail-insight button { border-radius: 13px; }
.rail-evidence-item { border-color: transparent; border-radius: 15px; background: rgba(255,255,255,.6); box-shadow: inset 0 1px rgba(255,255,255,.8); transition: transform 180ms var(--ease), background 180ms var(--ease); }
.rail-evidence-item:hover { border-color: transparent; background: rgba(255,255,255,.86); transform: translateY(-1px); }
.ai-composer > div { border-color: rgba(255,255,255,.72); border-radius: 17px; background: rgba(255,255,255,.6); box-shadow: inset 0 1px #fff; }
.ai-composer button { border-radius: 11px; background: #007aff; color: #fff; }

.modal-backdrop, .drawer-backdrop, .command-backdrop { background: rgba(28,28,30,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.capture-modal, .command-palette {
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 28px;
    background: rgba(250,250,252,.84);
    box-shadow: 0 34px 90px rgba(29,29,31,.23), inset 0 1px #fff;
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    animation: glassSheetIn 260ms var(--ease);
}
.capture-types button { border-color: transparent; border-radius: 999px; background: rgba(118,118,128,.08); }
.capture-types button:hover, .capture-types button.active { border-color: transparent; background: rgba(0,122,255,.12); color: #007aff; }
#noteTitle { border-bottom-color: var(--line); }
.capture-meta input, .capture-meta select { border: 0; border-radius: 13px; background: rgba(118,118,128,.08); }
.detail-drawer { width: min(500px,100%); border-left: 1px solid rgba(255,255,255,.7); background: rgba(250,250,252,.88); box-shadow: -24px 0 70px rgba(29,29,31,.16); backdrop-filter: blur(32px) saturate(180%); -webkit-backdrop-filter: blur(32px) saturate(180%); }
.detail-drawer > header { border-bottom-color: var(--line); background: rgba(250,250,252,.76); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.detail-ai { border-left: 0; border-radius: 18px; background: rgba(0,122,255,.08); }
.detail-actions button { border: 0; border-radius: 12px; background: rgba(118,118,128,.08); }
.command-input { border-bottom-color: var(--line); }
.command-result { border-radius: 14px; }
.command-result:hover { background: rgba(0,122,255,.08); }
.toast { border-color: rgba(255,255,255,.22); border-radius: 999px; background: rgba(30,30,32,.82); box-shadow: 0 16px 40px rgba(29,29,31,.2), inset 0 1px rgba(255,255,255,.16); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }

@keyframes glassFloat { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 50% { transform: translate(-50%,-50%) translateY(-7px); } }
@keyframes glassMenuIn { from { opacity: 0; transform: translateY(7px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes glassSheetIn { from { opacity: 0; transform: translateY(20px) scale(.965); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #111214;
        --paper: #1c1c1e;
        --paper-soft: #2c2c2e;
        --ink: #f5f5f7;
        --ink-soft: #dedee2;
        --muted: #a1a1a6;
        --muted-2: #74747a;
        --line: rgba(255,255,255,.09);
        --line-strong: rgba(255,255,255,.16);
    }
    body { background: linear-gradient(180deg,#17181b,#101113); }
    .sidebar, .ai-rail { border-color: rgba(255,255,255,.1); background: rgba(34,35,39,.68); box-shadow: 0 18px 50px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.08); }
    .topbar { border-color: rgba(255,255,255,.11); background: rgba(36,37,41,.68); box-shadow: 0 12px 34px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.08); }
    .topbar.scrolled { background: rgba(36,37,41,.86); }
    .workspace-switcher, .profile-menu, .reasoning-card, .rail-evidence-item, .ai-composer > div { border-color: rgba(255,255,255,.1); background: rgba(58,58,62,.55); box-shadow: inset 0 1px rgba(255,255,255,.08); }
    .nav-item { color: #b4b4ba; }
    .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
    .nav-item.active { background: rgba(10,132,255,.2); color: #64a9ff; }
    .search-trigger, .inline-search, .filter-tabs, #sortSelect, .capture-meta input, .capture-meta select { background: rgba(118,118,128,.16); }
    .metric-band, .content-section, .library-list, .action-progress, .weekly-report, .insight-card, .north-star, .guardrail, .role-contract, .roadmap, .insight-hero, .assumption-table { border-color: rgba(255,255,255,.08); background: rgba(35,35,38,.9); box-shadow: 0 10px 30px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.05); }
    .confidence-ring::before { background: #232326; }
    .insight-card:hover { border-color: rgba(10,132,255,.35); background: #2c2c2e; }
    .action-board > section { border-color: rgba(255,255,255,.08); background: rgba(35,35,38,.58); }
    .board-card { background: #2c2c2e; box-shadow: 0 10px 24px rgba(0,0,0,.14); }
    .action-row { background: rgba(118,118,128,.13); }
    .filter-tabs button.active { background: #3a3a3c; color: #64a9ff; }
    .capture-modal, .command-palette, .detail-drawer { border-color: rgba(255,255,255,.12); background: rgba(38,39,43,.88); }
    .detail-drawer > header { background: rgba(38,39,43,.78); }
    .auth-screen { background: #111214; }
    .auth-entry-inner { color: #f5f5f7; }
    .auth-divider span { background: transparent; }
}

@media (prefers-reduced-transparency: reduce) {
    .sidebar, .topbar, .ai-rail, .profile-menu, .capture-modal, .command-palette, .detail-drawer, .auth-entry-inner { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
}

@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes corePulse { 0%,100% { box-shadow: 0 0 0 18px rgba(220,237,114,.035),0 0 0 38px rgba(220,237,114,.025); } 50% { box-shadow: 0 0 0 24px rgba(220,237,114,.025),0 0 0 48px rgba(220,237,114,.012); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes stepPulse { 50% { box-shadow: 0 0 0 5px rgba(220,237,114,.18); } }

@media (max-width: 1330px) {
    .app-shell { grid-template-columns: 232px minmax(620px,1fr); }
    .ai-rail { display: none; }
    .view-stack { max-width: 1120px; }
}

@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; top: 0; width: 250px; transform: translateX(-102%); box-shadow: 20px 0 50px rgba(18,24,20,.16); transition: transform 220ms var(--ease); }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open::after { position: fixed; left: 250px; right: -100vw; top: 0; bottom: 0; content: ""; background: rgba(18,24,20,.35); }
    .sidebar-close, .mobile-menu { display: grid; }
    .topbar { padding: 0 24px; }
    .topbar .mobile-menu { margin-left: -7px; }
    .breadcrumb { margin-right: auto; }
    .view-stack { padding: 38px 28px 64px; }
    .auth-screen { grid-template-columns: minmax(360px,.9fr) minmax(430px,1.1fr); }
    .auth-showcase { padding: 32px; }
    .auth-insight h2 { font-size: 44px; }
    .focus-board { grid-template-columns: 1fr 300px; }
    .focus-copy { padding: 32px; }
    .focus-copy h2 { font-size: 29px; }
}

@media (max-width: 760px) {
    .auth-screen { display: block; overflow-y: auto; overflow-anchor: none; background: var(--paper); }
    .auth-showcase { display: none; }
    .auth-entry { min-height: 100%; place-items: start center; padding: 34px 24px; }
    .mobile-auth-brand { display: flex; }
    .auth-entry h1 { font-size: 39px; }
    .auth-form { grid-template-columns: 1fr; }
    .secondary-auth-button { grid-column: auto; }
    .topbar { height: 62px; padding: 0 16px; }
    .breadcrumb span, .breadcrumb svg { display: none; }
    .search-trigger { width: 36px; grid-template-columns: 1fr; place-items: center; padding: 0; }
    .search-trigger span, .search-trigger kbd { display: none; }
    .topbar-actions > .icon-button { display: none; }
    .primary-button.compact span { display: none; }
    .primary-button.compact { width: 36px; padding: 0; }
    .view-stack { padding: 28px 16px 52px; }
    .page-heading { display: block; margin-bottom: 24px; }
    .page-heading h1, .compact-heading h1 { font-size: 32px; }
    .heading-actions { margin-top: 20px; }
    .heading-actions .outline-button { display: none; }
    .focus-board { display: block; min-height: auto; }
    .focus-copy { padding: 28px 22px 18px; }
    .section-kicker { display: block; }
    .confidence { margin-top: 12px; }
    .focus-copy h2 { margin-top: 22px; font-size: 25px; }
    .focus-visual { min-height: 270px; }
    .metric-band { grid-template-columns: 1fr 1fr; }
    .metric-item:nth-child(3)::before { display: none; }
    .chart-metric { grid-column: 1 / -1; grid-template-columns: 92px 1fr; border-top: 1px solid var(--line); }
    .overview-columns { grid-template-columns: 1fr; }
    .content-section { padding: 18px 15px; }
    .signal-section { padding: 0; }
    .signal-list { grid-template-columns: 1fr; }
    .signal-row, .signal-row:nth-child(2n), .signal-row:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px dashed var(--line); }
    .signal-row:last-child { border-bottom: 0; }
    .library-toolbar { grid-template-columns: 1fr auto; }
    .inline-search { grid-column: 1 / -1; }
    .filter-tabs { max-width: 100%; overflow-x: auto; }
    .library-item { grid-template-columns: 38px minmax(0,1fr) 50px; padding: 14px 12px; }
    .library-tags { display: none; }
    .insight-hero { grid-template-columns: 1fr; padding: 26px 22px; }
    .insight-hero h2 { font-size: 23px; }
    .confidence-ring { justify-self: start; width: 92px; height: 92px; }
    .insight-grid { grid-template-columns: 1fr; }
    .assumption-row { grid-template-columns: 1fr; gap: 10px; }
    .assumption-actions { justify-content: flex-start; }
    .action-board { grid-template-columns: 1fr; }
    .action-board > section { min-height: 260px; }
    .weekly-opening { padding: 36px 22px; }
    .weekly-opening h2 { font-size: 26px; }
    .weekly-grid { grid-template-columns: 1fr; }
    .weekly-grid section:nth-child(odd) { border-right: 0; }
    .weekly-report > footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 12px 20px; }
    .method-heading .case-badge { display: inline-block; margin-top: 18px; }
    .case-intro { grid-template-columns: 1fr; gap: 25px; }
    .case-intro h2 { font-size: 25px; }
    .case-intro dl { border-left: 0; padding-left: 0; }
    .role-contract { grid-template-columns: 1fr; }
    .contract-line { min-height: 84px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .metric-framework, .roadmap { grid-template-columns: 1fr; }
    .roadmap-item { border-top: 1px solid var(--line); border-left: 0; }
    .roadmap-item:first-child { border-top: 0; }
    .capture-modal { max-height: calc(100vh - 24px); }
    .modal-backdrop { padding: 12px; }
    .error-dialog { padding: 28px 22px 22px; border-radius: 20px; }
    .error-dialog h2 { font-size: 22px; }
    .capture-meta { grid-template-columns: 1fr; }
    #noteForm footer { align-items: flex-start; flex-direction: column; }
    #noteForm footer > div { width: 100%; justify-content: flex-end; }
}

@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: 980px) {
    .sidebar {
        top: 10px;
        left: 10px;
        width: 258px;
        height: calc(100vh - 20px);
        margin: 0;
        border-radius: 28px;
    }
    .sidebar.open::after { left: 268px; }
    .topbar { top: 10px; height: 56px; margin: 10px 14px 0; padding: 0 12px; }
    .view-stack { padding-top: 42px; }
}

@media (max-width: 760px) {
    .auth-entry { padding: 20px; }
    .auth-entry-inner { padding: 25px; border-radius: 27px; }
    .auth-entry h1 { font-size: 38px; }
    .topbar { margin: 8px 10px 0; top: 8px; height: 54px; }
    .view-stack { padding: 36px 14px 54px; }
    .page-heading h1, .compact-heading h1 { font-size: 34px; }
    .focus-board { border-radius: 27px; }
    .focus-board::before { border-radius: 26px; }
    .focus-copy { padding: 30px 24px 18px; }
    .focus-copy h2 { font-size: 28px; }
    .focus-visual { min-height: 280px; }
    .metric-band, .content-section, .library-toolbar, .library-list, .insight-hero, .insight-card, .action-progress, .action-board > section, .weekly-report { border-radius: 22px; }
    .signal-row, .signal-row:nth-child(2n), .signal-row:nth-last-child(-n+2) { grid-template-columns: 38px minmax(0,1fr); border-bottom: 1px solid var(--line); }
    .signal-meta { grid-column: 2; justify-items: start; display: flex; }
    .insight-card:hover { transform: translateY(-2px); }
    .capture-modal, .command-palette { border-radius: 24px; }
}

/* Moonstone palette system. */
:root {
    --bg: #e7ebef;
    --paper: rgba(255,255,255,.72);
    --paper-soft: rgba(242,244,246,.78);
    --ink: #171b21;
    --ink-soft: #353b43;
    --muted: #69717b;
    --muted-2: #949ba3;
    --line: rgba(45,55,66,.1);
    --line-strong: rgba(45,55,66,.17);
    --green: #5c7087;
    --green-dark: #44596f;
    --green-soft: rgba(92,112,135,.11);
    --cobalt: #5c7087;
    --cobalt-dark: #344657;
    --mint: #718f7f;
    --lime: #d9c69d;
    --lime-soft: rgba(217,198,157,.18);
    --blue: #7d7d98;
    --blue-soft: rgba(125,125,152,.11);
    --orange: #b7835a;
    --orange-soft: rgba(183,131,90,.12);
    --rose: #a76f78;
    --rose-soft: rgba(167,111,120,.11);
    --shadow-sm: 0 9px 28px rgba(35,43,52,.065), 0 1px 2px rgba(35,43,52,.035);
    --shadow-md: 0 28px 80px rgba(35,43,52,.15), 0 3px 10px rgba(35,43,52,.06);
}

body {
    position: relative;
    background: linear-gradient(180deg,#f0f3f5 0%,#e7ebef 48%,#dfe5e9 100%);
    background-attachment: fixed;
}
body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(118deg,rgba(122,145,168,.22) 0%,transparent 36%),
        linear-gradient(305deg,rgba(123,157,139,.17) 0%,transparent 39%),
        linear-gradient(165deg,rgba(255,255,255,.55) 8%,transparent 48%);
}

.auth-screen { background: linear-gradient(145deg,#e9edf0,#dfe5e9); }
.auth-showcase { background: linear-gradient(145deg,#25323e 0%,#394b59 58%,#596f79 100%); box-shadow: 0 30px 78px rgba(37,50,62,.25),inset 0 1px rgba(255,255,255,.22); }
.auth-showcase::before { background: linear-gradient(125deg,rgba(255,255,255,.16),transparent 30%,transparent 68%,rgba(14,23,31,.2)); }
.auth-insight > p { color: #d8c49a; }
.auth-orbit span { background: #d8c49a; }
.auth-orbit i { background: #93a9bc; }
.auth-orbit b { background: #b88460; }
.auth-entry-inner { border-color: rgba(255,255,255,.68); background: rgba(255,255,255,.46); box-shadow: 0 28px 78px rgba(42,52,61,.14),inset 0 1px rgba(255,255,255,.86); backdrop-filter: blur(38px) saturate(145%); -webkit-backdrop-filter: blur(38px) saturate(145%); }
.demo-button { background: #29343f; box-shadow: 0 14px 30px rgba(41,52,63,.22),inset 0 1px rgba(255,255,255,.18); }
.demo-button:hover { background: #344452; box-shadow: 0 18px 36px rgba(41,52,63,.27),inset 0 1px rgba(255,255,255,.2); }
.auth-form input { background: rgba(255,255,255,.36); }

.sidebar, .ai-rail {
    border-color: rgba(255,255,255,.62);
    background: rgba(247,249,250,.43);
    box-shadow: 0 20px 58px rgba(38,47,57,.1),inset 0 1px rgba(255,255,255,.78);
    backdrop-filter: blur(38px) saturate(150%);
    -webkit-backdrop-filter: blur(38px) saturate(150%);
}
.topbar {
    border-color: rgba(255,255,255,.66);
    background: rgba(248,250,251,.42);
    box-shadow: 0 14px 38px rgba(38,47,57,.09),inset 0 1px rgba(255,255,255,.82);
    backdrop-filter: blur(36px) saturate(155%);
    -webkit-backdrop-filter: blur(36px) saturate(155%);
}
.topbar.scrolled { background: rgba(248,250,251,.64); box-shadow: 0 18px 46px rgba(38,47,57,.12),inset 0 1px #fff; }
.brand-logo, .ai-mark { background: linear-gradient(145deg,#61778d,#445a70); box-shadow: inset 0 1px rgba(255,255,255,.3),0 9px 22px rgba(68,90,112,.2); }
.workspace-switcher { border-color: rgba(255,255,255,.62); background: rgba(255,255,255,.32); }
.workspace-switcher:hover { background: rgba(255,255,255,.55); }
.workspace-switcher .workspace-icon { background: rgba(92,112,135,.13); color: #50677e; }
.nav-item.active { background: rgba(92,112,135,.13); color: #465d73; }
.nav-item.active svg, .nav-item.active em { color: #50677e; }
.nav-item.active em, .nav-item b { background: rgba(92,112,135,.12); }
.nav-item b { color: #50677e; }
.search-trigger { background: rgba(255,255,255,.28); }
.search-trigger:hover { background: rgba(255,255,255,.52); }
.overline { color: #5c7087; }
.primary-button { border-color: rgba(45,55,66,.34); background: rgba(37,45,54,.93); box-shadow: 0 10px 24px rgba(37,45,54,.18),inset 0 1px rgba(255,255,255,.16); }
.primary-button:hover { background: #303b46; box-shadow: 0 14px 30px rgba(37,45,54,.22),inset 0 1px rgba(255,255,255,.18); }
.outline-button:hover { border-color: rgba(92,112,135,.25); color: #50677e; }

.focus-board {
    grid-template-columns: minmax(0,1.35fr) minmax(310px,.65fr);
    border-color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.42);
    color: var(--ink);
    box-shadow: 0 28px 78px rgba(43,53,63,.13),inset 0 1px rgba(255,255,255,.9);
    backdrop-filter: blur(34px) saturate(145%);
    -webkit-backdrop-filter: blur(34px) saturate(145%);
}
.focus-board::before { background: linear-gradient(120deg,rgba(255,255,255,.45),transparent 34%,transparent 76%,rgba(92,112,135,.06)); }
.section-kicker { color: #647487; }
.confidence { border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.42); color: #5f6974; box-shadow: inset 0 1px rgba(255,255,255,.74); }
.confidence strong { color: #34414d; }
.confidence i { background: #718f7f; }
.focus-copy h2 { color: #171b21; }
.focus-copy > p { color: #68717c; }
.evidence-row { color: #8c949d; }
.evidence-row button { border-color: rgba(255,255,255,.72); background: rgba(255,255,255,.42); color: #50677e; box-shadow: inset 0 1px rgba(255,255,255,.82),0 7px 18px rgba(43,53,63,.05); }
.evidence-row button:hover { background: rgba(255,255,255,.68); }
.focus-visual {
    min-height: 350px;
    margin: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 25px;
    background: linear-gradient(150deg,rgba(28,34,41,.96),rgba(48,59,68,.9));
    box-shadow: 0 24px 55px rgba(31,39,47,.22),inset 0 1px rgba(255,255,255,.13);
}
.core-node { border-color: rgba(255,255,255,.22); background: rgba(149,169,182,.13); box-shadow: 0 24px 48px rgba(11,17,23,.27),inset 0 1px rgba(255,255,255,.18),0 0 0 18px rgba(255,255,255,.035); }
.core-node svg { color: #d8c49a; }
.signal-node { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.07); }
.signal-node i { background: #718f7f; box-shadow: 0 0 0 6px rgba(113,143,127,.14); }
.node-b i { background: #b7835a; box-shadow: 0 0 0 6px rgba(183,131,90,.14); }
.node-c i { background: #d8c49a; }

.metric-band, .content-section, .library-list, .action-progress, .weekly-report, .insight-card, .north-star, .guardrail, .role-contract, .roadmap, .insight-hero, .assumption-table { border-color: rgba(255,255,255,.64); background: rgba(255,255,255,.58); box-shadow: var(--shadow-sm),inset 0 1px rgba(255,255,255,.86); }
.mini-bars div.active { background: #667d92; }
.mini-bars div:hover { background: #718f7f; }
.signal-row:hover, .signal-row.featured, .signal-list:hover .signal-row.featured:not(:hover) { background: rgba(92,112,135,.085); }
.signal-row:hover .signal-type, .signal-row.featured .signal-type, .signal-list:hover .signal-row.featured:not(:hover) .signal-type { background: rgba(92,112,135,.12); color: #50677e; }
.action-row:hover { background: rgba(113,143,127,.1); }
.library-toolbar { border-color: rgba(255,255,255,.64); background: rgba(255,255,255,.35); backdrop-filter: blur(28px) saturate(145%); -webkit-backdrop-filter: blur(28px) saturate(145%); }
.filter-tabs button.active { color: #50677e; }
.library-item:hover { background: rgba(92,112,135,.075); }
.confidence-ring { background: conic-gradient(#667d92 calc(var(--score) * 1%),rgba(112,122,132,.12) 0); }
.insight-card:hover { border-color: rgba(92,112,135,.18); }
.insight-card:hover .insight-card-head em, .insight-card:hover footer button { color: #50677e; }
.progress-track span { background: linear-gradient(90deg,#62798e,#789889); }
.board-card:hover { border-color: rgba(92,112,135,.18); }
.weekly-next, .roadmap-item.complete { background: linear-gradient(145deg,#33424f,#536773); }
.case-badge { border-color: rgba(92,112,135,.18); background: rgba(92,112,135,.1); color: #50677e; }
.reasoning-card, .rail-evidence-item, .ai-composer > div { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.3); }
.rail-insight { background: linear-gradient(145deg,#26313a,#161d23); }
.rail-label, .rail-insight button { color: #d8c49a; }
.ai-composer button { background: #536a7f; }
.profile-menu, .capture-modal, .command-palette { border-color: rgba(255,255,255,.68); background: rgba(248,249,250,.58); backdrop-filter: blur(38px) saturate(150%); -webkit-backdrop-filter: blur(38px) saturate(150%); }
.capture-types button:hover, .capture-types button.active { background: rgba(92,112,135,.12); color: #50677e; }
.command-result:hover { background: rgba(92,112,135,.09); }
.detail-ai { background: rgba(92,112,135,.09); }

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15191e;
        --paper: rgba(34,39,45,.78);
        --paper-soft: rgba(49,55,62,.76);
        --ink: #f2f3f4;
        --ink-soft: #d8dce0;
        --muted: #aab0b7;
        --muted-2: #7d858d;
        --line: rgba(255,255,255,.09);
        --line-strong: rgba(255,255,255,.15);
    }
    body { background: linear-gradient(180deg,#1b2026,#11151a); }
    body::before { background: linear-gradient(118deg,rgba(91,116,139,.15),transparent 37%),linear-gradient(305deg,rgba(89,127,106,.12),transparent 40%); }
    .focus-board { border-color: rgba(255,255,255,.1); background: rgba(38,44,51,.52); }
    .focus-copy h2 { color: #f2f3f4; }
    .focus-copy > p, .evidence-row { color: #aab0b7; }
    .confidence { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #adb4bb; }
    .confidence strong { color: #f2f3f4; }
    .evidence-row button { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.07); color: #b8c7d4; }
    .metric-band, .content-section, .library-list, .action-progress, .weekly-report, .insight-card, .north-star, .guardrail, .role-contract, .roadmap, .insight-hero, .assumption-table { border-color: rgba(255,255,255,.08); background: rgba(38,43,49,.68); }
    .sidebar, .ai-rail, .topbar { border-color: rgba(255,255,255,.09); background: rgba(34,39,45,.46); }
    .library-toolbar, .profile-menu, .capture-modal, .command-palette { border-color: rgba(255,255,255,.1); background: rgba(39,44,50,.6); }
}

/* Contextual AI drawer: the assistant no longer consumes permanent layout space. */
html, body { max-width: 100%; overflow-x: clip; }
body.ai-rail-open { overflow: hidden; }
.app-shell { grid-template-columns: 244px minmax(0,1fr); }
.main-stage, .view-stack, .app-view, .library-toolbar, .library-list { min-width: 0; }

.ai-trigger {
    min-height: 38px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 999px;
    background: rgba(255,255,255,.34);
    color: #4f6478;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    box-shadow: inset 0 1px rgba(255,255,255,.78);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}
.ai-trigger svg { width: 15px; height: 15px; }
.ai-trigger:hover, .ai-trigger[aria-expanded="true"] { background: rgba(255,255,255,.65); box-shadow: 0 8px 22px rgba(41,51,60,.09),inset 0 1px #fff; transform: translateY(-1px); }
.ai-trigger[aria-expanded="true"] { color: #33495d; }

.ai-rail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 68;
    background: rgba(25,31,37,.18);
    opacity: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 220ms var(--ease);
}
.ai-rail-backdrop.open { opacity: 1; }
.ai-rail {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 70;
    width: min(390px,calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    margin: 0;
    display: flex !important;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 34px)) scale(.985);
    transform-origin: right center;
    transition: transform 260ms var(--ease), opacity 200ms var(--ease);
}
.ai-rail.open { opacity: 1; pointer-events: auto; transform: translateX(0) scale(1); }
.ai-rail > *, .ai-rail section, .reasoning-card, .rail-insight, .rail-evidence, #railEvidenceList, .ai-composer { width: 100%; min-width: 0; max-width: 100%; }
.ai-rail > header { min-height: 42px; }
.rail-close { display: grid; }
.reasoning-card { margin-top: 12px; padding: 13px; }
.reasoning-steps { gap: 9px; margin-top: 12px; }
.reasoning-steps > div { grid-template-columns: 21px minmax(0,1fr); }
.reasoning-steps span { min-width: 0; }
.reasoning-steps strong, .reasoning-steps small { overflow-wrap: anywhere; }
.rail-insight { margin-top: 12px; padding: 16px; }
.rail-insight h2 { margin: 10px 0 7px; font-size: 15px; line-height: 1.48; overflow-wrap: anywhere; }
.rail-insight p { font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.rail-insight button { margin-top: 13px; }
.rail-evidence { margin-top: 14px; }
#railEvidenceList { gap: 6px; margin-top: 8px; }
.rail-evidence-item { padding: 9px 10px; }
.rail-evidence-item strong, .rail-evidence-item p {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}
.rail-evidence-item p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rail-spacer { display: none; }
.ai-composer { margin-top: 14px; padding-top: 12px; }
.ai-composer > div { min-height: 58px; }
.ai-composer textarea { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 1330px) {
    .app-shell { grid-template-columns: 232px minmax(0,1fr); }
}
@media (max-width: 980px) {
    .app-shell { display: block; }
    .ai-rail { top: 10px; right: 10px; width: min(380px,calc(100vw - 20px)); max-width: calc(100vw - 20px); height: calc(100vh - 20px); max-height: calc(100vh - 20px); }
}
@media (max-width: 760px) {
    .ai-trigger { width: 38px; padding: 0; justify-content: center; }
    .ai-trigger span { display: none; }
    .ai-rail { padding: 14px; border-radius: 26px; }
}
@media (prefers-color-scheme: dark) {
    .ai-trigger { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.07); color: #b6c5d1; }
    .ai-trigger:hover, .ai-trigger[aria-expanded="true"] { background: rgba(255,255,255,.12); color: #dce5ec; }
    .ai-rail-backdrop { background: rgba(0,0,0,.32); }
}

/* One-screen overview: decisions first, detail on demand. */
#view-overview .overview-heading-row { align-items: center; margin-bottom: 18px; }
#view-overview .overview-heading-row h1 { font-size: 34px; line-height: 1.12; }
#view-overview .overview-heading-row > div > p:last-child { margin-top: 7px; }

#view-overview .focus-board {
    min-height: 210px;
    grid-template-columns: minmax(0,1fr);
}
#view-overview .focus-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 25px 30px; }
#view-overview .focus-copy h2 { margin: 14px 0 9px; font-size: 27px; line-height: 1.24; }
#view-overview .focus-copy > p { max-width: 760px; font-size: 11px; line-height: 1.65; }
.focus-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; }
.focus-actions { display: flex; align-items: center; gap: 8px; }
.focus-actions button { min-height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; font-size: 10px; font-weight: 750; transition: transform 170ms var(--ease), background 170ms var(--ease), box-shadow 170ms var(--ease); }
.focus-actions button:hover { transform: translateY(-1px); }
.focus-actions svg { width: 13px; height: 13px; }
.focus-evidence-button { border: 1px solid rgba(255,255,255,.74); background: rgba(255,255,255,.46); color: #50677e; box-shadow: inset 0 1px rgba(255,255,255,.88),0 7px 18px rgba(43,53,63,.06); }
.focus-evidence-button:hover { background: rgba(255,255,255,.72); }
.focus-action-button { border: 1px solid rgba(45,55,66,.28); background: #2f3943; color: #fff; box-shadow: 0 8px 18px rgba(37,45,54,.15),inset 0 1px rgba(255,255,255,.15); }
.focus-action-button:hover { background: #3a4753; box-shadow: 0 11px 23px rgba(37,45,54,.2),inset 0 1px rgba(255,255,255,.17); }
.focus-meta { display: flex; align-items: center; gap: 14px; color: #8c949d; font-size: 9px; white-space: nowrap; }
.focus-meta span + span { position: relative; }
.focus-meta span + span::before { position: absolute; left: -8px; top: 50%; width: 3px; height: 3px; border-radius: 50%; content: ""; background: #a4abb2; transform: translateY(-50%); }

.focus-context { position: relative; z-index: 2; min-width: 0; margin: 14px; border: 1px solid rgba(255,255,255,.68); border-radius: 24px; background: rgba(239,243,245,.56); display: flex; flex-direction: column; justify-content: space-between; padding: 18px; box-shadow: inset 0 1px rgba(255,255,255,.86),0 16px 38px rgba(43,53,63,.08); backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
.focus-context-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7d8791; font-size: 9px; }
.focus-context-head strong { max-width: 150px; overflow: hidden; color: #485b6d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.focus-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0; }
.focus-context-grid > div { min-width: 0; border-left: 1px solid rgba(88,106,122,.16); padding-left: 12px; }
.focus-context-grid span, .focus-context-grid small { display: block; color: #8b949d; font-size: 8px; }
.focus-context-grid strong { display: block; margin: 5px 0 4px; color: #202830; font-size: 25px; line-height: 1; }
.focus-context-grid strong em { margin-left: 3px; color: #6d7984; font-size: 8px; font-style: normal; font-weight: 650; }
.focus-context > p { margin: 0; color: #68737e; display: flex; align-items: flex-start; gap: 7px; font-size: 9px; line-height: 1.45; }
.focus-context > p i { width: 6px; height: 6px; flex: none; margin-top: 3px; border-radius: 50%; background: #718f7f; box-shadow: 0 0 0 4px rgba(113,143,127,.12); }

.workflow-strip {
    min-height: 86px;
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 22px;
    background: rgba(255,255,255,.5);
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    overflow: hidden;
    box-shadow: var(--shadow-sm),inset 0 1px rgba(255,255,255,.86);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
}
.workflow-strip button {
    position: relative;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    padding: 15px 20px;
    text-align: left;
    transition: background 180ms var(--ease);
}
.workflow-strip button + button { border-left: 1px solid rgba(69,82,94,.1); }
.workflow-strip button:hover { background: rgba(255,255,255,.48); }
.workflow-strip button > span { grid-column: 1; grid-row: 1 / 3; color: #60758a; font-size: 9px; font-weight: 850; }
.workflow-strip button > strong { grid-column: 2; color: var(--ink); font-size: 22px; line-height: 1; }
.workflow-strip button > small { grid-column: 2; color: var(--muted); font-size: 9px; }
.workflow-strip button > svg { grid-column: 3; grid-row: 1 / 3; width: 15px; height: 15px; color: #63778a; transition: transform 180ms var(--ease); }
.workflow-strip button:hover > svg { transform: translateX(3px); }
#view-overview .overview-columns { gap: 12px; margin-top: 12px; }
#view-overview .content-section { min-width: 0; padding: 16px 18px; }
#view-overview .section-head { margin-bottom: 8px; }
#view-overview .section-head h2 { font-size: 16px; }
#view-overview .signal-row { gap: 10px; padding: 9px 2px; }
#view-overview .signal-type { width: 30px; height: 30px; }
#view-overview .signal-copy strong { font-size: 11px; }
#view-overview .signal-copy p { margin-top: 4px; }
#view-overview .action-list { gap: 6px; }
#view-overview .action-row { padding: 9px 10px; }

@media (min-width: 981px) and (min-height: 800px) {
    .view-stack:has(> #view-overview.active) { padding-top: 24px; padding-bottom: 20px; }
    #view-overview.active { display: grid; grid-template-rows: auto 210px 86px auto; gap: 12px; align-content: start; }
    #view-overview .overview-heading-row, #view-overview .workflow-strip, #view-overview .overview-columns { margin: 0; }
    #view-overview .overview-columns { min-height: 0; }
}

@media (max-width: 760px) {
    #view-overview .overview-heading-row { align-items: flex-start; }
    #view-overview .overview-heading-row h1 { font-size: 28px; }
    #view-overview .focus-board { display: block; min-height: auto; }
    #view-overview .focus-copy { padding: 25px 22px 20px; }
    #view-overview .focus-copy h2 { font-size: 24px; }
    .focus-footer { align-items: flex-start; flex-direction: column; }
    .focus-meta { padding-left: 2px; }
    .focus-context { margin: 0 14px 14px; }
    .workflow-strip { grid-template-columns: 1fr; }
    .workflow-strip button + button { border-top: 1px solid rgba(69,82,94,.1); border-left: 0; }
}

@media (max-width: 430px) {
    .focus-actions { width: 100%; }
    .focus-actions button { flex: 1; }
    #view-overview .metric-band { grid-template-columns: 1fr 1fr; }
}

@media (prefers-color-scheme: dark) {
    .focus-evidence-button { border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.07); color: #c0d0dc; box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .focus-evidence-button:hover { background: rgba(255,255,255,.11); }
    .focus-meta { color: #929aa2; }
    .focus-context { border-color: rgba(255,255,255,.09); background: rgba(24,30,36,.5); box-shadow: inset 0 1px rgba(255,255,255,.06),0 16px 38px rgba(0,0,0,.13); }
    .focus-context-head, .focus-context-grid span, .focus-context-grid small { color: #89939c; }
    .focus-context-head strong { color: #b8c8d5; }
    .focus-context-grid strong { color: #f0f2f3; }
    .focus-context > p { color: #a1aab2; }
    .workflow-strip { border-color: rgba(255,255,255,.09); background: rgba(38,43,49,.68); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .workflow-strip button + button { border-color: rgba(255,255,255,.08); }
    .workflow-strip button:hover { background: rgba(255,255,255,.06); }
}

/* Capture fields stay square, with just enough radius to soften sharp corners. */
#noteTitle,
#noteContent,
.capture-meta input,
.capture-meta select { border-radius: 6px; }

/* Inspiration library document import: stacked files, not another banner. */
.document-import-section {
    margin-top: 24px;
    border: 1px solid rgba(255,255,255,.64);
    border-radius: 28px;
    background: rgba(255,255,255,.38);
    padding: 24px;
    box-shadow: var(--shadow-sm), inset 0 1px rgba(255,255,255,.82);
    backdrop-filter: blur(28px) saturate(145%);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
}
.document-upload { position: relative; min-height: 40px; border-radius: 14px; overflow: hidden; white-space: nowrap; }
.document-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.document-stack {
    --stack-height: 360px;
    position: relative;
    display: grid;
    min-height: var(--stack-height);
    padding: 12px 0 30px;
    isolation: isolate;
}
.document-card {
    position: sticky;
    top: 94px;
    z-index: var(--stack-order);
    min-height: 252px;
    margin-top: -48px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 26px;
    background:
        linear-gradient(110deg,rgba(255,255,255,.8),rgba(255,255,255,.42) 55%,rgba(255,255,255,.62)),
        linear-gradient(180deg,rgba(255,255,255,.42),rgba(230,235,239,.24));
    padding: 20px;
    box-shadow: 0 22px 58px rgba(35,43,52,.11), inset 0 1px rgba(255,255,255,.9);
    overflow: hidden;
    transform: translateY(var(--stack-offset)) scale(var(--stack-scale));
    transform-origin: center top;
    transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}
.document-card:first-child { margin-top: 0; }
.document-card:hover {
    border-color: color-mix(in srgb, var(--doc-accent) 34%, rgba(255,255,255,.72));
    box-shadow: 0 30px 72px rgba(35,43,52,.15), inset 0 1px rgba(255,255,255,.95);
    transform: translateY(calc(var(--stack-offset) - 6px)) scale(var(--stack-scale));
}
.document-card::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    content: "";
    background: linear-gradient(90deg,var(--doc-accent),transparent 78%);
}
.document-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.document-card header > div { min-width: 0; }
.document-kind {
    min-height: 24px;
    border: 1px solid rgba(92,112,135,.16);
    border-radius: 999px;
    background: rgba(92,112,135,.1);
    color: #50677e;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.document-card h3 {
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.28;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-card header em {
    flex: none;
    border-radius: 999px;
    background: rgba(255,255,255,.46);
    color: var(--muted);
    padding: 7px 10px;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
    box-shadow: inset 0 1px rgba(255,255,255,.78);
}
.document-card > p {
    margin: 14px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.72;
}
.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}
.document-meta span {
    min-height: 24px;
    border-radius: 999px;
    background: rgba(92,112,135,.08);
    color: #65717d;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    font-size: 8px;
    font-weight: 700;
}
.document-card footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
.document-note-button {
    min-height: 36px;
    border: 0;
    border-radius: 13px;
    background: rgba(37,45,54,.92);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    font-size: 10px;
    font-weight: 780;
    box-shadow: 0 9px 22px rgba(37,45,54,.14), inset 0 1px rgba(255,255,255,.14);
    transition: transform 170ms var(--ease), background 170ms var(--ease), box-shadow 170ms var(--ease);
}
.document-note-button svg { width: 13px; color: #d8c49a; }
.document-note-button:hover { background: #34424f; box-shadow: 0 13px 28px rgba(37,45,54,.2), inset 0 1px rgba(255,255,255,.18); transform: translateY(-1px); }
.document-empty {
    min-height: 270px;
    border: 1px dashed rgba(92,112,135,.2);
    border-radius: 24px;
    background: rgba(255,255,255,.28);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}
.document-empty span {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(92,112,135,.1);
    color: #50677e;
    display: grid;
    place-items: center;
}
.document-empty svg { width: 20px; height: 20px; }
.document-empty strong { color: var(--ink); font-size: 13px; }
.document-empty p { max-width: 440px; margin: 0; font-size: 10px; line-height: 1.65; }
.document-empty.parsing span { animation: importPulse 1.2s ease-in-out infinite; }

@supports (animation-timeline: view()) {
    .document-card {
        animation: documentStackReveal both;
        animation-timeline: view();
        animation-range: entry 6% cover 46%;
    }
}

@keyframes documentStackReveal {
    from { opacity: .86; transform: translateY(calc(var(--stack-offset) + 12px)) scale(calc(var(--stack-scale) - .012)); }
    to { opacity: 1; transform: translateY(var(--stack-offset)) scale(var(--stack-scale)); }
}
@keyframes importPulse {
    50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(92,112,135,.08); }
}

@media (max-width: 760px) {
    .document-import-section { border-radius: 24px; padding: 18px; }
    .document-upload { width: 100%; }
    .document-stack { min-height: calc(var(--stack-height) + 80px); }
    .document-card { top: 74px; border-radius: 22px; padding: 17px; }
    .document-card header { display: grid; gap: 10px; }
    .document-card header em { justify-self: start; }
    .document-card h3 { white-space: normal; }
    .document-card footer { justify-content: stretch; }
    .document-note-button { width: 100%; justify-content: center; }
}

@media (prefers-color-scheme: dark) {
    .document-import-section, .document-card, .document-empty {
        border-color: rgba(255,255,255,.1);
        background: rgba(38,43,49,.58);
        box-shadow: 0 20px 58px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.06);
    }
    .document-card { background: linear-gradient(120deg,rgba(43,49,56,.9),rgba(30,35,41,.72)); }
    .document-kind, .document-meta span, .document-empty span { background: rgba(255,255,255,.07); color: #b8c8d5; }
    .document-card header em { background: rgba(255,255,255,.07); color: #aab4bd; box-shadow: inset 0 1px rgba(255,255,255,.06); }
}

/* Compact file deck: import is an action, files become the visible object. */
.library-heading-actions { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.library-heading-actions .primary-button,
.library-heading-actions .document-upload { min-height: 40px; border-radius: 14px; }
.library-heading-actions .document-upload { padding: 0 12px; font-size: 11px; }

.document-import-section {
    max-width: 870px;
    margin-top: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 0 8px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.document-stack {
    min-height: auto;
    display: grid;
    align-items: start;
    padding: 20px 0 22px;
}
.document-card {
    position: relative;
    top: auto;
    z-index: var(--stack-order);
    min-height: 88px;
    margin-top: -34px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    background:
        linear-gradient(115deg,rgba(255,255,255,.78),rgba(248,250,251,.5) 58%,rgba(235,240,243,.62)),
        linear-gradient(90deg,color-mix(in srgb, var(--doc-accent) 14%, transparent),transparent 64%);
    padding: 0;
    box-shadow: 0 18px 44px rgba(35,43,52,.1), inset 0 1px rgba(255,255,255,.9);
    overflow: hidden;
    animation: none;
    transform: translateY(var(--stack-offset)) scale(var(--stack-scale));
}
.document-card:first-child { margin-top: 0; }
.document-card:hover,
.document-card.expanded {
    border-color: color-mix(in srgb, var(--doc-accent) 28%, rgba(255,255,255,.75));
    box-shadow: 0 24px 58px rgba(35,43,52,.14), inset 0 1px rgba(255,255,255,.94);
}
.document-card.expanded {
    z-index: 40;
    margin-bottom: 18px;
    transform: translateY(calc(var(--stack-offset) - 5px)) scale(1);
}
.document-card::before { height: 100%; width: 5px; background: linear-gradient(180deg,var(--doc-accent),transparent 86%); }
.document-card-main {
    width: 100%;
    min-height: 88px;
    border: 0;
    background: transparent;
    color: inherit;
    display: grid;
    grid-template-columns: 18px minmax(0,1fr) auto 24px;
    align-items: center;
    gap: 13px;
    padding: 17px 18px 17px 22px;
    text-align: left;
}
.document-ridge {
    width: 18px;
    height: 44px;
    border-radius: 999px;
    background:
        linear-gradient(180deg,rgba(255,255,255,.7),rgba(255,255,255,.16)),
        color-mix(in srgb, var(--doc-accent) 34%, rgba(92,112,135,.12));
    box-shadow: inset 0 1px rgba(255,255,255,.64);
}
.document-title-wrap {
    min-width: 0;
    display: grid;
    gap: 7px;
}
.document-title-wrap strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-status {
    min-height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 9px;
    font-weight: 760;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.76);
}
.document-chevron {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(92,112,135,.08);
    color: #5c7087;
    display: grid;
    place-items: center;
    transition: transform 180ms var(--ease), background 180ms var(--ease);
}
.document-chevron svg { width: 13px; }
.document-card.expanded .document-chevron { background: rgba(92,112,135,.14); transform: rotate(90deg); }
.document-card-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 22px;
    transition: max-height 240ms var(--ease), opacity 180ms var(--ease), padding 220ms var(--ease);
}
.document-card.expanded .document-card-details {
    max-height: 360px;
    opacity: 1;
    padding: 0 22px 20px 22px;
}
.document-card-details > p {
    margin: 0;
    border-top: 1px solid rgba(45,55,66,.09);
    color: var(--ink-soft);
    padding-top: 16px;
    font-size: 11px;
    line-height: 1.75;
}
.document-card-points {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}
.document-card-points section {
    min-width: 0;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 16px;
    background: rgba(255,255,255,.26);
    padding: 11px 12px;
    box-shadow: inset 0 1px rgba(255,255,255,.68);
}
.document-card-points span {
    color: #657487;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .08em;
}
.document-card-points strong {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-card footer { margin-top: 14px; }
.document-empty { min-height: 150px; }

@media (max-width: 760px) {
    .library-heading-actions {
        display: grid;
        grid-template-columns: 1fr 88px;
        margin-top: 18px;
    }
    .library-heading-actions .primary-button,
    .library-heading-actions .document-upload { width: 100%; }
    .document-import-section { max-width: none; }
    .document-card { border-radius: 21px; }
    .document-card-main {
        min-height: 84px;
        grid-template-columns: 14px minmax(0,1fr) 22px;
        padding: 16px;
    }
    .document-ridge { width: 14px; height: 40px; }
    .document-status { display: none; }
    .document-card-points { grid-template-columns: 1fr; }
    .document-title-wrap strong { white-space: normal; }
}

@media (prefers-color-scheme: dark) {
    .document-import-section { background: transparent; box-shadow: none; }
    .document-card {
        border-color: rgba(255,255,255,.1);
        background: linear-gradient(120deg,rgba(43,49,56,.9),rgba(30,35,41,.74));
        box-shadow: 0 18px 44px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.06);
    }
    .document-status, .document-card-points section { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.07); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .document-card-details > p { border-color: rgba(255,255,255,.08); }
}

/* The inspiration library is one outward-facing deck for notes and imported files. */
#view-library .library-list {
    display: grid;
    align-items: start;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    padding: 0 0 28px;
    isolation: isolate;
}
.library-stack-card {
    position: relative;
    z-index: var(--card-order);
    min-height: 108px;
    margin-top: -42px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 24px;
    background:
        linear-gradient(112deg,rgba(255,255,255,.86),rgba(247,249,250,.66) 58%,rgba(232,238,242,.76)),
        linear-gradient(90deg,color-mix(in srgb,var(--card-accent) 12%,transparent),transparent 62%);
    box-shadow: 0 18px 42px rgba(35,43,52,.11),inset 0 1px rgba(255,255,255,.94);
    overflow: hidden;
    transform: translateY(0) scale(1);
    transform-origin: center top;
    transition: margin 360ms cubic-bezier(.22,.75,.2,1),transform 360ms cubic-bezier(.22,.75,.2,1),box-shadow 300ms var(--ease),border-color 240ms var(--ease);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
}
.library-stack-card:first-child { margin-top: 0; }
.library-stack-card:hover {
    border-color: color-mix(in srgb,var(--card-accent) 30%,rgba(255,255,255,.8));
    box-shadow: 0 22px 50px rgba(35,43,52,.14),inset 0 1px rgba(255,255,255,.96);
}
.library-stack-card.expanded {
    z-index: 80;
    margin-top: -20px;
    margin-bottom: 26px;
    border-color: color-mix(in srgb,var(--card-accent) 38%,rgba(255,255,255,.82));
    box-shadow: 0 34px 76px rgba(35,43,52,.2),inset 0 1px rgba(255,255,255,.98);
    transform: translateY(8px) scale(1.008);
}
.library-stack-card:first-child.expanded { margin-top: 0; }
.library-card-main {
    width: 100%;
    min-height: 108px;
    border: 0;
    background: transparent;
    color: inherit;
    display: grid;
    grid-template-columns: 16px minmax(0,1fr) auto 26px;
    align-items: center;
    gap: 14px;
    padding: 17px 20px 18px 22px;
    text-align: left;
}
.library-card-ridge {
    width: 16px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(180deg,color-mix(in srgb,var(--card-accent) 82%,white),color-mix(in srgb,var(--card-accent) 32%,transparent));
    box-shadow: inset 0 1px rgba(255,255,255,.55);
}
.library-card-copy { min-width: 0; display: grid; gap: 5px; }
.library-card-kind {
    width: max-content;
    color: var(--card-accent);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.library-card-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.library-card-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.library-card-state {
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    color: var(--muted);
    padding: 7px 10px;
    font-size: 9px;
    font-style: normal;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.78);
}
.library-card-chevron {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(92,112,135,.08);
    color: #5c7087;
    display: grid;
    place-items: center;
    transition: transform 260ms var(--ease),background 220ms var(--ease);
}
.library-card-chevron svg { width: 13px; height: 13px; }
.library-stack-card.expanded .library-card-chevron { background: rgba(92,112,135,.15); transform: rotate(90deg); }
.library-card-details {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 360ms cubic-bezier(.22,.75,.2,1),opacity 240ms ease;
}
.library-card-details-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 22px;
    transition: padding 360ms cubic-bezier(.22,.75,.2,1);
}
.library-stack-card.expanded .library-card-details { grid-template-rows: 1fr; opacity: 1; }
.library-stack-card.expanded .library-card-details-inner { padding: 0 22px 22px; }
.library-card-details-inner > p {
    margin: 0;
    border-top: 1px solid rgba(45,55,66,.09);
    color: var(--ink-soft);
    padding-top: 17px;
    font-size: 11px;
    line-height: 1.75;
}
.library-card-details footer { display: flex; justify-content: flex-end; margin-top: 15px; }
.document-note-button.secondary { background: rgba(92,112,135,.12); color: #50677e; }
.library-empty {
    min-height: 92px;
    border: 1px dashed rgba(92,112,135,.22);
    border-radius: 20px;
    background: rgba(255,255,255,.26);
    color: var(--muted);
    display: grid;
    grid-template-columns: 34px auto;
    align-items: center;
    justify-content: center;
    column-gap: 11px;
    padding: 16px 22px;
    text-align: left;
}
.library-empty span { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(92,112,135,.09); color: #5c7087; display: grid; place-items: center; }
.library-empty svg { width: 17px; height: 17px; }
.library-empty strong { align-self: end; color: var(--ink); font-size: 11px; }
.library-empty p { align-self: start; margin: 3px 0 0; font-size: 9px; }
.library-empty.parsing span { animation: importPulse 1.2s ease-in-out infinite; }

@media (max-width: 760px) {
    .library-stack-card { min-height: 100px; margin-top: -36px; border-radius: 21px; }
    .library-stack-card.expanded { margin-top: -16px; transform: translateY(10px) scale(1.008); }
    .library-card-main { min-height: 100px; grid-template-columns: 13px minmax(0,1fr) 24px; gap: 11px; padding: 15px 16px; }
    .library-card-ridge { width: 13px; height: 46px; }
    .library-card-state { display: none; }
    .library-card-copy small { max-width: 100%; }
    .library-stack-card.expanded .library-card-details-inner { padding: 0 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .library-stack-card,
    .library-card-details,
    .library-card-details-inner,
    .library-card-chevron { transition: none; }
}

@media (prefers-color-scheme: dark) {
    .library-stack-card {
        border-color: rgba(255,255,255,.11);
        background: linear-gradient(118deg,rgba(48,55,63,.94),rgba(31,36,42,.88));
        box-shadow: 0 20px 48px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.07);
    }
    .library-card-state,
    .library-empty { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.06); }
    .library-card-details-inner > p { border-color: rgba(255,255,255,.08); }
}

/* Action brand system: a folded path becoming a decisive forward move. */
.brand-logo.action-mark,
.mini-logo.action-mark {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
    display: grid;
    place-items: center;
    box-shadow: none;
}
.brand-logo.action-mark { width: 40px; height: 40px; }
.mini-logo.action-mark { width: 38px; height: 38px; }
.action-mark svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: none;
    filter: drop-shadow(0 12px 22px rgba(39,50,59,.18));
}
.brand strong,
.mobile-auth-brand strong { font-weight: 780; letter-spacing: 0; }
.auth-showcase .mini-logo.action-mark {
    border: 0;
    background: transparent !important;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ai-trigger {
    min-height: 40px;
    border: 1px solid rgba(31,39,47,.22);
    border-radius: 12px;
    background: linear-gradient(145deg,#2a333d,#151b21);
    color: #f4f7f8;
    gap: 8px;
    padding: 0 14px;
    box-shadow: 0 12px 26px rgba(34,43,52,.16), inset 0 1px rgba(255,255,255,.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.ai-trigger svg { width: 15px; height: 15px; color: #d8c49a; }
.ai-trigger:hover,
.ai-trigger[aria-expanded="true"] {
    background: linear-gradient(145deg,#364554,#1d252d);
    color: #fff;
    box-shadow: 0 16px 34px rgba(34,43,52,.22), inset 0 1px rgba(255,255,255,.16);
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .ai-trigger { width: 40px; padding: 0; justify-content: center; }
    .ai-trigger span { display: none; }
}

@media (prefers-color-scheme: dark) {
    .brand-logo.action-mark,
    .mini-logo.action-mark { box-shadow: none; }
    .action-mark svg { filter: drop-shadow(0 14px 24px rgba(0,0,0,.34)); }
    .ai-trigger { border-color: rgba(255,255,255,.12); background: linear-gradient(145deg,#3a4652,#1b2229); color: #f3f6f7; }
    .ai-trigger:hover,
    .ai-trigger[aria-expanded="true"] { background: linear-gradient(145deg,#465766,#232d36); color: #fff; }
}

/* Detail modal and system-style completion feedback. */
.drawer-backdrop {
    z-index: 86;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 26px;
}
.detail-drawer {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    width: min(760px,calc(100vw - 52px));
    height: auto;
    max-height: min(760px,calc(100vh - 52px));
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 30px;
    background: rgba(248,250,251,.78);
    display: grid;
    grid-template-rows: auto minmax(0,1fr);
    overflow: hidden;
    opacity: 0;
    box-shadow: 0 34px 96px rgba(29,34,40,.24), inset 0 1px rgba(255,255,255,.86);
    transform: translateY(18px) scale(.965);
    transition: opacity 210ms var(--ease), transform 250ms var(--ease);
    backdrop-filter: blur(38px) saturate(155%);
    -webkit-backdrop-filter: blur(38px) saturate(155%);
}
.detail-drawer.open { opacity: 1; transform: translateY(0) scale(1); }
.detail-drawer > header {
    position: relative;
    top: auto;
    min-height: 70px;
    border-bottom: 1px solid rgba(45,55,66,.1);
    background: rgba(255,255,255,.38);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.detail-drawer > header > span {
    border-radius: 999px;
    background: rgba(92,112,135,.1);
    color: #50677e;
    padding: 7px 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
}
.detail-body {
    overflow-y: auto;
    padding: 34px 36px 32px;
}
.detail-body h2 {
    max-width: 620px;
    margin: 0;
    color: var(--ink);
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: 0;
}
.detail-meta { margin-top: 18px; gap: 8px; }
.detail-meta span {
    background: rgba(92,112,135,.09);
    color: #667381;
    padding: 7px 10px;
    font-size: 9px;
}
.detail-content {
    margin-top: 28px;
    border-top: 1px solid rgba(45,55,66,.1);
    border-bottom: 1px solid rgba(45,55,66,.1);
    color: var(--ink-soft);
    padding: 28px 0;
    font-size: 14px;
    line-height: 1.9;
}
.detail-divider { display: none; }
.detail-ai {
    margin-top: 24px;
    border: 1px solid rgba(255,255,255,.62);
    border-left: 0;
    border-radius: 22px;
    background: rgba(92,112,135,.09);
    padding: 20px 22px;
    box-shadow: inset 0 1px rgba(255,255,255,.72);
}
.detail-ai span { color: #536a7f; }
.detail-ai p { color: #66717b; font-size: 11px; }
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.detail-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(118,128,138,.1);
    color: #5f6973;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    font-size: 10px;
    font-weight: 750;
    transition: transform 170ms var(--ease), background 170ms var(--ease), color 170ms var(--ease);
}
.detail-actions button:hover { background: rgba(92,112,135,.14); color: #3d5061; transform: translateY(-1px); }
.detail-actions .task-complete {
    background: rgba(83,151,105,.14);
    color: #437d57;
}
.detail-actions .task-complete:hover { background: rgba(83,151,105,.2); color: #2f6f46; }
.detail-actions .task-restore {
    background: rgba(92,112,135,.13);
    color: #50677e;
}
.detail-actions button.danger:hover { background: rgba(183,81,98,.12); color: var(--rose); }

.action-check {
    position: relative;
    overflow: visible;
    transition: border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.action-check::before {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(83,151,105,.25);
    border-radius: 50%;
    content: "";
    opacity: 0;
    transform: scale(.66);
}
.action-check svg {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: opacity 120ms var(--ease);
}
.action-row.done .action-check,
.board-card.done .action-check {
    border-color: #539769;
    background: #539769;
    color: #fff;
}
.action-row.done .action-check svg,
.board-card.done .action-check svg {
    opacity: 1;
    stroke-dashoffset: 0;
}
.action-row.status-flash.done .action-check,
.board-card.status-flash.done .action-check { animation: checkButtonPop 520ms var(--ease) both; }
.action-row.status-flash.done .action-check::before,
.board-card.status-flash.done .action-check::before { animation: checkHalo 680ms var(--ease) both; }
.action-row.status-flash:not(.done) .action-check,
.board-card.status-flash:not(.done) .action-check {
    border-color: #5c7087;
    background: rgba(92,112,135,.12);
    color: #5c7087;
    animation: uncheckButtonSettle 460ms var(--ease) both;
}
.action-row.status-flash:not(.done) .action-check::before,
.board-card.status-flash:not(.done) .action-check::before { border-color: rgba(92,112,135,.25); animation: uncheckHalo 560ms var(--ease) both; }
.action-row.status-flash.done .action-check svg,
.board-card.status-flash.done .action-check svg {
    stroke-dashoffset: 24;
    animation: checkDraw 520ms 120ms var(--ease) both;
}
.action-row.status-flash.done,
.board-card.status-flash.done { animation: completedCardGlow 850ms var(--ease) both; }
.action-row.status-flash:not(.done),
.board-card.status-flash:not(.done) { animation: restoredCardGlow 760ms var(--ease) both; }

.operation-feedback {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms var(--ease), visibility 180ms var(--ease);
}
.operation-feedback.show { opacity: 1; visibility: visible; }
.operation-feedback-card {
    min-width: 190px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 28px;
    background: rgba(248,250,251,.78);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 24px 28px 22px;
    box-shadow: 0 28px 80px rgba(29,34,40,.2), inset 0 1px rgba(255,255,255,.8);
    transform: translateY(12px) scale(.94);
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
}
.operation-feedback.show .operation-feedback-card { animation: feedbackCardIn 420ms var(--ease) both; }
.operation-orb {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(83,151,105,.1);
    display: grid;
    place-items: center;
}
.operation-ring {
    position: absolute;
    inset: 6px;
    border: 4px solid rgba(83,151,105,.18);
    border-top-color: #539769;
    border-radius: 50%;
}
.operation-orb svg {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
    color: #fff;
    stroke-width: 2.4;
    stroke-dasharray: 34;
    stroke-dashoffset: 34;
    transform: translateY(2px);
}
.operation-dash {
    position: relative;
    z-index: 2;
    width: 30px;
    height: 5px;
    border-radius: 999px;
    background: #fff;
    opacity: 0;
    transform: scaleX(.25);
}
.operation-orb::after {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    content: "";
    background: #539769;
    box-shadow: 0 12px 24px rgba(83,151,105,.25);
    transform: scale(.72);
    opacity: 0;
}
.operation-feedback.show .operation-ring { animation: feedbackSpin 720ms cubic-bezier(.4,0,.2,1) both; }
.operation-feedback.show .operation-orb::after { animation: feedbackFill 620ms 420ms var(--ease) both; }
.operation-feedback.show .operation-orb svg { animation: checkDraw 520ms 610ms var(--ease) both; }
.operation-feedback[data-variant="success"] .operation-orb svg { display: none; }
.operation-feedback[data-variant="success"] .operation-orb::before {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    color: #fff;
    content: "完成";
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    opacity: 0;
    transform: translate(-50%,-50%) scale(.72);
}
.operation-feedback[data-variant="success"].show .operation-orb::before { animation: completionWordIn 460ms 610ms var(--ease) both; }
.operation-feedback-card strong {
    color: #25313b;
    font-size: 14px;
    letter-spacing: 0;
}
.operation-feedback[data-variant="restore"] .operation-orb,
.operation-feedback[data-variant="neutral"] .operation-orb { background: rgba(92,112,135,.11); }
.operation-feedback[data-variant="restore"] .operation-ring,
.operation-feedback[data-variant="neutral"] .operation-ring {
    border-color: rgba(92,112,135,.18);
    border-top-color: #5c7087;
}
.operation-feedback[data-variant="restore"] .operation-orb::after,
.operation-feedback[data-variant="neutral"] .operation-orb::after {
    background: #5c7087;
    box-shadow: 0 12px 24px rgba(92,112,135,.22);
}
.operation-feedback[data-variant="restore"].show .operation-ring { animation: feedbackSpinBack 640ms cubic-bezier(.4,0,.2,1) both; }
.operation-feedback[data-variant="restore"].show .operation-orb svg { animation: none; opacity: 0; }
.operation-feedback[data-variant="restore"].show .operation-dash { animation: dashReveal 460ms 610ms var(--ease) both; }

@keyframes feedbackCardIn {
    0% { opacity: 0; transform: translateY(18px) scale(.92); }
    68% { opacity: 1; transform: translateY(-2px) scale(1.025); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes feedbackSpin {
    0% { transform: rotate(0deg); }
    78% { transform: rotate(420deg); opacity: 1; }
    100% { transform: rotate(450deg); opacity: 0; }
}
@keyframes feedbackFill {
    0% { opacity: 0; transform: scale(.72); }
    68% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes checkDraw {
    to { stroke-dashoffset: 0; }
}
@keyframes completionWordIn {
    0% { opacity: 0; transform: translate(-50%,-50%) scale(.72); }
    68% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); }
    100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes checkButtonPop {
    0% { transform: scale(.84); }
    62% { transform: scale(1.14); }
    100% { transform: scale(1); }
}
@keyframes uncheckButtonSettle {
    0% { transform: rotate(-18deg) scale(1.08); }
    64% { transform: rotate(4deg) scale(.94); }
    100% { transform: rotate(0) scale(1); }
}
@keyframes checkHalo {
    0% { opacity: .75; transform: scale(.62); }
    100% { opacity: 0; transform: scale(1.8); }
}
@keyframes uncheckHalo {
    0% { opacity: .5; transform: scale(1.35); }
    100% { opacity: 0; transform: scale(.72); }
}
@keyframes completedCardGlow {
    0% { box-shadow: 0 0 0 rgba(83,151,105,0); }
    36% { box-shadow: 0 0 0 4px rgba(83,151,105,.1); }
    100% { box-shadow: 0 0 0 rgba(83,151,105,0); }
}
@keyframes restoredCardGlow {
    0% { box-shadow: 0 0 0 rgba(92,112,135,0); }
    36% { box-shadow: 0 0 0 4px rgba(92,112,135,.09); }
    100% { box-shadow: 0 0 0 rgba(92,112,135,0); }
}
@keyframes feedbackSpinBack {
    0% { transform: rotate(0deg); }
    78% { transform: rotate(-330deg); opacity: 1; }
    100% { transform: rotate(-360deg); opacity: 0; }
}
@keyframes dashReveal {
    0% { opacity: 0; transform: scaleX(.25); }
    72% { opacity: 1; transform: scaleX(1.14); }
    100% { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 760px) {
    .drawer-backdrop { padding: 12px; }
    .detail-drawer {
        width: min(100%,calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        border-radius: 24px;
    }
    .detail-body { padding: 26px 22px 24px; }
    .detail-body h2 { font-size: 27px; }
    .operation-feedback-card { min-width: 168px; border-radius: 24px; padding: 22px 24px 20px; }
    .operation-orb { width: 66px; height: 66px; }
}

@media (prefers-color-scheme: dark) {
    .detail-drawer {
        border-color: rgba(255,255,255,.11);
        background: rgba(38,43,49,.86);
        box-shadow: 0 34px 96px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.07);
    }
    .detail-drawer > header { border-bottom-color: rgba(255,255,255,.08); background: rgba(38,43,49,.68); }
    .detail-drawer > header > span { background: rgba(255,255,255,.07); color: #b8c8d5; }
    .detail-content { border-color: rgba(255,255,255,.08); }
    .detail-meta span, .detail-actions button { background: rgba(255,255,255,.07); color: #aeb8c1; }
    .detail-ai { border-color: rgba(255,255,255,.08); background: rgba(92,112,135,.14); }
    .detail-ai p { color: #aab4bd; }
    .operation-feedback-card {
        border-color: rgba(255,255,255,.12);
        background: rgba(38,43,49,.86);
        box-shadow: 0 28px 80px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.08);
    }
    .operation-feedback-card strong { color: #f2f3f4; }
}

/* Clearer insight hierarchy and a global AI analysis state. */
.insight-purpose {
    min-height: 76px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.66);
    border-radius: 20px;
    background: rgba(255,255,255,.38);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 18px;
    box-shadow: inset 0 1px rgba(255,255,255,.82);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.insight-purpose > div { display: grid; gap: 5px; }
.insight-purpose > div span { color: var(--muted); font-size: 9px; }
.insight-purpose > div strong { color: var(--ink); font-size: 12px; }
.insight-purpose ol { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.insight-purpose li { min-height: 34px; border-radius: 12px; background: rgba(92,112,135,.08); display: flex; align-items: center; gap: 7px; padding: 0 11px; }
.insight-purpose li em { color: #667d92; font-size: 8px; font-style: normal; font-weight: 850; }
.insight-purpose li span { color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
#view-insights .insight-hero { min-height: 236px; }
#view-insights .insight-hero > div:first-child { max-width: 780px; }
#view-insights .insight-hero h2 { margin-bottom: 12px; }
#view-insights .insight-hero p { max-width: 700px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.insight-hero-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.insight-hero-kicker > span { color: #62788e; font-size: 9px; font-weight: 850; }
.insight-hero-kicker > em { border-left: 1px solid rgba(69,82,94,.14); color: var(--muted); padding-left: 10px; font-size: 9px; font-style: normal; }
.insight-hero-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.insight-evidence-button {
    min-height: 34px;
    margin-top: 0;
    border: 1px solid rgba(92,112,135,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.42);
    color: #50677e;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    font-size: 9px;
    font-weight: 750;
}
.insight-evidence-button svg { width: 12px; height: 12px; }
.insight-action-button { min-height: 34px; border: 1px solid #35424d; border-radius: 12px; background: #35424d; color: #fff; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 9px; font-weight: 780; box-shadow: 0 8px 18px rgba(37,45,54,.14); transition: transform 170ms var(--ease),background 170ms var(--ease); }
.insight-action-button:hover { background: #41515e; transform: translateY(-1px); }
.insight-action-button svg { width: 12px; height: 12px; }
.insight-secondary { margin-top: 22px; }
.insight-secondary .insight-grid { grid-template-columns: minmax(0,1fr); margin-top: 12px; }
.insight-secondary .insight-card { min-height: 190px; }
#view-insights .assumption-section { margin-top: 24px; }
.weekly-live-status { margin-left: 10px; color: #718f7f; font-size: 9px; white-space: nowrap; }
.weekly-live-status i { width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #718f7f; display: inline-block; box-shadow: 0 0 0 4px rgba(113,143,127,.1); }

body.analysis-running { overflow: hidden; }
.analysis-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(22,27,32,.3);
    display: grid;
    place-items: center;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 240ms var(--ease),visibility 240ms var(--ease);
    backdrop-filter: blur(18px) saturate(115%);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
}
.analysis-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.analysis-overlay-card {
    width: min(410px,100%);
    min-height: 360px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 32px;
    background: rgba(247,249,250,.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 38px 30px;
    box-shadow: 0 40px 110px rgba(24,31,38,.28),inset 0 1px rgba(255,255,255,.95);
    transform: translateY(18px) scale(.96);
    transition: transform 360ms var(--ease);
}
.analysis-overlay.show .analysis-overlay-card { transform: translateY(0) scale(1); }
.analysis-core {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 25px;
    border-radius: 50%;
    background: rgba(92,112,135,.1);
    display: grid;
    place-items: center;
}
.analysis-core::before,
.analysis-core::after,
.analysis-core span {
    position: absolute;
    border: 1px solid rgba(92,112,135,.22);
    border-radius: 50%;
    content: "";
}
.analysis-core::before { inset: -12px; border-top-color: #667d92; animation: analysisOrbit 1.8s linear infinite; }
.analysis-core::after { inset: 10px; border-right-color: #718f7f; animation: analysisOrbit 1.25s linear infinite reverse; }
.analysis-core span { inset: 24px; border: 0; background: linear-gradient(145deg,#52687d,#718f7f); box-shadow: 0 14px 30px rgba(55,72,87,.25); }
.analysis-core svg { position: relative; z-index: 1; width: 25px; height: 25px; color: #fff; animation: analysisSpark 1.4s ease-in-out infinite; }
.analysis-kicker { color: #667d92; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.analysis-overlay-card > strong { margin-top: 10px; color: var(--ink); font-size: 20px; font-weight: 650; }
.analysis-overlay-card > p { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.analysis-progress { width: 100%; height: 5px; margin-top: 26px; border-radius: 999px; background: rgba(92,112,135,.1); overflow: hidden; }
.analysis-progress span { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#667d92,#718f7f); display: block; transition: width 620ms var(--ease); }
.analysis-stage-dots { display: flex; gap: 7px; margin-top: 13px; }
.analysis-stage-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(92,112,135,.18); transition: transform 220ms var(--ease),background 220ms var(--ease); }
.analysis-stage-dots i.active { background: #718f7f; transform: scale(1.35); }
.analysis-overlay.complete .analysis-core::before,
.analysis-overlay.complete .analysis-core::after { border-color: #539769; animation-duration: .7s; }
.analysis-overlay.complete .analysis-core span { background: #539769; }

@keyframes analysisOrbit { to { transform: rotate(360deg); } }
@keyframes analysisSpark { 50% { transform: scale(1.12) rotate(8deg); opacity: .76; } }

@media (max-width: 760px) {
    .insight-purpose { align-items: flex-start; flex-direction: column; gap: 12px; }
    .insight-purpose ol { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .insight-purpose li { justify-content: center; padding: 0 7px; }
    .insight-secondary .insight-grid { grid-template-columns: 1fr; }
    .weekly-live-status { display: block; margin: 7px 0 0; }
    .analysis-overlay-card { min-height: 330px; border-radius: 28px; padding: 30px 24px 26px; }
    .analysis-core { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .analysis-core::before,
    .analysis-core::after,
    .analysis-core svg { animation: none; }
}

@media (prefers-color-scheme: dark) {
    .insight-purpose { border-color: rgba(255,255,255,.09); background: rgba(39,44,50,.58); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .insight-purpose li,
    .insight-evidence-button { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.07); }
    .analysis-overlay { background: rgba(8,10,12,.48); }
    .analysis-overlay-card { border-color: rgba(255,255,255,.12); background: rgba(37,42,48,.9); box-shadow: 0 40px 110px rgba(0,0,0,.42),inset 0 1px rgba(255,255,255,.08); }
}

/* Writing typography: restrained Chinese weights with a calmer editorial rhythm. */
#noteTitle,
#noteContent {
    font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
    letter-spacing: 0;
    font-synthesis: none;
    caret-color: #667d92;
}
#noteTitle {
    height: 56px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    color: #20272e;
    padding: 0 16px;
    font-size: 17px;
    font-weight: 560;
    line-height: 1.35;
    box-shadow: inset 0 1px rgba(255,255,255,.9);
    transition: border-color 180ms var(--ease),background 180ms var(--ease),box-shadow 180ms var(--ease);
}
#noteContent {
    min-height: 210px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 7px;
    background: rgba(255,255,255,.68);
    color: #343b42;
    padding: 15px 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.85;
    box-shadow: inset 0 1px rgba(255,255,255,.88);
    transition: border-color 180ms var(--ease),background 180ms var(--ease),box-shadow 180ms var(--ease);
}
#noteTitle::placeholder {
    color: rgba(55,63,71,.48);
    font-weight: 480;
    opacity: 1;
}
#noteContent::placeholder {
    color: rgba(74,82,90,.5);
    font-weight: 400;
    opacity: 1;
}
#noteTitle:hover,
#noteContent:hover { background: rgba(255,255,255,.82); }
#noteTitle:focus,
#noteContent:focus {
    border-color: rgba(102,125,146,.34);
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 4px rgba(102,125,146,.08),inset 0 1px rgba(255,255,255,.94);
}
#noteTitle:focus-visible,
#noteContent:focus-visible { outline: none; }

@media (prefers-color-scheme: dark) {
    #noteTitle,
    #noteContent {
        border-color: rgba(255,255,255,.08);
        background: rgba(255,255,255,.065);
        color: #f0f2f3;
        box-shadow: inset 0 1px rgba(255,255,255,.05);
    }
    #noteTitle::placeholder,
    #noteContent::placeholder { color: rgba(220,225,229,.42); }
    #noteTitle:hover,
    #noteContent:hover,
    #noteTitle:focus,
    #noteContent:focus { background: rgba(255,255,255,.09); }
}

/* AI drawer: conversation first, supporting context second. */
.ai-rail { padding: 18px 20px 20px; }
.ai-rail > header {
    min-height: 48px;
    border-bottom: 1px solid rgba(92,112,135,.11);
    padding-bottom: 12px;
}
.ai-rail > header > div { gap: 8px; }
.ai-mark {
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: #50677e;
    box-shadow: none !important;
}
.ai-mark svg { width: 18px; height: 18px; }
.ai-rail > header strong { color: var(--ink); font-size: 12px; font-weight: 720; }
.ai-rail > header small { color: var(--muted-2); font-size: 8px; }
.ai-rail .reasoning-card { display: none; }

.ai-composer-primary {
    margin-top: 18px;
    border: 0;
    padding: 0 0 15px;
}
.ai-composer-primary label {
    color: var(--ink);
    font-size: 12px;
    font-weight: 680;
}
.ai-composer-primary > div {
    min-height: 66px;
    margin-top: 9px;
    border: 0;
    border-bottom: 1px solid rgba(92,112,135,.2);
    border-radius: 0;
    background: transparent;
    align-items: center;
    padding: 4px 0 9px;
    box-shadow: none;
    transition: border-color 180ms var(--ease);
}
.ai-composer-primary > div:focus-within { border-bottom-color: #667d92; }
.ai-composer-primary textarea {
    min-height: 46px;
    padding: 8px 2px;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.55;
}
.ai-composer-primary textarea::placeholder { color: var(--muted-2); opacity: .78; }
.ai-composer-primary button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #405467;
    color: #fff;
    box-shadow: 0 8px 18px rgba(52,70,86,.16),inset 0 1px rgba(255,255,255,.18);
}
.ai-composer-primary > p { margin-top: 8px; color: var(--muted-2); font-size: 8px; }

.ai-rail .rail-insight {
    margin-top: 4px;
    border-top: 1px solid rgba(92,112,135,.11);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    padding: 18px 0 0;
    box-shadow: none;
}
.ai-rail .rail-label { color: #8b7350; font-size: 8px; letter-spacing: .08em; }
.ai-rail .rail-insight h2 { margin: 9px 0 7px; color: var(--ink); font-size: 16px; line-height: 1.5; font-weight: 620; }
.ai-rail .rail-insight p { color: var(--muted); font-size: 9px; line-height: 1.65; }
.ai-rail .rail-insight button {
    width: max-content;
    min-height: 34px;
    margin-top: 13px;
    border: 0;
    border-radius: 999px;
    background: #2f3b46;
    color: #fff;
    gap: 18px;
    padding: 0 12px;
    box-shadow: 0 8px 18px rgba(40,51,61,.12),inset 0 1px rgba(255,255,255,.16);
}
.ai-rail .rail-evidence { margin-top: 22px; }
.ai-rail .rail-section-head { color: var(--ink-soft); font-size: 9px; }
.ai-rail .rail-section-head button { color: #50677e; font-size: 8px; }
.ai-rail #railEvidenceList { gap: 0; margin-top: 8px; }
.ai-rail .rail-evidence-item {
    border: 0;
    border-top: 1px solid rgba(92,112,135,.1);
    border-radius: 0;
    background: transparent;
    padding: 11px 1px;
    box-shadow: none;
}
.ai-rail .rail-evidence-item:hover { background: rgba(92,112,135,.055); transform: none; }
.ai-rail .rail-evidence-item strong { color: var(--ink); font-size: 9px; }
.ai-rail .rail-evidence-item p { margin-top: 4px; font-size: 8px; line-height: 1.5; }

@media (max-width: 760px) {
    .ai-rail { padding: 16px 18px 18px; }
    .ai-composer-primary { margin-top: 15px; }
}

@media (prefers-color-scheme: dark) {
    .ai-rail > header,
    .ai-rail .rail-insight,
    .ai-rail .rail-evidence-item { border-color: rgba(255,255,255,.08); }
    .ai-mark { color: #b8c8d5; }
    .ai-composer-primary > div { border-color: rgba(255,255,255,.12); background: transparent; box-shadow: none; }
    .ai-composer-primary > div:focus-within { border-color: #8ea4b7; }
    .ai-composer-primary button,
    .ai-rail .rail-insight button { background: #526a7f; }
    .ai-rail .rail-evidence-item { background: transparent; box-shadow: none; }
    .ai-rail .rail-evidence-item:hover { background: rgba(255,255,255,.05); }
}

/* The composer reads as the primary action without exposing browser focus chrome. */
.ai-composer-primary {
    position: relative;
    margin-top: 16px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 18px;
    background: rgba(255,255,255,.42);
    padding: 14px 14px 12px;
    box-shadow: 0 12px 30px rgba(40,50,59,.075),inset 0 1px rgba(255,255,255,.84);
    transition: border-color 180ms var(--ease),background 180ms var(--ease),box-shadow 180ms var(--ease),transform 180ms var(--ease);
}
.ai-composer-primary:hover {
    background: rgba(255,255,255,.56);
    box-shadow: 0 15px 34px rgba(40,50,59,.095),inset 0 1px rgba(255,255,255,.9);
}
.ai-composer-primary:focus-within {
    border-color: rgba(102,125,146,.34);
    background: rgba(255,255,255,.68);
    box-shadow: 0 0 0 4px rgba(102,125,146,.075),0 16px 38px rgba(40,50,59,.1),inset 0 1px rgba(255,255,255,.92);
    transform: translateY(-1px);
}
.ai-composer-primary label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #2b353e;
    font-size: 11px;
    font-weight: 720;
}
.ai-composer-primary label::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #718f7f;
    content: "";
    box-shadow: 0 0 0 4px rgba(113,143,127,.1);
}
.ai-composer-primary > div {
    min-height: 72px;
    margin-top: 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}
.ai-composer-primary > div:focus-within { border: 0; }
.ai-composer-primary textarea {
    min-height: 62px;
    padding: 11px 4px 8px 0;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.6;
}
.ai-composer-primary textarea:focus,
.ai-composer-primary textarea:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
.ai-composer-primary textarea::placeholder { color: rgba(88,98,108,.58); opacity: 1; }
.ai-composer-primary button { align-self: end; margin-bottom: 5px; }
.ai-composer-primary > p { margin: 5px 0 0; color: var(--muted-2); font-size: 8px; }

@media (prefers-color-scheme: dark) {
    .ai-composer-primary {
        border-color: rgba(255,255,255,.1);
        background: rgba(255,255,255,.065);
        box-shadow: 0 12px 30px rgba(0,0,0,.15),inset 0 1px rgba(255,255,255,.06);
    }
    .ai-composer-primary:hover,
    .ai-composer-primary:focus-within { background: rgba(255,255,255,.09); }
    .ai-composer-primary label { color: #eef1f3; }
    .ai-composer-primary textarea::placeholder { color: rgba(218,224,229,.42); }
}

/* Action affordances: completion is explicit, aligned, and easy to scan. */
.detail-header-controls { display: flex; align-items: center; gap: 8px; }
.detail-task-toggle {
    min-height: 38px;
    border: 1px solid rgba(58,178,112,.24);
    border-radius: 999px;
    background: rgba(58,178,112,.13);
    color: #287a50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    font-size: 10px;
    font-weight: 780;
    box-shadow: 0 8px 18px rgba(42,145,89,.1),inset 0 1px rgba(255,255,255,.66);
    transition: transform 170ms var(--ease),background 170ms var(--ease),box-shadow 170ms var(--ease);
}
.detail-task-toggle:hover { background: rgba(58,178,112,.2); box-shadow: 0 11px 23px rgba(42,145,89,.15),inset 0 1px rgba(255,255,255,.72); transform: translateY(-1px); }
.detail-task-toggle svg { width: 15px; height: 15px; stroke-width: 2.2; }
.detail-task-toggle.is-complete { border-color: #36ad70; background: #36ad70; color: #fff; box-shadow: 0 9px 22px rgba(54,173,112,.22),inset 0 1px rgba(255,255,255,.25); }

.board-card.done { opacity: .88; }

.action-check {
    width: 26px;
    height: 26px;
    padding: 0;
    border-color: rgba(70,92,110,.28);
    display: inline-grid;
    place-items: center;
}
.action-check svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke-width: 2.2;
    transform: translateY(1px);
}
.action-row.done .action-check,
.board-card.done .action-check { border-color: #36b274; background: #36b274; box-shadow: 0 6px 14px rgba(54,178,116,.2),inset 0 1px rgba(255,255,255,.24); }

.status-dot,
.live-dot {
    width: 9px;
    height: 9px;
    background: #2ed184;
    box-shadow: 0 0 0 4px rgba(46,209,132,.14),0 0 12px rgba(46,209,132,.26);
}

/* Secondary actions gain one measured step of contrast across the system. */
.outline-button {
    border-color: rgba(68,86,102,.18);
    background: rgba(255,255,255,.62);
    color: #354451;
    box-shadow: 0 5px 14px rgba(40,50,59,.055),inset 0 1px rgba(255,255,255,.82);
}
.ghost-button {
    background: rgba(92,112,135,.075);
    color: #526577;
    padding-inline: 13px;
}
.text-button { color: #47647c; font-weight: 780; }
.icon-button { color: #586b7b; }
.assumption-actions button,
.detail-actions button { color: #526270; background: rgba(92,112,135,.09); }

@media (max-width: 760px) {
    .detail-drawer > header { padding: 0 16px; }
    .detail-task-toggle { min-height: 34px; padding: 0 10px; }
}

@media (prefers-color-scheme: dark) {
    .detail-task-toggle { border-color: rgba(69,205,135,.2); background: rgba(69,205,135,.13); color: #79dca8; box-shadow: none; }
    .detail-task-toggle.is-complete { border-color: #3ab273; background: #3ab273; color: #fff; }
    .outline-button { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.075); color: #d0d8df; box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .ghost-button,
    .assumption-actions button,
    .detail-actions button { background: rgba(255,255,255,.075); color: #bcc7d0; }
    .icon-button { color: #aebbc5; }
}

/* One completion control per action card: icon and label move as one. */
.board-card { grid-template-columns: auto minmax(0,1fr); column-gap: 12px; }
.board-complete-control {
    width: auto;
    min-width: 72px;
    height: 26px;
    min-height: 26px;
    align-self: start;
    justify-self: start;
    border: 1px solid rgba(54,173,112,.22);
    border-radius: 999px;
    background: rgba(54,173,112,.1);
    color: #347d55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 7px;
    font-size: 8px;
    font-weight: 790;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.68);
    transition: transform 160ms var(--ease),background 160ms var(--ease),box-shadow 160ms var(--ease);
}
.board-complete-control:hover { background: rgba(54,173,112,.18); box-shadow: 0 7px 17px rgba(54,173,112,.11),inset 0 1px rgba(255,255,255,.72); transform: translateY(-1px); }
.board-complete-control svg { width: 11px; height: 11px; flex: none; display: block; stroke-width: 2.2; transform: translateY(.75px); }
.board-complete-control.is-complete { border-color: #3ab273; background: #3ab273; color: #fff; box-shadow: 0 7px 16px rgba(58,178,115,.18),inset 0 1px rgba(255,255,255,.22); }
.board-card.status-flash.done .board-complete-control { animation: checkButtonPop 520ms var(--ease) both; }
.board-card.status-flash.done .board-complete-control svg { stroke-dasharray: 24; stroke-dashoffset: 24; animation: checkDraw 520ms 120ms var(--ease) both; }
.board-card.status-flash:not(.done) .board-complete-control { animation: uncheckButtonSettle 460ms var(--ease) both; }

@media (max-width: 760px) {
    .board-card { grid-template-columns: 1fr; }
    .board-complete-control { min-width: 0; width: max-content; }
}

@media (prefers-color-scheme: dark) {
    .board-complete-control { border-color: rgba(69,205,135,.18); background: rgba(69,205,135,.1); color: #78d6a5; box-shadow: none; }
    .board-complete-control.is-complete { border-color: #3ab273; background: #3ab273; color: #fff; }
}

/* Workbench: one active task, one queue, then supporting context. */
#view-overview.active { max-height: none; }
#view-overview .overview-heading-row { margin-bottom: 18px; }
.workbench-main-grid { display: grid; grid-template-columns: minmax(0,1.38fr) minmax(320px,.62fr); gap: 14px; }
#view-overview .workbench-primary {
    min-height: 340px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 28px;
    background: linear-gradient(138deg,rgba(255,255,255,.76),rgba(238,243,246,.5));
    color: var(--ink);
    display: flex;
    flex-direction: column;
    padding: 24px 26px;
    box-shadow: 0 24px 70px rgba(43,53,63,.12),inset 0 1px rgba(255,255,255,.94);
}
.workbench-primary::before { background: radial-gradient(circle at 82% 18%,rgba(95,123,145,.14),transparent 34%); mask-image: none; }
.workbench-primary-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workbench-primary-head > span { color: #526a7f; display: inline-flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 850; }
.workbench-primary-head > span i { width: 7px; height: 7px; border-radius: 50%; background: #40bd7c; box-shadow: 0 0 0 5px rgba(64,189,124,.12); }
.workbench-primary-head em { border-radius: 999px; background: rgba(92,112,135,.1); color: #617284; padding: 6px 9px; font-size: 8px; font-style: normal; }
.workbench-primary-body { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 18px; padding: 26px 2px; }
.workbench-task-icon { width: 44px; height: 44px; border: 1px solid rgba(92,112,135,.15); border-radius: 14px; background: rgba(92,112,135,.1); color: #526b80; display: grid; place-items: center; }
.workbench-task-icon svg { width: 20px; height: 20px; }
.workbench-primary-body p { margin: 0 0 9px; color: #76818b; font-size: 9px; }
.workbench-primary-body h2 { max-width: 700px; margin: 0; color: #161b20; font-size: 28px; line-height: 1.28; }
.workbench-primary-body div > div { max-width: 680px; margin-top: 11px; color: #68737d; font-size: 11px; line-height: 1.7; }
.workbench-primary-footer { position: relative; z-index: 1; border-top: 1px solid rgba(69,82,94,.1); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 17px; }
.workbench-primary-footer > span { color: #7a858e; font-size: 9px; }
.workbench-primary-footer > div { display: flex; gap: 7px; }
.workbench-primary-footer button { min-height: 36px; }
.workbench-queue { min-height: 340px; border: 1px solid rgba(255,255,255,.68); border-radius: 24px; background: rgba(255,255,255,.48); display: flex; flex-direction: column; padding: 20px; box-shadow: var(--shadow-sm),inset 0 1px rgba(255,255,255,.86); backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
.workbench-queue .section-head { margin-bottom: 8px; }
.workbench-queue .action-list { display: grid; gap: 7px; }
.work-queue-item { position: relative; min-height: 62px; grid-template-columns: 28px minmax(0,1fr) 16px; border: 1px solid rgba(255,255,255,.64); border-radius: 14px; background: rgba(255,255,255,.38); padding: 10px; cursor: pointer; opacity: 0; animation: workItemEnter 360ms cubic-bezier(.25,.46,.45,.94) both; transition: transform 180ms var(--ease),background 180ms var(--ease),border-color 180ms var(--ease); }
.work-queue-item:nth-child(2) { animation-delay: 55ms; }
.work-queue-item:nth-child(3) { animation-delay: 110ms; }
.work-queue-item:hover { border-color: rgba(92,112,135,.22); background: rgba(255,255,255,.68); transform: translateX(3px); }
.work-queue-item:active { transform: translateX(3px) scale(.988); }
.work-queue-item .queue-arrow { width: 14px; height: 14px; color: #718191; transition: transform 180ms var(--ease); }
.work-queue-item:hover .queue-arrow { transform: translateX(2px); }
.workbench-queue-link { width: 100%; min-height: 36px; margin-top: auto; border: 0; border-top: 1px solid rgba(69,82,94,.1); background: transparent; color: #536b80; display: flex; align-items: flex-end; justify-content: space-between; padding: 13px 2px 0; font-size: 9px; font-weight: 760; }
.workbench-queue-link svg { width: 14px; height: 14px; }
.workbench-support-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 14px; margin-top: 14px; }
.workbench-review,.workbench-recent { min-height: 220px; border: 1px solid rgba(255,255,255,.68); border-radius: 24px; background: rgba(255,255,255,.48); padding: 21px 22px; box-shadow: var(--shadow-sm),inset 0 1px rgba(255,255,255,.84); }
.workbench-review { display: flex; flex-direction: column; }
.workbench-review-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workbench-review-label span { color: #5a7186; display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 820; }
.workbench-review-label svg { width: 14px; height: 14px; }
.workbench-review-label em { color: #76818b; font-size: 8px; font-style: normal; }
.workbench-review h2 { margin: 19px 0 9px; font-size: 18px; line-height: 1.4; }
.workbench-review > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.workbench-review > div:last-child { display: flex; gap: 7px; margin-top: auto; padding-top: 17px; }
.workbench-review .focus-action-button { min-height: 34px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 9px; }
.workbench-review .focus-action-button svg { width: 12px; height: 12px; }
.workbench-recent .section-head { margin-bottom: 5px; }
.workbench-recent .signal-row { padding: 11px 2px; }

/* Weekly review: a data-driven four-quadrant decision surface. */
.weekly-quadrant-report { border-radius: 28px; background: rgba(255,255,255,.56); }
.weekly-quadrant-report > header { background: rgba(255,255,255,.24); }
.weekly-quadrant-report .weekly-opening { min-height: 210px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 36px; padding: 34px 42px; text-align: left; }
.weekly-quadrant-report .weekly-opening p { margin-bottom: 12px; color: #5b7185; }
.weekly-quadrant-report .weekly-opening h2 { max-width: 760px; margin: 0; font-family: inherit; font-size: 29px; line-height: 1.42; font-weight: 600; }
.weekly-opening dl { display: grid; grid-template-columns: repeat(3,74px); margin: 0; }
.weekly-opening dl > div { border-left: 1px solid rgba(69,82,94,.12); display: grid; gap: 8px; padding-left: 16px; }
.weekly-opening dt { color: var(--muted); font-size: 8px; }
.weekly-opening dd { margin: 0; color: var(--ink); font-size: 22px; font-weight: 760; }
.weekly-quadrants { position: relative; border-top: 1px solid rgba(69,82,94,.12); display: grid; grid-template-columns: 1fr 1fr; }
.weekly-quadrants::before { position: absolute; z-index: 3; left: 50%; top: 50%; width: 70px; height: 24px; border: 1px solid rgba(92,112,135,.16); border-radius: 999px; background: rgba(243,246,248,.94); color: #60758a; display: grid; place-items: center; content: "本周复盘"; font-size: 8px; font-weight: 820; transform: translate(-50%,-50%); box-shadow: 0 6px 20px rgba(43,53,63,.09); pointer-events: none; }
.weekly-quadrant { --spot-x: 50%; --spot-y: 50%; position: relative; min-height: 280px; overflow: hidden; border-bottom: 1px solid rgba(69,82,94,.12); padding: 27px 30px; display: flex; flex-direction: column; isolation: isolate; }
.weekly-quadrant:nth-child(odd) { border-right: 1px solid rgba(69,82,94,.12); }
.weekly-quadrant::before { position: absolute; z-index: -1; inset: 0; content: ""; background: radial-gradient(220px circle at var(--spot-x) var(--spot-y),rgba(99,127,148,.13),transparent 72%); opacity: 0; transition: opacity 240ms var(--ease); }
.weekly-quadrant:hover::before { opacity: 1; }
.weekly-quadrant > span { color: #60768b; font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.weekly-quadrant h3 { margin: 20px 0 10px; font-size: 20px; line-height: 1.35; }
.weekly-quadrant h3 strong { font-size: 30px; }
.weekly-quadrant > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.72; }
.weekly-quadrant > button { width: max-content; min-height: 32px; margin-top: auto; border: 0; background: transparent; color: #526d83; display: inline-flex; align-items: center; gap: 7px; padding: 15px 0 0; font-size: 9px; font-weight: 760; }
.weekly-quadrant > button svg { width: 13px; height: 13px; transition: transform 180ms var(--ease); }
.weekly-quadrant > button:hover svg { transform: translateX(3px); }
.weekly-topic-list,.weekly-experiment-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.weekly-topic-list span,.weekly-experiment-meta span { border-radius: 999px; background: rgba(92,112,135,.09); color: #66798a; padding: 6px 8px; font-size: 8px; }
.weekly-confidence { display: flex; align-items: center; gap: 11px; margin-top: 17px; }
.weekly-confidence > i { width: 42px; height: 42px; border: 4px solid rgba(85,116,137,.16); border-top-color: #607f92; border-radius: 50%; display: grid; place-items: center; font-style: normal; transform: rotate(20deg); }
.weekly-confidence b { font-size: 11px; transform: rotate(-20deg); }
.weekly-confidence > span { color: #75808a; font-size: 8px; line-height: 1.45; }
.weekly-confidence em { color: #536d82; font-style: normal; }
.weekly-progress { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.weekly-progress > span { height: 7px; flex: 1; overflow: hidden; border-radius: 999px; background: rgba(92,112,135,.1); }
.weekly-progress i { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#627f91,#73a087); display: block; transition: width 700ms cubic-bezier(.25,.46,.45,.94); }
.weekly-progress em { color: #60758a; font-size: 8px; font-style: normal; white-space: nowrap; }
.weekly-quadrant.weekly-next { background: linear-gradient(145deg,#222c34,#30404a); color: #fff; }
.weekly-quadrant.weekly-next::before { background: radial-gradient(240px circle at var(--spot-x) var(--spot-y),rgba(215,189,118,.2),transparent 72%); }
.weekly-quadrant.weekly-next > span,.weekly-quadrant.weekly-next > button { color: #e2cc91; }
.weekly-quadrant.weekly-next > p { color: rgba(255,255,255,.62); }
.weekly-quadrant.weekly-next .weekly-experiment-meta span { background: rgba(255,255,255,.08); color: rgba(255,255,255,.72); }

@keyframes workItemEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width:981px) and (min-height:800px) {
    #view-overview.active { display: block; max-height: none; }
}
@media (max-width:900px) {
    .workbench-main-grid,.workbench-support-grid { grid-template-columns: 1fr; }
    .weekly-quadrant-report .weekly-opening { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
    #view-overview .workbench-primary { min-height: 310px; border-radius: 22px; padding: 20px; }
    .workbench-primary-body { grid-template-columns: 1fr; gap: 13px; }
    .workbench-primary-body h2 { font-size: 23px; }
    .workbench-primary-footer { align-items: flex-start; flex-direction: column; }
    .workbench-primary-footer > div { width: 100%; }
    .workbench-primary-footer button { flex: 1; }
    .weekly-quadrant-report .weekly-opening { padding: 28px 22px; }
    .weekly-quadrant-report .weekly-opening h2 { font-size: 24px; }
    .weekly-opening dl { grid-template-columns: repeat(3,1fr); }
    .weekly-quadrants { grid-template-columns: 1fr; }
    .weekly-quadrants::before { display: none; }
    .weekly-quadrant:nth-child(odd) { border-right: 0; }
    .weekly-quadrant { min-height: 250px; padding: 24px 22px; }
}
@media (prefers-color-scheme:dark) {
    #view-overview .workbench-primary,.workbench-queue,.workbench-review,.workbench-recent,.weekly-quadrant-report { border-color: rgba(255,255,255,.09); background: rgba(38,43,49,.68); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .workbench-primary-body h2,.weekly-quadrant-report .weekly-opening h2,.weekly-opening dd { color: #f0f2f3; }
    .work-queue-item { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
    .work-queue-item:hover { background: rgba(255,255,255,.09); }
    .weekly-quadrants::before { border-color: rgba(255,255,255,.1); background: #343c43; color: #bac8d2; }
    .weekly-quadrant,.weekly-quadrants,.weekly-quadrant:nth-child(odd) { border-color: rgba(255,255,255,.08); }
}
@media (prefers-reduced-motion:reduce) {
    .work-queue-item { opacity: 1; animation: none; }
    .weekly-quadrant::before { display: none; }
}

/* Weekly decision memo: editorial, static, and evidence-led. */
#view-weekly.motion-enter > * { opacity: 1; animation: none; transform: none; filter: none; }
.weekly-memo { border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: rgba(249,250,251,.72); box-shadow: 0 28px 80px rgba(43,53,63,.12),inset 0 1px rgba(255,255,255,.94); }
.weekly-memo > header { min-height: 58px; border-bottom-color: rgba(69,82,94,.12); background: rgba(255,255,255,.34); padding: 0 34px; letter-spacing: .12em; }
.weekly-memo-lead { min-height: 270px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 48px; padding: 42px 46px; }
.weekly-memo-lead > div { max-width: 760px; }
.weekly-memo-lead p { margin: 0 0 16px; color: #5d7488; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.weekly-memo-lead h2 { margin: 0; color: #171c21; font-size: 33px; line-height: 1.38; font-weight: 610; }
.weekly-memo-lead > div > span { display: block; max-width: 650px; margin-top: 17px; color: #77818a; font-size: 10px; line-height: 1.7; }
.weekly-memo-stats { min-width: 300px; margin: 0; display: grid; grid-template-columns: repeat(3,1fr); }
.weekly-memo-stats > div { min-width: 0; border-left: 1px solid rgba(69,82,94,.13); padding: 7px 0 7px 18px; }
.weekly-memo-stats dt { color: #7a858f; font-size: 8px; line-height: 1.4; }
.weekly-memo-stats dd { margin: 10px 0 0; color: #20272e; font-size: 24px; font-weight: 780; font-variant-numeric: tabular-nums; }
.weekly-story { border-top: 1px solid rgba(69,82,94,.12); border-bottom: 1px solid rgba(69,82,94,.12); background: rgba(226,232,236,.34); padding: 31px 38px 34px; }
.weekly-story-heading { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: end; gap: 22px; }
.weekly-story-heading > span { color: #60788d; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.weekly-story-heading h3 { margin: 0; color: #20272e; font-size: 19px; }
.weekly-story-heading p { margin: 7px 0 0; color: #79838c; font-size: 9px; }
.weekly-story-track { display: grid; grid-template-columns: 1fr 30px 1fr 30px 1fr 30px 1fr; align-items: center; margin-top: 28px; }
.weekly-story-track > div { min-width: 0; min-height: 105px; border-top: 2px solid #8193a1; padding: 15px 8px 0 0; }
.weekly-story-track > i { position: relative; width: 100%; height: 1px; background: rgba(81,103,119,.28); }
.weekly-story-track > i::after { position: absolute; right: 0; top: 50%; width: 6px; height: 6px; border-top: 1px solid #6b8191; border-right: 1px solid #6b8191; content: ""; transform: translateY(-50%) rotate(45deg); }
.weekly-story-track span { color: #72818d; font-size: 8px; font-weight: 820; }
.weekly-story-track strong { display: block; margin-top: 13px; overflow: hidden; color: #252c33; font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.weekly-story-track strong b { font-size: 24px; }
.weekly-story-track small { display: block; margin-top: 8px; color: #89929a; font-size: 8px; }
.weekly-story-track .weekly-topic-list { margin-top: 8px; flex-wrap: nowrap; overflow: hidden; }
.weekly-story-track .weekly-topic-list span { border: 0; background: transparent; color: #6b7e8e; padding: 0 7px 0 0; white-space: nowrap; }
.weekly-memo-body { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); }
.weekly-analysis-note { min-height: 390px; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 24px; padding: 42px 44px; }
.weekly-section-number { color: #81909c; font-size: 10px; font-weight: 850; }
.weekly-analysis-copy > span { color: #60788c; font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.weekly-analysis-copy h3 { margin: 17px 0 12px; color: #171d22; font-size: 27px; line-height: 1.3; }
.weekly-analysis-copy > p { max-width: 700px; margin: 0; color: #65717b; font-size: 11px; line-height: 1.82; }
.weekly-evidence-line { max-width: 700px; border-top: 1px solid rgba(69,82,94,.11); border-bottom: 1px solid rgba(69,82,94,.11); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 25px; padding: 16px 0; }
.weekly-evidence-line > strong { color: #526d82; font-size: 19px; }
.weekly-evidence-line > span { color: #818b94; font-size: 8px; }
.weekly-evidence-line button { min-height: 30px; border: 0; background: transparent; color: #526d82; display: inline-flex; align-items: center; gap: 7px; padding: 0; font-size: 9px; font-weight: 780; }
.weekly-evidence-line button svg { width: 13px; height: 13px; }
.weekly-action-note { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 16px; margin-top: 24px; }
.weekly-action-note span { color: #667d90; font-size: 8px; font-weight: 820; }
.weekly-action-note p { margin: 0; color: #7a858e; font-size: 9px; line-height: 1.7; }
.weekly-next-panel { min-height: 390px; background: #252f37; color: #fff; padding: 42px 36px; }
.weekly-next-panel > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.weekly-next-panel > div:first-child span { color: #d9c483; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.weekly-next-panel > div:first-child em { color: rgba(255,255,255,.42); font-size: 8px; font-style: normal; }
.weekly-next-panel h3 { margin: 34px 0 13px; font-size: 24px; line-height: 1.38; }
.weekly-next-panel > p { margin: 0; color: rgba(255,255,255,.62); font-size: 10px; line-height: 1.75; }
.weekly-next-panel dl { border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); margin: 28px 0 0; padding: 8px 0; }
.weekly-next-panel dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; }
.weekly-next-panel dt { color: rgba(255,255,255,.4); font-size: 8px; }
.weekly-next-panel dd { margin: 0; color: rgba(255,255,255,.78); font-size: 8px; }
.weekly-next-panel button { min-height: 38px; margin-top: 25px; border: 1px solid rgba(217,196,131,.34); border-radius: 999px; background: rgba(217,196,131,.08); color: #e1cd8f; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 9px; font-weight: 780; }
.weekly-next-panel button svg { width: 13px; height: 13px; }
.weekly-memo button,.weekly-memo button svg { transition: none; transform: none; }
.weekly-memo > footer { border-top: 1px solid rgba(69,82,94,.1); }
@media (max-width:960px) {
    .weekly-memo-lead { grid-template-columns: 1fr; }
    .weekly-memo-stats { min-width: 0; }
    .weekly-memo-body { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
    .weekly-memo > header { padding: 0 20px; }
    .weekly-memo-lead { min-height: 0; padding: 30px 22px; }
    .weekly-memo-lead h2 { font-size: 25px; }
    .weekly-memo-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .weekly-memo-stats > div { padding-left: 10px; }
    .weekly-story { padding: 27px 22px; }
    .weekly-story-heading { grid-template-columns: 1fr; }
    .weekly-story-track { grid-template-columns: 1fr; gap: 14px; }
    .weekly-story-track > i { width: 1px; height: 14px; margin-left: 4px; }
    .weekly-story-track > i::after { right: auto; left: -2px; top: auto; bottom: 0; transform: rotate(135deg); }
    .weekly-story-track > div { min-height: 82px; }
    .weekly-analysis-note { min-height: 0; grid-template-columns: 1fr; padding: 32px 22px; }
    .weekly-evidence-line { grid-template-columns: auto 1fr; }
    .weekly-evidence-line button { grid-column: 1 / -1; }
    .weekly-action-note { grid-template-columns: 1fr; }
    .weekly-next-panel { min-height: 0; padding: 34px 22px; }
}
@media (prefers-color-scheme:dark) {
    .weekly-memo { border-color: rgba(255,255,255,.09); background: rgba(38,43,49,.68); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .weekly-memo-lead h2,.weekly-memo-stats dd,.weekly-story-heading h3,.weekly-story-track strong,.weekly-analysis-copy h3 { color: #f0f2f3; }
    .weekly-story { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035); }
    .weekly-story-track > div { border-top-color: #728795; }
    .weekly-evidence-line { border-color: rgba(255,255,255,.08); }
}

/* Insight decisions come before supporting observations. */
.insight-decision-zone > header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.insight-decision-zone > header .overline { margin-bottom: 5px; }
.insight-decision-zone > header h2 { margin: 0; font-size: 23px; }
#view-insights .insight-decision-hero { min-height: 260px; border-color: rgba(92,112,135,.18); background: linear-gradient(132deg,rgba(255,255,255,.72),rgba(235,241,244,.54)); box-shadow: 0 22px 58px rgba(43,53,63,.1),inset 0 1px rgba(255,255,255,.92); }
.insight-decision-hero::before { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #6d8798; content: ""; }
.insight-decision-hero.is-confirmed { border-color: rgba(62,172,111,.3); }
.insight-decision-hero.is-confirmed::before { background: #45ad70; }
.insight-decision-hero.is-rejected { opacity: .72; }
.insight-decision-hero.is-rejected::before { background: #a5adb3; }
.insight-decision-button { min-height: 34px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; font-size: 9px; font-weight: 780; }
.insight-decision-button svg { width: 12px; height: 12px; }
.insight-decision-button.accept { border: 1px solid rgba(55,164,102,.25); background: rgba(55,164,102,.12); color: #367d54; }
.insight-decision-button.reject { border: 1px solid rgba(92,112,135,.14); background: rgba(255,255,255,.36); color: #73808a; }
.insight-decision-button:disabled { cursor: default; }
.insight-action-button[hidden] { display: none; }
.insight-pending-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 0 3px 9px; }
.insight-pending-head span { color: var(--ink); font-size: 11px; font-weight: 780; }
.insight-pending-head em { color: var(--muted); font-size: 8px; font-style: normal; }
.insight-decision-zone .assumption-table { border-radius: 18px; background: rgba(255,255,255,.45); }
.insight-decision-zone .assumption-row { min-height: 68px; }
#view-insights .insight-secondary { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(69,82,94,.1); }
#view-insights .insight-secondary .section-head h2 { font-size: 17px; }
#view-insights .insight-secondary .insight-card { min-height: 170px; background: rgba(255,255,255,.38); box-shadow: none; }

/* Weekly map: one central judgement, four related branches, no directional arrows. */
.weekly-map-report { border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: rgba(249,250,251,.72); box-shadow: 0 28px 80px rgba(43,53,63,.12),inset 0 1px rgba(255,255,255,.94); }
.weekly-map-report > header { min-height: 56px; border-bottom-color: rgba(69,82,94,.1); background: rgba(255,255,255,.3); padding: 0 32px; }
.weekly-map-intro { min-height: 180px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 40px; padding: 30px 38px; }
.weekly-map-intro > div { max-width: 700px; }
.weekly-map-intro p { margin: 0 0 10px; color: #5f778b; font-size: 8px; font-weight: 850; letter-spacing: .11em; }
.weekly-map-intro h2 { margin: 0; color: #171c21; font-size: 28px; line-height: 1.35; }
.weekly-map-intro > div > span { display: block; margin-top: 10px; color: #79838c; font-size: 9px; line-height: 1.65; }
.weekly-map-intro dl { min-width: 290px; margin: 0; display: grid; grid-template-columns: repeat(3,1fr); }
.weekly-map-intro dl > div { border-left: 1px solid rgba(69,82,94,.12); padding-left: 16px; }
.weekly-map-intro dt { color: #7d8790; font-size: 8px; }
.weekly-map-intro dd { margin: 9px 0 0; color: #20272e; font-size: 22px; font-weight: 780; }
.weekly-mindmap-section { border-top: 1px solid rgba(69,82,94,.1); border-bottom: 1px solid rgba(69,82,94,.1); background: rgba(228,233,237,.34); padding: 28px 34px 34px; }
.weekly-mindmap-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.weekly-mindmap-heading span { color: #667d90; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.weekly-mindmap-heading strong { color: #6f7c87; font-size: 9px; font-weight: 650; }
.weekly-mindmap { position: relative; min-height: 520px; display: grid; grid-template-columns: minmax(180px,1fr) minmax(280px,1.28fr) minmax(180px,1fr); grid-template-rows: 132px 176px 132px; align-items: center; gap: 24px 36px; margin-top: 20px; padding: 14px 4%; }
.weekly-map-connectors { position: absolute; z-index: 0; inset: 13% 16%; pointer-events: none; }
.weekly-map-connectors::before { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(86,110,128,.3); content: ""; }
.weekly-map-connectors::after { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(86,110,128,.3); content: ""; }
.weekly-map-node,.weekly-map-core { position: relative; z-index: 1; min-width: 0; border: 1px solid rgba(255,255,255,.78); border-radius: 14px; background: rgba(255,255,255,.72); padding: 16px 18px; box-shadow: 0 12px 32px rgba(43,53,63,.07),inset 0 1px rgba(255,255,255,.9); }
.weekly-map-node::before { position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--node-accent,#6e8999); content: ""; }
.weekly-map-node.input { --node-accent:#6e9a81; grid-column: 2; grid-row: 1; }
.weekly-map-node.insight { --node-accent:#c39962; grid-column: 1; grid-row: 2; }
.weekly-map-node.action { --node-accent:#62849c; grid-column: 3; grid-row: 2; }
.weekly-map-node.next { --node-accent:#8b819c; grid-column: 2; grid-row: 3; }
.weekly-map-node > span,.weekly-map-core > span { color: #71808c; font-size: 8px; font-weight: 850; }
.weekly-map-node > strong { display: block; margin-top: 10px; overflow: hidden; color: #20272e; font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.weekly-map-node > strong b { font-size: 22px; }
.weekly-map-node > small { display: block; margin-top: 7px; color: #818c95; font-size: 8px; line-height: 1.45; }
.weekly-map-node > small b { color: #536f83; }
.weekly-map-node > small em { color: inherit; font-style: normal; }
.weekly-map-node .weekly-topic-list { margin-top: 8px; flex-wrap: nowrap; overflow: hidden; }
.weekly-map-node .weekly-topic-list span { border: 0; background: transparent; color: #71818e; padding: 0 7px 0 0; white-space: nowrap; }
.weekly-map-core { grid-column: 2; grid-row: 2; border-color: rgba(40,51,60,.9); background: #27323a; color: #fff; padding: 24px 25px; box-shadow: 0 20px 50px rgba(38,49,58,.2); }
.weekly-map-core > span { color: #ddc88d; }
.weekly-map-core h3 { margin: 12px 0 0; color: #fff; font-size: 17px; line-height: 1.5; font-weight: 620; }
.weekly-map-reference { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); }
.weekly-map-reference > div { min-height: 330px; padding: 36px 40px; }
.weekly-map-reference > div > span,.weekly-map-reference > aside > span { color: #60798d; font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.weekly-map-reference h3 { margin: 17px 0 11px; color: #1c2228; font-size: 24px; }
.weekly-map-reference > div > p { max-width: 700px; margin: 0; color: #68747e; font-size: 10px; line-height: 1.78; }
.weekly-map-reference > div > button { min-height: 32px; margin-top: 18px; border: 0; background: transparent; color: #526f84; display: inline-flex; align-items: center; gap: 7px; padding: 0; font-size: 9px; font-weight: 780; }
.weekly-map-reference button svg { width: 13px; height: 13px; }
.weekly-map-reference > div > div { border-top: 1px solid rgba(69,82,94,.1); display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 16px; margin-top: 24px; padding-top: 17px; }
.weekly-map-reference > div > div strong { color: #61788a; font-size: 8px; }
.weekly-map-reference > div > div p { margin: 0; color: #7a858e; font-size: 9px; line-height: 1.65; }
.weekly-map-reference > aside { min-height: 330px; border-left: 1px solid rgba(69,82,94,.1); background: rgba(235,240,243,.46); padding: 36px 32px; }
.weekly-map-reference > aside h3 { font-size: 20px; }
.weekly-map-reference > aside > p { margin: 0; color: #707c86; font-size: 9px; line-height: 1.7; }
.weekly-map-reference > aside dl { margin: 22px 0 0; border-top: 1px solid rgba(69,82,94,.1); border-bottom: 1px solid rgba(69,82,94,.1); padding: 7px 0; }
.weekly-map-reference > aside dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.weekly-map-reference > aside dt { color: #84909a; font-size: 8px; }
.weekly-map-reference > aside dd { margin: 0; color: #596f81; font-size: 8px; }
.weekly-map-reference > aside button { min-height: 36px; margin-top: 22px; border: 1px solid rgba(82,111,132,.2); border-radius: 999px; background: rgba(82,111,132,.09); color: #526f84; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; font-size: 9px; font-weight: 780; }
.weekly-map-report button,.weekly-map-report button svg { transition: none; transform: none; }
@media (max-width:960px) {
    .weekly-map-intro { grid-template-columns: 1fr; }
    .weekly-map-intro dl { min-width: 0; }
    .weekly-mindmap { padding-inline: 0; }
    .weekly-map-reference { grid-template-columns: 1fr; }
    .weekly-map-reference > aside { border-top: 1px solid rgba(69,82,94,.1); border-left: 0; }
}
@media (max-width:760px) {
    .insight-decision-zone > header { align-items: flex-start; }
    .insight-hero-actions { flex-wrap: wrap; }
    .insight-pending-head { align-items: flex-start; flex-direction: column; gap: 5px; }
    .weekly-map-report > header { padding: 0 20px; }
    .weekly-map-intro { min-height: 0; padding: 28px 22px; }
    .weekly-map-intro h2 { font-size: 24px; }
    .weekly-map-intro dl { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .weekly-map-intro dl > div { padding-left: 10px; }
    .weekly-mindmap-section { padding: 25px 20px; }
    .weekly-mindmap-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .weekly-mindmap { min-height: 0; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding: 0; }
    .weekly-map-connectors { display: none; }
    .weekly-map-core { order: -1; }
    .weekly-map-node,.weekly-map-core { width: 100%; }
    .weekly-map-reference > div,.weekly-map-reference > aside { min-height: 0; padding: 30px 22px; }
    .weekly-map-reference > div > div { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme:dark) {
    .insight-decision-zone .assumption-table,.weekly-map-report { border-color: rgba(255,255,255,.09); background: rgba(38,43,49,.68); }
    #view-insights .insight-decision-hero,.weekly-map-node { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.055); box-shadow: inset 0 1px rgba(255,255,255,.05); }
    .weekly-map-intro h2,.weekly-map-intro dd,.weekly-map-node > strong,.weekly-map-reference h3 { color: #f0f2f3; }
    .weekly-mindmap-section,.weekly-map-reference > aside { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035); }
    .weekly-map-reference > div > div,.weekly-map-reference > aside dl { border-color: rgba(255,255,255,.08); }
}

/* Merge every pending insight into one continuous decision surface. */
.insight-decision-zone { overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(255,255,255,.46); box-shadow: 0 22px 60px rgba(43,53,63,.09),inset 0 1px rgba(255,255,255,.88); }
.insight-decision-zone > header { min-height: 82px; margin: 0; border-bottom: 1px solid rgba(69,82,94,.1); align-items: center; padding: 18px 24px; }
#view-insights .insight-decision-hero { position: relative; min-height: 250px; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.insight-decision-hero::before { display: none; }
.insight-pending-head { min-height: 54px; margin: 0; border-top: 1px solid rgba(69,82,94,.1); padding: 15px 24px 10px; }
.insight-decision-zone .assumption-table { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.insight-decision-zone .assumption-row { padding-inline: 24px; }
.insight-decision-zone .assumption-row:first-child { border-top: 0; }

/* The AI selects a weekly layout from real content density. */
.weekly-map-report > header > span { display: inline-flex; align-items: center; gap: 10px; }
.weekly-map-report > header > span em { border-left: 1px solid rgba(69,82,94,.14); color: #70818e; padding-left: 10px; font-size: 8px; font-style: normal; letter-spacing: 0; }
.weekly-evidence-samples { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.weekly-map-reference > div > .weekly-evidence-samples { border-top: 1px solid rgba(69,82,94,.1); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 22px; padding-top: 18px; }
.weekly-evidence-samples article { min-width: 0; border: 1px solid rgba(255,255,255,.65); border-radius: 10px; background: rgba(255,255,255,.34); padding: 11px 12px; cursor: pointer; }
.weekly-evidence-samples article > span { color: #718493; font-size: 7px; font-weight: 820; }
.weekly-evidence-samples article strong { display: block; margin-top: 6px; overflow: hidden; color: #293139; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.weekly-evidence-samples article p { margin: 5px 0 0; overflow: hidden; color: #7d8790; font-size: 8px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.weekly-map-report[data-layout="sparse"] .weekly-mindmap { min-height: 420px; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto auto auto; gap: 12px; padding: 12px 9%; }
.weekly-map-report[data-layout="sparse"] .weekly-map-connectors { display: none; }
.weekly-map-report[data-layout="sparse"] .weekly-map-core { grid-column: 1 / 3; grid-row: 1; }
.weekly-map-report[data-layout="sparse"] .weekly-map-node.input { grid-column: 1; grid-row: 2; }
.weekly-map-report[data-layout="sparse"] .weekly-map-node.insight { grid-column: 2; grid-row: 2; }
.weekly-map-report[data-layout="sparse"] .weekly-map-node.action { grid-column: 1; grid-row: 3; }
.weekly-map-report[data-layout="sparse"] .weekly-map-node.next { grid-column: 2; grid-row: 3; }
.weekly-map-report[data-layout="sparse"][data-has-actions="false"] .weekly-map-node.action { display: none; }
.weekly-map-report[data-layout="sparse"][data-has-actions="false"] .weekly-map-node.next { grid-column: 1 / 3; }
.weekly-map-report[data-layout="sparse"] .weekly-map-reference { grid-template-columns: minmax(0,1fr) minmax(280px,.65fr); }
.weekly-map-report[data-layout="sparse"] .weekly-evidence-samples { grid-template-columns: 1fr; }
.weekly-map-report[data-layout="dense"] .weekly-mindmap { min-height: 600px; grid-template-rows: 155px 210px 155px; padding-inline: 2%; }
.weekly-map-report[data-layout="dense"] .weekly-map-node { padding: 19px 20px; }
.weekly-map-report[data-layout="dense"] .weekly-map-core { padding: 28px; }
.weekly-map-report[data-layout="dense"] .weekly-map-core h3 { font-size: 18px; }
.weekly-map-report[data-layout="dense"] .weekly-topic-list { flex-wrap: wrap; }
.weekly-map-report[data-layout="dense"] .weekly-map-node .weekly-topic-list span { margin-bottom: 3px; }
.weekly-map-report[data-layout="dense"] .weekly-evidence-samples { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width:960px) {
    .weekly-map-report[data-layout="sparse"] .weekly-map-reference { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
    .insight-decision-zone { border-radius: 20px; }
    .insight-decision-zone > header { padding: 16px 18px; }
    #view-insights .insight-decision-hero { padding: 24px 18px; }
    .insight-pending-head,.insight-decision-zone .assumption-row { padding-inline: 18px; }
    .weekly-map-report[data-layout="sparse"] .weekly-mindmap,.weekly-map-report[data-layout="dense"] .weekly-mindmap { min-height: 0; display: flex; padding: 0; }
    .weekly-map-report[data-layout="sparse"] .weekly-map-node.action { display: block; }
    .weekly-evidence-samples,.weekly-map-reference > div > .weekly-evidence-samples { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme:dark) {
    .insight-decision-zone { border-color: rgba(255,255,255,.09); background: rgba(38,43,49,.68); box-shadow: inset 0 1px rgba(255,255,255,.06); }
    .insight-decision-zone > header,.insight-pending-head { border-color: rgba(255,255,255,.08); }
    .weekly-evidence-samples article { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.045); }
    .weekly-evidence-samples article strong { color: #e9edef; }
}

/* Motion layer: staged view entry and stable numeric updates. */
.app-view { animation: none; }
.app-view.motion-enter > * {
    opacity: 0;
    animation: motionContentIn 420ms var(--ease) both;
}
.app-view.motion-enter > .page-heading { animation-name: motionHeadingIn; animation-duration: 360ms; }
.app-view.motion-enter > :nth-child(2) { animation-delay: 55ms; }
.app-view.motion-enter > :nth-child(3) { animation-delay: 105ms; }
.app-view.motion-enter > :nth-child(4) { animation-delay: 155ms; }
.app-view.motion-enter > :nth-child(5) { animation-delay: 205ms; }
.app-view.motion-enter > :nth-child(n+6) { animation-delay: 245ms; }

#navSignalCount,
#navInsightCount,
#navActionCount,
#libraryCount,
#insightScore,
#actionProgressValue,
#todoCount,
#doneCount,
#weeklyHeaderInputs,
#weeklyHeaderDone,
#weeklyHeaderRate,
#weeklyInputCount,
#weeklyInsightScore,
#weeklyDoneCount { font-variant-numeric: tabular-nums; }

@keyframes motionHeadingIn {
    from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes motionContentIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .app-view.motion-enter > * { animation: none; opacity: 1; transform: none; filter: none; }
}

/* Account settings: profile controls belong to the signed-in workspace, not the auth showcase. */
body.settings-open { overflow: hidden; }
.auth-evidence span { gap: 7px; }
.auth-evidence span svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar b { font-size: inherit; }

.profile-menu-summary { display: grid; gap: 3px; padding: 8px 10px 9px; }
.profile-menu-summary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-summary small { overflow: hidden; color: var(--muted-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-divider { height: 1px; margin: 4px 7px; background: var(--line); }
.profile-menu button > span { display: grid; gap: 2px; text-align: left; }
.profile-menu button > span strong { font-size: 11px; font-weight: 720; }
.profile-menu button > span small { color: var(--muted-2); font-size: 8px; }
.profile-menu .profile-menu-primary { min-height: 48px; background: rgba(92,112,135,.08); }
.profile-menu .profile-menu-primary svg { color: #536b7e; }

.settings-modal {
    width: min(620px,100%);
    max-height: min(820px,calc(100vh - 44px));
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 26px;
    background: rgba(248,249,250,.9);
    box-shadow: 0 32px 100px rgba(30,40,48,.25),inset 0 1px rgba(255,255,255,.9);
    backdrop-filter: blur(38px) saturate(150%);
    -webkit-backdrop-filter: blur(38px) saturate(150%);
    animation: modalIn 220ms var(--ease);
}
.settings-modal > header { min-height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 24px; }
.settings-modal > header > div { display: flex; align-items: center; gap: 11px; }
.settings-modal > header > div > span:last-child { display: grid; gap: 3px; }
.settings-modal > header strong { font-size: 13px; }
.settings-modal > header small { color: var(--muted); font-size: 9px; }
.settings-modal form { padding: 0 24px 20px; }
.settings-profile-row { min-height: 116px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.settings-profile-row > div:last-child { min-width: 0; display: grid; gap: 5px; }
.settings-profile-row > div:last-child > strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.settings-profile-row p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.settings-profile-row button { width: max-content; border: 0; background: transparent; color: #60788d; padding: 3px 0; font-size: 9px; }
.settings-avatar-control { position: relative; width: 68px; height: 68px; flex: 0 0 68px; cursor: pointer; }
.settings-avatar-preview { width: 68px; height: 68px; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: linear-gradient(145deg,#526a7e,#273640); color: #fff; box-shadow: 0 12px 30px rgba(40,54,65,.18),inset 0 1px rgba(255,255,255,.25); display: grid; place-items: center; }
.settings-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-avatar-preview b { font-size: 21px; }
.settings-avatar-camera { position: absolute; right: -2px; bottom: -1px; width: 25px; height: 25px; border: 2px solid #f4f6f7; border-radius: 50%; background: #26343f; color: #fff; display: grid; place-items: center; box-shadow: 0 5px 14px rgba(34,45,54,.2); }
.settings-avatar-camera svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.settings-section { padding: 19px 0 4px; border-bottom: 1px solid var(--line); }
.settings-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.settings-section-title span { font-size: 11px; font-weight: 760; }
.settings-section-title small { color: var(--muted-2); font-size: 8px; }
.settings-field { min-height: 47px; display: grid; grid-template-columns: minmax(120px,.72fr) minmax(0,1.28fr); align-items: center; gap: 18px; }
.settings-field > span { color: var(--ink-soft); font-size: 10px; }
.settings-field input,.settings-field select { width: 100%; height: 38px; border: 1px solid rgba(126,138,148,.17); border-radius: 10px; outline: none; background: rgba(255,255,255,.62); color: var(--ink); padding: 0 12px; font: inherit; font-size: 11px; box-shadow: inset 0 1px rgba(255,255,255,.76); }
.settings-field input:focus,.settings-field select:focus { border-color: rgba(83,106,127,.46); box-shadow: 0 0 0 3px rgba(83,106,127,.1),inset 0 1px #fff; }
.settings-toggle { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.settings-toggle > span { display: grid; gap: 3px; }
.settings-toggle strong { font-size: 10px; }
.settings-toggle small { color: var(--muted-2); font-size: 8px; }
.settings-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.settings-toggle i { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; background: rgba(120,125,130,.25); transition: background 180ms var(--ease); }
.settings-toggle i::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); content: ""; transition: transform 180ms var(--ease); }
.settings-toggle input:checked + i { background: #43a777; }
.settings-toggle input:checked + i::after { transform: translateX(16px); }
.settings-toggle input:focus-visible + i { outline: 3px solid rgba(83,106,127,.15); outline-offset: 2px; }
.settings-data-section { padding-bottom: 18px; }
.settings-data-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.settings-data-actions button,.settings-data-actions label { min-height: 58px; border: 1px solid rgba(126,138,148,.15); border-radius: 12px; background: rgba(255,255,255,.44); color: var(--ink); display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 10px; padding: 0 13px; cursor: pointer; text-align: left; }
.settings-data-actions button:hover,.settings-data-actions label:hover { border-color: rgba(83,106,127,.24); background: rgba(255,255,255,.7); }
.settings-data-actions svg { width: 16px; height: 16px; fill: none; stroke: #60788d; stroke-width: 1.8; }
.settings-data-actions span { display: grid; gap: 3px; }
.settings-data-actions strong { font-size: 10px; }
.settings-data-actions small { color: var(--muted-2); font-size: 8px; }
.settings-data-actions input { display: none; }
.settings-modal form > footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-modal form > footer > span { color: var(--muted-2); font-size: 8px; }
.settings-modal form > footer > div { display: flex; align-items: center; gap: 8px; }

html.user-reduce-motion *,html.user-reduce-motion *::before,html.user-reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

@media (prefers-color-scheme:dark) {
    .settings-modal { border-color: rgba(255,255,255,.1); background: rgba(35,40,46,.94); box-shadow: 0 32px 100px rgba(0,0,0,.38),inset 0 1px rgba(255,255,255,.06); }
    .settings-field input,.settings-field select,.settings-data-actions button,.settings-data-actions label { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.05); }
    .settings-avatar-camera { border-color: #272d33; }
    .profile-menu .profile-menu-primary { background: rgba(255,255,255,.06); }
}

@media (max-width:760px) {
    .settings-modal { max-height: calc(100vh - 24px); border-radius: 22px; }
    .settings-modal > header { min-height: 66px; padding: 0 18px; }
    .settings-modal form { padding: 0 18px 14px; }
    .settings-profile-row { min-height: 106px; }
    .settings-section-title { display: grid; gap: 4px; }
    .settings-field { grid-template-columns: 1fr; gap: 7px; padding-bottom: 10px; }
    .settings-data-actions { grid-template-columns: 1fr; }
    .settings-modal form > footer { align-items: flex-end; }
    .settings-modal form > footer > span { max-width: 100px; }
}

/* Completion layer: history, feedback and user-controlled data. */
.auth-legal { max-width: 420px; margin: 14px auto 0; color: var(--muted-2); font-size: 8px; line-height: 1.55; text-align: center; }
.auth-legal a { color: #5d7488; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

.weekly-heading-actions { display: flex; align-items: center; gap: 9px; }
.weekly-history-control { min-width: 150px; height: 42px; border: 1px solid rgba(92,112,135,.15); border-radius: 12px; background: rgba(255,255,255,.48); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; padding: 0 11px; }
.weekly-history-control > span { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.weekly-history-control select { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 9px; font-weight: 720; }
.weekly-trend { min-height: 52px; border-top: 1px solid rgba(92,112,135,.1); border-bottom: 1px solid rgba(92,112,135,.1); display: grid; grid-template-columns: auto auto minmax(220px,1fr); align-items: center; gap: 24px; margin: -4px 0 14px; padding: 9px 4px; }
.weekly-trend > span { color: #60788d; font-size: 8px; font-weight: 820; letter-spacing: .06em; }
.weekly-trend > div { display: flex; align-items: center; gap: 7px; }
.weekly-trend strong { border-radius: 999px; background: rgba(92,112,135,.08); color: #536a7d; padding: 6px 9px; font-size: 8px; font-weight: 760; white-space: nowrap; }
.weekly-trend p { margin: 0; color: var(--muted-2); font-size: 8px; text-align: right; }
.weekly-no-evidence { margin: 0; color: var(--muted-2); font-size: 8px; }

.ai-boundary-note { border-top: 1px solid var(--line); display: flex; align-items: flex-start; gap: 8px; margin: auto 24px 20px; padding-top: 14px; color: var(--muted-2); font-size: 8px; line-height: 1.55; }
.ai-boundary-note svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: #668096; stroke-width: 1.7; }

.action-feedback-modal { width: min(560px,100%); max-height: calc(100vh - 44px); overflow-y: auto; border: 1px solid rgba(255,255,255,.72); border-radius: 22px; background: rgba(248,249,250,.92); box-shadow: 0 32px 100px rgba(30,40,48,.25),inset 0 1px rgba(255,255,255,.9); backdrop-filter: blur(38px) saturate(150%); -webkit-backdrop-filter: blur(38px) saturate(150%); animation: modalIn 220ms var(--ease); }
.action-feedback-modal > header { min-height: 70px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 22px; }
.action-feedback-modal > header > div { display: flex; align-items: center; gap: 11px; }
.action-feedback-modal > header > div > span:last-child { display: grid; gap: 3px; }
.action-feedback-modal > header strong { font-size: 13px; }
.action-feedback-modal > header small { color: var(--muted); font-size: 9px; }
.action-feedback-modal form { display: grid; gap: 18px; padding: 22px; }
.action-feedback-context { display: grid; gap: 5px; }
.action-feedback-context span { color: #60788d; font-size: 8px; font-weight: 820; }
.action-feedback-context strong { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
#actionResultOutcome { margin: 0; border: 0; padding: 0; }
#actionResultOutcome legend,.action-result-field > span { margin-bottom: 9px; color: var(--ink-soft); font-size: 9px; font-weight: 720; }
#actionResultOutcome > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; border-radius: 12px; background: rgba(92,112,135,.08); padding: 4px; }
#actionResultOutcome label { cursor: pointer; }
#actionResultOutcome input { position: absolute; opacity: 0; pointer-events: none; }
#actionResultOutcome label span { min-height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); font-size: 9px; font-weight: 720; }
#actionResultOutcome input:checked + span { background: rgba(255,255,255,.9); color: #2d7e5b; box-shadow: 0 4px 12px rgba(38,48,57,.08),inset 0 1px #fff; }
.action-result-field { display: grid; }
.action-result-field em { color: var(--muted-2); font-size: 8px; font-style: normal; font-weight: 500; }
.action-result-field textarea { min-height: 112px; resize: vertical; border: 1px solid rgba(126,138,148,.18); border-radius: 11px; outline: none; background: rgba(255,255,255,.66); color: var(--ink); padding: 12px; font: inherit; font-size: 10px; line-height: 1.65; }
.action-result-field textarea:focus { border-color: rgba(83,106,127,.46); box-shadow: 0 0 0 3px rgba(83,106,127,.1); }
.action-feedback-modal form > footer { border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }

.settings-feedback-section { padding-bottom: 18px; }
.settings-feedback-grid { display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: end; gap: 9px; }
.settings-feedback-grid label { display: grid; gap: 6px; }
.settings-feedback-grid label > span { color: var(--muted); font-size: 8px; }
.settings-feedback-grid select,.settings-feedback-grid textarea,.delete-account-confirm input { width: 100%; border: 1px solid rgba(126,138,148,.17); border-radius: 10px; outline: none; background: rgba(255,255,255,.62); color: var(--ink); padding: 0 10px; font: inherit; font-size: 9px; }
.settings-feedback-grid select { height: 38px; }
.settings-feedback-grid textarea { min-height: 38px; max-height: 90px; resize: vertical; padding-block: 9px; }
.settings-feedback-grid button { min-height: 38px; border: 0; border-radius: 10px; background: #35434f; color: #fff; padding: 0 12px; font-size: 9px; font-weight: 760; }
.settings-privacy-section { padding-bottom: 16px; }
.settings-legal-links { display: flex; align-items: center; gap: 8px; }
.settings-legal-links a,.settings-legal-links button { min-height: 34px; border: 1px solid rgba(126,138,148,.14); border-radius: 9px; background: rgba(255,255,255,.42); color: #5d7284; display: inline-flex; align-items: center; padding: 0 10px; font: inherit; font-size: 8px; text-decoration: none; }
.settings-legal-links button { margin-left: auto; color: #a04f5a; cursor: pointer; }
.delete-account-confirm { margin-top: 12px; border-top: 1px solid rgba(177,73,86,.14); padding-top: 12px; }
.delete-account-confirm[hidden] { display: none; }
.delete-account-confirm p { margin: 0; display: grid; gap: 4px; }
.delete-account-confirm strong { color: #a34855; font-size: 9px; }
.delete-account-confirm span { color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.delete-account-confirm > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.delete-account-confirm input { height: 38px; }
.delete-account-confirm button { min-height: 38px; border: 0; border-radius: 10px; background: #a34855; color: #fff; padding: 0 13px; font-size: 9px; font-weight: 760; }
.delete-account-confirm button:disabled,.settings-feedback-grid button:disabled { opacity: .42; cursor: not-allowed; }

@media (prefers-color-scheme:dark) {
    .weekly-history-control,.weekly-trend strong,#actionResultOutcome input:checked + span,.action-result-field textarea,.settings-feedback-grid select,.settings-feedback-grid textarea,.settings-legal-links a,.settings-legal-links button,.delete-account-confirm input { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.055); }
    .action-feedback-modal { border-color: rgba(255,255,255,.1); background: rgba(35,40,46,.95); }
    .action-feedback-context strong { color: #f1f3f4; }
}

@media (max-width:760px) {
    .weekly-heading-actions { width: 100%; align-items: stretch; }
    .weekly-history-control { min-width: 0; flex: 1; }
    .weekly-heading-actions .outline-button { flex: 0 0 auto; }
    .weekly-trend { grid-template-columns: 1fr; gap: 7px; padding: 12px 2px; }
    .weekly-trend p { text-align: left; }
    .weekly-trend > div { flex-wrap: wrap; }
    .action-feedback-modal { max-height: calc(100vh - 24px); border-radius: 20px; }
    .action-feedback-modal form { padding: 18px; }
    #actionResultOutcome > div { grid-template-columns: 1fr; }
    .settings-feedback-grid { grid-template-columns: 1fr; }
    .settings-legal-links { align-items: stretch; flex-wrap: wrap; }
    .settings-legal-links button { width: 100%; margin-left: 0; justify-content: center; }
}

.legal-page { min-height: 100vh; background: #eef2f5; color: #20272e; }
.legal-nav { position: sticky; z-index: 5; top: 0; min-height: 64px; border-bottom: 1px solid rgba(69,82,94,.1); background: rgba(244,247,249,.78); display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px,calc((100vw - 900px)/2)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.legal-nav a { color: #536a7c; display: inline-flex; align-items: center; gap: 8px; font-size: 10px; text-decoration: none; }
.legal-nav a:first-child { color: #20272e; font-size: 14px; }
.legal-nav svg { width: 28px; height: 28px; }
.legal-document { width: min(760px,calc(100% - 40px)); margin: 0 auto; padding: 72px 0 110px; }
.legal-document > .overline { color: #60788d; }
.legal-document h1 { margin: 12px 0 18px; font-size: 46px; line-height: 1.1; }
.legal-lead { max-width: 680px; margin: 0 0 58px; color: #65727e; font-size: 15px; line-height: 1.8; }
.legal-document section { border-top: 1px solid rgba(69,82,94,.12); display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 30px; padding: 26px 0; }
.legal-document h2 { margin: 0; font-size: 14px; }
.legal-document section p { margin: 0; color: #65727e; font-size: 11px; line-height: 1.9; }
.legal-document section a { color: #526f85; }
@media (max-width:620px) {
    .legal-document { padding-top: 52px; }
    .legal-document h1 { font-size: 36px; }
    .legal-lead { margin-bottom: 42px; font-size: 13px; }
    .legal-document section { grid-template-columns: 1fr; gap: 10px; }
}

/* Auth clarity pass: one task, one primary action, one quiet escape hatch. */
.auth-entry { padding: 32px; }
.auth-entry-inner {
    width: min(440px,100%);
    border-radius: 24px;
    padding: 30px;
}
.auth-intro { margin: 0 0 20px; }
.auth-entry .auth-intro h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.16;
    font-weight: 740;
}
.auth-entry .auth-lead {
    margin: 8px 0 0;
    color: #71808c;
    font-size: 12px;
    line-height: 1.6;
}
.auth-mode-switch { margin: 0 0 20px; }
.auth-email-support { display: none !important; }
.auth-form { gap: 14px 12px; }
.auth-form label { gap: 7px; font-size: 11px; }
.auth-form input {
    height: 50px;
    border-radius: 12px;
    background: rgba(255,255,255,.52);
}
.auth-field-help {
    display: none;
    min-height: 0;
    margin: 0;
}
.auth-field-help.error { display: block; }
.secondary-auth-button,
.auth-form.register-mode .secondary-auth-button {
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    background: #2d3944;
    color: #fff;
    box-shadow: 0 10px 24px rgba(45,57,68,.14), inset 0 1px rgba(255,255,255,.12);
}
.secondary-auth-button:hover,
.auth-form.register-mode .secondary-auth-button:hover { background: #26313b; }
.auth-demo-row {
    min-height: 38px;
    border-top: 1px solid rgba(76,93,108,.11);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 18px;
    padding-top: 10px;
    color: #8a949d;
    font-size: 9px;
}
.auth-demo-row .demo-button {
    width: auto;
    min-height: 30px;
    border-radius: 8px;
    background: transparent;
    color: #52697c;
    gap: 5px;
    padding: 0 7px;
    font-size: 10px;
    box-shadow: none;
}
.auth-demo-row .demo-button:hover {
    background: rgba(92,112,135,.08);
    box-shadow: none;
    transform: none;
}
.auth-demo-row .demo-button svg { width: 13px; height: 13px; color: currentColor; }
.auth-legal { margin-top: 8px; font-size: 7.5px; }
.auth-screen.otp-active .auth-intro,
.auth-screen.otp-active .auth-demo-row,
.auth-screen.otp-active .auth-legal { display: none; }
.auth-screen.otp-active .auth-otp-panel { margin-top: 0; }

@media (min-width:761px) and (max-height:820px) {
    .auth-screen.register-active .auth-entry-inner { padding: 24px 28px; }
    .auth-screen.register-active .auth-entry .auth-intro { margin-bottom: 14px; }
    .auth-screen.register-active .auth-entry h1 { font-size: 29px; }
    .auth-screen.register-active .auth-lead { margin-top: 6px; font-size: 10px; }
    .auth-screen.register-active .auth-mode-switch { margin: 0 0 14px; }
    .auth-screen.register-active .auth-form { gap: 10px; }
    .auth-screen.register-active .auth-form label { gap: 5px; }
    .auth-screen.register-active .auth-form input { height: 44px; }
    .auth-screen.register-active .secondary-auth-button { min-height: 44px; }
    .auth-screen.register-active .auth-demo-row { min-height: 32px; margin-top: 12px; padding-top: 6px; }
    .auth-screen.register-active .auth-legal { margin-top: 5px; }
}

@media (max-width:760px) {
    .auth-entry { min-height: 100%; padding: 20px 16px; }
    .auth-entry-inner { border-radius: 22px; padding: 24px; }
    .mobile-auth-brand { margin-bottom: 26px; }
    .auth-entry .auth-intro h1 { font-size: 30px; }
    .auth-entry .auth-lead { font-size: 11px; }
    .auth-mode-switch { margin-bottom: 18px; }
    .auth-form { gap: 13px; }
    .auth-demo-row { margin-top: 16px; }
}

/* Action Agent: one visible goal, one approved plan, one next step. */
.agent-overview-card {
    min-height: 86px;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 18px;
    background: rgba(247,249,250,.62);
    display: grid;
    grid-template-columns: minmax(0,1fr) 116px auto;
    align-items: center;
    gap: 22px;
    margin: 0 0 14px;
    padding: 15px 17px;
    box-shadow: 0 12px 34px rgba(43,54,64,.075),inset 0 1px rgba(255,255,255,.9);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
}
.agent-overview-main { min-width: 0; display: flex; align-items: center; gap: 13px; }
.agent-overview-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(87,109,129,.14);
    border-radius: 11px;
    background: rgba(92,116,137,.09);
    color: #536d83;
    display: grid;
    place-items: center;
}
.agent-overview-icon svg { width: 17px; height: 17px; }
.agent-overview-main > div { min-width: 0; }
.agent-overview-main span:not(.agent-overview-icon) { color: #6f8598; font-size: 8px; font-weight: 720; }
.agent-overview-main h2 { margin: 4px 0 3px; color: #20282f; font-size: 14px; line-height: 1.25; font-weight: 730; overflow-wrap: anywhere; }
.agent-overview-main p { margin: 0; color: #78838d; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.agent-overview-progress { display: grid; gap: 7px; }
.agent-overview-progress > span { color: #596b7b; font-size: 9px; font-weight: 720; text-align: right; }
.agent-overview-progress > div { height: 4px; border-radius: 4px; background: rgba(87,106,123,.11); overflow: hidden; }
.agent-overview-progress i { width: 0; height: 100%; border-radius: inherit; background: #66829a; display: block; transition: width 420ms cubic-bezier(.22,1,.36,1); }
.agent-overview-open {
    min-height: 38px;
    border: 1px solid rgba(53,65,76,.17);
    border-radius: 11px;
    background: #2f3a44;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 13px;
    font-size: 9px;
    font-weight: 720;
    box-shadow: 0 8px 18px rgba(39,48,57,.13),inset 0 1px rgba(255,255,255,.14);
    transition: transform 170ms var(--ease),background 170ms var(--ease),box-shadow 170ms var(--ease);
}
.agent-overview-open svg { width: 13px; height: 13px; }
.agent-overview-open:hover { background: #3b4853; box-shadow: 0 11px 23px rgba(39,48,57,.17),inset 0 1px rgba(255,255,255,.16); transform: translateY(-1px); }
.agent-overview-card[data-status="active"] .agent-overview-icon,
.agent-overview-card[data-status="completed"] .agent-overview-icon { background: rgba(53,172,111,.11); color: #2f9865; }
.agent-overview-card[data-status="active"] .agent-overview-progress i,
.agent-overview-card[data-status="completed"] .agent-overview-progress i { background: #49ad78; }
.agent-overview-card[data-status="ready"] .agent-overview-icon { background: rgba(188,145,71,.12); color: #9a7335; }

.ai-rail {
    width: min(460px,calc(100vw - 24px));
    padding: 18px 20px 17px;
    overflow: hidden;
}
.ai-rail > header { flex: 0 0 auto; }
.agent-header-actions { display: flex; align-items: center; gap: 4px !important; }
.agent-header-actions > #agentNewGoal {
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    background: rgba(82,103,122,.08);
    color: #52697d;
    padding: 0 9px;
    font-size: 8px;
    font-weight: 720;
}
.agent-header-actions > #agentNewGoal:hover { background: rgba(82,103,122,.14); }
.agent-stage-strip {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 0;
    margin: 13px 0 0;
    border-bottom: 1px solid rgba(91,111,129,.12);
    padding: 0 0 11px;
}
.agent-stage-strip::after {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 33.333%;
    height: 2px;
    border-radius: 2px;
    content: "";
    background: #617d95;
    transform: translateX(0);
    transition: transform 320ms cubic-bezier(.22,1,.36,1);
}
.agent-stage-strip[data-stage="plan"]::after { transform: translateX(100%); }
.agent-stage-strip[data-stage="execute"]::after { transform: translateX(200%); }
.agent-stage-strip > span { min-width: 0; color: #9aa2aa; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 8px; font-weight: 680; }
.agent-stage-strip i { width: 17px; height: 17px; border: 1px solid rgba(92,112,130,.15); border-radius: 50%; display: grid; place-items: center; color: inherit; font-size: 7px; font-style: normal; }
.agent-stage-strip > span.active { color: #405b72; }
.agent-stage-strip > span.active i { border-color: rgba(80,107,130,.24); background: rgba(93,120,143,.1); }
.agent-stage-strip > span.complete { color: #57906f; }
.agent-stage-strip > span.complete i { border-color: rgba(67,155,103,.24); background: rgba(67,155,103,.1); }

.agent-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 2px 20px;
}
.agent-empty[hidden] { display: none; }
.agent-empty-mark { width: 34px; height: 34px; border-radius: 10px; background: rgba(91,115,136,.09); color: #5c748a; display: grid; place-items: center; }
.agent-empty-mark svg { width: 17px; height: 17px; }
.agent-empty h2 { margin: 15px 0 7px; color: #202830; font-size: 21px; line-height: 1.3; font-weight: 720; }
.agent-empty > p { max-width: 360px; margin: 0; color: #78838c; font-size: 10px; line-height: 1.65; }
.agent-prompt-list { display: grid; gap: 6px; margin-top: 20px; }
.agent-prompt-list button {
    min-height: 39px;
    border: 1px solid rgba(85,105,123,.11);
    border-radius: 10px;
    background: rgba(255,255,255,.38);
    color: #526675;
    padding: 0 12px;
    text-align: left;
    font-size: 9px;
    font-weight: 650;
    transition: border-color 170ms var(--ease),background 170ms var(--ease),transform 170ms var(--ease);
}
.agent-prompt-list button::after { float: right; content: "\2192"; color: #7f8f9d; }
.agent-prompt-list button:hover { border-color: rgba(85,105,123,.22); background: rgba(255,255,255,.66); transform: translateX(2px); }

.agent-conversation {
    flex: 0 1 auto;
    max-height: 28vh;
    min-height: 0;
    margin: 12px -5px 0 0;
    padding: 0 7px 2px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.agent-conversation[hidden] { display: none; }
.agent-message { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px; border-bottom: 1px solid rgba(91,111,129,.09); padding: 11px 1px; }
.agent-message > span { color: #61778a; font-size: 8px; font-weight: 750; }
.agent-message p { margin: 0; color: #4f5b65; font-size: 10px; line-height: 1.58; overflow-wrap: anywhere; }
.agent-message time { color: #a0a7ad; font-size: 7px; white-space: nowrap; }
.agent-message.user p { color: #252e36; font-weight: 570; }
.agent-message.assistant > span { color: #8a6e40; }

.agent-plan-panel {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 14px;
    border-top: 1px solid rgba(91,111,129,.12);
    padding-top: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.agent-plan-panel[hidden] { display: none; }
.agent-plan-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.agent-plan-panel > header span { color: #7f8b95; font-size: 8px; }
.agent-plan-panel > header h2 { margin: 4px 0 0; color: #202830; font-size: 15px; line-height: 1.35; }
.agent-plan-panel > header em { border-radius: 7px; background: rgba(88,109,128,.08); color: #6d7d89; padding: 5px 7px; font-size: 8px; font-style: normal; white-space: nowrap; }
.agent-plan-steps { margin-top: 10px; }
.agent-plan-step { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; gap: 9px; border-top: 1px solid rgba(91,111,129,.09); padding: 11px 1px; }
.agent-plan-step > i { width: 22px; height: 22px; border: 1px solid rgba(85,106,125,.17); border-radius: 7px; color: #61778b; display: grid; place-items: center; font-size: 8px; font-style: normal; font-weight: 750; }
.agent-plan-step > i svg { width: 11px; height: 11px; }
.agent-plan-step > div { min-width: 0; }
.agent-plan-step strong { color: #273039; display: block; font-size: 9px; line-height: 1.4; }
.agent-plan-step p { margin: 3px 0 0; color: #78838c; font-size: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.agent-plan-step small { color: #929ba2; display: block; margin-top: 5px; font-size: 7px; }
.agent-plan-step > span { color: #7f8e99; font-size: 7px; white-space: nowrap; }
.agent-plan-step[data-status="completed"] > i { border-color: rgba(52,166,101,.22); background: rgba(52,166,101,.1); color: #29915c; }
.agent-plan-step[data-status="completed"] strong { color: #6f797f; text-decoration: line-through; }
.agent-plan-actions { position: sticky; bottom: -1px; display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(91,111,129,.1); background: rgba(238,243,246,.92); padding: 11px 0 2px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.agent-plan-actions button { min-height: 34px; border: 0; border-radius: 9px; background: rgba(83,104,122,.08); color: #5e7181; padding: 0 10px; font-size: 8px; font-weight: 700; }
.agent-plan-actions button:hover { background: rgba(83,104,122,.14); }
.agent-plan-actions .agent-approve { flex: 1; background: #2f3b46; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 8px 18px rgba(40,50,59,.13),inset 0 1px rgba(255,255,255,.14); }
.agent-plan-actions .agent-approve:hover { background: #3a4854; }
.agent-plan-actions .agent-approve svg { width: 12px; height: 12px; }

.ai-rail .agent-composer {
    flex: 0 0 auto;
    margin-top: 12px;
    border-radius: 14px;
    padding: 11px 12px 9px;
}
.ai-rail .agent-composer > div { min-height: 52px; margin-top: 4px; padding-bottom: 5px; }
.ai-rail .agent-composer textarea { min-height: 38px; font-size: 10px; }
.ai-rail .agent-composer button:disabled { opacity: .42; cursor: not-allowed; }
.ai-boundary-note { flex: 0 0 auto; margin: 8px 2px 0; color: #9099a1; display: flex; align-items: flex-start; gap: 6px; font-size: 7px; line-height: 1.45; }
.ai-boundary-note svg { width: 10px; height: 10px; flex: none; margin-top: 1px; }

.weekly-agent-context {
    border-top: 1px solid rgba(74,89,102,.11);
    border-bottom: 1px solid rgba(74,89,102,.11);
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 32px;
    padding: 13px 0;
}
.weekly-agent-context[hidden] { display: none; }
.weekly-agent-context > span { color: #6f8496; display: inline-flex; align-items: center; gap: 6px; font-size: 8px; font-weight: 760; }
.weekly-agent-context > span svg { width: 12px; height: 12px; }
.weekly-agent-context > div { min-width: 0; }
.weekly-agent-context strong { color: #242d35; display: block; font-size: 10px; line-height: 1.35; }
.weekly-agent-context p { margin: 3px 0 0; color: #7b858e; font-size: 8px; line-height: 1.4; }
.weekly-agent-context > em { color: #4e6579; font-size: 9px; font-style: normal; font-weight: 740; white-space: nowrap; }

@media (prefers-color-scheme: dark) {
    .agent-overview-card { border-color: rgba(255,255,255,.08); background: rgba(43,49,56,.68); box-shadow: 0 12px 34px rgba(0,0,0,.15),inset 0 1px rgba(255,255,255,.04); }
    .agent-overview-main h2,
    .agent-empty h2,
    .agent-message.user p,
    .agent-plan-panel > header h2,
    .agent-plan-step strong,
    .weekly-agent-context strong { color: #edf0f2; }
    .agent-overview-main p,
    .agent-empty > p,
    .agent-message p,
    .agent-plan-step p,
    .weekly-agent-context p { color: #a9b0b6; }
    .agent-prompt-list button { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.045); color: #c0c8ce; }
    .agent-prompt-list button:hover { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.08); }
    .agent-message,
    .agent-plan-panel,
    .agent-plan-step,
    .agent-plan-actions,
    .weekly-agent-context { border-color: rgba(255,255,255,.07); }
    .agent-plan-actions { background: rgba(35,40,46,.93); }
    .agent-plan-actions .agent-approve,
    .agent-overview-open { background: #536a7d; }
}

@media (max-width:980px) {
    .agent-overview-card { grid-template-columns: minmax(0,1fr) auto; }
    .agent-overview-progress { display: none; }
}
@media (max-width:760px) {
    .agent-overview-card { min-height: 0; grid-template-columns: 1fr; gap: 13px; border-radius: 16px; padding: 14px; }
    .agent-overview-open { width: 100%; }
    .ai-rail { width: calc(100vw - 20px); padding: 15px 16px; }
    .agent-empty { justify-content: flex-start; padding-top: 22px; }
    .agent-empty h2 { font-size: 19px; }
    .agent-conversation { max-height: 25vh; }
    .agent-message { grid-template-columns: 42px minmax(0,1fr); }
    .agent-message time { display: none; }
    .agent-plan-step { grid-template-columns: 24px minmax(0,1fr); }
    .agent-plan-step > span { grid-column: 2; }
    .agent-plan-actions { flex-wrap: wrap; }
    .agent-plan-actions .agent-approve { flex-basis: 100%; }
    .weekly-agent-context { grid-template-columns: 1fr auto; margin: 0 18px; }
    .weekly-agent-context > span { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion:reduce) {
    .agent-overview-progress i,
    .agent-stage-strip::after,
    .agent-prompt-list button { transition: none; }
}
