:root {
    color-scheme: light;
    --ink: #20251d;
    --ink-strong: #151913;
    --muted: #667060;
    --muted-soft: #697365;
    --line: #e2e6dd;
    --line-strong: #d4dacd;
    --surface: #ffffff;
    --sidebar: #f7f8f5;
    --sidebar-hover: #eef1ea;
    --primary: #6f842f;
    --primary-dark: #566820;
    --primary-pale: #f0f4e7;
    --brown: #a95220;
    --ochre: #ca7a0b;
    --focus: rgba(86, 104, 32, 0.82);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--surface);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    color: #fff;
    background: var(--ink-strong);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
}

.sidebar {
    position: relative;
    z-index: 20;
    width: 264px;
    height: 100vh;
    height: 100dvh;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    transition: width 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.sidebar-header {
    min-height: 78px;
    padding: 16px 13px 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.brand-logo {
    width: 174px;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-symbol {
    width: 38px;
    height: 38px;
    display: none;
    object-fit: contain;
}

.icon-button,
.composer-tool,
.popover-close {
    display: inline-grid;
    place-items: center;
    color: #667063;
    background: transparent;
    border-radius: 9px;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.icon-button {
    width: 38px;
    height: 38px;
}

.icon-button:hover,
.composer-tool:hover,
.popover-close:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.icon-button:focus-visible,
.composer-tool:focus-visible,
.popover-close:focus-visible,
.new-chat-button:focus-visible,
.section-heading:focus-visible,
.profile-button:focus-visible,
.send-button:focus-visible,
.agent-card:focus-visible,
.conversation-open:focus-visible,
.conversation-action:focus-visible,
.collection-open:focus-visible,
.project-heading:focus-visible,
.project-chat-open:focus-visible,
.context-menu-item:focus-visible,
.context-project-item:focus-visible,
.project-modal-close:focus-visible,
.project-modal-cancel:focus-visible,
.project-modal-submit:focus-visible,
.agent-selection-modal-close:focus-visible,
.agent-selection-option:focus-visible,
.agent-selection-modal-actions button:focus-visible,
.artifact-reference-open:focus-visible,
.artifact-reopen-button:focus-visible,
.agent-switch-button:focus-visible,
.agent-recommendation-actions button:focus-visible,
.segmented-control button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.sidebar-toggle .icon {
    width: 19px;
    height: 19px;
}

.sidebar-actions {
    padding: 7px 14px 15px;
    display: flex;
    gap: 7px;
}

.new-chat-button {
    min-width: 0;
    min-height: 43px;
    padding: 0 12px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: var(--ink-strong);
    border-radius: 10px;
    box-shadow: 0 7px 18px rgba(24, 30, 20, 0.1);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.new-chat-button:hover {
    background: #30392a;
    box-shadow: 0 9px 20px rgba(24, 30, 20, 0.14);
    transform: translateY(-1px);
}

.new-chat-button .icon {
    width: 18px;
    height: 18px;
}

.project-add-button,
.history-search-button {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    color: #5d6659;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.project-add-button:hover,
.history-search-button:hover {
    background: var(--sidebar-hover);
}

.project-add-button .icon {
    width: 18px;
    height: 18px;
}

.history-search {
    height: 40px;
    margin: 0 14px 8px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
}

.history-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
}

.history-search .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.history-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.history-search input::placeholder {
    color: var(--muted-soft);
}

.sidebar-navigation {
    min-height: 0;
    padding: 0 10px 20px;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d7dbd1 transparent;
}

.sidebar-section {
    margin-top: 3px;
}

.section-heading {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #485044;
    background: transparent;
    border-radius: 9px;
    text-align: left;
    transition: background 150ms ease, color 150ms ease;
}

.section-heading:hover {
    color: var(--ink-strong);
    background: var(--sidebar-hover);
}

.section-title,
.section-meta {
    display: flex;
    align-items: center;
}

.section-title {
    min-width: 0;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
}

.section-title .icon {
    width: 17px;
    height: 17px;
}

.section-title .star-icon {
    color: var(--ochre);
}

.section-meta {
    gap: 5px;
    color: var(--muted-soft);
    font-size: 11px;
}

.section-meta .chevron {
    width: 15px;
    height: 15px;
    transition: transform 180ms ease;
}

.sidebar-section.is-open .chevron {
    transform: rotate(180deg);
}

.section-content {
    overflow: hidden;
}

.sidebar-section:not(.is-open) .section-content {
    display: none;
}

.empty-state {
    margin: 1px 10px 7px;
    padding: 10px 11px;
    color: #626c5e;
    background: rgba(255, 255, 255, 0.48);
    border: 1px dashed #dfe3da;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.45;
}

.collection-list {
    padding: 0 4px 5px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.collection-item {
    min-width: 0;
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.collection-item:hover {
    background: var(--sidebar-hover);
}

.collection-item.is-active,
.project-chat-item.is-active,
.conversation-item.is-active {
    background: #e9eee1;
    box-shadow: inset 3px 0 0 var(--primary);
}

.collection-item.is-active .collection-open,
.project-chat-item.is-active .project-chat-open,
.conversation-item.is-active .conversation-open {
    color: var(--ink-strong);
}

.collection-item.is-active .collection-label,
.project-chat-item.is-active .project-chat-label,
.conversation-item.is-active .conversation-title {
    font-weight: 750;
}

.collection-open {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 8px 0 2px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #596154;
    background: transparent;
    border-radius: 8px;
    text-align: left;
}

.collection-action {
    width: 30px;
    height: 30px;
    margin-left: 2px;
    flex: 0 0 30px;
    background: transparent;
}

.conversation-action.collection-action.is-favorite {
    color: var(--ochre);
    background: transparent;
}

.conversation-action.collection-action.is-project {
    color: var(--primary-dark);
    background: transparent;
}

.conversation-action.collection-action.is-project .icon {
    fill: none;
}

.conversation-action.collection-action:hover {
    background: #e2e7dc;
}

.collection-label {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-list {
    padding: 0 4px 6px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-item {
    min-width: 0;
    border-radius: 8px;
}

.project-heading {
    width: 100%;
    min-height: 36px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4d5549;
    background: transparent;
    border-radius: 8px;
    text-align: left;
}

.project-heading:hover {
    color: var(--ink-strong);
    background: var(--sidebar-hover);
}

.project-heading-label {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
}

.project-heading-label > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-folder-icon {
    width: 16px;
    height: 16px;
    color: #667063;
    fill: none;
    stroke-width: 1.6;
}

.project-chat-count {
    min-width: 14px;
    color: var(--muted-soft);
    font-size: 10px;
    text-align: right;
}

.project-chevron {
    width: 14px;
    height: 14px;
    color: var(--muted-soft);
    transition: transform 160ms ease;
}

.project-item.is-open .project-chevron {
    transform: rotate(180deg);
}

.project-content {
    margin-left: 7px;
    padding: 0 0 4px 12px;
    border-left: 1px solid #e1e5dd;
}

.project-chat-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.project-chat-item {
    min-width: 0;
    display: flex;
    align-items: center;
    border-radius: 7px;
}

.project-chat-item:hover,
.project-chat-item:focus-within {
    background: var(--sidebar-hover);
}

.project-chat-open {
    min-width: 0;
    min-height: 32px;
    padding: 0 7px 0 2px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #646b60;
    background: transparent;
    border-radius: 7px;
    text-align: left;
}

.project-chat-remove {
    width: 28px;
    height: 28px;
    margin-left: 0;
    flex-basis: 28px;
}

.project-chat-label {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-empty {
    margin: 1px 8px 5px 30px;
    padding: 4px 0;
    color: #667060;
    font-size: 10px;
}

.conversation-list {
    margin-top: 0;
    padding: 0 0 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 0;
}

.all-conversation-section .conversation-no-results {
    margin-left: 18px;
}

.conversation-item {
    position: relative;
    min-width: 0;
    min-height: 38px;
    border-radius: 9px;
}

.conversation-item:hover,
.conversation-item:focus-within {
    background: var(--sidebar-hover);
}

.conversation-open {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 71px 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4e564a;
    background: transparent;
    border-radius: 9px;
    text-align: left;
}

.conversation-title {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    background: var(--primary);
    border-radius: 50%;
}

.conversation-item.is-unread .conversation-title,
.collection-item.is-unread .collection-label,
.project-chat-item.is-unread .project-chat-label {
    color: var(--ink-strong);
    font-weight: 750;
}

.conversation-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    gap: 1px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.conversation-item:hover .conversation-actions,
.conversation-item:focus-within .conversation-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.conversation-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #7d8578;
    background: var(--sidebar-hover);
    border-radius: 7px;
    transition: color 130ms ease, background 130ms ease;
}

.conversation-action:hover {
    color: var(--ink-strong);
    background: #e2e7dc;
}

.conversation-action .icon {
    width: 15px;
    height: 15px;
}

.conversation-action.is-favorite {
    color: var(--ochre);
}

.conversation-action.is-favorite .icon {
    fill: currentColor;
}

.conversation-action.is-project {
    color: var(--primary-dark);
    background: #e5ebd9;
}

.conversation-no-results {
    margin: 13px 8px;
    color: var(--muted-soft);
    font-size: 11px;
    text-align: center;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--line);
}

.profile-button {
    width: 100%;
    min-height: 56px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border-radius: 10px;
    text-align: left;
}

.profile-button:hover {
    background: var(--sidebar-hover);
}

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
}

.avatar .icon {
    width: 18px;
    height: 18px;
}

.profile-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-copy strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    color: var(--muted-soft);
    transform: rotate(180deg);
}

.main {
    position: relative;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(111, 132, 47, 0.035), transparent 28rem),
        var(--surface);
}

.mobile-header {
    display: none;
}

.main-stage {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    overflow: hidden;
}

.artifact-viewer {
    width: clamp(560px, 56%, 760px);
    min-width: 0;
    height: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f2f3f0;
    border-right: 1px solid #d8ddd4;
    box-shadow: 12px 0 34px rgba(35, 42, 30, 0.06);
    animation: artifact-viewer-reveal 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.artifact-viewer-header {
    position: relative;
    z-index: 2;
    min-height: 72px;
    padding: 11px 18px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #dfe3dc;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.artifact-viewer-heading,
.artifact-viewer-actions {
    min-width: 0;
    display: flex;
    align-items: center;
}

.artifact-viewer-heading {
    gap: 10px;
}

.artifact-viewer-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #88451f;
    background: #f8e9e0;
    border: 1px solid #ead5c8;
    border-radius: 10px;
}

.artifact-viewer-icon .icon {
    width: 18px;
    height: 18px;
}

.artifact-viewer-heading p,
.artifact-viewer-heading h2 {
    margin: 0;
}

.artifact-viewer-heading p {
    margin-bottom: 2px;
    color: #8a5639;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.artifact-viewer-heading h2 {
    overflow: hidden;
    color: #30372f;
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artifact-viewer-actions {
    flex: 0 0 auto;
    gap: 9px;
}

.artifact-viewer-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5f6b59;
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.artifact-viewer-status b {
    font: inherit;
}

.artifact-viewer-status > span {
    width: 6px;
    height: 6px;
    background: #758b38;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(117, 139, 56, 0.12);
}

.artifact-viewer-close {
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #5f685b;
    background: #f7f8f5;
    border: 1px solid #dfe3dc;
    border-radius: 9px;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.artifact-viewer-close:hover {
    color: #30372f;
    background: #eef1eb;
    border-color: #cfd5cc;
}

.artifact-viewer-close:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.artifact-viewer-close .icon {
    width: 17px;
    height: 17px;
}

.artifact-viewer-content {
    min-height: 0;
    padding: 22px;
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.artifact-viewer-content > .analysis-result {
    margin: 0;
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(35, 42, 30, 0.1);
    scroll-margin-top: 18px;
}

.artifact-viewer-content .result-hero {
    padding: 24px 22px 21px;
}

.artifact-viewer-content .verdict-grid,
.artifact-viewer-content .comparison-stat-grid,
.artifact-viewer-content .report-result-meta {
    grid-template-columns: 1fr 1fr;
}

.artifact-viewer-content .verdict-grid > div:nth-child(odd),
.artifact-viewer-content .comparison-stat-grid > div:nth-child(odd),
.artifact-viewer-content .report-result-meta > div:nth-child(odd) {
    border-left: 0;
}

.artifact-viewer-content .verdict-grid > div:nth-child(n + 3),
.artifact-viewer-content .comparison-stat-grid > div:nth-child(n + 3),
.artifact-viewer-content .report-result-meta > div:nth-child(n + 3) {
    border-top: 1px solid #e5e9e2;
}

.artifact-viewer-content .comparison-stat-primary,
.artifact-viewer-content .report-meta-primary {
    grid-column: 1 / -1;
}

.artifact-viewer-content .comparison-stat-grid > div:nth-child(2),
.artifact-viewer-content .report-result-meta > div:nth-child(2) {
    border-top: 1px solid #e5e9e2;
    border-left: 0;
}

.artifact-viewer-content .comparison-stat-grid > div:last-child,
.artifact-viewer-content .report-result-meta > div:last-child {
    grid-column: auto;
}

.artifact-viewer-content .country-source-grid,
.artifact-viewer-content .synthesis-grid,
.artifact-viewer-content .draft-source-list {
    grid-template-columns: 1fr;
}

.artifact-viewer-content .china-source-card {
    grid-column: auto;
}

.artifact-viewer-content .country-source-card > p,
.artifact-viewer-content .draft-source-card h4 {
    min-height: 0;
}

.artifact-viewer-content .report-paper-viewport {
    max-height: none;
    padding: 20px 14px 26px;
    overflow: visible;
}

.artifact-viewer-content .paper-page {
    min-height: 0;
    padding-right: 36px;
    padding-left: 36px;
}

.artifact-viewer-open .main-scroll {
    min-width: 0;
    flex: 1;
}

.artifact-viewer-open.agent-mode .main-scroll {
    padding-right: 24px;
    padding-left: 24px;
}

.artifact-viewer-open .agent-toolbar {
    gap: 8px;
}

.artifact-viewer-open .agent-demo-badge,
.artifact-viewer-open .agent-switch-button span,
.artifact-viewer-open .agent-reset-button span {
    display: none;
}

.artifact-viewer-open .agent-switch-button,
.artifact-viewer-open .agent-reset-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
}

@keyframes artifact-viewer-reveal {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

.main-scroll {
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    flex: 1;
    padding: 52px 48px;
    display: grid;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
}

.workspace {
    width: min(850px, 100%);
    margin: -24px auto 0;
}

.welcome-copy {
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.welcome-copy h1 {
    margin: 0;
    color: var(--ink-strong);
    font-size: clamp(31px, 3vw, 38px);
    line-height: 1.24;
    letter-spacing: -0.045em;
}

.welcome-description {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    word-break: keep-all;
}

.composer {
    position: relative;
    min-height: 157px;
    margin-top: 28px;
    padding: 19px 18px 10px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    box-shadow: 0 15px 40px rgba(38, 50, 30, 0.08);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.composer:focus-within {
    border-color: rgba(111, 132, 47, 0.72);
    box-shadow: 0 0 0 4px var(--focus), 0 18px 45px rgba(38, 50, 30, 0.1);
}

.composer textarea {
    width: 100%;
    min-height: 68px;
    max-height: 180px;
    padding: 0 2px;
    display: block;
    resize: none;
    overflow-y: auto;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 15px;
    line-height: 1.65;
}

.composer textarea::placeholder {
    color: #9ca39a;
}

.attachment-list {
    margin: 2px 0 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attachment-chip {
    max-width: 250px;
    min-height: 30px;
    padding: 0 6px 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #596451;
    background: var(--primary-pale);
    border: 1px solid #dde6cc;
    border-radius: 8px;
    font-size: 11px;
}

.attachment-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip button {
    width: 24px;
    height: 24px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #727d69;
    background: transparent;
    border-radius: 6px;
}

.attachment-chip button:hover {
    color: var(--ink);
    background: #e4ebd7;
}

.attachment-chip .icon {
    width: 14px;
    height: 14px;
}

.composer-toolbar {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.composer-tool {
    width: 36px;
    height: 36px;
}

.composer-tool .icon {
    width: 19px;
    height: 19px;
}

.composer-tool[aria-pressed="true"] {
    color: var(--primary-dark);
    background: var(--primary-pale);
}

.settings-wrap {
    position: relative;
}

.settings-popover {
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 12px);
    left: 0;
    width: 284px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(24, 31, 20, 0.16);
}

.settings-popover::after {
    position: absolute;
    bottom: -6px;
    left: 56px;
    width: 11px;
    height: 11px;
    content: "";
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform: rotate(45deg);
}

.popover-heading {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popover-heading strong {
    font-size: 14px;
}

.popover-close {
    width: 28px;
    height: 28px;
}

.popover-close .icon {
    width: 16px;
    height: 16px;
}

.setting-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.segmented-control {
    padding: 3px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #f2f4ef;
    border-radius: 9px;
}

.segmented-control button {
    min-height: 33px;
    color: var(--muted);
    background: transparent;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.segmented-control button[aria-pressed="true"] {
    color: var(--ink-strong);
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(25, 31, 21, 0.09);
}

.setting-check {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #4c5548;
    cursor: pointer;
    font-size: 12px;
}

.setting-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-check {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: transparent;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 5px;
}

.custom-check .icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.setting-check input:checked + .custom-check {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.setting-check input:focus-visible + .custom-check {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.send-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(86, 104, 32, 0.22);
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.send-button:not(:disabled):hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(86, 104, 32, 0.28);
    transform: translateY(-1px);
}

.send-button:disabled {
    color: #a4aaa0;
    background: #eceee9;
    box-shadow: none;
    opacity: 0.9;
}

.send-button .icon {
    width: 19px;
    height: 19px;
    stroke-width: 2.1;
}

.composer-meta {
    min-height: 16px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-mode {
    position: relative;
    padding-left: 10px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 700;
}

.search-mode::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 5px;
    content: "";
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
}

.character-count {
    margin-left: auto;
    color: #a1a79d;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.agent-section {
    margin-top: 26px;
}

.agent-section-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.agent-section-heading h2 {
    margin: 0;
    color: #4a5246;
    font-size: 12px;
    letter-spacing: -0.01em;
}

.agent-section-heading p {
    margin: 0;
    color: #969d92;
    font-size: 10px;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.agent-card {
    min-width: 0;
    min-height: 96px;
    padding: 15px 14px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.agent-card:hover {
    background: #fdfefc;
    border-color: #cfd6c7;
    box-shadow: 0 10px 25px rgba(36, 45, 29, 0.075);
    transform: translateY(-2px);
}

.agent-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.agent-icon .icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.7;
}

.distortion .agent-icon {
    color: #a66004;
    background: #fff2dc;
}

.comparison .agent-icon {
    color: var(--primary-dark);
    background: var(--primary-pale);
}

.report .agent-icon {
    color: #995026;
    background: #f8ede7;
}

.agent-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.agent-copy strong {
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: -0.025em;
    word-break: keep-all;
}

.agent-copy small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    word-break: keep-all;
}

.ai-notice {
    margin: 18px 0 0;
    color: #9ba197;
    font-size: 10px;
    text-align: center;
}

/* Distortion detection scenario */
.agent-mode .main-scroll {
    padding: 0 42px;
    display: block;
    align-items: initial;
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

.agent-workspace {
    width: min(1000px, 100%);
    min-height: 100%;
    margin: 0 auto;
}

.agent-toolbar {
    position: sticky;
    z-index: 12;
    top: 0;
    min-height: 72px;
    padding: 12px 4px;
    display: flex;
    align-items: center;
    gap: 11px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.agent-back-button,
.artifact-reopen-button,
.agent-switch-button,
.agent-reset-button,
.example-prompt-button,
.scenario-send-button,
.analysis-progress-actions button,
.result-tabs button,
.secondary-result-button,
.primary-result-button {
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.agent-back-button {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #596253;
    background: transparent;
    border-radius: 10px;
}

.agent-back-button:hover {
    color: var(--ink-strong);
    background: var(--sidebar-hover);
}

.agent-toolbar-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    color: #a66004;
    background: #fff1da;
    border: 1px solid #f4dfbd;
    border-radius: 11px;
}

.agent-toolbar-icon .icon {
    width: 19px;
    height: 19px;
}

.agent-toolbar-copy {
    min-width: 0;
    flex: 1;
}

.agent-toolbar-copy p {
    margin: 0 0 2px;
    color: #626c5e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.agent-toolbar-copy h1 {
    overflow: hidden;
    margin: 0;
    color: var(--ink-strong);
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-demo-badge,
.result-demo-label {
    padding: 5px 9px;
    color: #56614f;
    background: #f4f6f0;
    border: 1px solid #e0e5da;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.artifact-reopen-button,
.agent-switch-button,
.agent-reset-button {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #55604e;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}

.artifact-reopen-button[hidden] {
    display: none;
}

.artifact-reopen-button:hover,
.agent-switch-button:hover,
.agent-reset-button:hover {
    color: var(--ink-strong);
    background: var(--sidebar-hover);
    border-color: var(--line-strong);
}

.artifact-reopen-button .icon,
.agent-switch-button .icon,
.agent-reset-button .icon {
    width: 15px;
    height: 15px;
}

.agent-switch-button .icon {
    transform: rotate(-90deg);
}

.agent-thread {
    width: min(860px, 100%);
    min-height: calc(100vh - 220px);
    min-height: calc(100dvh - 220px);
    margin: 0 auto;
    padding: 34px 8px 50px;
}

.agent-intro-turn {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    animation: scenario-rise 420ms ease both;
}

.assistant-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #a66004;
    background: #fff1da;
    border: 1px solid #f2dcb8;
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(91, 67, 25, 0.08);
}

.assistant-avatar .icon {
    width: 19px;
    height: 19px;
}

.assistant-message {
    min-width: 0;
    max-width: 720px;
    padding: 1px 0 0;
}

.assistant-label {
    color: #7c8577;
    font-size: 10px;
    font-weight: 700;
}

.assistant-message h2 {
    margin: 7px 0 8px;
    color: var(--ink-strong);
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.035em;
}

.assistant-message > p {
    max-width: 650px;
    margin: 0;
    color: #60695c;
    font-size: 13px;
    line-height: 1.72;
    white-space: pre-line;
    word-break: keep-all;
}

.agent-capability-list {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.agent-capability-list li {
    padding: 6px 9px;
    color: #5c684f;
    background: #f5f7f1;
    border: 1px solid #e3e7de;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.example-prompt-button {
    width: min(620px, 100%);
    min-height: 51px;
    margin-top: 19px;
    padding: 9px 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    color: #454e40;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 7px 20px rgba(35, 45, 28, 0.045);
    font-size: 12px;
    font-weight: 650;
    text-align: left;
}

.example-prompt-button:hover {
    color: var(--ink-strong);
    background: #fcfdfb;
    border-color: #cfd7c7;
    box-shadow: 0 10px 26px rgba(35, 45, 28, 0.075);
    transform: translateY(-1px);
}

.example-prompt-button .example-mark {
    padding: 4px 6px;
    color: #8c5b10;
    background: #fff2dc;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
}

.example-prompt-button .icon {
    width: 15px;
    height: 15px;
    justify-self: center;
    color: var(--primary);
    transform: rotate(45deg);
}

.scenario-output {
    margin-top: 34px;
}

.scenario-user-turn {
    margin: 0 0 24px auto;
    display: flex;
    justify-content: flex-end;
    scroll-margin-top: 86px;
    animation: scenario-rise 350ms ease both;
}

.scenario-user-turn.has-artifact-context {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
}

.scenario-user-artifact {
    max-width: min(620px, 88%);
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #76543d;
    background: #fbf3ed;
    border: 1px solid #ead8cb;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 750;
}

.scenario-user-artifact .icon {
    width: 13px;
    height: 13px;
}

.scenario-user-artifact span {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scenario-user-artifact em {
    color: #995026;
    font-style: normal;
    font-weight: 850;
}

.scenario-user-bubble {
    max-width: min(620px, 88%);
    padding: 12px 15px;
    color: #fff;
    background: #293125;
    border-radius: 15px 15px 4px 15px;
    box-shadow: 0 8px 20px rgba(27, 34, 23, 0.1);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.general-workspace {
    width: min(1000px, 100%);
}

.general-workspace .agent-thread,
.general-workspace .scenario-composer,
.general-workspace .scenario-notice {
    width: min(860px, 100%);
}

.general-agent-icon,
.general-avatar,
.general .agent-icon {
    color: #476d69;
    background: #eaf4f2;
    border-color: #d2e5e1;
}

.general-avatar {
    box-shadow: 0 7px 18px rgba(40, 81, 75, 0.09);
}

.general-scope > span {
    background: #4d7772;
}

.general-assistant-turn {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    scroll-margin-top: 86px;
    animation: scenario-rise 420ms ease both;
}

.general-assistant-message {
    width: min(720px, calc(100% - 51px));
}

.artifact-followup-turn {
    margin: 0 0 28px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    scroll-margin-top: 86px;
    animation: scenario-rise 420ms ease both;
}

.artifact-followup-avatar {
    color: #8a4b29;
    background: #f8eae1;
    border-color: #ead3c4;
}

.artifact-followup-message {
    width: min(720px, calc(100% - 51px));
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e1e4de;
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 8px 24px rgba(35, 45, 28, 0.055);
}

.artifact-followup-message > span {
    color: #8a654d;
    font-size: 9px;
    font-weight: 800;
}

.artifact-followup-message h3 {
    margin: 5px 0 6px;
    color: #343a32;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.artifact-followup-message p {
    margin: 0;
    color: #5e675b;
    font-size: 11px;
    line-height: 1.7;
}

.artifact-followup-meta {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.artifact-followup-meta span {
    padding: 4px 6px;
    color: #76513a;
    background: #fbf3ed;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 750;
}

.artifact-reference-card {
    margin: 12px 0 34px;
    padding: 13px 14px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    color: #4d3b30;
    background: #fffaf6;
    border: 1px solid #ead9cd;
    border-radius: 13px;
    box-shadow: 0 9px 24px rgba(70, 45, 29, 0.055);
    animation: scenario-rise 350ms ease both;
}

.artifact-reference-card.is-active {
    background: #fff5ed;
    border-color: #c98961;
    box-shadow: 0 0 0 2px rgba(164, 90, 51, 0.09), 0 10px 26px rgba(70, 45, 29, 0.07);
}

.artifact-reference-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #995026;
    background: #f8e9df;
    border-radius: 10px;
}

.artifact-reference-icon .icon {
    width: 19px;
    height: 19px;
}

.artifact-reference-copy,
.artifact-reference-copy small,
.artifact-reference-copy strong {
    min-width: 0;
    display: block;
}

.artifact-reference-copy > small:first-child {
    color: #9a6d52;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.artifact-reference-copy strong {
    margin-top: 2px;
    overflow: hidden;
    color: #3d332d;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artifact-reference-copy > small:last-child {
    margin-top: 3px;
    color: #7c6a5f;
    font-size: 9px;
}

.artifact-reference-open {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #874724;
    background: #fff;
    border: 1px solid #dfc4b3;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.artifact-reference-open:hover {
    color: #6f3518;
    background: #fff3ea;
    border-color: #c98e68;
    transform: translateY(-1px);
}

.artifact-reference-open[aria-pressed="true"] {
    color: #fff;
    background: #995026;
    border-color: #995026;
}

.artifact-reference-open .icon {
    width: 14px;
    height: 14px;
}

.artifact-revision-banner {
    padding: 11px 16px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #654a38;
    background: #fff7f1;
    border-bottom: 1px solid #ecdcd1;
}

.artifact-revision-banner > .icon {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    color: #995026;
}

.artifact-revision-banner div {
    min-width: 0;
    flex: 1;
}

.artifact-revision-banner strong,
.artifact-revision-banner span {
    display: block;
}

.artifact-revision-banner strong {
    font-size: 10px;
}

.artifact-revision-banner span {
    margin-top: 2px;
    overflow: hidden;
    color: #806754;
    font-size: 9px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artifact-viewer-content .is-artifact-source-emphasized {
    box-shadow: inset 3px 0 #a45a33;
}

.agent-recommendation-card {
    width: min(620px, 100%);
    margin-top: 17px;
    padding: 15px;
    background: #fbfcfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(35, 45, 28, 0.06);
}

.agent-recommendation-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.recommendation-eyebrow {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.agent-recommendation-actions {
    margin-top: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.agent-recommendation-actions button {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.recommendation-accept {
    color: #fff;
    background: var(--primary-dark);
    border: 1px solid var(--primary-dark);
}

.recommendation-accept:not(:disabled):hover {
    background: #3f4d20;
    transform: translateY(-1px);
}

.recommendation-decline {
    color: #596155;
    background: #fff;
    border: 1px solid var(--line);
}

.recommendation-decline:not(:disabled):hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.agent-recommendation-actions button:disabled {
    display: none;
}

.recommendation-resolution {
    color: #55704b;
    font-size: 10px;
    font-weight: 700;
}

.scenario-user-settings {
    max-width: min(620px, 88%);
    margin: 7px 2px 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.report-user-turn {
    align-items: flex-end;
    flex-direction: column;
}

.scenario-user-settings span {
    padding: 4px 6px;
    color: #795845;
    background: #fbf0ea;
    border: 1px solid #edddd4;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
}

.scenario-composer-dock {
    position: sticky;
    z-index: 10;
    bottom: 0;
    padding: 18px 8px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 20%, #fff 100%);
}

.scenario-composer {
    width: min(860px, 100%);
    min-height: 86px;
    margin: 0 auto;
    padding: 13px 13px 9px 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    box-shadow: 0 12px 38px rgba(31, 41, 25, 0.11);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.artifact-context-chip {
    min-width: 0;
    margin: -3px 0 10px;
    padding: 8px 9px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #62472f;
    background: #fbf5f0;
    border: 1px solid #ead9cd;
    border-radius: 10px;
}

.artifact-context-chip > .icon {
    width: 26px;
    height: 26px;
    padding: 6px;
    color: #8a4d2c;
    background: #f3e3d8;
    border-radius: 7px;
}

.artifact-context-chip > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.artifact-context-chip small {
    color: #8b715d;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.artifact-context-chip strong {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artifact-context-chip em {
    padding: 3px 6px;
    color: #814622;
    background: #fff;
    border: 1px solid #e5cdbd;
    border-radius: 999px;
    font-size: 8px;
    font-style: normal;
    font-weight: 850;
}

.scenario-composer:focus-within {
    border-color: rgba(111, 132, 47, 0.72);
    box-shadow: 0 0 0 4px var(--focus), 0 14px 42px rgba(31, 41, 25, 0.12);
}

.scenario-composer.is-busy {
    background: #fafbf8;
}

.scenario-composer textarea {
    width: 100%;
    min-height: 28px;
    max-height: 120px;
    padding: 0 2px;
    display: block;
    resize: none;
    overflow-y: auto;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
    line-height: 1.6;
}

.scenario-composer textarea::placeholder {
    color: #9ca39a;
}

.scenario-composer textarea:disabled {
    color: #8d9589;
    -webkit-text-fill-color: #8d9589;
}

.scenario-composer-bottom {
    min-height: 34px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scenario-scope {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5d6757;
    font-size: 10px;
    font-weight: 700;
}

.scenario-scope > span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.scenario-character-count {
    margin-left: auto;
    color: #657062;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.scenario-send-button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 9px;
    box-shadow: 0 5px 13px rgba(86, 104, 32, 0.2);
}

.scenario-send-button:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.scenario-send-button:disabled {
    color: #a4aaa0;
    background: #eceee9;
    box-shadow: none;
}

.scenario-send-button .icon {
    width: 17px;
    height: 17px;
}

.scenario-send-button.is-loading .icon {
    animation: scenario-send-pulse 900ms ease-in-out infinite alternate;
}

.scenario-notice {
    width: min(860px, 100%);
    margin: 7px auto 0;
    color: #626c5e;
    font-size: 10px;
    text-align: center;
}

.analysis-progress-card {
    padding: 21px;
    background: #fff;
    border: 1px solid #dce2d7;
    border-radius: 17px;
    box-shadow: 0 14px 36px rgba(35, 45, 28, 0.075);
    scroll-margin-top: 86px;
    animation: scenario-rise 420ms ease both;
}

.analysis-progress-card:focus-visible,
.analysis-result:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.analysis-progress-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.analysis-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.analysis-live-badge > span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(111, 132, 47, 0.4);
    animation: analysis-live-pulse 1.5s ease-out infinite;
}

.analysis-progress-card.is-complete .analysis-live-badge > span {
    animation: none;
    box-shadow: none;
}

.analysis-progress-heading h2 {
    margin: 7px 0 4px;
    color: var(--ink-strong);
    font-size: 18px;
    letter-spacing: -0.03em;
}

.analysis-progress-heading p {
    margin: 0;
    color: #626c5e;
    font-size: 11px;
}

.analysis-step-count {
    padding: 5px 8px;
    color: #586250;
    background: #f4f6f0;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.analysis-live-badge b {
    font: inherit;
}

.analysis-progress-track {
    height: 5px;
    margin-top: 18px;
    overflow: hidden;
    background: #edf0e9;
    border-radius: 999px;
}

.analysis-progress-track > span {
    width: 8%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #879e42, var(--primary));
    border-radius: inherit;
    transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.analysis-pipeline {
    margin: 21px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    list-style: none;
}

.analysis-pipeline li {
    position: relative;
    min-width: 0;
    padding-right: 8px;
}

.analysis-pipeline li:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 12px;
    right: 7px;
    left: 28px;
    height: 1px;
    content: "";
    background: #e2e6dd;
}

.pipeline-marker {
    position: relative;
    z-index: 1;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: #626c5e;
    background: #fff;
    border: 1px solid #dce1d8;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    transition: color 250ms ease, background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.pipeline-marker .icon {
    width: 13px;
    height: 13px;
    display: none;
    stroke-width: 2.5;
}

.pipeline-copy {
    margin-top: 8px;
    display: block;
}

.pipeline-copy strong,
.pipeline-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-copy strong {
    color: #626c5e;
    font-size: 10px;
    transition: color 250ms ease;
}

.pipeline-copy small {
    margin-top: 3px;
    color: #687265;
    font-size: 10px;
}

.analysis-pipeline li.is-active .pipeline-marker {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(111, 132, 47, 0.12);
    animation: pipeline-marker-pulse 1s ease-in-out infinite alternate;
}

.analysis-pipeline li.is-active .pipeline-copy strong {
    color: var(--ink-strong);
}

.analysis-pipeline li.is-complete .pipeline-marker {
    color: #fff;
    background: #8c9f51;
    border-color: #8c9f51;
}

.analysis-pipeline li.is-complete .pipeline-marker span {
    display: none;
}

.analysis-pipeline li.is-complete .pipeline-marker .icon {
    display: block;
}

.analysis-pipeline li.is-complete::after {
    background: #aab98a;
}

.analysis-pipeline li.is-complete .pipeline-copy strong {
    color: #4e5848;
}

.analysis-activity {
    min-height: 84px;
    margin-top: 20px;
    padding: 14px 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f7f9f4;
    border: 1px solid #e4e9df;
    border-radius: 12px;
}

.activity-visual {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: #edf3e2;
    border-radius: 50%;
}

.activity-visual .icon {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    animation: activity-radar 2.1s linear infinite;
}

.activity-visual i {
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(111, 132, 47, 0.24);
    border-radius: 50%;
    animation: activity-ring 1.6s ease-out infinite;
}

.activity-copy {
    min-width: 0;
    flex: 1;
}

.activity-copy > strong {
    display: block;
    color: #3f4939;
    font-size: 12px;
}

.activity-copy > p {
    margin: 4px 0 0;
    color: #626c5e;
    font-size: 11px;
}

.activity-findings {
    min-height: 22px;
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.activity-findings span {
    padding: 4px 7px;
    color: #58634f;
    background: #fff;
    border: 1px solid #dfe5d9;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 750;
    animation: finding-pop 330ms ease both;
}

.activity-findings span:nth-child(2) {
    animation-delay: 90ms;
}

.activity-findings span:nth-child(3) {
    animation-delay: 180ms;
}

.analysis-complete-summary {
    min-height: 65px;
    margin-top: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #4d5b40;
    background: #f2f6e9;
    border: 1px solid #dde7cd;
    border-radius: 11px;
}

.analysis-complete-summary > .icon {
    width: 29px;
    height: 29px;
    padding: 6px;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    stroke-width: 2.4;
}

.analysis-complete-summary span,
.analysis-complete-summary strong,
.analysis-complete-summary small {
    display: block;
}

.analysis-complete-summary strong {
    font-size: 11px;
}

.analysis-complete-summary small {
    margin-top: 3px;
    color: #5d6952;
    font-size: 10px;
}

.analysis-progress-actions {
    min-height: 28px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-progress-actions > span {
    color: #626c5e;
    font-size: 10px;
}

.analysis-progress-actions button {
    padding: 5px 7px;
    color: #6a7560;
    background: transparent;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

.analysis-progress-actions button:hover {
    color: var(--primary-dark);
    background: var(--primary-pale);
}

.analysis-result {
    margin-top: 17px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce2d7;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(35, 45, 28, 0.085);
    scroll-margin-top: 86px;
    animation: result-reveal 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.result-hero {
    padding: 27px 29px 24px;
    background:
        radial-gradient(circle at 92% 0%, rgba(111, 132, 47, 0.11), transparent 15rem),
        linear-gradient(145deg, #fafbf8, #fff 64%);
    border-bottom: 1px solid var(--line);
}

.result-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.result-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
}

.result-complete-badge .icon {
    width: 16px;
    height: 16px;
    padding: 3px;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    stroke-width: 2.5;
}

.result-kicker {
    margin: 18px 0 6px;
    color: #65744f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.result-hero h2 {
    margin: 0;
    color: var(--ink-strong);
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.04em;
}

.result-claim {
    margin: 11px 0 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #626c5e;
    font-size: 11px;
}

.result-claim strong {
    min-width: 0;
    color: #596253;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: normal;
}

.verdict-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1.65fr repeat(3, minmax(0, 0.9fr));
    border: 1px solid #e0e5dc;
    border-radius: 12px;
}

.verdict-grid > div {
    min-width: 0;
    min-height: 73px;
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.verdict-grid > div + div {
    border-left: 1px solid #e5e9e1;
}

.verdict-grid span {
    margin-bottom: 6px;
    color: #626c5e;
    font-size: 10px;
    font-weight: 700;
}

.verdict-grid strong {
    min-width: 0;
    color: #3d4638;
    font-size: 11px;
    line-height: 1.4;
}

.verdict-grid strong small {
    display: block;
    margin-top: 2px;
    color: #626c5e;
    font-size: 9px;
    font-weight: 600;
}

.verdict-grid .verdict-primary strong {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #8b4e1a;
    font-size: 12px;
}

.verdict-primary .icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    flex: 0 0 15px;
}

.verdict-grid .severity-high {
    color: #a64a2b;
}

.verdict-summary {
    margin: 17px 0 0;
    padding-left: 12px;
    color: #596253;
    border-left: 3px solid #82953f;
    font-size: 11px;
    line-height: 1.75;
    word-break: keep-all;
}

.result-tabs {
    padding: 0 28px;
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 76px;
}

.result-tabs button {
    position: relative;
    min-height: 50px;
    padding: 0 2px;
    color: #626c5e;
    background: transparent;
    font-size: 11px;
    font-weight: 750;
}

.result-tabs button::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    content: "";
    background: transparent;
}

.result-tabs button:hover {
    color: #4b5546;
}

.result-tabs button[aria-selected="true"] {
    color: var(--ink-strong);
}

.result-tabs button[aria-selected="true"]::after {
    background: var(--primary);
}

.result-tabs button span {
    margin-left: 3px;
    padding: 2px 4px;
    color: var(--primary-dark);
    background: var(--primary-pale);
    border-radius: 4px;
    font-size: 9px;
}

.result-panel {
    padding: 27px 29px 30px;
    animation: panel-fade 260ms ease both;
}

.report-section + .report-section {
    margin-top: 31px;
    padding-top: 29px;
    border-top: 1px solid #eaede7;
}

.report-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.report-section-heading > span:first-child {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #607326;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
}

.report-section-heading > div {
    min-width: 0;
    flex: 1;
}

.report-section-heading h3 {
    margin: 1px 0 3px;
    color: var(--ink-strong);
    font-size: 14px;
    letter-spacing: -0.025em;
}

.report-section-heading p {
    margin: 0;
    color: #626c5e;
    font-size: 11px;
}

.distortion-type-grid {
    margin-top: 17px;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 9px;
}

.distortion-type-grid > div {
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    background: #fafbf9;
    border: 1px solid #e4e8e1;
    border-radius: 11px;
}

.distortion-type-grid > div > span {
    display: block;
    margin-bottom: 8px;
    color: #626c5e;
    font-size: 10px;
    font-weight: 700;
}

.distortion-type-grid .distortion-type-main {
    background: #fff8f2;
    border-color: #f0dfd2;
}

.distortion-type-main strong {
    color: #914e20;
    font-size: 13px;
}

.distortion-type-main p {
    margin: 7px 0 0;
    color: #7b6a5e;
    font-size: 10px;
    line-height: 1.55;
}

.type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.type-chips em {
    padding: 5px 6px;
    color: #5f6959;
    background: #fff;
    border: 1px solid #e0e5dc;
    border-radius: 5px;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.distortion-type-grid ul {
    margin: 0;
    padding: 0 0 0 14px;
    color: #616a5c;
    font-size: 10px;
    line-height: 1.75;
}

.evidence-count {
    margin-left: auto;
    padding: 5px 7px;
    color: #55624b;
    background: #f1f4ec;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.evidence-list {
    margin-top: 17px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.evidence-card {
    min-width: 0;
    min-height: 214px;
    padding: 15px;
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 11px;
    background: #fff;
    border: 1px solid #e1e6de;
    border-radius: 12px;
}

.evidence-index {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    color: #778170;
    background: #f1f4ee;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
}

.evidence-card.is-conflict .evidence-index {
    color: #9a552c;
    background: #fff0e7;
}

.evidence-card.is-timeline .evidence-index {
    color: #657838;
    background: #f0f4e6;
}

.evidence-card.is-caution .evidence-index {
    color: #96701c;
    background: #fff6df;
}

.evidence-body {
    min-width: 0;
}

.evidence-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.evidence-meta span {
    overflow: hidden;
    color: #626c5e;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-meta em {
    padding: 3px 5px;
    flex: 0 0 auto;
    color: #93512b;
    background: #fff1e8;
    border-radius: 4px;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.is-timeline .evidence-meta em {
    color: #617535;
    background: #eef4e4;
}

.is-caution .evidence-meta em {
    color: #8d681b;
    background: #fff6df;
}

.evidence-body h4 {
    margin: 8px 0 5px;
    color: #353d32;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.evidence-body > p {
    min-height: 42px;
    margin: 0;
    color: #70796b;
    font-size: 11px;
    line-height: 1.58;
    word-break: keep-all;
}

.evidence-body > .evidence-caveat {
    min-height: 0;
    margin-top: 8px;
    padding: 7px 8px;
    color: #6f612f;
    background: #fff9e9;
    border: 1px solid #eee0b8;
    border-radius: 7px;
    font-size: 10px;
    line-height: 1.5;
}

.evidence-caveat strong {
    margin-right: 3px;
    color: #765a13;
}

.source-location {
    margin-top: 10px;
    padding: 8px 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 2px 7px;
    background: #f7f8f5;
    border-radius: 7px;
}

.source-location span {
    grid-row: span 2;
    align-self: center;
    color: #5d6759;
    font-size: 9px;
}

.source-location strong,
.source-location small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-location strong {
    color: #525b4e;
    font-size: 9px;
}

.source-location small {
    color: #5d6759;
    font-size: 9px;
}

.source-location a {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 4px 5px;
    color: #53652c;
    background: #edf2e6;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.source-location a:hover {
    color: #fff;
    background: var(--primary-dark);
}

.source-location a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.triple-preview {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: #5d6759;
    font-size: 9px;
    white-space: nowrap;
}

.triple-preview .icon {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    color: var(--primary);
}

.triple-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.triple-preview b {
    padding: 2px 4px;
    flex: 0 0 auto;
    color: #647250;
    background: #eef3e7;
    border-radius: 3px;
    font-weight: 750;
}

.triple-preview em {
    margin-left: auto;
    flex: 0 0 auto;
    color: #626c5e;
    font-style: normal;
}

.rebuttal-draft {
    position: relative;
    margin-top: 17px;
    padding: 18px 19px 17px;
    background: #f7f9f4;
    border: 1px solid #e0e7d8;
    border-left: 4px solid #7b8f3b;
    border-radius: 0 12px 12px 0;
}

.draft-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.rebuttal-draft p {
    margin: 0;
    color: #4c5548;
    font-size: 11px;
    line-height: 1.82;
    word-break: keep-all;
}

.network-panel {
    background: #fbfcfa;
}

.network-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.network-heading h3 {
    margin: 0 0 4px;
    color: var(--ink-strong);
    font-size: 15px;
    letter-spacing: -0.025em;
}

.network-heading p {
    margin: 0;
    color: #626c5e;
    font-size: 11px;
}

.network-legend {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    list-style: none;
}

.network-legend li {
    position: relative;
    padding-left: 16px;
    color: #626c5e;
    font-size: 10px;
    white-space: nowrap;
}

.network-legend li::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 11px;
    height: 2px;
    content: "";
    background: #789143;
    transform: translateY(-50%);
}

.network-legend .interprets::before {
    height: 1px;
    background: repeating-linear-gradient(90deg, #cc8a34 0 3px, transparent 3px 5px);
}

.network-legend .conflicts::before {
    background: #c16343;
}

.kg-canvas {
    margin-top: 17px;
    overflow: hidden;
    background:
        radial-gradient(circle at 1px 1px, rgba(111, 132, 47, 0.09) 1px, transparent 0) 0 0 / 16px 16px,
        #fff;
    border: 1px solid #e0e5dc;
    border-radius: 13px;
}

.kg-canvas svg {
    width: 100%;
    height: auto;
    min-height: 400px;
    display: block;
}

.kg-edge {
    fill: none;
    stroke: #789143;
    stroke-width: 1.8;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.kg-edge.interprets {
    stroke: #cc8a34;
    stroke-dasharray: 5 5;
    stroke-dashoffset: 0;
    opacity: 0;
}

.kg-edge.conflicts {
    stroke: #c16343;
}

.network-panel.is-animated .kg-edge {
    animation: draw-kg-edge 800ms ease forwards;
}

.network-panel.is-animated .kg-edge.interprets {
    animation: show-kg-edge 500ms ease 700ms forwards;
}

.network-panel.is-animated .kg-edge.delay-1 {
    animation-delay: 350ms;
}

.network-panel.is-animated .kg-edge.delay-2 {
    animation-delay: 700ms;
}

.network-panel.is-animated .kg-edge.delay-3 {
    animation-delay: 1050ms;
}

.kg-edges marker path {
    fill: context-stroke;
}

#kg-arrow-green path {
    fill: #789143;
}

#kg-arrow-orange path {
    fill: #cc8a34;
}

#kg-arrow-red path {
    fill: #c16343;
}

.kg-edge-labels text {
    fill: #949b90;
    font-family: inherit;
    font-size: 9px;
}

.kg-node rect {
    fill: #fff;
    stroke: #dce3d7;
    stroke-width: 1.2;
    filter: drop-shadow(0 5px 7px rgba(43, 53, 37, 0.06));
}

.kg-node text {
    fill: #465040;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
}

.kg-node text + text {
    fill: #8a9385;
    font-size: 9px;
    font-weight: 600;
}

.kg-node.claim rect {
    fill: #fff6f1;
    stroke: #d88362;
}

.kg-node.claim text,
.kg-node.conclusion text {
    fill: #8f4a2b;
}

.kg-node.focus rect {
    fill: #edf3e2;
    stroke: #7d943d;
    stroke-width: 1.8;
}

.kg-node.focus text {
    fill: #526723;
}

.kg-node.entity rect {
    fill: #fffaf0;
    stroke: #d8ad66;
    stroke-dasharray: 4 3;
}

.kg-node.conclusion rect {
    fill: #fff4ed;
    stroke: #d27a58;
}

.kg-triple-list {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    list-style: none;
}

.kg-triple-list > li {
    min-height: 38px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #e3e7e0;
    border-radius: 8px;
    font-size: 10px;
}

.kg-triple-list span {
    overflow: hidden;
    color: #4e5849;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kg-triple-list b {
    padding: 4px 6px;
    color: #60724b;
    background: #eef3e8;
    border-radius: 4px;
    font-size: 9px;
}

.kg-triple-list em {
    padding: 3px 5px;
    color: #60733b;
    background: #eff4e6;
    border-radius: 4px;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
}

.kg-triple-list em.interpretation {
    color: #956c22;
    background: #fff4dd;
}

.kg-triple-list em.caution {
    color: #98543a;
    background: #fff0e9;
}

.network-caution {
    margin: 12px 0 0;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #786c5e;
    background: #fffaf0;
    border: 1px solid #efe3c7;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.55;
}

.network-caution .icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: #b07822;
}

.result-actions {
    padding: 15px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8f9f6;
    border-top: 1px solid var(--line);
}

.result-actions p,
.result-actions p strong,
.result-actions p span {
    display: block;
}

.result-actions p {
    margin: 0;
}

.result-actions p strong {
    color: #60695a;
    font-size: 10px;
}

.result-actions p span {
    margin-top: 2px;
    color: #626c5e;
    font-size: 10px;
}

.result-actions > div {
    display: flex;
    gap: 7px;
}

.secondary-result-button,
.primary-result-button {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 750;
}

.secondary-result-button {
    color: #596353;
    background: #fff;
    border: 1px solid #dde2d9;
}

.secondary-result-button:hover {
    background: #f3f6ef;
    border-color: #cfd7c7;
}

.primary-result-button {
    color: #fff;
    background: var(--primary);
}

.primary-result-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-result-button .icon,
.primary-result-button .icon {
    width: 14px;
    height: 14px;
}

.agent-back-button:focus-visible,
.agent-reset-button:focus-visible,
.example-prompt-button:focus-visible,
.scenario-send-button:focus-visible,
.analysis-progress-actions button:focus-visible,
.result-tabs button:focus-visible,
.secondary-result-button:focus-visible,
.primary-result-button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

@keyframes scenario-rise {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes result-reveal {
    from { opacity: 0; transform: translateY(14px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panel-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes analysis-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(111, 132, 47, 0.42); }
    75%, 100% { box-shadow: 0 0 0 6px rgba(111, 132, 47, 0); }
}

@keyframes pipeline-marker-pulse {
    from { box-shadow: 0 0 0 3px rgba(111, 132, 47, 0.08); }
    to { box-shadow: 0 0 0 6px rgba(111, 132, 47, 0.16); }
}

@keyframes activity-radar {
    to { transform: rotate(360deg); }
}

@keyframes activity-ring {
    from { opacity: 0.8; transform: scale(0.72); }
    to { opacity: 0; transform: scale(1.18); }
}

@keyframes finding-pop {
    from { opacity: 0; transform: translateY(3px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scenario-send-pulse {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

@keyframes draw-kg-edge {
    to { stroke-dashoffset: 0; }
}

@keyframes show-kg-edge {
    to { opacity: 1; }
}

/* Cross-source comparison scenario */
.comparison-workspace {
    width: min(1080px, 100%);
}

.comparison-workspace .agent-thread,
.comparison-workspace .scenario-composer,
.comparison-workspace .scenario-notice {
    width: min(960px, 100%);
}

.comparison-agent-icon,
.comparison-avatar {
    color: #607b31;
    background: #eef4e4;
    border-color: #dbe6ca;
}

.comparison-avatar {
    box-shadow: 0 7px 18px rgba(67, 92, 33, 0.08);
}

.comparison-capabilities li {
    color: #536842;
    background: #f3f7ed;
    border-color: #dfe8d5;
}

.comparison-example-button .example-mark {
    color: #537028;
    background: #edf5e2;
}

.comparison-scope > span {
    background: #73923a;
}

.comparison-live-badge {
    color: #54732d;
}

.comparison-live-badge > span {
    background: #73923a;
    box-shadow: 0 0 0 0 rgba(115, 146, 58, 0.42);
}

.comparison-progress-track > span {
    background: linear-gradient(90deg, #90a657, #627f30);
}

.parallel-source-board {
    position: relative;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.source-lane {
    position: relative;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
    background: #fafbf9;
    border: 1px solid #e2e6df;
    border-radius: 12px;
    transition: opacity 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.source-lane::before {
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    content: "";
    opacity: 0.65;
}

.lane-korea::before { background: #4f8090; }
.lane-japan::before { background: #a65d51; }
.lane-china::before { background: #a6813e; }

.source-lane-heading {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.country-code {
    width: 30px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: #667466;
    border-radius: 6px;
    font-size: 8px;
    font-style: normal;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.lane-korea .country-code,
.korea-source-card .country-code { background: #4f8090; }
.lane-japan .country-code,
.japan-source-card .country-code { background: #a65d51; }
.lane-china .country-code,
.china-source-card .country-code { background: #a6813e; }

.source-lane-heading strong,
.source-lane-heading small {
    display: block;
}

.source-lane-heading strong {
    color: #384238;
    font-size: 11px;
}

.source-lane-heading small {
    margin-top: 2px;
    color: #7c857b;
    font-size: 9px;
}

.source-lane-heading em {
    padding: 4px 6px;
    color: #777f75;
    background: #f0f2ee;
    border-radius: 5px;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.source-lane-document {
    margin-top: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e6e9e4;
    border-radius: 8px;
}

.source-lane-document span {
    display: block;
    overflow: hidden;
    color: #535d53;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-lane-document i {
    height: 4px;
    margin-top: 7px;
    display: block;
    background: #ebeee9;
    border-radius: 99px;
}

.source-lane-document i:nth-of-type(1) { width: 92%; }
.source-lane-document i:nth-of-type(2) { width: 74%; }
.source-lane-document i:nth-of-type(3) { width: 84%; }

.lane-scan {
    position: absolute;
    top: -35%;
    bottom: -35%;
    left: -45%;
    width: 36%;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
    transform: rotate(9deg);
}

.source-lane.is-active {
    background: #fff;
    border-color: #cfd9ca;
    box-shadow: 0 7px 18px rgba(47, 59, 42, 0.07);
    transform: translateY(-2px);
}

.source-lane.is-active .lane-scan {
    opacity: 1;
    animation: source-lane-scan 1.15s ease-in-out infinite;
}

.source-lane.is-active .source-lane-heading em {
    color: #5c7338;
    background: #eaf2df;
}

.source-lane.is-complete .source-lane-document i {
    background: #dfe7d7;
}

.source-lane.is-complete .source-lane-heading em {
    color: #4e6930;
    background: #eaf2df;
}

.source-lane.is-limited {
    background: #fcfaf5;
    border-color: #eadfc9;
}

.source-lane.is-limited .source-lane-heading em {
    color: #896a34;
    background: #f7eddc;
}

.translation-agent-row {
    margin-top: 9px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f7f9f4;
    border: 1px solid #e4e9df;
    border-radius: 10px;
}

.translation-hub-label,
.translation-agent {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.translation-hub-label {
    gap: 5px;
    margin-right: auto;
    color: #4d5b43;
    font-size: 9px;
    font-weight: 850;
}

.translation-hub-label .icon {
    width: 14px;
    height: 14px;
    color: #6a8439;
}

.translation-agent {
    gap: 5px;
    padding: 5px 7px;
    color: #737c70;
    background: #fff;
    border: 1px solid #e0e5dc;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.translation-agent i {
    width: 5px;
    height: 5px;
    background: #c5cbc2;
    border-radius: 50%;
}

.translation-agent.is-active {
    color: #506936;
    background: #edf4e4;
    border-color: #cfddbf;
}

.translation-agent.is-active i {
    background: #789344;
    animation: translation-agent-pulse 760ms ease-in-out infinite alternate;
}

.translation-agent.is-complete {
    color: #526047;
    background: #fff;
    border-color: #d5dfce;
}

.translation-agent.is-complete i {
    background: #779044;
}

.parallel-source-board.is-aligning .lane-korea,
.parallel-source-board.is-aligning .lane-japan {
    border-color: #9fb58c;
    box-shadow: 0 0 0 3px rgba(111, 132, 47, 0.09);
}

.parallel-source-board.is-synthesizing .source-lane {
    transform: translateY(0);
}

.comparison-analysis-result .result-kicker {
    color: #617e34;
}

.comparison-result-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(80, 128, 144, 0.12), transparent 16rem),
        radial-gradient(circle at 72% 0%, rgba(166, 93, 81, 0.07), transparent 13rem),
        #fbfcfa;
}

.comparison-stat-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1.55fr repeat(3, minmax(0, 0.82fr));
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe4dc;
    border-radius: 12px;
}

.comparison-stat-grid > div {
    min-width: 0;
    min-height: 74px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.comparison-stat-grid > div + div {
    border-left: 1px solid #e5e9e2;
}

.comparison-stat-grid span,
.comparison-stat-grid strong {
    display: block;
}

.comparison-stat-grid span {
    color: #788176;
    font-size: 9px;
    font-weight: 700;
}

.comparison-stat-grid strong {
    margin-top: 5px;
    overflow: hidden;
    color: #384338;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.comparison-stat-grid .comparison-stat-primary {
    background: #f3f7ed;
}

.comparison-stat-grid .comparison-stat-primary strong {
    color: #4d672f;
    font-size: 14px;
}

.comparison-stat-grid .context-only {
    color: #967239;
}

.comparison-result-tabs button[aria-selected="true"] {
    color: #587332;
}

.comparison-result-tabs button[aria-selected="true"]::after {
    background: #718b43;
}

.comparison-analysis-result .report-section {
    opacity: 0;
    animation: comparison-report-write 430ms ease forwards;
}

.comparison-analysis-result .report-section:nth-child(2) { animation-delay: 110ms; }
.comparison-analysis-result .report-section:nth-child(3) { animation-delay: 220ms; }
.comparison-analysis-result .report-section:nth-child(4) { animation-delay: 330ms; }
.comparison-analysis-result .report-section:nth-child(5) { animation-delay: 440ms; }

.country-source-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.country-source-card {
    position: relative;
    min-width: 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e5dd;
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(38, 47, 34, 0.04);
}

.country-source-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    content: "";
    border-radius: 12px 0 0 12px;
}

.korea-source-card::before { background: #4f8090; }
.japan-source-card::before { background: #a65d51; }
.china-source-card::before { background: #a6813e; }

.country-source-card > header {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.country-source-card header strong,
.country-source-card header small {
    display: block;
}

.country-source-card header strong {
    color: #374137;
    font-size: 11px;
}

.country-source-card header small {
    margin-top: 2px;
    color: #7a8378;
    font-size: 9px;
}

.country-source-card header em {
    padding: 4px 6px;
    color: #687164;
    background: #f2f4f0;
    border-radius: 5px;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
}

.country-source-card h4 {
    margin: 13px 0 6px;
    color: #2f382f;
    font-size: 12px;
    line-height: 1.48;
    word-break: keep-all;
}

.country-source-card > p {
    min-height: 50px;
    margin: 0;
    color: #626b60;
    font-size: 10px;
    line-height: 1.65;
    word-break: keep-all;
}

.country-source-card > a,
.source-unavailable {
    margin-top: 11px;
    display: inline-flex;
    align-items: center;
    color: #5e753a;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
}

.country-source-card > a:hover {
    text-decoration: underline;
}

.source-unavailable {
    color: #8c7650;
}

.source-tags {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.source-tags span {
    padding: 4px 6px;
    color: #657061;
    background: #f3f5f1;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 750;
}

.china-source-card {
    grid-column: 1 / -1;
    background: #fcfaf6;
}

.china-source-card > p {
    min-height: 0;
}

.parallel-excerpt-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
}

.parallel-excerpt {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e5dd;
    border-radius: 12px;
}

.parallel-excerpt header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.parallel-excerpt header span {
    padding: 4px 6px;
    color: #fff;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 850;
}

.korea-excerpt header span { background: #4f8090; }
.japan-excerpt header span { background: #a65d51; }

.parallel-excerpt header strong {
    overflow: hidden;
    color: #4d574c;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parallel-excerpt p {
    margin: 14px 0 10px;
    color: #3f493f;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.75;
    word-break: keep-all;
}

.parallel-excerpt small {
    color: #7a8378;
    font-size: 8px;
}

.parallel-match {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #657a45;
}

.parallel-match::before,
.parallel-match::after {
    position: absolute;
    z-index: 0;
    top: 50%;
    width: 25px;
    height: 1px;
    content: "";
    background: #aab99a;
}

.parallel-match::before { left: -10px; }
.parallel-match::after { right: -10px; }

.parallel-match .icon {
    position: relative;
    z-index: 1;
    width: 29px;
    height: 29px;
    padding: 7px;
    background: #eef3e7;
    border-radius: 50%;
}

.parallel-match strong,
.parallel-match span {
    position: relative;
    z-index: 1;
}

.parallel-match strong {
    margin-top: 5px;
    font-size: 11px;
}

.parallel-match span {
    margin-top: 1px;
    color: #7a8475;
    font-size: 7px;
    font-weight: 750;
}

.excerpt-caution,
.context-caution {
    margin: 10px 0 0;
    padding: 9px 10px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #766a55;
    background: #fcfaf5;
    border: 1px solid #ece3d3;
    border-radius: 8px;
    font-size: 9px;
    line-height: 1.55;
}

.excerpt-caution .icon,
.context-caution .icon {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin-top: 1px;
    color: #a27b3d;
}

.difference-count {
    padding: 5px 8px;
    color: #8c584f;
    background: #f8ece9;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 850;
    white-space: nowrap;
}

.source-comparison-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid #dfe4dd;
    border-radius: 11px;
    outline: 0;
    overscroll-behavior-inline: contain;
}

.source-comparison-table-wrap:focus-visible {
    box-shadow: 0 0 0 3px var(--focus);
}

.source-comparison-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}

.source-comparison-table th,
.source-comparison-table td {
    padding: 12px;
    color: #566055;
    border-right: 1px solid #e6eae4;
    border-bottom: 1px solid #e6eae4;
    font-size: 9px;
    line-height: 1.6;
    text-align: left;
    vertical-align: top;
    word-break: keep-all;
}

.source-comparison-table tr:last-child > * { border-bottom: 0; }
.source-comparison-table tr > *:last-child { border-right: 0; }

.source-comparison-table thead th {
    color: #434d43;
    background: #f4f6f2;
    font-weight: 850;
    vertical-align: middle;
}

.source-comparison-table thead th:nth-child(1) { width: 13%; }
.source-comparison-table thead th:nth-child(2),
.source-comparison-table thead th:nth-child(3) { width: 23%; }
.source-comparison-table thead th:nth-child(4) { width: 18%; }
.source-comparison-table thead th:nth-child(5) { width: 23%; }

.source-comparison-table tbody th {
    color: #354035;
    background: #fafbf9;
    font-weight: 850;
}

.table-country {
    margin-right: 5px;
    padding: 3px 4px;
    color: #fff;
    border-radius: 4px;
    font-size: 7px;
}

.table-country.korea { background: #4f8090; }
.table-country.japan { background: #a65d51; }
.table-country.china { background: #a6813e; }

.no-direct-record {
    color: #786d58 !important;
    background: #fcfaf5;
    vertical-align: middle !important;
}

.no-direct-record strong,
.no-direct-record span {
    display: block;
}

.no-direct-record strong {
    color: #8c6c37;
    font-size: 10px;
}

.no-direct-record span {
    margin-top: 6px;
}

.verdict-chip {
    margin-right: 5px;
    padding: 3px 5px;
    display: inline-block;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 850;
}

.verdict-chip.common {
    color: #4b703d;
    background: #eaf3e4;
}

.verdict-chip.difference {
    color: #8f5148;
    background: #f8e9e6;
}

.synthesis-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.synthesis-grid article {
    padding: 16px;
    border-radius: 12px;
}

.common-findings {
    background: #f1f7ef;
    border: 1px solid #dce9d8;
}

.difference-findings {
    background: #fcf3f1;
    border: 1px solid #f0ddda;
}

.synthesis-grid article > span {
    padding: 4px 6px;
    display: inline-block;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 850;
}

.common-findings > span { color: #4c7141; background: #dfeeda; }
.difference-findings > span { color: #8a5149; background: #f4dfdc; }

.synthesis-grid h4 {
    margin: 10px 0 8px;
    color: #364036;
    font-size: 12px;
}

.synthesis-grid ul {
    margin: 0;
    padding-left: 16px;
    color: #596358;
    font-size: 9px;
    line-height: 1.75;
}

.report-section + .generated-report-section {
    padding-top: 0;
    border-top: 0;
}

.generated-report {
    margin-top: 18px;
    padding: 28px;
    background: #f1f2ef;
    border: 0;
    border-radius: 0;
}

.hwp-report-paper {
    max-width: 720px;
    margin: 0 auto;
    padding: 42px 48px 34px;
    color: #252825;
    background: #fff;
    box-shadow: 0 7px 22px rgba(37, 44, 34, 0.09);
    font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", "바탕", serif;
}

.hwp-report-header {
    position: relative;
    padding: 6px 0 25px;
    text-align: center;
}

.generated-report .draft-label {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 7px;
    color: #62685f;
    background: #eff0ed;
    border-radius: 2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 8px;
    font-weight: 800;
}

.hwp-report-kicker {
    display: block;
    color: #6b7169;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.22em;
}

.hwp-report-header h4 {
    margin: 15px 0 0;
    color: #202320;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.035em;
}

.hwp-report-header h4 strong {
    font-size: 25px;
    font-weight: 800;
}

.hwp-report-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 30px;
    padding: 1px;
    background: #dfe1dc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.hwp-report-meta div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 37px;
    background: #fff;
}

.hwp-report-meta dt,
.hwp-report-meta dd {
    margin: 0;
    padding: 10px 11px;
    font-size: 9px;
    line-height: 1.55;
}

.hwp-report-meta dt {
    color: #505650;
    background: #f4f5f2;
    font-weight: 800;
}

.hwp-report-meta dd {
    color: #3e443e;
    font-weight: 600;
}

.hwp-report-body {
    counter-reset: report-part;
}

.hwp-report-part + .hwp-report-part {
    margin-top: 24px;
}

.hwp-report-part h5,
.hwp-report-part h6 {
    margin: 0;
    color: #242724;
}

.hwp-report-part h5 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.hwp-report-part h5 span {
    display: inline-block;
    width: 20px;
}

.hwp-report-subpart {
    margin: 14px 0 0 20px;
}

.hwp-report-subpart h6 {
    font-size: 11px;
    font-weight: 750;
}

.generated-report .hwp-report-body p {
    margin: 9px 0 0 20px;
    color: #3f443f;
    font-size: 11px;
    line-height: 1.9;
    text-align: justify;
    word-break: keep-all;
}

.generated-report .hwp-report-subpart p {
    margin-left: 18px;
}

.hwp-report-limit {
    padding: 16px 18px;
    background: #f6f6f3;
}

.generated-report .hwp-report-limit p {
    color: #555a54;
}

.hwp-report-footer {
    margin-top: 29px;
    text-align: center;
}

.hwp-report-footer strong {
    display: block;
    font-size: 11px;
}

.hwp-report-footer small {
    margin-top: 20px;
    display: block;
    color: #7b8079;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 8px;
    line-height: 1.65;
}

.comparison-context-panel {
    animation: panel-fade 280ms ease both;
}

.context-visual-section + .context-visual-section {
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px solid #e5e9e2;
}

.event-timeline {
    position: relative;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.event-timeline::before {
    position: absolute;
    top: 13px;
    bottom: 16px;
    left: 82px;
    width: 2px;
    content: "";
    background: #dde4d8;
}

.event-timeline li {
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: 68px 28px minmax(0, 1fr);
    gap: 0 0;
}

.event-timeline time {
    padding-top: 5px;
    color: #526448;
    font-size: 10px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin: 3px auto 0;
    background: #fff;
    border: 3px solid #718b43;
    border-radius: 50%;
    box-sizing: border-box;
}

.timeline-dot.korea { border-color: #4f8090; }
.timeline-dot.japan { border-color: #a65d51; }
.timeline-dot.overlap {
    border-color: #708b46;
    box-shadow: 0 0 0 4px rgba(112, 139, 70, 0.12);
}

.event-timeline li > div {
    padding: 1px 0 18px 8px;
}

.event-timeline strong,
.event-timeline p,
.event-timeline em {
    display: block;
}

.event-timeline strong {
    color: #354035;
    font-size: 11px;
}

.event-timeline p {
    margin: 4px 0 5px;
    color: #5e685c;
    font-size: 9px;
    line-height: 1.6;
}

.event-timeline em {
    color: #7c8579;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}

.route-map-wrap {
    margin-top: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #f2f7f7, #e9f1f0);
    border: 1px solid #d9e3e1;
    border-radius: 14px;
}

.route-map {
    width: 100%;
    height: auto;
    display: block;
}

.map-land { fill: #dbe4d2; stroke: #bdcab3; stroke-width: 1; }
.japan-land { fill: #e6dcd7; stroke: #cebbb2; }

.route-path,
.return-path {
    fill: none;
    stroke: #607d37;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 8 7;
    marker-end: url(#route-arrow);
}

.return-path {
    stroke: #7893a0;
    stroke-width: 2;
    stroke-dasharray: 5 7;
}

.route-map #route-arrow path { fill: #607d37; }

.route-node circle {
    fill: #fff;
    stroke: #607d37;
    stroke-width: 4;
}

.route-node.focus circle { fill: #eef4e6; stroke: #718f40; }
.route-node.japan circle { fill: #f7ece9; stroke: #a65d51; }
.route-node.return circle { stroke: #7893a0; }

.route-node text {
    fill: #435243;
    font-size: 11px;
    font-weight: 800;
}

.map-label {
    fill: #83907c;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.sea-label {
    fill: #8aa1a1;
    font-size: 13px;
    font-weight: 750;
}

.route-legend {
    padding: 10px 13px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid #dce6e3;
}

.route-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #647168;
    font-size: 8px;
    font-weight: 700;
}

.route-legend i {
    width: 17px;
    height: 2px;
    background: #607d37;
}

.route-legend .inbound { background: #7893a0; }
.route-legend .point {
    width: 7px;
    height: 7px;
    background: #fff;
    border: 2px solid #607d37;
    border-radius: 50%;
}

.comparison-context-panel.is-animated .route-path,
.comparison-context-panel.is-animated .return-path {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: draw-comparison-route 1.2s ease forwards;
}

.comparison-context-panel.is-animated .return-path {
    animation-delay: 520ms;
}

.comparison-context-panel.is-animated .event-timeline li {
    opacity: 0;
    animation: comparison-timeline-reveal 350ms ease forwards;
}

.comparison-context-panel.is-animated .event-timeline li:nth-child(2) { animation-delay: 90ms; }
.comparison-context-panel.is-animated .event-timeline li:nth-child(3) { animation-delay: 180ms; }
.comparison-context-panel.is-animated .event-timeline li:nth-child(4) { animation-delay: 270ms; }
.comparison-context-panel.is-animated .event-timeline li:nth-child(5) { animation-delay: 360ms; }

@keyframes source-lane-scan {
    from { transform: translateX(0) rotate(9deg); }
    to { transform: translateX(430%) rotate(9deg); }
}

@keyframes translation-agent-pulse {
    from { opacity: 0.35; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.15); }
}

@keyframes comparison-report-write {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes draw-comparison-route {
    to { stroke-dashoffset: 0; }
}

@keyframes comparison-timeline-reveal {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Research report draft scenario */
.report-workspace {
    width: min(1080px, 100%);
}

.report-workspace .agent-thread,
.report-workspace .scenario-composer,
.report-workspace .scenario-notice {
    width: min(960px, 100%);
}

.report-agent-icon,
.report-avatar {
    color: #995026;
    background: #f8ede7;
    border-color: #eed8cb;
}

.report-avatar {
    box-shadow: 0 7px 18px rgba(121, 65, 34, 0.09);
}

.report-assistant-message {
    max-width: 790px;
}

.report-capabilities li {
    color: #75452c;
    background: #fbf3ef;
    border-color: #eedfd7;
}

.report-example-button {
    width: min(760px, 100%);
}

.report-example-button .example-mark {
    color: #914b25;
    background: #fae9df;
}

.report-example-button .icon {
    color: #995026;
}

.report-setting-panel {
    min-width: 0;
    margin: 18px 0 0;
    padding: 15px;
    background: linear-gradient(135deg, #fcf8f5, #fff 72%);
    border: 1px solid #eadfd8;
    border-radius: 13px;
}

.report-setting-panel legend {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.report-setting-panel legend span {
    color: #4c382d;
    font-size: 12px;
    font-weight: 800;
}

.report-setting-panel legend small {
    color: #66584f;
    font-size: 11px;
    font-weight: 500;
}

.report-setting-grid {
    margin-top: 11px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.report-setting-group {
    min-width: 0;
}

.report-setting-group > span {
    display: block;
    margin: 0 0 6px 1px;
    color: #604d43;
    font-size: 10px;
    font-weight: 800;
}

.report-setting-group > div {
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: #f3eee9;
    border-radius: 8px;
}

.report-setting-group button {
    min-width: 0;
    min-height: 32px;
    padding: 4px 5px;
    color: #5d5049;
    background: transparent;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.report-setting-group button:hover {
    color: #573c2e;
}

.report-setting-group button[aria-pressed="true"] {
    color: #723817;
    background: #fff;
    box-shadow: 0 2px 7px rgba(90, 54, 32, 0.1);
}

.report-citation-setting {
    margin: 11px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #624e43;
    font-size: 10px;
    font-weight: 650;
}

.report-citation-setting .icon {
    width: 13px;
    height: 13px;
    padding: 2px;
    color: #fff;
    background: #9b5b37;
    border-radius: 50%;
    stroke-width: 2.4;
}

.report-composer:focus-within {
    border-color: rgba(153, 80, 38, 0.72);
    box-shadow: 0 0 0 4px rgba(153, 80, 38, 0.13), 0 14px 42px rgba(54, 37, 27, 0.12);
}

.report-composer textarea::placeholder {
    color: #697064;
    opacity: 1;
}

.report-composer .scenario-send-button {
    background: #995026;
    box-shadow: 0 5px 13px rgba(153, 80, 38, 0.2);
}

.report-composer .scenario-send-button:not(:disabled):hover {
    background: #7d3f1e;
}

.report-composer .scenario-send-button:disabled {
    color: #a4aaa0;
    background: #eceee9;
    box-shadow: none;
}

.report-scope > span {
    background: #995026;
}

.report-scope b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-progress-card {
    border-color: #e7d9d0;
    box-shadow: 0 14px 36px rgba(87, 51, 31, 0.08);
}

.report-live-badge {
    color: #85441f;
}

.report-live-badge > span {
    background: #a45b32;
    box-shadow: 0 0 0 0 rgba(164, 91, 50, 0.42);
}

.report-progress-track > span {
    background: linear-gradient(90deg, #c3835e, #8f4923);
}

.report-pipeline li.is-active .pipeline-marker {
    background: #995026;
    border-color: #995026;
    box-shadow: 0 0 0 5px rgba(153, 80, 38, 0.12);
}

.report-pipeline li.is-complete .pipeline-marker {
    background: #ad7150;
    border-color: #ad7150;
}

.report-pipeline li.is-complete::after {
    background: #d2a990;
}

.report-rag-board {
    position: relative;
    min-height: 182px;
    margin-top: 20px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1.08fr);
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
    background: linear-gradient(140deg, #fbf7f4, #fff 54%, #fafbf8);
    border: 1px solid #eadfd7;
    border-radius: 13px;
}

.report-source-streams {
    display: grid;
    gap: 7px;
}

.report-source-streams article {
    position: relative;
    min-width: 0;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e8e0da;
    border-radius: 9px;
    opacity: 0.62;
    transition: opacity 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.report-source-streams article::after {
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: -24%;
    width: 16%;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(180, 110, 68, 0.16), transparent);
    transform: skewX(-14deg);
    opacity: 0;
}

.report-source-streams article.is-active,
.report-source-streams article.is-complete {
    opacity: 1;
}

.report-source-streams article.is-active {
    border-color: #dcbba8;
    box-shadow: 0 5px 15px rgba(100, 62, 39, 0.07);
}

.report-source-streams article.is-active::after {
    opacity: 1;
    animation: report-source-scan 1s ease-in-out infinite;
}

.report-source-streams article.is-complete {
    border-color: #dfe5d8;
}

.report-source-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    color: #8e5130;
    background: #f8e9e0;
    border-radius: 8px;
}

.report-source-icon .icon {
    width: 15px;
    height: 15px;
}

.report-source-streams strong,
.report-source-streams small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-source-streams strong {
    color: #493d36;
    font-size: 10px;
}

.report-source-streams small {
    margin-top: 2px;
    color: #635950;
    font-size: 10px;
}

.report-source-streams em {
    padding: 4px 5px;
    color: #66554c;
    background: #f6f2ef;
    border-radius: 5px;
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
    white-space: nowrap;
}

.report-source-streams article.is-complete em {
    color: #56624e;
    background: #eef3e9;
}

.report-evidence-flow {
    position: relative;
    display: grid;
    place-items: center;
}

.report-evidence-flow::before {
    width: 100%;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, #dfc3b1, #b27c5d);
}

.report-evidence-flow::after {
    position: absolute;
    right: 1px;
    width: 7px;
    height: 7px;
    content: "";
    border-top: 1px solid #a76a48;
    border-right: 1px solid #a76a48;
    transform: rotate(45deg);
}

.report-evidence-flow i {
    position: absolute;
    left: 0;
    width: 5px;
    height: 5px;
    background: #a25a34;
    border-radius: 50%;
    opacity: 0;
}

.report-rag-board.is-searching .report-evidence-flow i,
.report-rag-board.is-verifying .report-evidence-flow i,
.report-rag-board.is-writing .report-evidence-flow i {
    animation: report-evidence-travel 1.2s linear infinite;
}

.report-evidence-flow i:nth-child(2) { animation-delay: 400ms !important; }
.report-evidence-flow i:nth-child(3) { animation-delay: 800ms !important; }

.report-writing-preview {
    min-width: 0;
    padding: 12px 13px;
    background: #fff;
    border: 1px solid #e0e4dc;
    border-radius: 10px;
    box-shadow: 0 7px 18px rgba(42, 51, 37, 0.055);
}

.preview-page-heading {
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #ebece8;
}

.preview-page-heading span {
    width: 7px;
    height: 7px;
    background: #995026;
    border-radius: 2px;
}

.preview-page-heading b {
    color: #3f423c;
    font-size: 10px;
}

.preview-outline-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    opacity: 0.24;
    transform: translateY(3px);
    transition: opacity 260ms ease, transform 260ms ease;
}

.preview-outline-row strong {
    color: #985126;
    font-size: 10px;
}

.preview-outline-row span {
    padding: 5px 6px;
    color: #686b64;
    background: #f7f7f4;
    border-radius: 5px;
    font-size: 9px;
}

.report-rag-board.is-outlining .preview-outline-row,
.report-rag-board.is-writing .preview-outline-row,
.report-rag-board.is-ready .preview-outline-row {
    opacity: 1;
    transform: translateY(0);
}

.report-rag-board.is-outlining .preview-outline-row:nth-child(3) { transition-delay: 100ms; }
.report-rag-board.is-outlining .preview-outline-row:nth-child(4) { transition-delay: 200ms; }

.preview-writing-lines {
    margin-top: 10px;
    display: grid;
    gap: 4px;
}

.preview-writing-lines i {
    width: 0;
    height: 3px;
    display: block;
    background: #dedfd9;
    border-radius: 999px;
}

.preview-writing-lines i:nth-child(2) { max-width: 88%; }
.preview-writing-lines i:nth-child(3) { max-width: 96%; }
.preview-writing-lines i:nth-child(4) { max-width: 66%; }

.report-rag-board.is-writing .preview-writing-lines i,
.report-rag-board.is-ready .preview-writing-lines i {
    animation: report-line-write 650ms ease forwards;
}

.preview-writing-lines i:nth-child(2) { animation-delay: 130ms !important; }
.preview-writing-lines i:nth-child(3) { animation-delay: 260ms !important; }
.preview-writing-lines i:nth-child(4) { animation-delay: 390ms !important; }

.preview-footnote-count {
    margin-top: 8px;
    display: inline-block;
    padding: 3px 5px;
    color: #8b5739;
    background: #faeee7;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 750;
}

.report-activity {
    background: #fbf7f4;
    border-color: #eadfd8;
}

.report-activity .activity-visual {
    color: #88451f;
    background: #f8e8de;
}

.report-activity .activity-visual i {
    border-color: rgba(153, 80, 38, 0.24);
}

.report-activity .activity-findings span {
    color: #735544;
    border-color: #eadbd3;
}

.report-progress-card .analysis-complete-summary {
    color: #6b452f;
    background: #fcf2ec;
    border-color: #ead5c8;
}

.report-progress-card .analysis-complete-summary > .icon {
    background: #995026;
}

.report-progress-card .analysis-progress-actions button:hover {
    color: #783a18;
    background: #faeee7;
}

.report-result-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(153, 80, 38, 0.13), transparent 16rem),
        linear-gradient(145deg, #fcf9f7, #fff 64%);
}

.report-complete-badge {
    color: #82421f;
}

.report-complete-badge .icon {
    background: #995026;
}

.report-result-hero .result-kicker {
    color: #76452c;
}

.report-result-meta {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(0, 0.8fr));
    overflow: hidden;
    border: 1px solid #e7ddd6;
    border-radius: 12px;
}

.report-result-meta > div {
    min-width: 0;
    min-height: 69px;
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.report-result-meta > div + div {
    border-left: 1px solid #ebe3de;
}

.report-result-meta span,
.report-result-meta strong {
    display: block;
}

.report-result-meta span {
    margin-bottom: 5px;
    color: #655950;
    font-size: 10px;
    font-weight: 700;
}

.report-result-meta strong {
    overflow: hidden;
    color: #4b403a;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
}

.report-meta-primary {
    background: #fdf8f5;
}

.report-meta-primary strong {
    color: #824620;
}

.report-result-summary {
    margin: 16px 0 0;
    padding-left: 12px;
    color: #665d57;
    border-left: 3px solid #a15b35;
    font-size: 11px;
    line-height: 1.72;
}

.report-result-tabs button[aria-selected="true"]::after {
    background: #995026;
}

.report-result-tabs button span {
    color: #7c3e1b;
    background: #faeae1;
}

.report-document-panel {
    padding: 0;
    background: #e9e8e4;
}

.report-document-toolbar {
    min-height: 58px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #4e554d;
    background: #fbfbfa;
    border-bottom: 1px solid #d9d9d4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
}

.document-file-info,
.document-file-info > span:last-child,
.document-view-meta {
    display: flex;
    align-items: center;
}

.document-file-info {
    min-width: 0;
    gap: 10px;
}

.document-file-info > span:last-child {
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
}

.document-file-info strong {
    overflow: hidden;
    max-width: 520px;
    color: #30352f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-info small {
    color: #687067;
    font-size: 9px;
}

.document-file-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #8a4725;
    background: #f7e9e1;
    border: 1px solid #ead2c5;
    border-radius: 8px;
}

.document-file-icon .icon {
    width: 17px;
    height: 17px;
}

.document-view-meta {
    flex: 0 0 auto;
    gap: 5px;
}

.document-view-meta span {
    min-width: 38px;
    padding: 5px 7px;
    color: #5b6259;
    background: #fff;
    border: 1px solid #ddded9;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 750;
    text-align: center;
}

.report-paper-viewport {
    max-height: 760px;
    padding: 30px 24px 36px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background:
        linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
        #dfded9;
}

.report-paper-viewport:focus-visible {
    outline: 3px solid #6f3518;
    outline-offset: -4px;
}

.academic-paper {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 24px;
    color: #292c27;
    font-family: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
}

.paper-page {
    width: min(720px, 100%);
    min-height: 1018px;
    padding: 38px 58px 34px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: #292c27;
    background: #fff;
    border: 1px solid #d5d5d0;
    box-shadow: 0 12px 34px rgba(43, 38, 32, 0.13);
}

.paper-page-body {
    flex: 1;
}

.paper-running-header,
.paper-running-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #777b74;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 8px;
    letter-spacing: 0.035em;
}

.paper-running-header {
    min-height: 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d8d9d5;
}

.paper-running-footer {
    min-height: 25px;
    margin-top: 31px;
    padding-top: 8px;
    border-top: 1px solid #d8d9d5;
}

.paper-running-footer b {
    color: #454a44;
    font-size: 9px;
    font-weight: 500;
}

.paper-cover {
    padding: 31px 0 27px;
    text-align: center;
    border-bottom: 1px solid #d9dad6;
}

.paper-cover > span {
    display: inline-block;
    padding: 4px 8px;
    color: #8b4b27;
    background: #faeee7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
}

.paper-cover h3 {
    max-width: 520px;
    margin: 28px auto 10px;
    color: #1d211c;
    font-size: 26px;
    line-height: 1.5;
    letter-spacing: -0.04em;
    word-break: keep-all;
}

.paper-cover > p {
    margin: 0;
    color: #5d625a;
    font-size: 11px;
    line-height: 1.6;
}

.paper-cover > div {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    color: #5f655c;
    font-size: 10px;
}

.paper-cover b {
    color: #4a4f47;
}

.paper-author-block {
    width: min(340px, 100%);
    margin: 25px auto 0;
    padding-top: 13px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 18px;
    border-top: 1px solid #e1e2de;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 9px;
}

.paper-author-block > div {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
    text-align: left;
}

.paper-author-block dt {
    color: #777d74;
    font-weight: 700;
}

.paper-author-block dd {
    margin: 0;
    color: #444a43;
}

.paper-abstract {
    margin-top: 31px;
    padding: 20px 4px 22px;
    background: transparent;
    border-top: 2px solid #4c514a;
    border-bottom: 1px solid #cfd1cc;
}

.paper-abstract h4,
.paper-section h4,
.paper-footnotes h4,
.paper-references h4 {
    margin: 0;
    color: #20241f;
    font-size: 15px;
    letter-spacing: -0.025em;
}

.paper-abstract > p:not(.paper-keywords) {
    margin: 11px 0 0;
    font-size: 12px;
    line-height: 2;
    text-align: justify;
}

.paper-keywords {
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 10px;
}

.paper-keywords strong {
    margin-right: 2px;
}

.paper-keywords span {
    padding: 3px 5px;
    color: #66594f;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.paper-section {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 13px;
}

.paper-section-number {
    padding-top: 1px;
    color: #995026;
    font-size: 15px;
    font-weight: 800;
}

.paper-section h5 {
    margin: 24px 0 0;
    color: #353932;
    font-size: 12px;
    letter-spacing: -0.02em;
}

.paper-section p {
    margin: 12px 0 0;
    color: #363a34;
    font-size: 12px;
    line-height: 2.05;
    text-align: justify;
    word-break: break-all;
}

.paper-main-section {
    margin-top: 27px;
}

.paper-section sup {
    position: relative;
    top: -0.15em;
    margin-left: 1px;
}

.paper-section sup a {
    color: #954819;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.paper-caution {
    margin-top: 18px;
    padding: 11px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #725d4f;
    background: #fff8ed;
    border: 1px solid #efe0c5;
    border-radius: 7px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 10px;
    line-height: 1.7;
}

.paper-caution .icon {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    flex: 0 0 13px;
    color: #a56e24;
}

.paper-footnotes {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #d9dad6;
}

.paper-footnotes ol {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #565b53;
    font-size: 10px;
    line-height: 1.8;
}

.paper-footnotes button {
    padding: 1px 3px;
    color: #8c4b26;
    background: transparent;
    border-bottom: 1px dotted currentColor;
    font-size: inherit;
}

.paper-references {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #555a52;
}

.paper-references > div {
    margin-top: 13px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
}

.paper-references strong {
    color: #4d534c;
    font-size: 10px;
}

.paper-references ul {
    margin: 0;
    padding: 0;
    color: #4f554e;
    font-size: 10px;
    line-height: 1.78;
    list-style: none;
}

.paper-references li {
    padding-left: 12px;
    text-indent: -12px;
}

.paper-document-note {
    margin: 24px 0 0;
    padding: 10px 12px;
    color: #6a5a4e;
    background: #fbf7f0;
    border-left: 3px solid #a3623c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 9px;
    line-height: 1.65;
}

.paper-document-note strong {
    margin-right: 5px;
    color: #754023;
}

.source-panel-heading > span:first-child {
    background: #995026;
}

.source-panel-heading {
    flex-wrap: wrap;
}

.source-return-button {
    min-height: 30px;
    padding: 0 9px;
    color: #713a1d;
    background: #fff8f3;
    border: 1px solid #d9b9a7;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 750;
}

.source-return-button:hover {
    color: #fff;
    background: #7d3f1e;
    border-color: #7d3f1e;
}

.draft-source-list {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.draft-source-card {
    min-width: 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e4e1dc;
    border-radius: 11px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.draft-source-card:focus,
.draft-source-card.is-highlighted {
    outline: 0;
    border-color: #bd7e5b;
    box-shadow: 0 0 0 3px rgba(153, 80, 38, 0.12), 0 9px 24px rgba(69, 46, 32, 0.08);
    transform: translateY(-1px);
}

.draft-source-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.draft-source-status span,
.draft-source-status em {
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
}

.draft-source-status span {
    color: #536348;
    background: #eef4e9;
}

.draft-source-status em {
    color: #77685f;
    background: #f3f0ed;
}

.draft-source-card.is-caution .draft-source-status span {
    color: #76500f;
    background: #fff4d9;
}

.draft-source-card > p {
    margin: 13px 0 4px;
    color: #685b53;
    font-size: 10px;
    font-weight: 650;
}

.draft-source-card h4 {
    min-height: 38px;
    margin: 0;
    color: #30342f;
    font-size: 12px;
    line-height: 1.55;
}

.draft-source-card dl {
    margin: 12px 0;
    padding: 9px 10px;
    background: #f8f8f6;
    border-radius: 7px;
}

.draft-source-card dl > div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 7px;
}

.draft-source-card dl > div + div {
    margin-top: 6px;
}

.draft-source-card dt,
.draft-source-card dd {
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
}

.draft-source-card dt {
    color: #7b746d;
    font-weight: 700;
}

.draft-source-card dd {
    color: #555b52;
}

.draft-source-card > a {
    color: #89502d;
    font-size: 10px;
    font-weight: 750;
}

.draft-source-card > a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.draft-bibliography {
    margin-top: 26px;
    padding: 19px;
    background: #fafaf8;
    border: 1px solid #e6e6e1;
    border-radius: 11px;
}

.draft-bibliography h3 {
    margin: 0 0 13px;
    color: #292e28;
    font-size: 13px;
}

.draft-bibliography > div {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
}

.draft-bibliography > div + div {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e6e1;
}

.draft-bibliography strong {
    color: #73513f;
    font-size: 10px;
}

.draft-bibliography ul {
    margin: 0;
    padding-left: 15px;
    color: #5f655d;
    font-size: 10px;
    line-height: 1.75;
}

.source-verification-notice {
    margin: 14px 0 0;
    padding: 10px 11px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #625848;
    background: #fffaf0;
    border: 1px solid #eee3cc;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.6;
}

.source-verification-notice .icon {
    width: 14px;
    height: 14px;
    margin-top: 1px;
    flex: 0 0 14px;
    color: #a06c22;
}

.report-result-actions {
    align-items: center;
}

.report-result-actions .report-action-groups {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.export-button-group {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #92502b;
    border-radius: 8px;
}

.export-button-group button {
    min-height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    background: #995026;
    font-size: 11px;
    font-weight: 750;
    transition: background 150ms ease;
}

.export-button-group button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.export-button-group button:hover {
    background: #7d3f1e;
}

.export-button-group .icon {
    width: 13px;
    height: 13px;
}

.rebuttal-document-panel {
    background: #e7e8e2;
}

.rebuttal-file-icon {
    color: #4f681c;
    background: #edf2df;
    border-color: #d6dfbc;
}

.rebuttal-paper .paper-section-number {
    color: #526b20;
}

.rebuttal-paper .paper-running-header,
.rebuttal-paper .paper-running-footer {
    color: #686d65;
}

.rebuttal-paper-cover {
    padding-top: 55px;
}

.rebuttal-paper-cover > span {
    color: #526b20;
    background: #edf2df;
}

.rebuttal-paper-cover h3 {
    margin-top: 38px;
    font-size: 30px;
    line-height: 1.55;
}

.rebuttal-document-meta {
    width: min(430px, 100%);
    margin: 47px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 2px solid #4f554b;
    border-bottom: 1px solid #b9bdb4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 10px;
    text-align: left;
}

.rebuttal-document-meta > div {
    min-width: 0;
    padding: 8px 9px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    border-top: 1px solid #e0e2dc;
}

.rebuttal-document-meta > div:nth-child(-n + 2) {
    border-top: 0;
}

.rebuttal-document-meta dt {
    color: #697064;
    font-weight: 750;
}

.rebuttal-document-meta dd {
    margin: 0;
    color: #343a32;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.rebuttal-summary-grid {
    margin: 16px 0 0;
    border-top: 2px solid #51564e;
    border-bottom: 1px solid #bfc2bb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 10px;
}

.rebuttal-summary-grid > div {
    min-height: 38px;
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: stretch;
    border-top: 1px solid #dfe1dc;
}

.rebuttal-summary-grid > div:first-child {
    border-top: 0;
}

.rebuttal-summary-grid dt,
.rebuttal-summary-grid dd {
    padding: 9px 10px;
}

.rebuttal-summary-grid dt {
    color: #52594e;
    background: #f1f3ed;
    font-weight: 750;
}

.rebuttal-summary-grid dd {
    margin: 0;
    color: #30362e;
    overflow-wrap: anywhere;
}

.rebuttal-evidence-section article {
    padding: 17px 0 15px;
    border-bottom: 1px solid #dfe1dc;
    break-inside: avoid;
}

.rebuttal-evidence-section article:last-child {
    border-bottom: 0;
}

.rebuttal-evidence-section article h5 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.rebuttal-evidence-section article h5 > span {
    width: 20px;
    height: 20px;
    display: inline-grid;
    flex: 0 0 20px;
    place-items: center;
    color: #fff;
    background: #596f28;
    border-radius: 50%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9px;
}

.rebuttal-evidence-section article h5 em {
    margin-left: auto;
    padding: 3px 6px;
    color: #944326;
    background: #fff0ea;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 9px;
    font-style: normal;
    white-space: nowrap;
}

.rebuttal-evidence-section article h5 em.is-timeline {
    color: #766019;
    background: #fff8d8;
}

.rebuttal-evidence-section article h5 em.is-caution {
    color: #5f645b;
    background: #eff0ec;
}

.rebuttal-evidence-section article p {
    margin-top: 7px;
    line-height: 1.78;
}

.rebuttal-source-line {
    padding: 8px 10px;
    color: #4f574c !important;
    background: #f5f6f2;
    border-left: 3px solid #758b41;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    font-size: 9px !important;
    text-align: left !important;
}

.rebuttal-source-line a {
    color: #456316;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rebuttal-source-line span {
    display: block;
    margin-top: 3px;
    color: #62695f;
}

.rebuttal-document-draft {
    margin-top: 14px;
    padding: 16px 18px;
    background: #f7f8f4;
    border: 1px solid #d8ddd0;
    border-left: 4px solid #61782c;
}

.rebuttal-document-draft p {
    margin: 0;
}

.rebuttal-limitations ul,
.rebuttal-references ol {
    margin: 12px 0 0;
    padding-left: 19px;
    color: #42483f;
    font-size: 11px;
    line-height: 1.85;
}

.rebuttal-references {
    margin-top: 27px;
}

.rebuttal-references ol {
    font-size: 10px;
}

.rebuttal-export-group {
    border-color: #5d742c;
}

.rebuttal-export-group button {
    background: #637a30;
}

.rebuttal-export-group button:hover {
    background: #4c621e;
}

.rebuttal-export-group button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.report-setting-group button:focus-visible,
.paper-footnotes button:focus-visible,
.export-button-group button:focus-visible,
.draft-source-card:focus-visible,
.source-return-button:focus-visible {
    outline: 3px solid #6f3518;
    outline-offset: 2px;
}

@keyframes report-source-scan {
    from { transform: translateX(0) skewX(-14deg); }
    to { transform: translateX(780%) skewX(-14deg); }
}

@keyframes report-evidence-travel {
    0% { left: 0; opacity: 0; }
    15%, 75% { opacity: 1; }
    100% { left: calc(100% - 5px); opacity: 0; }
}

@keyframes report-line-write {
    from { width: 0; }
    to { width: 100%; }
}

.project-modal-backdrop {
    position: fixed;
    z-index: 400;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    background: rgba(21, 25, 19, 0.36);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.project-modal {
    width: min(420px, 100%);
    padding: 24px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 17px;
    box-shadow: 0 24px 70px rgba(21, 25, 19, 0.2);
}

.project-modal-heading {
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.project-modal-eyebrow {
    margin: 0 0 5px;
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.project-modal-heading h2 {
    margin: 0;
    color: var(--ink-strong);
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -0.035em;
}

.project-modal-close {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border-radius: 9px;
}

.project-modal-close:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.project-modal-close .icon {
    width: 18px;
    height: 18px;
}

.project-name-label {
    display: block;
    margin-bottom: 8px;
    color: #42493e;
    font-size: 12px;
    font-weight: 700;
}

.project-name-input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    color: var(--ink-strong);
    background: #fbfcfa;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: 0;
    font-size: 13px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.project-name-input::placeholder {
    color: #a0a79c;
}

.project-name-input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
}

.project-name-input[aria-invalid="true"] {
    border-color: #c85a4b;
    box-shadow: 0 0 0 3px rgba(200, 90, 75, 0.12);
}

.project-name-help,
.project-name-error {
    margin: 7px 1px 0;
    font-size: 10px;
    line-height: 1.5;
}

.project-name-help {
    color: var(--muted-soft);
}

.project-name-error {
    color: #b34032;
    font-weight: 600;
}

.project-modal-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.project-modal-cancel,
.project-modal-submit {
    min-width: 68px;
    height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.project-modal-cancel {
    color: #596155;
    background: var(--sidebar);
    border: 1px solid var(--line);
}

.project-modal-cancel:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.project-modal-submit {
    color: #fff;
    background: var(--ink-strong);
}

.project-modal-submit:not(:disabled):hover {
    background: #30372c;
}

.project-modal-submit:disabled {
    color: #a4aaa0;
    background: #eceee9;
}

.agent-selection-modal-backdrop {
    position: fixed;
    z-index: 410;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    background: rgba(21, 25, 19, 0.42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.agent-selection-modal {
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 26px;
    overflow-y: auto;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(21, 25, 19, 0.22);
}

.agent-selection-modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.agent-selection-modal-eyebrow {
    margin: 0 0 5px;
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.agent-selection-modal-heading h2 {
    margin: 0;
    color: var(--ink-strong);
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.04em;
    word-break: keep-all;
}

.agent-selection-modal-close {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border-radius: 9px;
}

.agent-selection-modal-close:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.agent-selection-modal-close .icon {
    width: 18px;
    height: 18px;
}

.agent-selection-modal-description {
    margin: 10px 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
}

.agent-selection-options {
    display: grid;
    gap: 9px;
}

.agent-selection-option {
    width: 100%;
    min-height: 74px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: var(--ink);
    background: #fbfcfa;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease, transform 150ms ease;
}

.agent-selection-option:hover {
    background: var(--surface);
    border-color: #cbd3c2;
    box-shadow: 0 8px 22px rgba(36, 45, 29, 0.08);
    transform: translateY(-1px);
}

.agent-selection-option .agent-icon {
    width: 42px;
    height: 42px;
}

.agent-selection-option .agent-copy strong {
    font-size: 14px;
}

.agent-selection-option .agent-copy small {
    font-size: 11px;
}

.agent-selection-draft-notice {
    margin: 13px 2px 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary-dark);
    font-size: 11px;
    line-height: 1.5;
}

.agent-selection-draft-notice .icon {
    width: 15px;
    height: 15px;
    stroke-width: 2.4;
}

.agent-selection-modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.agent-selection-modal-actions button {
    min-width: 68px;
    height: 40px;
    padding: 0 16px;
    color: #596155;
    background: var(--sidebar);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.agent-selection-modal-actions button:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
}

.conversation-context-menu,
.context-project-menu {
    padding: 6px;
    color: #353b32;
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: 0 14px 42px rgba(24, 30, 21, 0.16);
}

.conversation-context-menu {
    position: fixed;
    z-index: 300;
    width: 224px;
}

.context-project-wrap {
    position: relative;
}

.context-menu-item,
.context-project-item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: inherit;
    background: transparent;
    border-radius: 8px;
    text-align: left;
}

.context-menu-item {
    padding: 0 9px;
    font-size: 12px;
    font-weight: 600;
}

.context-menu-item:hover,
.context-menu-item[aria-expanded="true"],
.context-project-item:hover,
.context-project-item.is-current {
    background: var(--sidebar-hover);
}

.context-menu-item > .icon,
.context-project-item > .icon {
    width: 17px;
    height: 17px;
    color: #737b6f;
}

.context-menu-item > span,
.context-project-item > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.context-menu-item .context-arrow {
    width: 14px;
    height: 14px;
    margin-left: auto;
    transform: rotate(-90deg);
}

.context-menu-item.is-danger {
    color: #b34032;
}

.context-menu-item.is-danger > .icon {
    color: currentColor;
}

.context-project-menu {
    position: absolute;
    z-index: 1;
    top: -6px;
    left: calc(100% + 7px);
    width: 210px;
}

.conversation-context-menu.opens-left .context-project-menu {
    right: calc(100% + 7px);
    left: auto;
}

.context-project-item {
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
}

.context-project-item .context-check {
    width: 15px;
    height: 15px;
    margin-left: auto;
    color: var(--primary);
}

.toast {
    position: fixed;
    z-index: 100;
    bottom: 26px;
    left: 50%;
    max-width: min(420px, calc(100vw - 32px));
    padding: 11px 15px;
    color: #fff;
    background: rgba(26, 31, 23, 0.94);
    border-radius: 10px;
    box-shadow: 0 12px 35px rgba(20, 25, 17, 0.2);
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.sidebar-backdrop {
    display: none;
}

.sidebar-collapsed .sidebar {
    width: 76px;
}

.sidebar-collapsed .sidebar-header {
    padding: 13px 10px 9px;
    flex-direction: column;
    gap: 3px;
}

.sidebar-collapsed .brand {
    width: 46px;
    flex: 0 0 46px;
    justify-content: center;
}

.sidebar-collapsed .brand-logo {
    display: none;
}

.sidebar-collapsed .brand-symbol {
    width: 38px;
    height: 38px;
    display: block;
}

.sidebar-collapsed .sidebar-toggle {
    width: 40px;
    height: 32px;
}

.sidebar-collapsed .sidebar-toggle .icon {
    transform: rotate(180deg);
}

.sidebar-collapsed .sidebar-actions {
    padding: 8px 10px 12px;
    flex-direction: column;
    align-items: center;
}

.sidebar-collapsed .new-chat-button,
.sidebar-collapsed .project-add-button,
.sidebar-collapsed .history-search-button {
    width: 44px;
    min-width: 44px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    justify-content: center;
    padding: 0;
}

.sidebar-collapsed .new-chat-button span,
.sidebar-collapsed .history-search,
.sidebar-collapsed .section-title > span,
.sidebar-collapsed .section-meta,
.sidebar-collapsed .section-content,
.sidebar-collapsed .conversation-list,
.sidebar-collapsed .conversation-no-results,
.sidebar-collapsed .profile-copy,
.sidebar-collapsed .profile-chevron {
    display: none !important;
}

.sidebar-collapsed .sidebar-navigation {
    padding: 0 10px 20px;
}

.sidebar-collapsed .section-heading {
    min-height: 44px;
    justify-content: center;
    padding: 0;
}

.sidebar-collapsed .section-title {
    gap: 0;
}

.sidebar-collapsed .section-title .icon {
    width: 19px;
    height: 19px;
}

.sidebar-collapsed .sidebar-footer {
    padding: 10px;
}

.sidebar-collapsed .profile-button {
    justify-content: center;
    padding: 7px 0;
}

@media (max-width: 1180px) {
    .main-stage {
        flex-direction: column;
    }

    .artifact-viewer {
        position: relative;
        z-index: 14;
        inset: auto;
        width: 100%;
        height: min(56vh, 560px);
        flex-basis: 56%;
        border-right: 0;
        border-bottom: 1px solid #d8ddd4;
        box-shadow: 0 14px 38px rgba(28, 35, 24, 0.1);
    }

    .artifact-viewer-open .main-scroll {
        height: auto;
        min-height: 0;
        flex: 1;
    }

    .artifact-viewer-open.agent-mode .main-scroll {
        padding-right: 42px;
        padding-left: 42px;
    }
}

@media (max-width: 1020px) {
    .main-scroll {
        padding-right: 34px;
        padding-left: 34px;
    }

    .workspace {
        width: min(820px, 100%);
    }

    .agent-card {
        padding: 13px 12px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
    }

    .agent-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 820px) {
    body {
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(292px, calc(100vw - 48px));
        height: 100dvh;
        box-shadow: none;
        transform: translateX(-100%);
    }

    .sidebar-open .sidebar {
        box-shadow: 18px 0 55px rgba(26, 32, 22, 0.18);
        transform: translateX(0);
    }

    .sidebar-collapsed .sidebar {
        width: min(292px, calc(100vw - 48px));
    }

    .sidebar-collapsed .sidebar-header {
        padding: 16px 13px 10px 18px;
        flex-direction: row;
        gap: 8px;
    }

    .sidebar-collapsed .brand {
        width: auto;
        flex: 1;
        justify-content: flex-start;
    }

    .sidebar-collapsed .brand-logo {
        display: block;
    }

    .sidebar-collapsed .brand-symbol {
        display: none;
    }

    .sidebar-collapsed .sidebar-toggle {
        width: 38px;
        height: 38px;
    }

    .sidebar-collapsed .sidebar-toggle .icon {
        transform: none;
    }

    .sidebar-collapsed .sidebar-actions {
        padding: 7px 14px 15px;
        flex-direction: row;
    }

    .sidebar-collapsed .new-chat-button {
        width: auto;
        min-width: 0;
        min-height: 43px;
        padding: 0 14px;
        flex: 1;
        justify-content: flex-start;
    }

    .sidebar-collapsed .project-add-button,
    .sidebar-collapsed .history-search-button {
        width: 43px;
        min-width: 43px;
        height: 43px;
        flex: 0 0 43px;
    }

    .sidebar-collapsed .new-chat-button span,
    .sidebar-collapsed .section-title > span {
        display: inline !important;
    }

    .sidebar-collapsed .section-meta,
    .sidebar-collapsed .profile-copy {
        display: flex !important;
    }

    .sidebar-collapsed .profile-chevron {
        display: block !important;
    }

    .sidebar-collapsed .history-search {
        display: flex !important;
    }

    .sidebar-collapsed .history-search[hidden] {
        display: none !important;
    }

    .sidebar-collapsed .section-content {
        display: block !important;
    }

    .sidebar-collapsed .conversation-list {
        display: flex !important;
    }

    .sidebar-collapsed .conversation-no-results {
        display: block !important;
    }

    .sidebar-collapsed .conversation-no-results[hidden] {
        display: none !important;
    }

    .sidebar-collapsed .sidebar-section:not(.is-open) .section-content {
        display: none !important;
    }

    .sidebar-collapsed .sidebar-navigation {
        padding: 0 10px 20px;
    }

    .sidebar-collapsed .section-heading {
        min-height: 42px;
        padding: 0 10px;
        justify-content: space-between;
    }

    .sidebar-collapsed .section-title {
        gap: 10px;
    }

    .sidebar-collapsed .section-title .icon {
        width: 17px;
        height: 17px;
    }

    .sidebar-collapsed .profile-button {
        padding: 7px 9px;
        justify-content: flex-start;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 15;
        inset: 0;
        display: block;
        background: rgba(20, 25, 17, 0.28);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
    }

    .sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        width: 100%;
    }

    .main-stage {
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
    }

    .artifact-viewer {
        width: 100%;
        max-width: none;
        right: 0;
    }

    .artifact-viewer-content {
        padding: 18px;
    }

    .mobile-header {
        height: 64px;
        padding: 0 16px;
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        align-items: center;
        border-bottom: 1px solid var(--line);
    }

    .mobile-header img {
        width: 148px;
        height: auto;
        justify-self: center;
    }

    .mobile-menu-button {
        justify-self: start;
    }

    .main-scroll {
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
        padding: 42px 28px;
    }

    .workspace {
        margin: 0 auto;
    }
}

@media (hover: none) {
    .conversation-actions {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
}

@media (max-width: 680px) {
    .project-modal-backdrop,
    .agent-selection-modal-backdrop {
        padding: 16px;
    }

    .project-modal,
    .agent-selection-modal {
        padding: 20px;
        border-radius: 15px;
    }

    .agent-selection-modal-heading h2 {
        font-size: 20px;
    }

    .agent-selection-modal-description {
        margin-bottom: 16px;
    }

    .agent-selection-option {
        min-height: 68px;
        padding: 10px 12px;
    }

    .main-scroll {
        padding: 34px 18px 30px;
        align-items: start;
    }

    .artifact-viewer-header {
        min-height: 64px;
        padding: 9px 12px;
        gap: 10px;
    }

    .artifact-viewer-heading {
        gap: 8px;
    }

    .artifact-viewer-icon,
    .artifact-viewer-close {
        width: 34px;
        height: 34px;
    }

    .artifact-viewer-icon {
        flex-basis: 34px;
    }

    .artifact-viewer-heading h2 {
        max-width: 230px;
        font-size: 13px;
    }

    .artifact-viewer-status {
        display: none;
    }

    .artifact-viewer-content {
        padding: 10px;
    }

    .artifact-viewer-content .result-hero {
        padding: 22px 18px 20px;
    }

    .artifact-viewer-content .result-panel {
        padding: 23px 18px 25px;
    }

    .artifact-viewer-content .report-document-panel {
        padding: 0;
    }

    .artifact-viewer-content .report-paper-viewport {
        padding: 14px 8px 20px;
    }

    .artifact-viewer-content .paper-page {
        padding: 32px 22px;
    }

    .workspace {
        width: 100%;
    }

    .welcome-copy h1 {
        font-size: 30px;
    }

    .welcome-description {
        max-width: 420px;
        margin-right: auto;
        margin-left: auto;
        font-size: 13px;
    }

    .composer {
        margin-top: 24px;
    }

    .agent-section {
        margin-top: 22px;
    }

    .agent-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .agent-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .agent-card {
        min-height: 76px;
        padding: 11px 13px;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 11px;
    }

    .agent-icon {
        width: 40px;
        height: 40px;
    }

    .agent-copy {
        gap: 3px;
    }

    .ai-notice {
        padding: 0 12px;
        line-height: 1.5;
    }
}

@media (max-width: 420px) {
    .mobile-header {
        height: 60px;
        padding: 0 12px;
    }

    .mobile-header img {
        width: 136px;
    }

    .main-scroll {
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        padding: 28px 14px 24px;
    }

    .main-stage {
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
    }

    .artifact-viewer-heading h2 {
        max-width: 190px;
    }

    .artifact-viewer-content .verdict-grid,
    .artifact-viewer-content .comparison-stat-grid,
    .artifact-viewer-content .report-result-meta {
        grid-template-columns: 1fr;
    }

    .artifact-viewer-content .comparison-stat-primary,
    .artifact-viewer-content .report-meta-primary {
        grid-column: auto;
    }

    .artifact-viewer-content .verdict-grid > div,
    .artifact-viewer-content .comparison-stat-grid > div,
    .artifact-viewer-content .report-result-meta > div {
        border-top: 1px solid #e5e9e2;
        border-left: 0;
    }

    .artifact-viewer-content .verdict-grid > div:first-child,
    .artifact-viewer-content .comparison-stat-grid > div:first-child,
    .artifact-viewer-content .report-result-meta > div:first-child {
        border-top: 0;
    }

    .eyebrow {
        margin-bottom: 8px;
        font-size: 9px;
    }

    .welcome-copy h1 {
        font-size: 27px;
    }

    .welcome-description {
        font-size: 12px;
    }

    .composer {
        min-height: 151px;
        padding: 16px 14px 9px;
        border-radius: 15px;
    }

    .composer textarea {
        min-height: 70px;
        font-size: 14px;
    }

    .settings-popover {
        position: fixed;
        right: 14px;
        bottom: 18px;
        left: 14px;
        width: auto;
    }

    .settings-popover::after {
        display: none;
    }

    .attachment-chip {
        max-width: 100%;
    }
}

@media (max-height: 720px) and (min-width: 821px) {
    .main-scroll {
        padding-top: 34px;
        padding-bottom: 34px;
        align-items: start;
    }

    .workspace {
        margin: 0 auto;
    }

    .agent-mode .main-scroll {
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 820px) {
    .agent-mode .main-scroll {
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
        padding: 0 24px;
    }

    .agent-thread {
        min-height: calc(100vh - 270px);
        min-height: calc(100dvh - 270px);
    }

    .analysis-pipeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 15px;
    }

    .analysis-pipeline li:nth-child(3)::after {
        display: none;
    }

    .verdict-grid {
        grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
    }

    .evidence-card {
        min-height: 226px;
    }
}

@media (max-width: 680px) {
    .agent-mode .main-scroll {
        padding: 0 14px;
    }

    .agent-toolbar {
        min-height: 66px;
        padding: 10px 0;
        gap: 8px;
    }

    .agent-toolbar-icon {
        width: 34px;
        height: 34px;
    }

    .agent-toolbar-copy h1 {
        font-size: 14px;
    }

    .agent-demo-badge {
        display: none;
    }

    .artifact-reopen-button,
    .agent-switch-button,
    .agent-reset-button {
        width: 35px;
        height: 35px;
        min-height: 35px;
        padding: 0;
        justify-content: center;
    }

    .artifact-reopen-button span,
    .agent-switch-button span,
    .agent-reset-button span {
        display: none;
    }

    .general-assistant-turn {
        gap: 9px;
    }

    .general-assistant-message {
        width: min(720px, calc(100% - 43px));
    }

    .agent-thread {
        min-height: calc(100vh - 258px);
        min-height: calc(100dvh - 258px);
        padding: 27px 2px 39px;
    }

    .assistant-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .assistant-message h2 {
        font-size: 18px;
    }

    .assistant-message > p {
        font-size: 12px;
    }

    .agent-capability-list li {
        font-size: 9px;
    }

    .example-prompt-button {
        grid-template-columns: auto minmax(0, 1fr);
        font-size: 11px;
    }

    .example-prompt-button .icon {
        display: none;
    }

    .scenario-composer-dock {
        padding: 15px 2px 10px;
    }

    .scenario-notice {
        padding: 0 10px;
        line-height: 1.4;
    }

    .analysis-progress-card {
        padding: 17px 15px;
        border-radius: 15px;
    }

    .analysis-progress-heading h2 {
        font-size: 16px;
    }

    .analysis-pipeline {
        grid-template-columns: 1fr 1fr;
        gap: 10px 12px;
    }

    .analysis-pipeline li {
        min-height: 43px;
        padding: 0;
        display: grid;
        grid-template-columns: 25px minmax(0, 1fr);
        align-items: start;
        gap: 7px;
    }

    .analysis-pipeline li::after {
        display: none;
    }

    .pipeline-copy {
        margin-top: 1px;
    }

    .pipeline-copy strong,
    .pipeline-copy small {
        white-space: normal;
    }

    .activity-visual {
        width: 37px;
        height: 37px;
        flex-basis: 37px;
    }

    .result-hero {
        padding: 22px 18px 20px;
    }

    .result-hero h2 {
        font-size: 21px;
    }

    .result-claim {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .result-claim strong {
        max-width: 100%;
    }

    .verdict-grid {
        grid-template-columns: 1fr 1fr;
    }

    .verdict-grid > div {
        min-height: 69px;
    }

    .verdict-grid > div + div {
        border-left: 0;
    }

    .verdict-grid > div:nth-child(even) {
        border-left: 1px solid #e5e9e1;
    }

    .verdict-grid > div:nth-child(n + 3) {
        border-top: 1px solid #e5e9e1;
    }

    .result-tabs {
        padding: 0 18px;
    }

    .result-panel {
        padding: 23px 18px 25px;
    }

    .distortion-type-grid,
    .evidence-list {
        grid-template-columns: 1fr;
    }

    .distortion-type-grid > div,
    .evidence-card {
        min-height: 0;
    }

    .evidence-body > p {
        min-height: 0;
    }

    .network-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .network-legend {
        justify-content: flex-start;
    }

    .kg-canvas {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .kg-canvas svg {
        width: 680px;
        min-height: auto;
    }

    .kg-triple-list > li {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .kg-triple-list em {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .result-actions {
        padding: 15px 18px;
        align-items: stretch;
        flex-direction: column;
    }

    .result-actions > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .agent-mode .main-scroll {
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        padding: 0 10px;
    }

    .artifact-reference-card {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 12px;
        gap: 9px;
    }

    .artifact-reference-icon {
        width: 34px;
        height: 34px;
    }

    .artifact-reference-open {
        width: 100%;
        grid-column: 1 / -1;
        justify-content: center;
    }

    .agent-back-button {
        width: 34px;
        height: 34px;
    }

    .agent-toolbar-icon {
        display: none;
    }

    .agent-recommendation-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .agent-recommendation-actions button {
        width: 100%;
    }

    .agent-intro-turn {
        gap: 9px;
    }

    .agent-capability-list {
        align-items: flex-start;
        flex-direction: column;
    }

    .example-prompt-button {
        padding: 9px 10px;
    }

    .example-prompt-button .example-mark {
        display: none;
    }

    .example-prompt-button {
        grid-template-columns: 1fr;
    }

    .analysis-progress-heading {
        gap: 10px;
    }

    .analysis-progress-heading p {
        max-width: 210px;
        line-height: 1.45;
    }

    .analysis-pipeline {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .analysis-pipeline li {
        min-height: 39px;
    }

    .analysis-pipeline li:not(.is-active, .is-complete) {
        display: none;
    }

    .analysis-activity {
        align-items: flex-start;
    }

    .activity-findings {
        gap: 4px;
    }

    .result-complete-badge,
    .result-demo-label {
        font-size: 8px;
    }

    .verdict-grid {
        grid-template-columns: 1fr;
    }

    .verdict-grid > div:nth-child(even) {
        border-left: 0;
    }

    .verdict-grid > div + div {
        border-top: 1px solid #e5e9e1;
    }

    .report-section-heading p {
        line-height: 1.45;
    }

    .evidence-card {
        padding: 13px 11px;
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 8px;
    }

    .evidence-index {
        width: 24px;
        height: 24px;
    }

    .triple-preview em {
        display: none;
    }

    .result-actions > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .comparison-stat-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .comparison-stat-grid > div:last-child {
        grid-column: 1 / -1;
        min-height: 56px;
        border-top: 1px solid #e5e9e2;
        border-left: 0;
    }

    .country-source-card > p {
        min-height: 64px;
    }
}

@media (max-width: 680px) {
    .parallel-source-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .source-lane.lane-china {
        grid-column: 1 / -1;
    }

    .translation-agent-row {
        flex-wrap: wrap;
    }

    .translation-hub-label {
        width: 100%;
    }

    .translation-agent {
        flex: 1 1 135px;
        white-space: normal;
    }

    .comparison-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .comparison-stat-grid .comparison-stat-primary,
    .comparison-stat-grid > div:last-child {
        grid-column: 1 / -1;
    }

    .comparison-stat-grid > div:nth-child(2) {
        border-left: 0;
    }

    .comparison-stat-grid > div:nth-child(2),
    .comparison-stat-grid > div:nth-child(3) {
        border-top: 1px solid #e5e9e2;
    }

    .country-source-grid,
    .synthesis-grid {
        grid-template-columns: 1fr;
    }

    .china-source-card {
        grid-column: auto;
    }

    .country-source-card > p {
        min-height: 0;
    }

    .parallel-excerpt-grid {
        grid-template-columns: 1fr;
    }

    .parallel-match {
        min-height: 48px;
        flex-direction: row;
        gap: 5px;
    }

    .parallel-match::before,
    .parallel-match::after {
        top: auto;
        right: 50%;
        left: 50%;
        width: 1px;
        height: 14px;
    }

    .parallel-match::before { top: -8px; }
    .parallel-match::after { bottom: -8px; }

    .parallel-match strong,
    .parallel-match span {
        margin-top: 0;
    }

    .source-comparison-table {
        min-width: 820px;
    }

    .generated-report {
        padding: 12px;
    }

    .hwp-report-paper {
        padding: 30px 20px 25px;
    }

    .hwp-report-header {
        padding-top: 24px;
    }

    .hwp-report-header h4 {
        font-size: 16px;
    }

    .hwp-report-header h4 strong {
        font-size: 20px;
    }

    .hwp-report-meta {
        grid-template-columns: 1fr;
        margin-bottom: 25px;
    }

    .generated-report .hwp-report-body p {
        font-size: 10px;
        line-height: 1.82;
        text-align: left;
    }

    .route-map-wrap {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .route-map {
        width: 650px;
        max-width: none;
    }

    .route-legend {
        width: 650px;
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .parallel-source-board {
        grid-template-columns: 1fr;
    }

    .source-lane.lane-china {
        grid-column: auto;
    }

    .translation-agent-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .translation-agent {
        width: 100%;
    }

    .comparison-stat-grid {
        grid-template-columns: 1fr;
    }

    .comparison-stat-grid .comparison-stat-primary,
    .comparison-stat-grid > div:last-child {
        grid-column: auto;
    }

    .comparison-stat-grid > div + div {
        border-top: 1px solid #e5e9e2;
        border-left: 0;
    }

    .event-timeline::before {
        left: 63px;
    }

    .event-timeline li {
        grid-template-columns: 50px 27px minmax(0, 1fr);
    }

    .event-timeline time {
        font-size: 9px;
    }

    .comparison-result-actions > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .report-result-meta {
        grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
    }

    .report-result-meta > div:last-child {
        grid-column: 1 / -1;
        min-height: 52px;
        border-top: 1px solid #ebe3de;
        border-left: 0;
    }

    .paper-page {
        padding-right: 42px;
        padding-left: 42px;
    }
}

@media (max-width: 680px) {
    .report-setting-panel legend {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .report-setting-grid {
        grid-template-columns: 1fr;
    }

    .report-setting-group {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: center;
        gap: 7px;
    }

    .report-setting-group > span {
        margin: 0;
    }

    .report-scope b {
        max-width: 300px;
    }

    .report-rag-board {
        grid-template-columns: 1fr;
    }

    .report-evidence-flow {
        min-height: 24px;
    }

    .report-evidence-flow::before {
        width: 1px;
        height: 100%;
        background: linear-gradient(180deg, #dfc3b1, #b27c5d);
    }

    .report-evidence-flow::after {
        right: auto;
        bottom: 1px;
        transform: rotate(135deg);
    }

    .report-evidence-flow i {
        top: 0;
        left: calc(50% - 2px);
    }

    .report-rag-board.is-searching .report-evidence-flow i,
    .report-rag-board.is-verifying .report-evidence-flow i,
    .report-rag-board.is-writing .report-evidence-flow i {
        animation-name: report-evidence-travel-mobile;
    }

    .report-result-meta {
        grid-template-columns: 1fr 1fr;
    }

    .report-result-meta .report-meta-primary {
        grid-column: 1 / -1;
    }

    .report-result-meta > div:nth-child(2) {
        border-top: 1px solid #ebe3de;
        border-left: 0;
    }

    .report-result-meta > div:nth-child(3) {
        border-top: 1px solid #ebe3de;
    }

    .report-document-panel {
        padding: 0;
    }

    .report-paper-viewport {
        max-height: 680px;
        padding: 18px 12px 24px;
    }

    .report-document-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .document-view-meta {
        align-self: flex-end;
    }

    .paper-page {
        min-height: 0;
        padding: 34px 25px;
    }

    .paper-cover h3 {
        font-size: 19px;
    }

    .paper-cover > div {
        flex-direction: column;
        gap: 4px;
    }

    .paper-author-block {
        grid-template-columns: 1fr;
    }

    .paper-section {
        grid-template-columns: 25px minmax(0, 1fr);
        gap: 9px;
    }

    .draft-source-list {
        grid-template-columns: 1fr;
    }

    .draft-source-card h4 {
        min-height: 0;
    }

    .report-result-actions .report-action-groups {
        width: 100%;
        justify-content: stretch;
    }

    .report-result-actions .secondary-result-button {
        flex: 1 1 150px;
    }

    .export-button-group {
        width: 100%;
    }

    .export-button-group button {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .report-setting-panel {
        padding: 12px;
    }

    .report-setting-group {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .report-scope b {
        max-width: 165px;
    }

    .report-source-streams article {
        grid-template-columns: 27px minmax(0, 1fr);
    }

    .report-source-streams em {
        grid-column: 2;
        justify-self: start;
    }

    .report-result-meta {
        grid-template-columns: 1fr;
    }

    .report-result-meta .report-meta-primary,
    .report-result-meta > div:last-child {
        grid-column: auto;
    }

    .report-result-meta > div + div {
        border-top: 1px solid #ebe3de;
        border-left: 0;
    }

    .report-paper-viewport {
        max-height: 620px;
        padding: 10px 7px 16px;
    }

    .document-file-info strong {
        max-width: 225px;
    }

    .document-file-info small {
        max-width: 250px;
        line-height: 1.4;
    }

    .paper-page {
        padding: 28px 18px;
    }

    .paper-abstract {
        padding: 14px;
    }

    .paper-section {
        grid-template-columns: 1fr;
    }

    .paper-section-number {
        padding-bottom: 5px;
        border-bottom: 1px solid #ecece7;
    }

    .paper-running-header span:first-child,
    .paper-running-footer span {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .paper-references > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .draft-bibliography > div,
    .draft-source-card dl > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .export-button-group button {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 8px;
    }
}

@keyframes report-evidence-travel-mobile {
    0% { top: 0; left: calc(50% - 2px); opacity: 0; }
    15%, 75% { opacity: 1; }
    100% { top: calc(100% - 5px); left: calc(50% - 2px); opacity: 0; }
}

@media (max-width: 680px) {
    .rebuttal-document-meta {
        grid-template-columns: 1fr;
    }

    .rebuttal-document-meta > div:nth-child(2) {
        border-top: 1px solid #e0e2dc;
    }

    .rebuttal-summary-grid > div {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .rebuttal-evidence-section article h5 {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .rebuttal-evidence-section article h5 em {
        margin-left: 27px;
    }

    .rebuttal-paper-cover {
        padding-top: 25px;
    }

    .rebuttal-paper-cover h3 {
        margin-top: 24px;
        font-size: 21px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 16mm;
    }

    body.is-printing-report {
        height: auto;
        overflow: visible;
        background: #fff;
    }

    body.is-printing-report .sidebar,
    body.is-printing-report .mobile-header,
    body.is-printing-report .sidebar-backdrop,
    body.is-printing-report .artifact-viewer-header,
    body.is-printing-report .main-scroll,
    body.is-printing-report .artifact-revision-banner,
    body.is-printing-report .report-workspace > .agent-toolbar,
    body.is-printing-report .report-workspace > .scenario-composer-dock,
    body.is-printing-report [data-report-intro],
    body.is-printing-report .scenario-user-turn,
    body.is-printing-report .report-progress-card,
    body.is-printing-report .report-result-hero,
    body.is-printing-report .report-result-tabs,
    body.is-printing-report .report-result-actions,
    body.is-printing-report .report-document-toolbar,
    body.is-printing-report .report-sources-panel,
    body.is-printing-report .paper-footnotes button,
    body.is-printing-report .source-return-button,
    body.is-printing-report .report-sources-panel .draft-bibliography,
    body.is-printing-report .toast {
        display: none !important;
    }

    body.is-printing-report .app-shell,
    body.is-printing-report .main,
    body.is-printing-report .main-stage,
    body.is-printing-report .artifact-viewer,
    body.is-printing-report .artifact-viewer-content,
    body.is-printing-report .report-workspace,
    body.is-printing-report .agent-thread,
    body.is-printing-report .scenario-output,
    body.is-printing-report .report-draft-result,
    body.is-printing-report .report-document-panel,
    body.is-printing-report .report-paper-viewport {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        display: block !important;
        overflow: visible;
        background: #fff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.is-printing-report .academic-paper {
        width: 100%;
        margin: 0;
        padding: 0;
        display: block;
        border: 0;
        box-shadow: none;
    }

    body.is-printing-report .paper-page {
        width: 100%;
        min-height: 265mm;
        margin: 0;
        padding: 0;
        display: flex;
        border: 0;
        box-shadow: none;
        break-after: page;
    }

    body.is-printing-report .paper-page:last-child {
        break-after: auto;
    }

    body.is-printing-report .artifact-viewer,
    body.is-printing-rebuttal .artifact-viewer {
        position: static;
        inset: auto;
    }

    body.is-printing-report .report-draft-result,
    body.is-printing-report .report-document-panel {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body.is-printing-report .paper-abstract > p:not(.paper-keywords),
    body.is-printing-report .paper-section p {
        font-size: 10.5pt;
        line-height: 1.85;
    }

    body.is-printing-report .paper-footnotes ol,
    body.is-printing-report .paper-references,
    body.is-printing-report .paper-document-note,
    body.is-printing-report .draft-source-card,
    body.is-printing-report .draft-bibliography,
    body.is-printing-report .source-verification-notice {
        font-size: 9pt;
    }

    body.is-printing-report .report-sources-panel {
        margin-top: 18mm;
        padding-top: 10mm;
        break-before: page;
        border-top: 1px solid #d9dad6;
    }

    body.is-printing-report .draft-source-list {
        grid-template-columns: 1fr 1fr;
    }

    body.is-printing-report .draft-source-card,
    body.is-printing-report .draft-bibliography {
        break-inside: avoid;
    }

    body.is-printing-report .paper-section,
    body.is-printing-report .paper-abstract,
    body.is-printing-report .paper-footnotes {
        break-inside: avoid;
    }

    body.is-printing-rebuttal {
        height: auto;
        overflow: visible;
        background: #fff;
    }

    body.is-printing-rebuttal .sidebar,
    body.is-printing-rebuttal .mobile-header,
    body.is-printing-rebuttal .sidebar-backdrop,
    body.is-printing-rebuttal .artifact-viewer-header,
    body.is-printing-rebuttal .main-scroll,
    body.is-printing-rebuttal .artifact-revision-banner,
    body.is-printing-rebuttal [data-agent-workspace] > .agent-toolbar,
    body.is-printing-rebuttal [data-agent-workspace] > .scenario-composer-dock,
    body.is-printing-rebuttal [data-agent-intro],
    body.is-printing-rebuttal .scenario-user-turn,
    body.is-printing-rebuttal .analysis-progress-card,
    body.is-printing-rebuttal .result-hero,
    body.is-printing-rebuttal .result-tabs,
    body.is-printing-rebuttal .result-actions,
    body.is-printing-rebuttal .report-document-toolbar,
    body.is-printing-rebuttal .network-panel,
    body.is-printing-rebuttal .toast {
        display: none !important;
    }

    body.is-printing-rebuttal .app-shell,
    body.is-printing-rebuttal .main,
    body.is-printing-rebuttal .main-stage,
    body.is-printing-rebuttal .artifact-viewer,
    body.is-printing-rebuttal .artifact-viewer-content,
    body.is-printing-rebuttal [data-agent-workspace],
    body.is-printing-rebuttal .agent-thread,
    body.is-printing-rebuttal .scenario-output,
    body.is-printing-rebuttal .analysis-result,
    body.is-printing-rebuttal .rebuttal-document-panel,
    body.is-printing-rebuttal .rebuttal-paper-viewport {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        display: block !important;
        overflow: visible;
        background: #fff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.is-printing-rebuttal .rebuttal-paper {
        width: 100%;
        margin: 0;
        padding: 0;
        display: block;
    }

    body.is-printing-rebuttal .paper-page {
        width: 100%;
        min-height: 265mm;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        break-after: page;
    }

    body.is-printing-rebuttal .paper-page:last-child {
        break-after: auto;
    }

    body.is-printing-rebuttal .paper-section,
    body.is-printing-rebuttal .rebuttal-evidence-section article,
    body.is-printing-rebuttal .paper-references {
        break-inside: avoid;
    }
}

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