:root {
    --bg: #080b0d;
    --surface: #0d1215;
    --surface-raised: #11181c;
    --surface-hover: #151f23;
    --line: #222e33;
    --line-bright: #33444a;
    --text: #e7edef;
    --muted: #849298;
    --faint: #59676c;
    --accent: #31c4b3;
    --accent-soft: #183a38;
    --danger: #e56b6f;
    --status-unread: #f06a72;
    --status-unread-bg: #35181d;
    --status-read: #a96a70;
    --status-read-bg: #24171a;
    --warning: #d7a94b;
    --header-height: 58px;
    --filter-width: 248px;
    --detail-width: 350px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, article:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 9px 14px; background: var(--accent); color: #03110f; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 8px; }

.topbar { height: var(--header-height); position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: var(--filter-width) minmax(220px, 1fr) auto; gap: clamp(12px, 1.4vw, 20px); align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(8, 11, 13, .96); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; color: #aeb9bd; text-decoration: none; font: 600 .78rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.brand b { color: var(--text); }
.brand-mark { width: 10px; height: 10px; border: 1px solid var(--accent); position: relative; transform: rotate(45deg); }
.brand-mark::after { content: ""; position: absolute; inset: 2px; background: var(--accent); }
.global-search { height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); }
.global-search:focus-within { border-color: var(--accent); }
.search-icon { width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; position: absolute; width: 5px; border-top: 1.5px solid var(--muted); transform: rotate(45deg); right: -4px; bottom: -2px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .86rem; }
.global-search input::placeholder { color: var(--faint); }
.global-search kbd { color: var(--faint); font: .68rem ui-monospace, monospace; border: 1px solid var(--line); padding: 1px 5px; }
.system-stats { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: clamp(12px, 1.5vw, 22px); color: var(--muted); white-space: nowrap; font: .66rem/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.system-stats > span { display: inline-flex; gap: 7px; align-items: center; }
.topbar-link { color: #78c7bd; text-decoration: none; font-weight: 700; }
.topbar-link:hover { color: var(--text); }
.logout-form { margin: 0; }
.logout-form button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 700 .62rem ui-monospace, monospace; letter-spacing: .06em; }
.logout-form button:hover { color: var(--text); }
.system-stats > .topbar-link + span { padding-left: 14px; border-left: 1px solid var(--line); }
.system-stats b { color: #c9d2d5; font-weight: 500; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 3px rgba(215,169,75,.1); }
.status-dot.is-live { background: var(--accent); box-shadow: 0 0 0 3px rgba(49,196,179,.1); }
.filter-toggle { display: none; }

.workspace { display: grid; grid-template-columns: var(--filter-width) minmax(440px, 1fr) var(--detail-width); min-height: calc(100vh - var(--header-height)); }
.filters-panel, .detail-panel { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-bright) transparent; background: var(--surface); }
.filters-panel { border-right: 1px solid var(--line); padding: 20px 16px 40px; }
.filters fieldset { border: 0; padding: 0 0 20px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.filters legend, .utility-panel summary, .eyebrow, .detail-heading { color: var(--muted); font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.filters legend { width: 100%; padding: 0 0 10px; }
.filter-option { position: relative; display: flex; align-items: center; min-height: 31px; padding: 4px 5px; color: #aeb9bd; cursor: pointer; font-size: .81rem; }
.filter-option:hover { background: var(--surface-hover); color: var(--text); }
.filter-option input { appearance: none; width: 12px; height: 12px; margin: 0 10px 0 0; border: 1px solid var(--line-bright); border-radius: 2px; }
.filter-option input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.filter-option:has(input:checked) { color: var(--text); }
.filter-option em { margin-left: auto; color: var(--faint); font: normal .7rem ui-monospace, monospace; }
.status-filter input { border-color: #704047; }
.status-filter:has(input:checked) { border-radius: 2px; }
.status-unread:has(input:checked) { color: #ffb2b7; background: var(--status-unread-bg); }
.status-unread input:checked { border-color: var(--status-unread); background: var(--status-unread); }
.status-read:has(input:checked) { color: #d49a9f; background: var(--status-read-bg); }
.status-read input:checked { border-color: var(--status-read); background: var(--status-read); }
.category-filter::before { content: ""; width: 3px; height: 14px; margin-right: 8px; background: var(--category-color, #607078); border-radius: 1px; opacity: .8; }
.category-filter input { margin-left: 0; }
.category-filter:has(input:checked) { background: color-mix(in srgb, var(--category-color, #607078) 13%, transparent); }
.category-filter:has(input:checked) input { border-color: var(--category-color); background: var(--category-color); }
.primary-button, .collect-form button, .index-form button, .manual-form button { width: 100%; min-height: 34px; border: 1px solid #287e75; background: var(--accent-soft); color: #b8eee8; cursor: pointer; font: 700 .7rem ui-monospace, monospace; letter-spacing: .08em; }
.primary-button:hover, .collect-form button:hover, .index-form button:hover, .manual-form button:hover { background: #20504c; }
.clear-filters { display: block; margin: 11px 0 0; color: var(--muted); text-align: center; text-decoration: none; font: .68rem ui-monospace, monospace; }
.utility-panel { border-bottom: 1px solid var(--line); }
.utility-panel summary { padding: 18px 0; cursor: pointer; list-style: none; }
.utility-panel summary::after { content: "+"; float: right; color: var(--faint); font-size: .9rem; }
.utility-panel[open] summary::after { content: "−"; }
.collect-form, .index-form { margin-bottom: 10px; }
.collect-form button:disabled, .index-form button:disabled { opacity: .5; cursor: wait; }
.source-health { padding: 3px 0 14px; }
.source-health div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: .72rem; }
.source-health span { color: #a5b0b4; overflow: hidden; text-overflow: ellipsis; }
.source-health b { flex: 0 0 auto; font: 500 .64rem ui-monospace, monospace; }
.fetch-ok, .success { color: var(--accent); }.fetch-error, .error { color: var(--danger); }.fetch-pending, .muted { color: var(--muted); }
.success, .error, .muted { font-size: .73rem; }
.manual-form { padding-bottom: 18px; }
.manual-form label { display: block; margin: 9px 0 4px; color: var(--muted); font-size: .72rem; }
.manual-form input, .manual-form textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 7px 8px; font-size: .78rem; }
.manual-form textarea { min-height: 68px; resize: vertical; }
.manual-form button { margin-top: 10px; }

.feed-panel { min-width: 0; background: var(--bg); }
.feed-header { min-height: 80px; display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 7px; color: var(--accent); }
.feed-header h1 { margin: 0; font-size: 1.2rem; line-height: 1; letter-spacing: -.01em; }
.result-count { margin: 0; color: var(--muted); font: .66rem ui-monospace, monospace; letter-spacing: .05em; white-space: nowrap; }
.result-count b { color: var(--text); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 22px; border-bottom: 1px solid var(--line); }
.active-filters span { padding: 3px 7px; background: var(--accent-soft); color: #8ddbd1; font: .63rem ui-monospace, monospace; }
.article-row { position: relative; padding: 16px 22px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s ease; }
.article-row::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; background: transparent; }
.article-row.is-unread::before { background: var(--status-unread); }
.article-row:hover, .article-row.is-selected { background: var(--surface-raised); }
.article-row.is-selected { box-shadow: inset -2px 0 var(--accent); }
.article-row.is-read { opacity: .68; }
.article-row.is-read:hover, .article-row.is-read.is-selected { opacity: .9; }
.article-topline { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 700 .65rem ui-monospace, monospace; letter-spacing: .06em; }
.article-topline time { margin-left: auto; color: var(--faint); font-weight: 500; }
.read-indicator { padding: 2px 5px; border: 1px solid #653c42; color: var(--status-read); background: var(--status-read-bg); }
.is-unread .read-indicator { border-color: #a74750; color: #ff9ba2; background: var(--status-unread-bg); }
.article-source { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-row h2 { margin: 8px 0 6px; color: #dce4e6; font-size: 1rem; line-height: 1.38; font-weight: 600; letter-spacing: -.005em; }
.article-title-link { color: inherit; text-decoration: none; }
.article-title-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.is-unread h2 { color: #f2f6f7; }
.article-excerpt { display: -webkit-box; margin: 0 0 10px; overflow: hidden; color: #8e9ba0; font-size: .78rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.categories { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.category { padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--category-color, #607078) 58%, #182126); background: color-mix(in srgb, var(--category-color, #607078) 11%, transparent); color: color-mix(in srgb, var(--category-color, #8ba0a8) 78%, white); text-decoration: none; font: 600 .61rem ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.category:hover { border-color: var(--category-color, var(--accent)); background: color-mix(in srgb, var(--category-color, var(--accent)) 19%, transparent); color: color-mix(in srgb, var(--category-color, var(--accent)) 64%, white); }
.category-empty { color: var(--faint); }
[data-category="Russia"] { --category-color: #d75c63; }
[data-category="GRU"] { --category-color: #d9824b; }
[data-category="FSB"] { --category-color: #9a70c7; }
[data-category="SVR"] { --category-color: #648dcc; }
[data-category="Cyber"] { --category-color: #3fa7b8; }
[data-category="Influence Operations"] { --category-color: #c7a84d; }
[data-category="Espionage"] { --category-color: #bd668d; }
[data-category="Military"] { --category-color: #879b55; }
[data-category="Central Asia"] { --category-color: #4e9b88; }
[data-category="Tajikistan"] { --category-color: #55a58f; }
[data-category="Uzbekistan"] { --category-color: #4f98b0; }
[data-category="Kazakhstan"] { --category-color: #6f91c2; }
[data-category="Kyrgyzstan"] { --category-color: #9b82bd; }
[data-category="Turkmenistan"] { --category-color: #b68191; }
.read-form { flex: 0 0 auto; }
.read-form button { border: 0; background: transparent; color: var(--muted); padding: 4px 0 4px 8px; cursor: pointer; font-size: .7rem; }
.read-form button:hover { color: var(--accent); }
.pagination { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 22px; color: var(--muted); font: .7rem ui-monospace, monospace; }
.pagination a { text-decoration: none; }.pagination a:last-child { text-align: right; }.pagination a:hover { color: var(--accent); }
.empty-state { margin: 70px auto; max-width: 340px; padding: 26px; border: 1px solid var(--line); text-align: center; color: var(--muted); }
.empty-state span { color: var(--faint); font: .68rem ui-monospace, monospace; letter-spacing: .1em; }
.empty-state a { color: var(--accent); font-size: .8rem; }

.detail-panel { border-left: 1px solid var(--line); }
.detail-heading { height: 43px; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); }
.detail-heading span:last-child { color: var(--faint); font-weight: 500; }
.detail-content { padding: 25px 20px 40px; }
.detail-status { display: inline-block; margin: 0 0 18px; padding: 3px 6px; color: #ff9ba2; border: 1px solid #a74750; background: var(--status-unread-bg); font: 700 .63rem ui-monospace, monospace; }
.detail-status.is-read { color: #d49a9f; border-color: #653c42; background: var(--status-read-bg); }
.detail-content h2 { margin: 0 0 18px; font-size: 1.22rem; line-height: 1.42; font-weight: 600; }
.detail-summary { color: #a1adb1; font-size: .86rem; line-height: 1.72; }
.detail-content dl { margin: 28px 0; border-top: 1px solid var(--line); }
.detail-content dl div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-content dt { color: var(--faint); font: .64rem ui-monospace, monospace; letter-spacing: .08em; }
.detail-content dd { margin: 0; color: #bac4c7; font-size: .73rem; overflow-wrap: anywhere; }
.open-article, .analyze-button { width: 100%; min-height: 38px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border: 1px solid #287e75; background: transparent; color: #b8eee8; cursor: pointer; text-decoration: none; font: 700 .7rem ui-monospace, monospace; letter-spacing: .08em; }
.open-article:hover { background: var(--accent-soft); }
.open-article.is-disabled, .analyze-button.is-disabled { pointer-events: none; opacity: .35; }
.analyze-button { margin-top: 9px; border-color: #785f2a; color: #e5c878; }
.analyze-button:hover { background: rgba(215,169,75,.12); }
.mobile-analyze { display: none; }
.analyze-form { margin: 9px 0 0; }
.analyze-form .analyze-button { margin-top: 0; }
.related-archive { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.related-archive h3 { margin: 0 0 12px; color: var(--accent); font: 700 .66rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; }
.related-archive summary { color: var(--accent); cursor: pointer; font: 700 .66rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; }
.related-archive summary + .related-list, .related-archive summary + .related-empty { margin-top: 12px; }
.related-list { display: grid; gap: 8px; }
.related-item { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); background: var(--surface-raised); text-decoration: none; }
.related-item:hover { border-color: #287e75; background: var(--accent-soft); }
.related-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font: .62rem ui-monospace, monospace; }
.related-item strong { color: #dce4e6; font-size: .78rem; line-height: 1.45; }
.related-item small { color: #78c7bd; font-size: .67rem; line-height: 1.45; }
.related-empty { margin: 0; color: var(--faint); font-size: .74rem; line-height: 1.6; }
.mobile-related { display: none; }
.mobile-related .related-results .related-archive { margin-top: 0; padding-top: 0; border-top: 0; }
.mobile-related .related-results .related-archive h3 { display: none; }
.mobile-only { display: none; }
.filter-backdrop { display: none; }

@media (max-width: 1180px) {
    :root { --filter-width: 228px; }
    .topbar { grid-template-columns: var(--filter-width) minmax(280px, 1fr) auto; }
    .system-stats .updated { display: none; }
    .workspace { grid-template-columns: var(--filter-width) minmax(0, 1fr); }
    .detail-panel { display: none; }
    .mobile-related { display: block; margin-top: 14px; padding-top: 12px; }
    .mobile-related .related-list { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}

@media (max-width: 760px) {
    :root { --header-height: 132px; }
    .topbar { height: var(--header-height); grid-template-columns: 1fr auto; grid-template-rows: 42px 36px 44px; gap: 0 10px; padding: 0 14px 10px; }
    .brand { grid-column: 1 / -1; grid-row: 1; font-size: .72rem; }
    .system-stats { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-self: stretch; justify-content: space-between; gap: 10px; }
    .system-stats > .topbar-link + span { padding-left: 10px; }
    .system-stats .stat { display: none; }
    .global-search { grid-column: 1; grid-row: 3; }
    .global-search kbd { display: none; }
    .filter-toggle { display: block; grid-column: 2; grid-row: 3; height: 34px; min-width: 80px; border: 1px solid var(--line-bright); background: var(--surface); color: var(--text); font: 700 .67rem ui-monospace, monospace; }
    .filter-toggle span { color: var(--accent); }
    .workspace { display: block; min-height: calc(100vh - var(--header-height)); }
    .filters-panel { position: fixed; z-index: 50; top: 0; left: 0; width: min(88vw, 340px); height: 100dvh; transform: translateX(-105%); transition: transform .18s ease; padding: 0 18px 36px; border-right-color: var(--line-bright); }
    .filters-panel.is-open { transform: translateX(0); }
    .mobile-only { display: flex; }
    .panel-heading { position: sticky; top: 0; z-index: 2; height: 54px; align-items: center; justify-content: space-between; margin: 0 -18px 18px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 .7rem ui-monospace, monospace; letter-spacing: .1em; }
    .filter-close { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
    .filter-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.68); }
    .filter-backdrop:not([hidden]) { display: block; }
    body.filter-open { overflow: hidden; }
    .feed-header { min-height: 70px; padding: 15px 15px 12px; }
    .feed-header h1 { font-size: 1.05rem; }
    .active-filters { padding: 7px 15px; }
    .article-row { padding: 15px 15px 13px 17px; }
    .article-row h2 { font-size: .97rem; line-height: 1.4; }
    .article-excerpt { font-size: .76rem; -webkit-line-clamp: 2; }
    .article-footer { align-items: end; }
    .read-form button { min-height: 32px; }
    .pagination { padding: 0 15px; }
}

@media (max-width: 390px) {
    .brand { letter-spacing: .04em; }
    .system-stats { gap: 8px; font-size: .56rem; }
    .system-stats > .topbar-link + span { padding-left: 8px; }
    .article-topline { gap: 7px; font-size: .6rem; }
    .article-source { max-width: 120px; }
    .result-count { font-size: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.newsletter-topbar { grid-template-columns: 1fr auto; }
.newsletter-back { color: var(--muted); text-decoration: none; font: 700 .68rem ui-monospace, monospace; letter-spacing: .08em; }
.newsletter-back:hover { color: var(--accent); }
.newsletter-nav { display: flex; align-items: center; gap: 18px; }
.newsletter-reader { width: min(100% - 32px, 820px); margin: 0 auto; padding: 54px 0 90px; }
.newsletter-reader article { padding: clamp(22px, 5vw, 56px); border: 1px solid var(--line); background: var(--surface); }
.newsletter-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font: .69rem ui-monospace, monospace; }
.newsletter-reader h1 { margin: 18px 0 34px; font-size: clamp(1.45rem, 4vw, 2.15rem); line-height: 1.4; }
.newsletter-body { color: #c4ced1; font-size: 1rem; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.newsletter-library { width: min(100% - 32px, 1040px); margin: 0 auto; padding: 46px 0 80px; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.library-heading h1 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.3rem); line-height: 1.1; }
.library-count { margin: 0; color: var(--muted); font: .68rem ui-monospace, monospace; letter-spacing: .08em; }
.library-count b { color: var(--text); }
.library-search { min-height: 44px; display: flex; align-items: center; gap: 12px; padding-left: 14px; border: 1px solid var(--line-bright); background: var(--surface); }
.library-search:focus-within { border-color: var(--accent); }
.library-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .9rem; }
.library-search button { align-self: stretch; padding: 0 20px; border: 0; border-left: 1px solid #287e75; background: var(--accent-soft); color: #b8eee8; cursor: pointer; font: 700 .68rem ui-monospace, monospace; letter-spacing: .08em; }
.library-search button:hover { background: #20504c; }
.library-types { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 24px; }
.library-types a { padding: 6px 10px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font: 700 .64rem ui-monospace, monospace; letter-spacing: .06em; }
.library-types a:hover, .library-types a.is-active { border-color: #287e75; background: var(--accent-soft); color: #b8eee8; }
.library-query { margin: -8px 0 16px; color: var(--muted); font: .67rem ui-monospace, monospace; }
.library-query b { color: var(--text); }
.library-query a { margin-left: 8px; color: var(--accent); }
.newsletter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.newsletter-card { min-width: 0; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .12s ease, background .12s ease; }
.newsletter-card:hover { border-color: #287e75; background: var(--surface-raised); }
.newsletter-card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: .66rem ui-monospace, monospace; }
.newsletter-card-meta span { color: #78c7bd; }
.newsletter-card h2 { margin: 12px 0 9px; color: #e3eaec; font-size: 1rem; line-height: 1.5; }
.newsletter-card p { display: -webkit-box; margin: 0 0 18px; overflow: hidden; color: #8e9ba0; font-size: .78rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.newsletter-card-open { margin-top: auto; color: var(--accent); font: 700 .62rem ui-monospace, monospace; letter-spacing: .07em; }
.newsletter-grid > .empty-state { grid-column: 1 / -1; }
.library-pagination { margin-top: 22px; border: 1px solid var(--line); background: var(--surface); }
.analysis-shell { width: min(100% - 32px, 1180px); margin: 0 auto; padding: 42px 0 84px; }
.analysis-heading { margin-bottom: 28px; }
.analysis-heading h1 { margin: 0 0 14px; font: 700 clamp(1.7rem, 4vw, 2.6rem)/1 ui-monospace, monospace; letter-spacing: .06em; }
.analysis-heading > p:last-child { max-width: 850px; margin: 0; color: #a5b0b4; font-size: 1rem; line-height: 1.6; }
.analysis-evidence, .analysis-prompt-section { margin-top: 18px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); background: var(--surface); }
.analysis-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 20px; }
.analysis-section-heading h2 { margin: 0; font-size: 1.15rem; }
.analysis-section-heading > span { color: var(--muted); font: .64rem ui-monospace, monospace; }
.analysis-notice { padding: 9px 11px; border-left: 2px solid var(--warning); background: rgba(215,169,75,.08); color: #cfbd8b; font-size: .76rem; }
.process-panel { margin-top: 18px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); background: var(--surface); }
.process-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.process-heading h2 { margin: 0; font: 700 1.15rem ui-monospace, monospace; letter-spacing: .04em; }
.process-heading > span { color: var(--accent); font: 700 .62rem ui-monospace, monospace; letter-spacing: .08em; }
.process-steps { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.process-step { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 9px 0; color: var(--muted); border-bottom: 1px solid rgba(52,63,68,.45); }
.process-step:last-child { border-bottom: 0; }
.process-step-icon { font: 700 .8rem ui-monospace, monospace; }
.process-step-content { min-width: 0; display: flex; justify-content: space-between; gap: 12px; }
.process-step strong { overflow-wrap: anywhere; font: 600 .75rem/1.45 ui-monospace, monospace; }
.process-step small { flex: 0 0 auto; color: inherit; font: .62rem/1.5 ui-monospace, monospace; }
.process-step.is-running { color: #b8eee8; }
.process-step.is-completed { color: #78c7bd; }
.process-step.is-fallback { color: var(--warning); }
.process-step.is-failed { color: #df7c76; }
.process-error { margin: 16px 0 0; padding: 10px 12px; border-left: 2px solid #b95b55; background: rgba(185,91,85,.08); color: #dfaaa6; font-size: .76rem; }
.evidence-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.evidence-columns > section > h3 { margin: 0 0 10px; color: var(--muted); font: 700 .68rem ui-monospace, monospace; letter-spacing: .08em; }
.evidence-columns h3 b { color: var(--accent); }
.evidence-card { display: grid; gap: 5px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; }
.evidence-card:hover { border-color: #287e75; }
.evidence-card span, .evidence-card small { color: var(--muted); font: .62rem ui-monospace, monospace; }
.evidence-card span b { color: var(--accent); }
.evidence-card strong { color: #dce4e6; font-size: .82rem; line-height: 1.45; }
.evidence-card p { display: -webkit-box; margin: 0; overflow: hidden; color: #849298; font-size: .72rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.evidence-card small { color: #78c7bd; }
#copy-analysis { min-height: 38px; padding: 0 15px; border: 1px solid #287e75; background: var(--accent-soft); color: #b8eee8; cursor: pointer; font: 700 .67rem ui-monospace, monospace; letter-spacing: .06em; }
#copy-analysis:hover { background: #20504c; }
.copy-status { min-height: 18px; margin: -10px 0 8px; color: var(--accent); text-align: right; font: .62rem ui-monospace, monospace; }
#analysis-prompt { width: 100%; min-height: 620px; resize: vertical; padding: 18px; border: 1px solid var(--line-bright); background: #070a0c; color: #c4ced1; font: .78rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-shell { width: min(100%, 430px); }
.login-panel { padding: clamp(24px, 6vw, 38px); border: 1px solid var(--line-bright); background: var(--surface); }
.login-brand { margin-bottom: 36px; }
.login-panel h1 { margin: 0 0 24px; font: 700 clamp(1.2rem, 5vw, 1.65rem)/1.25 ui-monospace, monospace; letter-spacing: .04em; }
.login-form label { display: block; margin: 14px 0 6px; color: var(--muted); font: 700 .66rem ui-monospace, monospace; letter-spacing: .08em; }
.login-form input:not([type="hidden"]) { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.login-form input:focus { border-color: var(--accent); outline: none; }
.login-form button, .security-return { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; margin-top: 22px; border: 1px solid #287e75; background: var(--accent-soft); color: #b8eee8; cursor: pointer; text-decoration: none; font: 700 .7rem ui-monospace, monospace; letter-spacing: .08em; }
.login-error { padding: 10px 12px; border-left: 2px solid var(--danger); background: rgba(229,107,111,.08); color: #e8a3a6; font-size: .78rem; }
@media (max-width: 760px) {
    .newsletter-topbar { height: 58px; grid-template-columns: 1fr auto; grid-template-rows: 58px; padding-bottom: 0; }
    .newsletter-reader { padding: 20px 0 50px; }
    .newsletter-reader article { padding: 20px 17px 32px; }
    .newsletter-body { font-size: .94rem; line-height: 1.82; }
    .newsletter-nav { gap: 10px; }
    .newsletter-nav .newsletter-back { font-size: .58rem; }
    .newsletter-library { width: min(100% - 24px, 1040px); padding: 26px 0 55px; }
    .library-heading { margin-bottom: 18px; }
    .library-heading .eyebrow { margin-bottom: 8px; }
    .library-search { min-height: 42px; }
    .library-search button { padding: 0 13px; }
    .newsletter-grid { grid-template-columns: 1fr; gap: 9px; }
    .newsletter-card { padding: 17px 15px; }
    .mobile-analyze { display: flex; margin-top: 12px; }
    .analysis-shell { width: min(100% - 24px, 1180px); padding: 25px 0 55px; }
    .analysis-heading { margin-bottom: 20px; }
    .analysis-heading > p:last-child { font-size: .88rem; }
    .analysis-section-heading { align-items: start; flex-direction: column; }
    .process-heading { align-items: start; flex-direction: column; gap: 8px; }
    .process-step-content { flex-direction: column; gap: 3px; }
    .process-step small { flex: auto; overflow-wrap: anywhere; }
    .evidence-columns { grid-template-columns: 1fr; }
    #copy-analysis { width: 100%; }
    .copy-status { text-align: left; }
    #analysis-prompt { min-height: 500px; padding: 13px; font-size: .7rem; }
}
