:root {
  --ink: #0d2346;
  --muted: #627187;
  --soft-muted: #8a96a7;
  --line: #dfe6ef;
  --canvas: #f3f7fc;
  --surface: #ffffff;
  --sage: #315e9b;
  --sage-dark: #16305c;
  --sage-soft: #eaf1fa;
  --lime: #f0d9ad;
  --warm: #f5efe4;
  --danger: #a5534d;
  --danger-soft: #f8e9e7;
  --violet: #65547d;
  --violet-soft: #eeeaf4;
  --blue: #315e9b;
  --blue-soft: #eaf1fa;
  --shadow: 0 18px 55px rgba(13, 35, 70, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

/* First-visit interactive guide */
.tour-replay-button { min-height: 34px; padding: 0 10px; border: 1px solid #c9d7e6; border-radius: 8px; background: #fff; color: #16305c; cursor: pointer; font-size: 9px; font-weight: 850; white-space: nowrap; }
.tour-replay-button:hover { border-color: #16305c; background: #eaf1fa; }
.tour-replay-button:focus-visible { outline: 3px solid rgba(184, 135, 59, .32); outline-offset: 2px; }
.guided-tour { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.tour-spotlight { position: fixed; z-index: 901; border: 2px solid #fff; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(7, 20, 42, .72), 0 0 0 5px rgba(184, 135, 59, .82), 0 16px 46px rgba(5, 15, 32, .28); pointer-events: none; transition: inset 220ms ease, width 220ms ease, height 220ms ease; }
.tour-popover { position: fixed; z-index: 902; display: grid; gap: 10px; max-height: calc(100vh - 40px); padding: 21px; overflow: auto; border: 1px solid #d7e2ef; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(7, 26, 57, .28); pointer-events: auto; }
.tour-popover > header, .tour-popover > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-popover > header span { color: #765319; font-size: 9px; font-weight: 900; letter-spacing: .16em; }.tour-popover > header button { padding: 5px 2px; border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 10px; font-weight: 750; }
.tour-progress { height: 4px; overflow: hidden; border-radius: 999px; background: #e4ebf4; }.tour-progress i { display: block; width: 33.333%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16305c, #315d97); transition: width 220ms ease; }
.tour-step-label { margin: 2px 0 -5px; color: #6f7f91; font-size: 9px; font-weight: 850; }.tour-popover h2 { margin: 0; color: #0d2346; font-size: 21px; line-height: 1.25; letter-spacing: -.03em; }.tour-description { margin: 0; color: #536276; font-size: 11px; line-height: 1.7; }
.tour-simulation { min-height: 96px; padding: 13px; border: 1px solid #dce6f1; border-radius: 11px; background: #f3f7fc; }.tour-popover > footer { margin-top: 2px; }.tour-popover > footer button { min-height: 40px; padding: 0 16px; border: 1px solid #d4deea; border-radius: 8px; background: #fff; color: #536276; cursor: pointer; font-size: 10px; font-weight: 800; }.tour-popover > footer button:last-child { margin-left: auto; border-color: #16305c; background: #16305c; color: #fff; }.tour-popover button:focus-visible { outline: 3px solid rgba(184, 135, 59, .35); outline-offset: 2px; }
.tour-parser-demo { display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; align-items: center; }.tour-parser-demo span { padding: 3px 7px; border-radius: 999px; background: #dfeaf7; color: #315d97; font-size: 8px; font-weight: 850; }.tour-parser-demo b { overflow: hidden; color: #30445e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tour-file-flight { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; align-items: center; }.tour-file-flight > span { grid-row: 1 / 4; display: grid; width: 43px; height: 50px; place-items: center; border-radius: 7px; background: #16305c; color: #fff; font-size: 8px; font-weight: 900; animation: tour-file-drop 600ms cubic-bezier(.2,.9,.2,1) both; }.tour-file-flight strong { color: #223a5d; font-size: 10px; }.tour-file-flight small { color: #6a7787; font-size: 8px; }.tour-file-flight i { height: 5px; overflow: hidden; border-radius: 999px; background: #dce5ef; }.tour-file-flight i b { display: block; width: 100%; height: 100%; border-radius: inherit; background: #315d97; animation: tour-file-read 1.1s ease both; }
@keyframes tour-file-drop { from { opacity: 0; transform: translateY(-24px) rotate(-4deg); } to { opacity: 1; transform: none; } } @keyframes tour-file-read { from { width: 0; } }
.tour-row-demo { display: flex; gap: 9px; align-items: center; padding: 9px; border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgba(22, 48, 92, .08); animation: tour-row-in 520ms ease both; }.tour-row-demo > i { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #dfeaf7; color: #16305c; font-size: 10px; font-style: normal; font-weight: 900; }.tour-row-demo span { min-width: 0; }.tour-row-demo strong, .tour-row-demo small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tour-row-demo strong { color: #1e3659; font-size: 9px; }.tour-row-demo small { margin-top: 3px; color: #748091; font-size: 8px; }.tour-row-demo em { margin-left: auto; padding: 4px 6px; border-radius: 5px; background: #e8f1ec; color: #32644d; font-size: 7px; font-style: normal; font-weight: 850; } @keyframes tour-row-in { from { opacity: 0; transform: translateY(10px); } }
.attachment-preview.is-tour-file { display: block; }.tour-fake-file { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 8px; border: 1px dashed #86a4c8; border-radius: 8px; background: #eef5fc; }.tour-fake-file i { grid-row: 1 / 3; padding: 5px; border-radius: 5px; background: #16305c; color: #fff; font-size: 7px; font-style: normal; }.tour-fake-file b { color: #1f3a60; font-size: 9px; }.tour-fake-file small { color: #69809a; font-size: 8px; }

@media (max-width: 720px) {
  .composer-actions .tour-replay-button { width: 50px; padding: 0 3px; font-size: 8px; }
  .guided-tour::after { content: ""; position: fixed; inset: 0; z-index: 900; background: rgba(7, 20, 42, .18); }.tour-spotlight { border-radius: 11px; }.tour-popover { inset: auto 10px 10px; z-index: 903; width: auto !important; max-height: min(55vh, 470px); padding: 17px; border-radius: 14px; }.tour-popover h2 { font-size: 18px; }.tour-description { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tour-spotlight, .tour-progress i, .tour-file-flight > span, .tour-file-flight i b, .tour-row-demo { animation: none; transition: none; } }

* { box-sizing: border-box; }

html { max-width: 100%; overflow-x: clip; scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(184, 135, 59, 0.32);
  outline-offset: 2px;
}

.app-shell { max-width: 100%; min-height: 100vh; overflow-x: clip; transition: width 340ms ease, transform 340ms ease; }
.section-wrap { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }

.topbar {
  height: 78px;
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(22, 48, 92, 0.1);
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); }
.brand-mark svg { width: 24px; fill: var(--lime); }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 18px; letter-spacing: -0.03em; }
.brand small { color: var(--soft-muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.topbar-login-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #d9e3f0;
  border-radius: 9px;
  color: var(--sage-dark);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 780;
}
.topbar-login-button:hover { border-color: #a9bdd8; background: #f3f7fc; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 11px; background: transparent; cursor: pointer; position: relative; }
.icon-button:hover { background: #eaf1fa; }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #d86c5d; top: 7px; right: 8px; box-shadow: 0 0 0 2px var(--canvas); }
.avatar { width: 36px; height: 36px; margin-left: 5px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--sage-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.hero { padding: 82px 0 58px; }
.eyebrow, .section-kicker { color: var(--sage); font-size: 11px; line-height: 1; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.eyebrow span { width: 26px; height: 1px; background: var(--sage); }
.hero-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.hero h1 { margin: 0; max-width: 750px; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: clamp(45px, 5.4vw, 75px); line-height: 1.05; letter-spacing: -.055em; font-weight: 500; }
.hero h1 em { color: var(--sage); font-style: italic; }
.hero-heading p { margin: 24px 0 0; color: var(--muted); font-size: 17px; letter-spacing: -.02em; }
.date-stamp { min-width: 120px; border-left: 1px solid #d7dbd5; padding-left: 22px; margin-bottom: 7px; }
.date-stamp span { display: block; color: var(--soft-muted); margin-bottom: 7px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.date-stamp strong { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }

.ai-composer {
  margin-top: 50px;
  min-height: 120px;
  background: var(--surface);
  border: 1px solid #e1e5de;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.ai-composer:focus-within { border-color: #afc5b8; box-shadow: 0 22px 65px rgba(30, 48, 39, .1); }
.ai-avatar { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); }
.ai-avatar svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.composer-main { min-width: 0; flex: 1; }
.composer-main label { display: block; color: var(--ink); font-weight: 680; font-size: 14px; margin: 2px 0 4px; }
.composer-main textarea { display: block; width: 100%; min-height: 36px; max-height: 100px; resize: none; border: 0; outline: 0; padding: 7px 0; color: var(--ink); background: transparent; font-size: 15px; line-height: 1.5; }
.composer-main textarea::placeholder { color: #a4aaa5; }
.prompt-suggestions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.prompt-suggestions button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fafbf8; color: #747c76; cursor: pointer; font-size: 11px; }
.prompt-suggestions button:hover { border-color: #c0cec5; color: var(--sage); background: #f6f9f6; }
.attachment-preview { width: fit-content; margin-top: 4px; padding: 6px 9px; border-radius: 7px; color: var(--sage); background: var(--sage-soft); font-size: 11px; }
.composer-actions { align-self: flex-end; display: flex; align-items: center; gap: 8px; }
.attach-button { min-width: 66px; height: 39px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); border: 1px solid var(--line); cursor: pointer; font-size: 12px; font-weight: 650; }
.attach-button:hover { background: #f5f6f3; }
.attach-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.send-button { width: 39px; height: 39px; border: 0; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--ink); cursor: pointer; transition: transform .2s, background .2s; }
.send-button:hover { transform: translateY(-1px); background: var(--sage-dark); }
.send-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.dashboard { padding: 64px 0 72px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 25px; }
.section-heading h2 { margin: 8px 0 0; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 34px; letter-spacing: -.04em; font-weight: 500; }
.primary-button, .secondary-button { min-height: 43px; padding: 0 16px; border-radius: 11px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.primary-button { color: #fff; background: var(--ink); box-shadow: 0 5px 13px rgba(24, 32, 28, .14); }
.primary-button:hover { background: var(--sage-dark); }
.primary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.secondary-button { background: #f0f2ee; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: .9fr .9fr 1.35fr; gap: 14px; margin-bottom: 15px; }
.metric-card { min-height: 176px; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.metric-primary { color: #fff; background: var(--sage-dark); border-color: var(--sage-dark); }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.metric-primary .metric-label { color: rgba(255,255,255,.67); }
.metric-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--sage-dark); background: var(--lime); font-size: 13px; }
.metric-icon.pale { background: var(--sage-soft); color: var(--sage); }
.metric-card > strong { display: block; margin-top: 14px; font-family: Georgia, serif; font-size: 42px; font-weight: 500; line-height: 1; }
.metric-card > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.metric-primary > p { color: rgba(255,255,255,.69); }
.deadline-number span { margin-left: 3px; font-family: inherit; font-size: 17px; }
.mini-bars { display: flex; align-items: end; gap: 5px; position: absolute; right: 20px; bottom: 20px; height: 55px; }
.mini-bars i { display: block; width: 5px; border-radius: 4px; background: rgba(217,237,180,.3); }
.mini-bars i:nth-child(1) { height: 19%; }.mini-bars i:nth-child(2) { height: 42%; }.mini-bars i:nth-child(3) { height: 31%; }.mini-bars i:nth-child(4) { height: 60%; }.mini-bars i:nth-child(5) { height: 48%; }.mini-bars i:nth-child(6) { height: 77%; }.mini-bars i:nth-child(7) { height: 100%; background: var(--lime); }
.progress-track { position: absolute; height: 5px; left: 21px; right: 21px; bottom: 23px; border-radius: 10px; background: #edf0ec; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.ai-insight-card { padding-left: 25px; background: #eef2e9; border-color: #e2e8dd; }
.spark-icon { color: var(--sage); font-size: 16px; }
.ai-insight-card blockquote { margin: 16px 0 13px; max-width: 470px; font-family: Georgia, "Noto Serif KR", serif; font-size: 16px; line-height: 1.55; letter-spacing: -.02em; }
.ai-insight-card button { border: 0; padding: 0; color: var(--sage); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.ai-insight-card button span { margin-left: 5px; }

.tracker-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.tracker-toolbar { min-height: 70px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.view-tabs { display: flex; gap: 3px; }
.view-tab { border: 0; border-radius: 9px; padding: 9px 12px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 680; cursor: pointer; }
.view-tab span { min-width: 18px; display: inline-grid; place-items: center; margin-left: 3px; padding: 2px 5px; border-radius: 6px; color: var(--soft-muted); background: #eff1ed; font-size: 9px; }
.view-tab:hover { color: var(--ink); }
.view-tab.active { color: var(--ink); background: #edf1ec; }
.view-tab.active span { color: var(--sage-dark); background: #dce8df; }
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.table-search { height: 36px; width: 190px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }
.table-search:focus-within { border-color: #b9c7be; }
.table-search svg, .sort-button svg { width: 15px; flex: 0 0 auto; fill: none; stroke: var(--soft-muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.table-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.table-search input::placeholder { color: #a6aca7; }
.sort-button { height: 36px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; color: var(--muted); font-size: 10px; cursor: pointer; }
.sort-button:hover { background: #f7f8f5; }

.table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 41px; color: var(--soft-muted); background: #fafbf8; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 750; }
th:first-child { padding-left: 19px; width: 36%; }
th:nth-child(2) { width: 15%; } th:nth-child(3) { width: 15%; } th:nth-child(4) { width: 18%; } th:nth-child(5) { width: 11%; } th:last-child { width: 5%; }
td { height: 76px; padding: 10px 8px 10px 0; border-bottom: 1px solid #edf0eb; vertical-align: middle; font-size: 12px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fafbf8; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { padding-left: 19px; }
.project-cell { display: flex; align-items: center; min-width: 0; gap: 12px; }
.type-glyph { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--warm); color: #8a6842; font-family: Georgia, serif; font-weight: 700; font-size: 12px; }
.type-glyph.grant { background: var(--blue-soft); color: var(--blue); }
.type-glyph.book { background: var(--violet-soft); color: var(--violet); }
.project-copy { min-width: 0; }
.project-title-button { max-width: 100%; border: 0; padding: 0; background: transparent; font-size: 12px; font-weight: 720; letter-spacing: -.015em; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.project-title-button:hover { color: var(--sage); }
.project-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--soft-muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-label { font-weight: 700; color: var(--muted); }
.index-badge { padding: 2px 5px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); font-weight: 750; }
.index-badge:nth-of-type(2n) { color: var(--violet); background: var(--violet-soft); }
.status-select { max-width: 130px; height: 30px; border: 0; border-radius: 8px; padding: 0 25px 0 9px; color: var(--sage-dark); background-color: var(--sage-soft); font-size: 10px; font-weight: 750; cursor: pointer; }
.status-select[data-tone="draft"] { color: #8a6842; background-color: var(--warm); }
.status-select[data-tone="done"] { color: var(--sage-dark); background-color: #ddebe3; }
.status-select[data-tone="danger"] { color: var(--danger); background-color: var(--danger-soft); }
.row-progress { display: flex; align-items: center; gap: 8px; }
.row-progress-track { width: 64px; height: 4px; overflow: hidden; border-radius: 5px; background: #e8ebe6; }
.row-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.row-progress small { color: var(--soft-muted); font-size: 9px; }
.target-cell { min-width: 0; }
.target-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555e58; font-size: 10px; }
.target-link { display: inline-block; margin-top: 4px; color: var(--sage); text-decoration: none; font-size: 9px; }
.target-link:hover { text-decoration: underline; }
.deadline { display: grid; gap: 3px; }
.deadline strong { font-size: 10px; font-weight: 680; }
.deadline small { color: var(--soft-muted); font-size: 9px; }
.deadline.urgent small { color: var(--danger); font-weight: 700; }
.row-menu { width: 29px; height: 29px; border: 0; border-radius: 8px; color: var(--soft-muted); background: transparent; cursor: pointer; font-size: 18px; letter-spacing: 1px; }
.row-menu:hover { background: #eef0ec; color: var(--ink); }
.tracker-footer { height: 47px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--soft-muted); font-size: 10px; }
.tracker-footer button { border: 0; background: transparent; color: var(--sage); font-weight: 700; cursor: pointer; }
.empty-state { padding: 55px 20px; display: grid; place-items: center; color: var(--soft-muted); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state > span { font-size: 30px; margin-bottom: 10px; }.empty-state strong { color: var(--ink); font-size: 14px; }.empty-state p { margin: 6px 0 0; font-size: 11px; }

.ai-lab { padding: 78px 0 96px; }
.ai-lab-heading { align-items: flex-end; }
.ai-lab-heading p { max-width: 570px; margin: 13px 0 0; color: var(--muted); font-size: 14px; }
.ai-feature-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.ai-feature-card { min-height: 500px; border-radius: var(--radius-xl); padding: 29px; overflow: hidden; position: relative; }
.analysis-card { color: #fff; background: var(--ink); }
.feature-topline { display: flex; align-items: center; justify-content: space-between; }
.feature-label { color: var(--sage); font-size: 9px; letter-spacing: .15em; font-weight: 800; }
.analysis-card .feature-label { color: var(--lime); }
.feature-index { font-family: Georgia, serif; color: rgba(24,32,28,.2); font-size: 20px; }
.analysis-card .feature-index { color: rgba(255,255,255,.25); }
.ai-feature-card h3 { margin: 25px 0 10px; font-family: Georgia, "Noto Serif KR", serif; font-weight: 500; font-size: 28px; letter-spacing: -.04em; }
.ai-feature-card > p { max-width: 440px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.analysis-card > p { color: rgba(255,255,255,.6); }
.context-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-family: Georgia, serif; font-size: 12px; font-weight: 700; }
.feature-button { position: absolute; bottom: 28px; left: 29px; right: 29px; min-height: 45px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #cbd5cd; border-radius: 11px; color: var(--sage-dark); background: rgba(255,255,255,.45); font-size: 11px; font-weight: 750; cursor: pointer; }
.feature-button:hover { background: #fff; }
.dark-button { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.dark-button:hover { background: rgba(255,255,255,.13); }
.analysis-sample { min-height: 185px; margin-top: 27px; display: grid; grid-template-columns: 42% 58%; align-items: center; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.analysis-orbit { width: 135px; height: 135px; margin: auto; border: 1px solid rgba(217,237,180,.16); border-radius: 50%; position: relative; display: grid; place-items: center; }
.analysis-orbit::before { content: ""; position: absolute; inset: 21px; border: 1px solid rgba(217,237,180,.2); border-radius: 50%; }
.orbit-center { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--lime); font-family: Georgia, serif; font-size: 12px; }
.dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,237,180,.08); }
.dot-one { top: 15px; right: 25px; }.dot-two { bottom: 11px; left: 35px; }.dot-three { top: 58px; left: -3px; }
.analysis-points { display: grid; gap: 13px; }
.analysis-points p { margin: 0; display: flex; align-items: center; gap: 10px; }
.point-number { color: var(--lime); font-family: Georgia, serif; font-size: 9px; }
.analysis-points p > span:last-child { display: grid; gap: 2px; }
.analysis-points strong { font-size: 10px; }.analysis-points small { color: rgba(255,255,255,.42); font-size: 8px; }

.footer { height: 90px; border-top: 1px solid #dfe3dc; display: flex; justify-content: space-between; align-items: center; color: var(--soft-muted); font-size: 10px; }
.footer p:last-child { display: flex; align-items: center; gap: 7px; }.footer p:last-child span { width: 6px; height: 6px; border-radius: 50%; background: #65a177; }

.ai-drawer { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -25px 0 65px rgba(24,32,28,.1); display: flex; flex-direction: column; visibility: hidden; transform: translateX(105%); transition: transform 340ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 340ms; }
body.drawer-open .ai-drawer { visibility: visible; transform: translateX(0); transition-delay: 0s; }
body.drawer-open .app-shell { width: calc(100% - min(440px, 28vw)); }
.drawer-scrim { position: fixed; z-index: 15; inset: 0; background: rgba(18,24,21,.2); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-header { min-height: 89px; padding: 20px 23px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h2 { margin: 6px 0 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 22px; font-weight: 500; }
.drawer-status { color: var(--sage); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.drawer-status i { width: 5px; height: 5px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #66a579; }
#closeDrawer { font-size: 25px; font-weight: 300; }
.drawer-context { margin: 16px 22px 0; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf9; }
.drawer-context > div { min-width: 0; flex: 1; display: grid; gap: 2px; }.drawer-context small { color: var(--soft-muted); font-size: 8px; }.drawer-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.drawer-context button { border: 0; background: transparent; color: var(--sage); font-size: 9px; font-weight: 700; cursor: pointer; }
.drawer-progress { margin: 10px 22px 0; padding: 11px 12px; border: 1px solid #e2e7e2; border-radius: 11px; background: #fbfcfb; }
.drawer-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-progress strong { color: var(--ink); font-size: 9px; }
.drawer-progress > div > span { color: var(--sage); font-size: 8px; font-weight: 750; }
.drawer-progress > p { margin: 4px 0 7px; color: var(--soft-muted); font-size: 7px; }
#drawerProgressFeed { max-height: 88px; overflow-y: auto; display: grid; gap: 4px; }
#drawerProgressFeed:empty { display: none; }
#drawerProgressFeed > p { margin: 0; padding-left: 10px; position: relative; color: #667069; font-size: 8px; line-height: 1.45; }
#drawerProgressFeed > p::before { content: ""; position: absolute; top: .52em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #a8b9ad; }
#drawerProgressFeed > p.reasoning-live { color: #4b5e51; }
#drawerProgressFeed > p.reasoning-live::before { background: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.drawer-messages { flex: 1; overflow-y: auto; padding: 23px; display: flex; flex-direction: column; gap: 18px; }
.message { max-width: 88%; display: flex; gap: 9px; align-items: flex-start; }
.message.ai { align-self: flex-start; }.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--sage); background: var(--sage-soft); font-size: 10px; }
.message.user .message-avatar { color: #fff; background: var(--sage-dark); }
.message-bubble { padding: 11px 13px; border-radius: 4px 13px 13px 13px; color: #4c554f; background: #f0f3ef; font-size: 11px; line-height: 1.65; }
.message.user .message-bubble { color: #fff; background: var(--sage-dark); border-radius: 13px 4px 13px 13px; }
.message-bubble strong { color: var(--ink); font-weight: 760; }.message.user .message-bubble strong { color: #fff; }
.typing { display: flex; gap: 4px; padding: 8px 0; }.typing i { width: 4px; height: 4px; border-radius: 50%; background: #8fa398; animation: bounce 1.1s infinite; }.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,70%,100% { transform: translateY(0); opacity: .5; } 35% { transform: translateY(-4px); opacity: 1; } }
.drawer-composer { margin: 0 19px 7px; padding: 10px 11px; border: 1px solid #dce1da; border-radius: 13px; }
.drawer-composer:focus-within { border-color: #aabeb1; }.drawer-composer textarea { width: 100%; min-height: 40px; max-height: 90px; resize: none; border: 0; outline: 0; padding: 3px; font-size: 11px; }.drawer-composer > div { display: flex; align-items: center; gap: 8px; }.drawer-composer > div span { flex: 1; color: #abb0ac; font-size: 8px; text-align: right; }.drawer-attach, .drawer-send { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }.drawer-attach { border: 1px solid var(--line); color: var(--muted); background: #fff; }.drawer-send { border: 0; color: #fff; background: var(--ink); }
.drawer-disclaimer { margin: 0 0 11px; color: #a4aaa5; text-align: center; font-size: 7px; }

.project-dialog { width: min(700px, calc(100% - 28px)); max-width: calc(100vw - 28px); max-height: calc(100vh - 36px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 30px 100px rgba(14,23,18,.24); overflow: auto; }
.project-dialog::backdrop { background: rgba(20,27,23,.42); backdrop-filter: blur(3px); }
.project-dialog form { min-width: 0; max-width: 100%; padding: 27px; overflow: hidden; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 7px 0 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 27px; font-weight: 500; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f1f3ef; cursor: pointer; font-size: 22px; color: var(--muted); }
.form-grid { min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 22px 0; }
.field { min-width: 0; display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span, .field legend { color: #626b65; font-size: 10px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dfe3dd; border-radius: 10px; color: var(--ink); background: #fff; padding: 10px 11px; font-size: 12px; outline: none; }
.field input, .field select { height: 41px; }.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22,48,92,.08); }
.field[hidden] { display: none; }
.paired-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; }
.paired-inputs b { color: var(--soft-muted); font-weight: 600; }
.binary-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.binary-checks label { cursor: pointer; }
.binary-checks input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.binary-checks span { display: block; padding: 8px 11px; border: 1px solid #dfe3dd; border-radius: 8px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 750; }
.binary-checks input:checked + span { color: #16305c; border-color: #9eb3cf; background: #eaf1fa; }
.contribution-field > small { color: var(--soft-muted); font-size: 8px; }
.index-field legend { margin-bottom: 7px; }
#indexOptions { display: flex; flex-wrap: wrap; gap: 7px; }
#indexOptions label { cursor: pointer; }
#indexOptions input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); opacity: 0; pointer-events: none; }
#indexOptions span { display: block; padding: 8px 10px; border: 1px solid #dfe3dd; border-radius: 8px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 750; }
#indexOptions input:checked + span { color: var(--sage-dark); background: var(--sage-soft); border-color: #acc4b5; }
.file-drop { min-height: 72px; display: flex !important; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1px dashed #cbd2cb; border-radius: 10px; background: #fafbf9; cursor: pointer; position: relative; overflow: hidden; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }.file-drop strong { font-size: 10px; }.file-drop small { color: var(--soft-muted); font-size: 8px; }
.dialog-actions { padding-top: 17px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.tier-bronze { --badge-base: #aa803a; --badge-ring: #f0e3c9; }
.tier-green { --badge-base: #255a44; --badge-ring: #e8f3ec; }
.tier-slate { --badge-base: #465460; --badge-ring: #e6ebef; }
.tier-ink { --badge-base: #14170e; --badge-ring: #e2e4e2; }
.badge-medal { position: relative; width: 128px; height: 128px; display: grid; place-items: center; border: 12px solid var(--badge-ring); border-radius: 50%; color: #fff; background: var(--badge-base); box-shadow: 0 0 0 2px var(--badge-base), 0 16px 32px rgba(20, 28, 38, .14); }
.badge-medal::before { content: ""; position: absolute; inset: -19px; z-index: -1; border-radius: 50%; background: repeating-conic-gradient(var(--badge-ring) 0 8deg, transparent 8deg 14deg); }
.badge-medal::after { content: ""; position: absolute; inset: 9px; border: 2px solid color-mix(in srgb, #fff 70%, transparent); border-radius: 50%; }
.badge-medal svg { width: 62px; height: 62px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.achievement-dialog { width: min(540px, calc(100vw - 28px)); padding: 0; overflow: visible; border: 0; border-radius: 24px; background: transparent; }
.achievement-dialog::backdrop { background: rgba(7, 18, 34, .58); backdrop-filter: blur(4px); }
.achievement-celebration { position: relative; z-index: 2; padding: 17px; border-radius: 24px; background: #fff; box-shadow: 0 36px 100px rgba(5, 16, 31, .36); }
.achievement-close { position: absolute; z-index: 3; top: 27px; right: 27px; width: 35px; height: 35px; border: 0; border-radius: 50%; color: #68768a; background: rgba(255,255,255,.82); cursor: pointer; font-size: 21px; }
.achievement-card { min-height: 520px; padding: 44px 40px 30px; border-radius: 17px; color: #fff; background: linear-gradient(155deg, var(--badge-base) 0%, #102746 100%); display: flex; align-items: center; flex-direction: column; text-align: center; }
.achievement-card .badge-medal { margin: 64px 0 38px; }
.achievement-kicker { font-size: 10px; font-weight: 850; letter-spacing: .18em; opacity: .66; }
.achievement-card h2 { margin: 0; font: 750 42px/1.12 Georgia, "Noto Serif KR", serif; letter-spacing: -.045em; }
.achievement-card > strong { margin-top: 17px; font-size: 18px; }
.achievement-card > p { margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: 12px; }
.achievement-card > small { width: 100%; margin-top: auto; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.18); text-align: left; font-size: 9px; opacity: .64; }
.achievement-actions { display: flex; gap: 8px; padding-top: 13px; }
.achievement-actions .primary-button { flex: 1; }
.confetti-stage { position: fixed; inset: -18vh -18vw; z-index: 1; overflow: hidden; pointer-events: none; }
.confetti-stage i { position: absolute; top: 44%; left: 50%; width: 9px; height: 17px; border-radius: 2px; background: var(--confetti); opacity: 0; animation: confetti-burst 1.6s cubic-bezier(.1,.7,.25,1) var(--delay) both; }
@keyframes confetti-burst { 0% { opacity: 0; transform: translate(-50%,-50%) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + 58vh)) rotate(var(--rotate)); } }
.badge-drawer-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 34px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: #f3f7fc; box-shadow: 0 30px 90px rgba(10,31,57,.28); }
.badge-drawer-dialog::backdrop { background: rgba(10, 25, 45, .42); backdrop-filter: blur(3px); }
.badge-drawer-shell { max-height: calc(100vh - 34px); overflow-y: auto; padding: 25px; }
.badge-drawer-shell > header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.badge-drawer-shell h2 { margin: 5px 0 4px; color: #16305c; font: 650 30px/1.1 Georgia, "Noto Serif KR", serif; }
.badge-drawer-shell header p { margin: 0; color: #6c7b8e; font-size: 11px; }
.badge-drawer-shell header > button { width: 36px; height: 36px; border: 0; border-radius: 10px; color: #5d6c7f; background: #fff; cursor: pointer; font-size: 22px; }
.badge-progress-summary { margin: 20px 0 16px; padding: 14px 17px; border: 1px solid #d8e3f0; border-radius: 12px; background: #fff; display: flex; align-items: center; gap: 18px; color: #637287; font-size: 10px; }
.badge-progress-summary strong { margin-right: auto; color: #16305c; font-size: 18px; }
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.badge-tile { min-height: 250px; padding: 22px 16px 17px; border: 1px solid #dbe5f0; border-radius: 15px; background: #fff; display: flex; align-items: center; flex-direction: column; text-align: center; }
.badge-tile .badge-medal { width: 86px; height: 86px; border-width: 8px; margin: 14px 0 22px; }
.badge-tile .badge-medal::before { inset: -14px; }
.badge-tile .badge-medal::after { inset: 6px; border-width: 1px; }
.badge-tile .badge-medal svg { width: 42px; height: 42px; stroke-width: 6; }
.badge-tile.locked { filter: grayscale(1); opacity: .55; }
.badge-tile.locked .badge-medal { color: #98a1ad; --badge-base: #d8dde3; --badge-ring: #edf0f3; box-shadow: none; }
.badge-tile > span { color: var(--badge-base); font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.badge-tile h3 { margin: 5px 0 7px; color: #152b49; font-size: 16px; }
.badge-tile p { margin: 0; color: #6f7b8b; font-size: 9px; line-height: 1.5; }
.badge-tile small { margin-top: auto; padding-top: 14px; color: #9aa5b2; font-size: 8px; }
.badge-drawer-shell > footer { display: flex; justify-content: flex-end; padding-top: 16px; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 25px; min-width: 270px; padding: 12px 15px; border-radius: 12px; color: #fff; background: var(--ink); box-shadow: 0 15px 45px rgba(20,30,25,.2); display: flex; align-items: center; gap: 10px; opacity: 0; transform: translate(-50%, 25px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast span { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; color: var(--sage-dark); background: var(--lime); font-size: 11px; font-weight: 900; }.toast p { margin: 0; font-size: 11px; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1020px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }.ai-insight-card { grid-column: 1 / -1; min-height: 145px; }.metric-card { min-height: 165px; }
  .toolbar-actions .table-search { display: none; }
  th:first-child { width: 40%; } th:nth-child(4) { width: 15%; }
  body.drawer-open .app-shell { width: 100%; transform: translateX(-80px); }
  body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
}

@media (max-width: 760px) {
  .section-wrap, .topbar { width: min(100% - 30px, 620px); }
  .topbar { height: 65px; }.brand small { display: none; }.brand-mark { width: 34px; height: 34px; }.brand strong { font-size: 16px; }.topbar .icon-button:first-child { display: none; }
  .hero { padding: 55px 0 39px; }.hero-heading { align-items: flex-start; }.hero h1 { font-size: clamp(40px, 12vw, 55px); }.hero-heading p { font-size: 14px; line-height: 1.55; }.date-stamp { display: none; }
  .ai-composer { margin-top: 33px; padding: 16px; border-radius: 18px; flex-wrap: wrap; }.ai-avatar { width: 37px; height: 37px; }.composer-main { width: calc(100% - 53px); flex: none; }.composer-actions { width: 100%; justify-content: flex-end; }.prompt-suggestions { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }.prompt-suggestions button { white-space: nowrap; }
  .dashboard { padding: 48px 0 58px; }.section-heading h2 { font-size: 29px; }.section-heading .primary-button { min-width: 43px; width: 43px; padding: 0; font-size: 0; }
  .metric-grid { grid-template-columns: 1fr; }.ai-insight-card { grid-column: auto; }.metric-card { min-height: 150px; }
  .tracker-toolbar { align-items: flex-start; flex-direction: column; padding: 12px; }.view-tabs { width: 100%; overflow-x: auto; }.view-tab { white-space: nowrap; }.toolbar-actions { width: 100%; }.toolbar-actions .table-search { display: flex; flex: 1; width: auto; }
  table { min-width: 760px; }.tracker-footer { position: sticky; left: 0; }
  .ai-lab { padding: 60px 0 75px; }.ai-feature-grid { grid-template-columns: 1fr; }.ai-feature-card { min-height: 470px; padding: 24px; }.feature-button { left: 24px; right: 24px; bottom: 24px; }.ai-feature-card h3 { font-size: 25px; }
  .footer { height: 80px; }.footer p:first-child { display: none; }.footer { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }.project-dialog form { padding: 20px; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: 40px; }.hero h1 br { display: none; }.hero-heading p { max-width: 330px; }
  .ai-composer { display: grid; grid-template-columns: 37px 1fr; }.composer-main { width: auto; }.composer-actions { grid-column: 1 / -1; }.prompt-suggestions button:nth-child(n+3) { display: none; }
  .analysis-sample { grid-template-columns: 40% 60%; }.analysis-orbit { width: 110px; height: 110px; }.orbit-center { width: 44px; height: 44px; }
  .ai-feature-card { min-height: 500px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Clean workspace layout */
:root {
  --ink: #0d2346;
  --muted: #627187;
  --soft-muted: #8a96a7;
  --line: #dfe6ef;
  --canvas: #f3f7fc;
  --surface: #fff;
  --sage: #315e9b;
  --sage-dark: #16305c;
  --sage-soft: #eaf1fa;
  --shadow: none;
}

body { background: var(--canvas); }
.section-wrap { width: min(1240px, calc(100% - 48px)); }

.topbar {
  width: min(1240px, calc(100% - 48px));
  height: 64px;
  background: #fff;
  border-bottom-color: var(--line);
}
.brand { gap: 10px; }
.brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #dfe3df;
  border-radius: 9px;
  background: #fff;
}
.brand-mark svg { width: 20px; fill: var(--sage); }
.brand strong { font-size: 16px; }
.brand small { display: none; }
.icon-button:hover { background: #f5f6f4; }

.workspace-head { padding: 46px 0 0; }
.guest-sample-banner {
  margin-bottom: 22px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid #dce6df;
  border-radius: 12px;
  background: #f3f7fc;
}
.guest-sample-banner > div { min-width: 0; }
.guest-sample-banner span {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--sage);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.guest-sample-banner strong { display: block; font-size: 13px; line-height: 1.45; }
.guest-sample-banner p { margin: 4px 0 0; color: #626a64; font-size: 11px; line-height: 1.55; }
.guest-sample-banner button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--sage-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  margin: 0;
  font-family: inherit;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.04em;
  font-weight: 750;
}
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.primary-button { box-shadow: none; }

.ai-composer {
  min-height: 74px;
  margin-top: 28px;
  padding: 14px 15px;
  align-items: center;
  border: 1px solid #dfe3df;
  border-radius: 14px;
  box-shadow: none;
}
.ai-composer:focus-within { border-color: #a9bbd2; box-shadow: 0 0 0 3px rgba(22, 48, 92, .07); }
.ai-avatar { width: 34px; height: 34px; border-radius: 9px; background: #f2f5f2; }
.ai-avatar svg { width: 19px; }
.composer-main label { margin: 0; font-size: 11px; }
.composer-main textarea { min-height: 30px; padding: 4px 0 0; font-size: 13px; }
.composer-actions { align-self: center; }
.attach-button { height: 36px; min-width: 62px; border-color: #e2e5e2; background: #fafbfa; }
.send-button { width: 36px; height: 36px; border-radius: 9px; background: var(--sage-dark); }
.attachment-preview { margin-top: 3px; }
.guest-save-notice {
  margin-top: 10px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #d9e4dc;
  border-radius: 11px;
  background: #fbfdfb;
}
.guest-save-notice strong { display: block; font-size: 12px; }
.guest-save-notice p { margin: 4px 0 0; color: #626a64; font-size: 10.5px; line-height: 1.5; }
.guest-save-notice > div:last-child { flex: 0 0 auto; display: flex; gap: 7px; }
.guest-save-notice .primary-button, .guest-save-notice .secondary-button { min-height: 36px; padding: 0 12px; font-size: 10.5px; }
.guest-save-notice .secondary-button { color: #4f5751; }

.notion-section { padding-top: 28px; }
.notion-panel-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.notion-panel-card[aria-busy="true"] { cursor: progress; }
.notion-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.notion-panel-heading h2 { margin: 3px 0 5px; font-size: 20px; letter-spacing: -.025em; }
.notion-panel-heading p { max-width: 660px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.notion-status-summary { flex: 0 0 auto; display: grid; justify-items: end; gap: 6px; }
.notion-status-summary small { color: var(--soft-muted); font-size: 9px; }
.notion-state-badge {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #dce2dd;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #59615c;
  background: #f5f7f5;
  font-size: 9px;
  font-weight: 800;
}
.notion-state-badge[data-state="connected"] { color: #356248; border-color: #cfe0d4; background: #edf5ef; }
.notion-state-badge[data-state="expired"],
.notion-state-badge[data-state="reconnect_required"] { color: #8a6534; border-color: #ead9bc; background: #fff7e8; }
.notion-state-badge[data-state="revoked"],
.notion-state-badge[data-state="malformed"] { color: #925250; border-color: #edd0ce; background: #fff0ef; }
.notion-panel-actions { margin-top: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notion-panel-actions .primary-button,
.notion-panel-actions .secondary-button { min-height: 36px; padding: 0 12px; font-size: 10.5px; }
.notion-disconnect-button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #ecd8d7;
  border-radius: 9px;
  color: #925250;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 730;
}
.notion-disconnect-button:hover { background: #fff5f4; }
.notion-panel-actions button:disabled,
.notion-import-actions button:disabled { opacity: .5; cursor: not-allowed; }
.notion-live-message { min-height: 18px; margin: 13px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.notion-live-message[data-tone="error"] { color: var(--danger); }
.notion-live-message[data-tone="success"] { color: var(--sage); }
.notion-object-region { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.notion-object-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.notion-object-heading strong { display: block; font-size: 13px; }
.notion-object-heading small { display: block; margin-top: 4px; color: var(--soft-muted); font-size: 9.5px; }
.notion-object-list { margin-top: 12px; display: grid; gap: 8px; }
.notion-object-option {
  min-width: 0;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #fbfcfa;
}
.notion-object-option:has(input:checked) { border-color: #9eb3cf; box-shadow: 0 0 0 2px rgba(22,48,92,.1); background: #f3f7fc; }
.notion-object-option.is-disabled { color: #777e78; background: #f6f7f5; }
.notion-object-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--sage); }
.notion-object-option-copy { min-width: 0; display: grid; gap: 4px; }
.notion-object-option-copy strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.notion-object-option-copy small { color: var(--soft-muted); font-size: 9.5px; }
.notion-object-tag { padding: 4px 7px; border-radius: 999px; color: #53625a; background: #edf1ee; font-size: 8.5px; font-weight: 750; white-space: nowrap; }
.notion-object-option.is-disabled .notion-object-tag { color: #875f42; background: #f5eadf; }
.notion-import-actions { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.notion-import-actions span { color: var(--soft-muted); font-size: 9.5px; }
.notion-import-actions .primary-button { min-height: 38px; padding: 0 13px; font-size: 10.5px; }

.overview-strip {
  min-height: 76px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 140px minmax(300px, 1fr) 250px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.overview-item {
  min-width: 0;
  padding: 15px 18px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
}
.overview-item > span, .overview-ai > span { color: var(--soft-muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.overview-item > strong { font-size: 21px; line-height: 1; }
.overview-deadline { grid-template-columns: auto 1fr; column-gap: 12px; }
.overview-deadline > span { grid-column: 1 / -1; }
.overview-deadline > strong { grid-row: 2 / 4; align-self: center; font-size: 19px; }
.overview-deadline > strong span { margin-left: 2px; font-size: 10px; }
.overview-deadline p { min-width: 0; margin: 0; overflow: hidden; color: #555c56; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.overview-progress { width: min(220px, 100%); height: 3px; overflow: hidden; border-radius: 4px; background: #edf0ed; }
.overview-progress span { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.overview-ai {
  padding: 14px 17px;
  border: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 4px 12px;
  background: #fafbf9;
  text-align: left;
  cursor: pointer;
}
.overview-ai > span { grid-column: 1 / -1; }
.overview-ai strong { font-size: 11px; }
.overview-ai b { color: var(--sage); font-size: 14px; font-weight: 500; }
.overview-ai:hover { background: #f5f8f5; }
.overview-publication { cursor: default; }
.overview-publication:hover { background: #fafbf9; }
.overview-publication > span { color: #626a64; }
.overview-publication small { color: #626a64; font-size: 10px; }

.dashboard { padding: 38px 0 0; }
.list-heading { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.list-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.list-heading > span { color: var(--soft-muted); font-size: 10px; }
.tracker-card { border-radius: 12px; }
.tracker-toolbar { min-height: 58px; padding: 10px 13px; }
.view-tab { padding: 8px 11px; }
.view-tab.active { background: #f0f2ef; }
.table-search, .sort-button { height: 34px; }
th { height: 38px; background: #fbfcfb; }
td { height: 66px; }
.type-glyph,
.type-glyph.grant,
.type-glyph.book { width: 33px; height: 33px; border-radius: 8px; color: #6d746e; background: #f2f3f1; }
.project-title-button { font-weight: 680; }
.status-select { background-color: #f1f3f1; }
.tracker-footer { height: 43px; }

.ai-lab { padding: 54px 0 72px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-family: inherit; font-size: 21px; font-weight: 730; letter-spacing: -.03em; }
.ai-lab-heading p { margin: 7px 0 0; font-size: 12px; }
.ai-feature-grid { gap: 14px; }
.ai-feature-card {
  min-height: 310px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}
.analysis-card { color: var(--ink); background: #fff; border-color: var(--line); }
.feature-heading { display: flex; align-items: flex-start; gap: 12px; }
.feature-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #dfe5e0; border-radius: 9px; color: var(--sage); background: #f5f8f5; font-size: 11px; font-weight: 800; }
.ai-feature-card h3 { margin: 1px 0 5px; font-family: inherit; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.feature-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.analysis-sample {
  min-height: 0;
  margin-top: 18px;
  padding: 13px;
  display: block;
  border: 1px solid #eceeeb;
  border-radius: 10px;
  background: #fafbfa;
}
.analysis-points { gap: 9px; }
.analysis-points p { padding: 3px 0; }
.analysis-points strong { color: var(--ink); font-size: 10px; }
.analysis-points small { color: var(--soft-muted); font-size: 8px; }
.point-number { min-width: 18px; color: var(--sage); font-family: inherit; font-weight: 750; }
.feature-button {
  position: static;
  min-height: 39px;
  margin-top: auto;
  padding: 0 13px;
  border-color: #dfe3df;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.feature-button:hover { border-color: #b8c6bd; background: #f8faf8; }

.footer { height: 64px; }

@media (max-width: 760px) {
  .section-wrap, .topbar { width: min(100% - 32px, 620px); }
  .topbar { height: 60px; }
  .workspace-head { padding-top: 32px; }
  .page-heading { align-items: center; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { margin-top: 5px; font-size: 11px; }
  .page-heading .primary-button { min-width: 40px; width: 40px; height: 40px; padding: 0; font-size: 0; }
  .ai-composer { min-height: 70px; margin-top: 22px; padding: 12px; display: flex; flex-wrap: nowrap; }
  .ai-avatar { display: none; }
  .composer-main { width: auto; flex: 1; }
  .composer-actions { width: auto; flex: 0 0 auto; }
  .attach-button { width: 34px; min-width: 34px; padding: 0; }
  .attach-button span { display: none; }
  .overview-strip { grid-template-columns: 100px 1fr; }
  .overview-item { padding: 13px 14px; }
  .overview-deadline { border-right: 0; }
  .overview-ai { grid-column: 1 / -1; min-height: 57px; border-top: 1px solid var(--line); }
  .dashboard { padding-top: 32px; }
  .list-heading > span { display: none; }
  .tracker-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .table-search { display: flex; }
  .ai-lab { padding: 44px 0 60px; }
  .ai-feature-grid { grid-template-columns: 1fr; }
  .ai-feature-card { min-height: 285px; padding: 18px; }
  .feature-button { margin-top: 16px; }
}

@media (max-width: 430px) {
  .page-heading p { max-width: 220px; }
  .composer-main label { font-size: 10px; }
  .composer-main textarea { font-size: 12px; }
  .overview-strip { grid-template-columns: 92px 1fr; }
}

/* Ordered pastel tags */
.type-glyph.paper { color: #496d96; background: #eaf1fa; }
.type-glyph.grant { color: #3f7652; background: #e8f4ea; }
.type-glyph.book { color: #715b91; background: #f0ebf8; }
.type-glyph.report { color: #315f8d; background: #e8f0fa; }

.index-badge {
  border: 1px solid transparent;
  font-weight: 750;
}
.index-badge[data-index="SSCI"] { color: #466b91; background: #eaf2fa; border-color: #dae7f4; }
.index-badge[data-index="SCOPUS"] { color: #665990; background: #efecf8; border-color: #e1dcf1; }
.index-badge[data-index="A&HCI"] { color: #925a71; background: #f8ebf1; border-color: #efd9e3; }
.index-badge[data-index="KCI"] { color: #3e765d; background: #e8f4ed; border-color: #d6e9de; }
.index-badge[data-index="SCI"] { color: #956334; background: #fff0e3; border-color: #f4ddc9; }
.index-badge[data-index="Non-indexed"] { color: #686f69; background: #f0f2f0; border-color: #e1e4e1; }

#allCount { color: #646a65; background: #ecefec; }
#paperCount { color: #496d96; background: #eaf1fa; }
#grantCount { color: #3f7652; background: #e8f4ea; }
#bookCount { color: #715b91; background: #f0ebf8; }

#indexOptions input[value="SSCI"] + span { color: #466b91; background: #f4f8fc; }
#indexOptions input[value="SCOPUS"] + span { color: #665990; background: #f7f5fb; }
#indexOptions input[value="A&HCI"] + span { color: #925a71; background: #fcf5f8; }
#indexOptions input[value="KCI"] + span { color: #3e765d; background: #f3f9f5; }
#indexOptions input[value="SCI"] + span { color: #956334; background: #fff8f1; }
#indexOptions input[value="Non-indexed"] + span { color: #686f69; background: #f6f7f6; }
#indexOptions input:checked + span { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }

.status-picker-button {
  width: fit-content;
  max-width: 132px;
  height: 30px;
  padding: 0 8px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--tag-border);
  border-radius: 8px;
  color: var(--tag-fg);
  background: var(--tag-bg);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.status-picker-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status-picker-button svg { width: 12px; height: 12px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.status-picker-button[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag-border) 50%, transparent); }
.status-picker-button[aria-expanded="true"] svg { transform: rotate(180deg); }

.status-menu {
  position: fixed;
  z-index: 80;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #dfe3df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 42, 35, .14);
}
.status-menu[hidden] { display: none; }
.status-menu-option {
  width: 100%;
  min-height: 37px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.status-menu-option:hover,
.status-menu-option:focus-visible { background: #f6f7f5; outline: 0; }
.status-option-chip {
  min-width: 0;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--tag-border);
  border-radius: 7px;
  color: var(--tag-fg);
  background: var(--tag-bg);
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}
.status-option-chip i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--tag-fg); opacity: .75; }
.status-option-check { width: 18px; color: var(--tag-fg); font-size: 11px; font-weight: 800; text-align: center; }

/* Functional database classifications */
.tracker-toolbar { align-items: flex-start; }
.classification-filters { min-width: 0; display: grid; gap: 6px; }
.filter-row { min-width: 0; display: flex; align-items: center; gap: 9px; }
.filter-label { width: 42px; flex: 0 0 auto; color: var(--soft-muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; }
.index-tabs { min-width: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.index-tab {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #737973;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}
.index-tab span { margin-left: 3px; opacity: .62; }
.index-tab:hover { background: #f5f6f4; }
.index-tab.active { color: var(--ink); border-color: #dfe3df; background: #f3f5f3; }
.index-tab[data-index-filter="SSCI"].active { color: #466b91; border-color: #dae7f4; background: #eaf2fa; }
.index-tab[data-index-filter="SCOPUS"].active { color: #665990; border-color: #e1dcf1; background: #efecf8; }
.index-tab[data-index-filter="A&HCI"].active { color: #925a71; border-color: #efd9e3; background: #f8ebf1; }
.index-tab[data-index-filter="KCI"].active { color: #3e765d; border-color: #d6e9de; background: #e8f4ed; }
.index-tab[data-index-filter="SCI"].active { color: #956334; border-color: #f4ddc9; background: #fff0e3; }
.index-tab[data-index-filter="Non-indexed"].active { color: #686f69; border-color: #e1e4e1; background: #f0f2f0; }
.tracker-toolbar .toolbar-actions { padding-top: 2px; }

table { min-width: 1100px; }
th:first-child { width: 28%; }
th:nth-child(2) { width: 7%; }
th:nth-child(3) { width: 13%; }
th:nth-child(4) { width: 10%; }
th:nth-child(5) { width: 15%; }
th:nth-child(6) { width: 13%; }
th:nth-child(7) { width: 10%; }
th:last-child { width: 4%; }
.type-pill { min-width: 38px; padding: 5px 7px; display: inline-grid; place-items: center; border-radius: 7px; font-size: 9px; font-weight: 750; }
.type-pill.paper { color: #496d96; background: #eaf1fa; }
.type-pill.grant { color: #3f7652; background: #e8f4ea; }
.type-pill.book { color: #715b91; background: #f0ebf8; }
.type-pill.report { color: #315f8d; background: #e8f0fa; }
.report-tool-button { min-height: 34px; padding: 0 10px; border: 1px solid #d5dfec; border-radius: 9px; color: #294f7d; background: #fff; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; font-size: 9px; font-weight: 750; white-space: nowrap; }
.report-tool-button:hover { border-color: #93aac6; background: #f3f7fc; }
.index-cell { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.no-index { color: #b0b4b0; font-size: 10px; }
.target-links { margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.file-count { color: var(--soft-muted); font-size: 8px; font-weight: 700; }
.target-link { margin-top: 0; }
.file-link { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dialog-actions > span { flex: 1; }
.danger-button { min-height: 43px; padding: 0 15px; border: 1px solid #f0d6d6; border-radius: 11px; color: #a24d51; background: #fff7f7; font-size: 12px; font-weight: 700; cursor: pointer; }
.danger-button:hover { background: #fcecec; }
.danger-button:disabled { opacity: .5; cursor: wait; }

#saveStatus[data-state="saving"] span { background: #d39a4a; animation: pulse 1s infinite; }
#saveStatus[data-state="error"] { color: #a65353; }
#saveStatus[data-state="error"] span { background: #c96666; }
@keyframes pulse { 50% { opacity: .38; } }
.toast.error { background: #7f383b; }
.toast.error span { color: #7f383b; background: #f8dede; }

.send-button:disabled, .drawer-send:disabled { opacity: .62; cursor: wait; }
.send-button.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#drawerProjectSelect { width: 96px; height: 30px; border: 1px solid #dfe3dd; border-radius: 8px; color: var(--sage); background: #fff; padding: 0 7px; font-size: 9px; font-weight: 700; }
.drawer-attach { cursor: pointer; }
.drawer-composer > div span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-heading-actions, .row-actions { display: flex; align-items: center; gap: 7px; }
.reopen-chat-button { min-height: 41px; padding: 0 14px; border: 1px solid #d7e1ed; border-radius: 11px; color: #315e9b; background: #fff; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 11px; font-weight: 750; }
.reopen-chat-button:hover { border-color: #b8cbbd; background: #f7faf7; }
.reopen-chat-button i { color: #6e9c7b; font-style: normal; }
.reopen-chat-button.is-live i { animation: chat-pulse 1.2s ease-in-out infinite; }
.row-actions { justify-content: flex-end; }
.row-ai-chat { min-height: 29px; padding: 0 8px; border: 1px solid #dce5f0; border-radius: 8px; color: #315e9b; background: #fff; cursor: pointer; font-size: 9px; font-weight: 700; white-space: nowrap; }
.row-ai-chat:hover { border-color: #b9cbbd; background: #f5f8f5; }
@keyframes chat-pulse { 50% { opacity: .35; transform: scale(.82); } }
.drawer-reopen-handle { position: fixed; z-index: 14; top: 50%; right: 0; width: 38px; min-height: 74px; padding: 8px 5px; border: 1px solid #d9e2da; border-right: 0; border-radius: 13px 0 0 13px; color: #4f6c58; background: rgba(255,255,255,.96); box-shadow: -7px 7px 24px rgba(31,48,38,.1); display: grid; place-items: center; gap: 2px; cursor: pointer; transform: translateY(-50%); transition: opacity .2s, transform .2s, background .2s; }
.drawer-reopen-handle:hover { background: #f6faf6; transform: translateY(-50%) translateX(-2px); }
.drawer-reopen-handle span { font-size: 27px; font-weight: 300; line-height: .8; }
.drawer-reopen-handle i { color: #7da087; font-size: 11px; font-style: normal; }
.drawer-reopen-handle.is-live i { animation: chat-pulse 1.2s ease-in-out infinite; }
body.drawer-open .drawer-reopen-handle { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(110%); }
.full-content-control { padding: 12px; border: 1px solid #e1e6e1; border-radius: 11px; background: #fafbf9; }
.content-open-button { width: 100%; min-height: 40px; margin-top: 7px; padding: 0 12px; border: 1px solid #d5e0ec; border-radius: 9px; color: #315e9b; background: #fff; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 11px; font-weight: 750; }
.content-open-button:hover { border-color: #b5c7b9; background: #f7faf7; }
.content-dialog { width: min(980px, calc(100vw - 34px)); height: min(820px, calc(100vh - 34px)); padding: 0; border: 0; border-radius: 16px; overflow: hidden; color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(16,24,19,.22); }
.content-dialog::backdrop { background: rgba(22,29,25,.3); backdrop-filter: blur(2px); }
.content-dialog form { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.content-dialog-header p { max-width: 720px; margin: 5px 0 0; overflow: hidden; color: var(--soft-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.content-editor-wrap { min-height: 0; padding: 0 22px 16px; }
#contentEditor { width: 100%; height: 100%; min-height: 360px; padding: 20px; resize: none; border: 1px solid #dfe5df; border-radius: 11px; outline: 0; color: #263029; background: #fcfdfc; font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
#contentEditor:focus { border-color: #a9beae; box-shadow: 0 0 0 3px #edf4ef; }
.content-dialog-actions { min-height: 68px; padding: 12px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.content-dialog-actions > span { margin-right: auto; color: var(--soft-muted); font-size: 9px; }
.target-link-button { padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.message-bubble p { margin: 0; }
.message-bubble p + p { margin-top: 7px; }
.message.ai { width: 100%; max-width: 100%; }
.message.ai .message-bubble { width: calc(100% - 36px); min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 { margin: 18px 0 7px; color: var(--ink); font-family: inherit; font-weight: 780; line-height: 1.35; letter-spacing: -.02em; }
.message-bubble h1:first-child,
.message-bubble h2:first-child,
.message-bubble h3:first-child { margin-top: 0; }
.message-bubble h1 { font-size: 1.28em; }
.message-bubble h2 { padding-bottom: 5px; border-bottom: 1px solid #dce3dd; font-size: 1.2em; }
.message-bubble h3 { font-size: 1.1em; }
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 { font-size: 1em; }
.message-bubble ul,
.message-bubble ol { margin: 8px 0; padding-left: 21px; }
.message-bubble ul ul,
.message-bubble ol ul,
.message-bubble ul ol,
.message-bubble ol ol { margin: 5px 0; }
.message-bubble li + li { margin-top: 5px; }
.message-bubble li > div { margin-top: 4px; }
.message-bubble code { padding: 1px 5px; border: 1px solid #dce4de; border-radius: 5px; color: #365542; background: #f7faf7; font: .88em/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.message-bubble pre { max-width: 100%; margin: 10px 0; padding: 12px; overflow-x: auto; border: 1px solid #d9e1db; border-radius: 8px; background: #f7f9f7; }
.message-bubble pre code { padding: 0; border: 0; color: #334039; background: transparent; white-space: pre; }
.message-bubble blockquote { margin: 10px 0; padding: 8px 11px; border-left: 3px solid #9cb6a3; color: #536158; background: #f7faf7; }
.message-bubble blockquote p { margin: 0; }
.message-bubble hr { height: 1px; margin: 14px 0; border: 0; background: #dce3dd; }
.message-bubble a { color: #315e9b; text-decoration: underline; text-underline-offset: 2px; }
.markdown-table-wrap { width: 100%; max-width: 100%; margin: 10px 0; overflow-x: auto; border: 1px solid #dce3dd; border-radius: 8px; background: #fff; }
.message-bubble table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: .88em; line-height: 1.5; }
.message-bubble th,
.message-bubble td { min-width: 90px; padding: 7px 9px; border-right: 1px solid #e4e9e5; border-bottom: 1px solid #e4e9e5; text-align: left; vertical-align: top; }
.message-bubble th { color: #34483a; background: #f3f7f4; font-weight: 760; }
.message-bubble th:last-child,
.message-bubble td:last-child { border-right: 0; }
.message-bubble tbody tr:last-child td { border-bottom: 0; }
.message-source { display: block; margin-top: 8px; color: #89928c; font-size: 7px; font-weight: 700; letter-spacing: .04em; }
.message.user .message-source { color: rgba(255,255,255,.6); }
.message.streaming .message-bubble { border-color: #cbdad0; }
.stream-content > p:last-child { margin-bottom: 0; }
.existing-files { min-width: 0; max-width: 100%; display: grid; gap: 8px; overflow: hidden; }
.existing-files > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.existing-files > div { min-width: 0; max-width: 100%; display: grid; gap: 6px; }
.existing-file { min-width: 0; max-width: 100%; min-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; overflow: hidden; }
.existing-file a { min-width: 0; max-width: 100%; display: block; overflow: hidden; color: var(--sage-dark); font-size: 9px; font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.existing-file small { color: var(--soft-muted); font-size: 8px; }
.existing-file button { width: 26px; height: 26px; border: 0; border-radius: 6px; color: var(--danger); background: var(--danger-soft); cursor: pointer; }

@media (max-width: 900px) {
  .tracker-toolbar { align-items: stretch; flex-direction: column; }
  .tracker-toolbar .toolbar-actions { width: 100%; padding-top: 3px; }
  .tracker-toolbar .table-search { display: flex; flex: 1; width: auto; }
}

@media (max-width: 760px) {
  .reopen-chat-button { width: 40px; min-width: 40px; padding: 0; justify-content: center; }
  .reopen-chat-button span, .row-ai-chat span { display: none; }
  .drawer-reopen-handle { width: 34px; min-height: 64px; }
  .content-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); }
  .content-editor-wrap { padding: 0 10px 10px; }
  #contentEditor { min-height: 280px; padding: 14px; font-size: 11px; }
  .content-dialog-actions { padding: 10px; }
  .classification-filters { gap: 8px; }
  .filter-row { align-items: flex-start; }
  .filter-label { padding-top: 8px; }
  .view-tabs, .index-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar, .index-tabs::-webkit-scrollbar { display: none; }
  .index-tab { white-space: nowrap; }
  table { min-width: 1080px; }
}

/* Clearer type, analysis drawer, and registration demo */
body { color: #171b18; font-size: 14px; }
.page-heading p { color: #59615b; font-size: 15px; line-height: 1.55; }
.composer-main label { font-size: 13px; }
.composer-main textarea { font-size: 15px; }
.demo-button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d9e1db;
  border-radius: 9px;
  color: #486252;
  background: #f6f9f6;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.demo-button:hover { border-color: #afc2b5; background: #edf4ef; }
.demo-button:disabled { opacity: .55; cursor: wait; }
.overview-item > span, .overview-ai > span { font-size: 11px; }
.overview-deadline p, .overview-ai strong { font-size: 12px; }
.list-heading h2 { font-size: 20px; }
.list-heading > span { color: #707771; font-size: 12px; }
.filter-label { width: 46px; color: #737a74; font-size: 11px; }
.view-tab, .index-tab { font-size: 11px; }
th { color: #737a74; font-size: 11px; }
.project-title-button { font-size: 14px; line-height: 1.35; }
.tracker-card, .table-wrap { min-width: 0; max-width: 100%; }
.table-wrap { contain: inline-size; }
.project-copy { min-width: 0; }
.project-title-button {
  width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-meta { color: #7b817c; font-size: 11px; }
.type-pill { min-width: 42px; font-size: 11px; }
.status-picker-button, .status-option-chip { font-size: 11.5px; }
.target-name { color: #454c47; font-size: 12px; }
.target-link { font-size: 10.5px; }
.index-badge { padding: 3px 6px; font-size: 10.5px; }
.deadline strong { font-size: 12px; }
.deadline small { font-size: 10.5px; }
.row-ai-chat { font-size: 10.5px; }
.ai-feature-grid { grid-template-columns: 1fr; }
.ai-feature-card h3 { font-size: 17px; line-height: 1.3; }
.feature-heading p { color: #626a64; font-size: 13px; line-height: 1.5; }
.analysis-points strong { font-size: 12px; }
.analysis-points small { font-size: 10px; }
#drawerProjectSelect { width: 190px; max-width: 48%; height: 34px; font-size: 11.5px; }
.drawer-context small { font-size: 10px; }
.drawer-context strong { font-size: 12px; }
.message-bubble { color: #3f4741; font-size: 13px; line-height: 1.7; }
.drawer-progress > p, #drawerProgressFeed p { font-size: 10.5px; }
.drawer-composer textarea { font-size: 14px; }
.drawer-disclaimer { font-size: 10px; }
.paper-chooser { display: grid; gap: 6px; }
.paper-chooser > strong { font-size: 16px; }
.paper-chooser > p { margin: 0 0 10px; color: #6f766f; font-size: 12px; }
.paper-chooser > div { display: grid; gap: 8px; }
.paper-chooser button {
  width: 100%;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  border: 1px solid #e0e5e1;
  border-radius: 10px;
  color: #29342d;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.paper-chooser button:hover { border-color: #afc3b5; background: #f7faf7; }
.paper-chooser button span { overflow: hidden; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.paper-chooser button small { grid-column: 1; color: #7a817b; font-size: 10.5px; }
.paper-chooser button b { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #52705d; font-size: 11px; }
.demo-row-label { padding: 5px 8px; border-radius: 7px; color: #586e5e; background: #edf4ef; font-size: 10px; font-weight: 800; }
.demo-title { cursor: default; }
.demo-row-enter { animation: demo-row-enter .75s cubic-bezier(.2,.8,.2,1) both; }
@keyframes demo-row-enter {
  from { opacity: 0; transform: translateY(-16px); background: #e9f5ec; }
  55% { background: #eef8f0; }
  to { opacity: 1; transform: translateY(0); background: transparent; }
}
th:first-child { width: 25%; }
th:nth-child(5) { width: 14%; }
th:nth-child(6) { width: 12%; }
th:last-child { width: 9%; }

@media (max-width: 1040px) {
  .ai-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-heading p { font-size: 13px; }
  .demo-button { width: 50px; padding: 0; }
  #drawerProjectSelect { width: 145px; }
}

/* Full-screen portfolio analysis; ingest conversations keep the compact drawer. */
body.analysis-fullscreen.drawer-open { overflow: hidden; }

/* Account access */
.auth-gate {
  width: min(420px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}
.auth-gate::backdrop { background: rgba(24, 32, 28, .38); backdrop-filter: blur(3px); }
.auth-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  padding: 48px 38px 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(35, 45, 39, .07);
  text-align: center;
}
.auth-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: #f3f5f2;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}
.auth-close:hover { background: #ecefeb; }
.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe3df;
  border-radius: 11px;
  color: var(--sage);
  background: #fff;
}
.auth-brand-mark svg { width: 25px; fill: currentColor; }
.auth-card h1 { margin: 20px 0 0; font-size: 27px; letter-spacing: -.045em; }
.auth-card > p:not(.auth-message) { margin: 10px 0 28px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.google-login-trigger {
  width: min(310px, 100%);
  min-height: 44px;
  border: 1px solid #cfd5d0;
  border-radius: 7px;
  color: #303530;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}
.google-login-trigger:hover { border-color: #aebdb5; background: #f8faf8; }
.google-login-trigger:disabled { cursor: progress; opacity: .7; }
.google-signin { min-height: 44px; display: grid; place-items: center; }
.auth-message { min-height: 18px; margin: 18px 0 0; color: var(--soft-muted); font-size: 11px; line-height: 1.5; }
.auth-message.is-error { color: #9b4f50; }

.account-menu-wrap { position: relative; margin-left: 5px; }
.account-button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.account-button:hover, .account-button[aria-expanded="true"] { background: #f5f6f4; }
.account-button .avatar { width: 34px; height: 34px; margin: 0; }
.account-button-name { max-width: 110px; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(25, 34, 29, .12);
}
.account-popover strong, .account-popover span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover strong { font-size: 12px; }
.account-popover span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.account-popover button { width: 100%; margin-top: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: #545b56; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.account-popover button:hover { background: #f7f8f6; }

@media (max-width: 620px) {
  .auth-card { padding: 40px 24px 36px; }
  .guest-sample-banner, .guest-save-notice { align-items: stretch; flex-direction: column; }
  .guest-sample-banner button { width: 100%; }
  .guest-save-notice > div:last-child { width: 100%; }
  .guest-save-notice .primary-button, .guest-save-notice .secondary-button { flex: 1; }
  .account-button { padding-right: 3px; }
  .account-button-name { display: none; }
  .notion-panel-card { padding: 17px; }
  .notion-panel-heading { display: grid; gap: 13px; }
  .notion-status-summary { justify-items: start; }
  .notion-panel-actions > button { flex: 1 1 auto; }
  .notion-object-option { grid-template-columns: 18px minmax(0, 1fr); }
  .notion-object-tag { grid-column: 2; justify-self: start; }
  .notion-import-actions { align-items: stretch; flex-direction: column; }
  .notion-import-actions .primary-button { width: 100%; }
}
body.analysis-fullscreen.drawer-open .app-shell { width: 100%; transform: none; }
body.analysis-fullscreen.drawer-open .drawer-scrim { opacity: 0; pointer-events: none; }
body.analysis-fullscreen .ai-drawer {
  left: 0;
  width: 100vw;
  max-width: none;
  border-left: 0;
  box-shadow: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 260ms;
}
body.analysis-fullscreen.drawer-open .ai-drawer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}
body.analysis-fullscreen .drawer-header {
  min-height: 82px;
  padding: 16px max(28px, calc((100vw - 1120px) / 2));
}
.drawer-header-actions { display: flex; align-items: center; gap: 9px; }
.drawer-rerun { min-height: 35px; padding: 0 12px; border: 1px solid #d7e2da; border-radius: 9px; color: #496754; background: #f8faf8; cursor: pointer; font-size: 11px; font-weight: 750; }
.drawer-rerun:hover { border-color: #aec3b4; background: #eef5f0; }
.drawer-rerun:disabled { opacity: .5; cursor: wait; }
body.analysis-fullscreen .drawer-context,
body.analysis-fullscreen .drawer-progress,
body.analysis-fullscreen .drawer-messages,
body.analysis-fullscreen .drawer-composer,
body.analysis-fullscreen .drawer-disclaimer { width: min(1120px, calc(100% - 48px)); margin-left: auto; margin-right: auto; }
body.analysis-fullscreen .drawer-context { margin-top: 14px; }
body.analysis-fullscreen .drawer-progress { margin-top: 9px; }
body.analysis-fullscreen .drawer-messages { align-self: center; padding: 24px 0; }
body.analysis-fullscreen .drawer-composer { margin-top: 0; margin-bottom: 8px; }
body.analysis-fullscreen .drawer-disclaimer { margin-bottom: 10px; }
body.analysis-fullscreen .message.ai .message-bubble { width: min(920px, calc(100% - 36px)); }
body.analysis-fullscreen .message.user { max-width: min(760px, 82%); }

@media (max-width: 760px) {
  body.analysis-fullscreen .drawer-header { min-height: 70px; padding: 12px; }
  body.analysis-fullscreen .drawer-header h2 { font-size: 19px; }
  body.analysis-fullscreen .drawer-context,
  body.analysis-fullscreen .drawer-progress,
  body.analysis-fullscreen .drawer-messages,
  body.analysis-fullscreen .drawer-composer,
  body.analysis-fullscreen .drawer-disclaimer { width: calc(100% - 24px); }
  body.analysis-fullscreen .drawer-messages { padding: 18px 0; }
  .drawer-rerun { min-height: 32px; padding: 0 9px; font-size: 10px; }
}

/* Persisted portfolio conversations and a single centered research-tool card. */
.ai-feature-grid {
  width: min(100%, 380px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
}
.feature-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.feature-actions .feature-button {
  position: static;
  min-width: 0;
  margin: 0;
}
.feature-continue-button {
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid #dfe3df;
  border-radius: 9px;
  color: #526159;
  background: #f7f9f7;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.feature-continue-button:hover { border-color: #b8c6bd; background: #eef4ef; }

.analysis-chat-toolbar {
  min-height: 56px;
  padding: 9px 12px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.analysis-chat-toolbar:not([hidden]) { display: flex; }
.analysis-chat-toolbar label { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.analysis-chat-toolbar label > span { flex: 0 0 auto; color: #747c76; font-size: 10px; font-weight: 750; }
#analysisConversationSelect {
  min-width: 0;
  width: 100%;
  height: 35px;
  padding: 0 34px 0 10px;
  border: 1px solid #dfe4df;
  border-radius: 8px;
  color: #2e3932;
  background: #fafbfa;
  font-size: 11.5px;
  font-weight: 680;
}
.analysis-chat-toolbar > small { flex: 0 0 auto; color: #8b928c; font-size: 10px; }
body.analysis-fullscreen .analysis-chat-toolbar {
  width: min(1120px, calc(100% - 48px));
  margin: 14px auto 0;
}
body.analysis-fullscreen .drawer-context { margin-top: 9px; }
body.analysis-fullscreen .drawer-attach { display: none; }

.analysis-selection-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 90px rgba(16, 24, 19, .2);
}
.analysis-selection-dialog::backdrop { background: rgba(22, 29, 25, .34); backdrop-filter: blur(2px); }
.analysis-selection-dialog form { max-height: min(780px, calc(100vh - 32px)); padding: 24px; display: flex; flex-direction: column; }
.analysis-selection-dialog .dialog-header h2 { margin-top: 7px; font-family: inherit; font-size: 23px; font-weight: 760; }
.analysis-selection-dialog .dialog-header p { margin: 7px 0 0; color: #727a74; font-size: 11px; }
.analysis-select-all,
.analysis-project-options label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e6e2;
  border-radius: 10px;
  cursor: pointer;
}
.analysis-select-all { margin-top: 17px; padding: 12px 13px; background: #f5f8f5; }
.analysis-select-all input,
.analysis-project-options input { width: 16px; height: 16px; accent-color: var(--sage); }
.analysis-select-all > span { display: grid; gap: 2px; }
.analysis-select-all strong { font-size: 12px; }
.analysis-select-all small { color: #858d87; font-size: 9px; }
.analysis-project-options { min-height: 0; margin: 9px 0 16px; padding-right: 3px; display: grid; gap: 7px; overflow-y: auto; }
.analysis-project-options label { min-height: 46px; padding: 8px 11px; background: #fff; }
.analysis-project-options label:hover { border-color: #b9c9be; background: #fafcfa; }
.analysis-project-options strong { min-width: 0; overflow: hidden; font-size: 11.5px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.analysis-selection-dialog .dialog-actions { flex: 0 0 auto; }

@media (max-width: 760px) {
  .ai-feature-grid { width: 100%; }
  body.analysis-fullscreen .analysis-chat-toolbar { width: calc(100% - 24px); margin-top: 10px; }
  .analysis-chat-toolbar { align-items: stretch; flex-direction: column; gap: 5px; }
  .analysis-chat-toolbar label { width: 100%; }
  .analysis-chat-toolbar > small { padding-left: 52px; }
  .analysis-selection-dialog form { padding: 18px; }
  .analysis-project-options label { min-height: 50px; }
}

/* Keep composer actions at the edge and make the live steering state obvious. */
.drawer-composer > div { justify-content: flex-end; }
.drawer-composer > div > .drawer-attach { margin-right: auto; }
.drawer-composer > div > #drawerAttachmentName {
  flex: 0 1 auto;
  max-width: none;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #7b837d;
  font-size: 11px;
  text-align: right;
}
#drawerAttachmentName.is-live { color: #315e9b; }
#drawerAttachmentName.is-live b { font-size: 12px; font-weight: 760; white-space: nowrap; }
#drawerAttachmentName .steering-dots { flex: 0 0 auto; max-width: none; display: inline-flex; align-items: center; gap: 4px; text-align: left; }
.steering-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #315e9b;
  animation: steering-dot 1.05s ease-in-out infinite;
}
.steering-dots i:nth-child(2) { animation-delay: .14s; }
.steering-dots i:nth-child(3) { animation-delay: .28s; }
.drawer-send { width: 35px; height: 35px; font-size: 17px; }
.message .typing { gap: 5px; padding: 10px 2px; }
.message .typing i { width: 7px; height: 7px; }
@keyframes steering-dot {
  0%, 65%, 100% { opacity: .28; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-4px); }
}

@media (max-width: 760px) {
  .badge-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .badge-drawer-shell { padding: 19px; }
  .achievement-card { min-height: 480px; padding: 40px 24px 26px; }
  .achievement-card h2 { font-size: 35px; }
  .achievement-actions { flex-direction: column; }
}

@media (max-width: 430px) {
  .badge-grid { grid-template-columns: 1fr; }
  .badge-progress-summary { align-items: flex-start; flex-direction: column; gap: 5px; }
  .badge-progress-summary strong { margin-right: 0; }
}
