/* ==========================================================
   PEP Think Tank — Design System
   IOG-inspired layout with PEP Blue palette
   ========================================================== */

/* ===== カスタムプロパティ ===== */
:root {
    --pep-blue: #303f9f;
    --pep-blue-dark: #1a237e;
    --pep-blue-light: #E8EAF6;
    --pep-blue-second: #7986CB;
    --pep-blue-hover: #283593;

    --text-primary: #23221e;
    --text-secondary: #4a4a4a;
    --text-muted: #7a7a7a;
    --text-on-dark: #ffffff;

    --bg-page: #fafafa;
    --bg-white: #ffffff;
    --bg-subtle: #f5f5f8;

    --border-main: #ddd;
    --border-light: #eee;
    --border-focus: var(--pep-blue-second);

    --radius: 6px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    --layout-max-width: 1100px;
    --layout-gutter: clamp(1rem, 2vw, 1.5rem);
}

/* ===== グローバルリセット ===== */
body {
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
                 "Noto Sans JP", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    letter-spacing: -0.01em;
    font-weight: 700;
}

a {
    color: var(--pep-blue);
}

a:hover {
    color: var(--pep-blue-hover);
}

/* ===== ナビゲーション（IOG風） ===== */
.site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(48, 63, 159, 0.12);
    backdrop-filter: blur(14px);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 140;
}

.site-header .container,
main.container,
.site-footer .container {
    width: 100%;
    max-width: calc(var(--layout-max-width) + (var(--layout-gutter) * 2));
    margin-inline: auto;
    padding-left: var(--layout-gutter);
    padding-right: var(--layout-gutter);
    box-sizing: border-box;
}

.site-header .container {
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
}

.site-header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-width: 0;
    flex: 1;
}

.site-brand {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    flex: 0 0 auto;
}

.site-logo {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--pep-blue);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.site-logo:hover {
    color: var(--pep-blue-dark);
}

.site-brand-meta {
    margin: 0;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.site-nav-rail {
    display: flex;
    min-width: 0;
    flex: 1;
}

.site-nav-row {
    display: flex;
    align-items: center;
    gap: 0.22rem 0.3rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
    padding-bottom: 0.05rem;
    min-width: 0;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
    cursor: pointer;
}

.site-nav-link:hover,
.site-nav-link.is-active {
    color: var(--pep-blue-dark);
    background: var(--pep-blue-light);
    border-color: rgba(121, 134, 203, 0.45);
}

.site-nav-dropdown {
    position: relative;
    display: inline-flex;
}

.site-nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
}

.site-nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.site-nav-dropdown > summary::after {
    content: "▾";
    margin-left: 0.3rem;
    font-size: 0.68em;
    line-height: 1;
}

.site-nav-dropdown[open] > summary,
.site-nav-dropdown.is-active > summary {
    color: var(--pep-blue-dark);
    background: var(--pep-blue-light);
    border-color: rgba(121, 134, 203, 0.45);
}

.site-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 11rem;
    background: #fff;
    border: 1px solid rgba(48, 63, 159, 0.18);
    border-radius: 0.55rem;
    box-shadow: 0 10px 26px rgba(48, 63, 159, 0.14);
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    z-index: 150;
}

.site-nav-dropdown-menu a {
    padding: 0.45rem 0.72rem;
    border-radius: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav-dropdown-menu a:hover {
    background: var(--pep-blue-light);
    color: var(--pep-blue-dark);
}

.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.28rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.site-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.38rem 0.66rem;
    border-radius: 999px;
    border: 1px solid rgba(48, 63, 159, 0.16);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
    white-space: nowrap;
}

.site-action-link:hover,
.site-action-link.is-active {
    background: var(--pep-blue-light);
    color: var(--pep-blue-dark);
    border-color: rgba(121, 134, 203, 0.4);
    transform: translateY(-1px);
}

.site-action-link-primary {
    background: var(--pep-blue);
    color: var(--text-on-dark);
    border-color: var(--pep-blue);
}

.site-action-link-primary:hover,
.site-action-link-primary.is-active {
    background: var(--pep-blue-dark);
    color: var(--text-on-dark);
    border-color: var(--pep-blue-dark);
}

.site-action-link-quiet {
    color: var(--text-muted);
}

/* ===== メインコンテンツ ===== */
main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ===== フッター ===== */
.site-footer {
    border-top: 1px solid var(--border-main);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--pep-blue);
}

/* ===== ページタイトル ===== */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pep-blue);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.page-header .page-title {
    margin-bottom: 0;
}

.page-header-copy {
    max-width: 54rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.page-header-button {
    text-decoration: none;
}

.utility-link-block {
    margin-top: 0.75rem;
}

.utility-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
    margin-top: 0.75rem;
}

.utility-inline-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.inline-form {
    display: inline;
    margin: 0;
}

.is-hidden {
    display: none;
}

.page-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pep-blue);
    margin: 0 0 0.35rem;
}

.section-description {
    margin: 0 0 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== トップページ ===== */
.top-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.top-hero h1 {
    font-size: 1.8rem;
    color: var(--pep-blue);
    margin-bottom: 0.25rem;
}

.top-hero p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.tool-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

.tool-card.active:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--pep-blue-second);
    transform: translateY(-2px);
}

.tool-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ===== サマリーカード ===== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    text-align: center;
    margin: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    overflow: hidden;
}

.summary-card header {
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pep-blue);
    margin: 0;
    padding: 0.75rem 0 1rem;
}

.summary-card .card-note {
    margin: 0;
    padding: 0 0.85rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ===== ダッシュボード 2カラム ===== */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-columns > section {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.dashboard-columns > section > h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pep-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-columns.dashboard-columns-tight {
    gap: 1rem;
}

.dashboard-columns.dashboard-columns-tight > section {
    padding: 1rem 1.1rem;
}

.dashboard-section {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-section > h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pep-blue);
    margin-bottom: 0.3rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.dashboard-actions a[role="button"] {
    margin-bottom: 0;
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.priority-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
}

.priority-panel h3 {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    color: var(--pep-blue);
}

.priority-panel p {
    margin: 0;
}

.priority-panel .priority-count {
    display: block;
    margin-top: 0.55rem;
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    color: var(--pep-blue);
}

.priority-panel .priority-hint {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.priority-panel .priority-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.priority-panel.priority-panel-alert {
    border-color: #ef9a9a;
    background: #fff7f7;
}

.priority-panel.priority-panel-review {
    border-color: #ffe082;
    background: #fffdf3;
}

.dashboard-subgrid {
    margin-bottom: 0;
}

.dashboard-subpanel {
    border: none;
    padding: 0;
    background: transparent;
}

.dashboard-subheading {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-chip {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
}

.metric-chip .metric-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.metric-chip .metric-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-chip .metric-meta {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.queue-empty {
    margin: 0;
    color: var(--text-muted);
}

.queue-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.queue-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.queue-summary-card h3 {
    margin: 0 0 0.3rem;
    font-size: 0.96rem;
    color: var(--pep-blue);
}

.queue-summary-card p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.queue-summary-card strong {
    display: block;
    margin-top: 0.55rem;
    font-size: 1.55rem;
    line-height: 1;
    color: var(--text-primary);
}

.candidate-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.candidate-card {
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    background: var(--bg-white);
    padding: 1rem 1.1rem;
}

.candidate-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}

.candidate-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
}

.candidate-card-title a {
    text-decoration: none;
}

.candidate-card-title a:hover {
    text-decoration: underline;
}

.candidate-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.candidate-card-meta li {
    margin: 0;
}

.candidate-card-meta strong {
    color: var(--text-secondary);
}

.candidate-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.candidate-kicker.candidate-kicker-report {
    background: #eef3ff;
}

.candidate-kicker.candidate-kicker-article {
    background: #f3f6ff;
}

.candidate-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 1rem;
}

.candidate-primary {
    min-width: 0;
}

.candidate-reason-box,
.candidate-side-box {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    padding: 0.85rem 0.95rem;
}

.candidate-reason-box {
    margin-bottom: 0.85rem;
}

.candidate-reason-label,
.candidate-side-box h4 {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.candidate-reason-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.candidate-reason-list {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.candidate-reason-list li + li {
    margin-top: 0.3rem;
}

.candidate-side-box h4 {
    text-transform: none;
    letter-spacing: 0;
}

.candidate-side-box p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.candidate-side-box p + p {
    margin-top: 0.45rem;
}

.candidate-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.candidate-primary-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.candidate-dismiss-form {
    display: grid;
    gap: 0.5rem;
    min-width: min(100%, 320px);
}

.candidate-dismiss-form select,
.candidate-dismiss-form textarea {
    margin-bottom: 0;
    background: var(--bg-white);
}

.candidate-dismiss-form textarea {
    min-height: 74px;
    resize: vertical;
}

.candidate-dismiss-form-actions {
    display: flex;
    justify-content: flex-end;
}

/* ===== テーブル共通 ===== */
table {
    font-size: 0.88rem;
}

table thead th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--border-main);
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
}

table tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table tbody tr:hover {
    background: var(--pep-blue-light);
}

table tbody td a {
    font-weight: 500;
}

/* ===== importance スコア色分け ===== */
.importance-high {
    color: #c62828;
    font-weight: bold;
}

.importance-medium {
    color: #e65100;
}

.importance-low {
    color: #2e7d32;
}

/* ===== 記事一覧（2段レイアウト） ===== */
.articles-table {
    border-collapse: collapse;
}
.articles-table .article-title-cell {
    max-width: 520px;
    padding-bottom: 0.45rem;
}
/* タイトル行と要約行をペアとして視覚的に分離 */
.articles-table .article-row-title td {
    border-bottom: none;
    vertical-align: top;
}

.list-row-meta td {
    border-top: none;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-top: 0.08rem;
    padding-bottom: 0.72rem;
}

.list-row-meta-cell {
    padding-left: 0.75rem;
}

.list-primary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.list-title-link {
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.45;
    color: var(--text-main);
    text-decoration: none;
}

.list-title-link:hover {
    color: var(--pep-blue-dark);
}

.list-context-label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
}

.list-support-copy {
    margin-top: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 108ch;
}

.list-secondary-row,
.list-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.77rem;
    color: var(--text-muted);
}

.list-secondary-item,
.list-inline-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.02rem 0;
}

.list-secondary-item + .list-secondary-item::before {
    content: "•";
    color: #9aa4b2;
    margin-right: 0.5rem;
}

.list-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.list-status-done {
    background: #e8f5e9;
    color: #2e7d32;
}

.list-status-pending {
    background: #fff8e1;
    color: #b26a00;
}

.list-next-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--pep-blue-second);
    color: var(--pep-blue);
    background: var(--bg-white);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.list-next-action:hover {
    background: var(--pep-blue-light);
    color: var(--pep-blue-dark);
}

.table-score {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.table-score-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.table-score-high {
    background: #fdecea;
    color: #c62828;
}

.table-score-medium {
    background: #fff4e5;
    color: #e65100;
}

.table-score-low {
    background: #edf7ed;
    color: #2e7d32;
}

.reports-table {
    border-collapse: collapse;
}

.reports-table .report-row-title td {
    border-bottom: none;
    vertical-align: top;
}

.reports-table .report-row-meta td {
    border-top: none;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-top: 0.15rem;
}

.report-title-cell {
    max-width: 560px;
    padding-bottom: 0.5rem;
}

.report-meta-cell {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding-bottom: 0.55rem;
}

.table-col-insight {
    width: 50%;
}

.table-col-confidence {
    width: 12%;
}

.table-col-review {
    width: 12%;
}

.table-col-created {
    width: 12%;
}

.table-col-action {
    width: 10%;
}

.generate-disclosure {
    margin-bottom: 1rem;
}

.generate-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.di-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 360px);
    gap: 1.5rem;
    align-items: start;
}

.di-page-title {
    margin-top: 0.25rem;
}

.di-form-main {
    min-width: 0;
}

.di-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.di-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.di-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
    color: var(--pep-blue);
}

.di-panel p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.di-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.di-step-list li {
    display: grid;
    grid-template-columns: 1.7rem 1fr;
    gap: 0.65rem;
    align-items: start;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.di-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    font-size: 0.78rem;
    font-weight: 700;
}

.di-form-section {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}

.di-form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.di-form-section-title {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.di-form-section-copy {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.di-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.di-label-note {
    font-weight: 400;
}

.di-advanced-label {
    display: block;
    margin-top: 0.85rem;
}

.di-textarea-mono {
    font-family: monospace;
    font-size: 0.85rem;
}

.di-helper {
    margin-top: 0.35rem;
    font-size: 0.81rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.di-inline-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 1rem;
}

.di-topic-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.di-topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    font-size: 0.82rem;
    cursor: pointer;
}

.di-topic-pill input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.di-option-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.di-option-card {
    border: 1px solid var(--border-main);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    background: var(--bg-subtle);
}

.di-option-card.is-recommended {
    border-color: #90caf9;
    background: #f6fbff;
}

.di-option-card label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.di-option-card input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.1rem 0 0;
}

.di-option-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.di-recommended-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.72rem;
    font-weight: 700;
}

.di-option-copy {
    margin: 0.35rem 0 0 1.75rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.di-submit-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.di-kv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.di-kv-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.di-kv-list strong {
    color: var(--text-primary);
}

.di-focus-card {
    margin: 0 auto 1rem;
    max-width: 760px;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    padding: 1rem 1.15rem;
}

.di-focus-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pep-blue);
    text-transform: uppercase;
}

.di-focus-title {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.di-focus-copy {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.di-focus-next {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.di-progress-wrap {
    max-width: 680px;
    margin: 2rem auto;
}

.di-header {
    text-align: center;
    margin-bottom: 2rem;
}

.di-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.di-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.di-stages {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.di-stage {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    transition: background 0.3s, border-color 0.3s;
}

.di-stage.running {
    background: #e8f4fd;
    border-color: #90caf9;
}

.di-stage.completed {
    background: #f1f8e9;
    border-color: #aed581;
}

.di-stage.failed {
    background: #fce4ec;
    border-color: #ef9a9a;
}

.di-stage-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #e0e0e0;
    color: #888;
}

.di-stage.running .di-stage-icon {
    background: #1976d2;
    color: #fff;
}

.di-stage.completed .di-stage-icon {
    background: #558b2f;
    color: #fff;
}

.di-stage.failed .di-stage-icon {
    background: #c62828;
    color: #fff;
}

.di-stage-spin {
    display: inline-block;
    animation: di-stage-spin-keyframes 1.2s linear infinite;
}

@keyframes di-stage-spin-keyframes {
    to {
        transform: rotate(360deg);
    }
}

.di-stage-body {
    flex: 1;
    min-width: 0;
}

.di-stage-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.di-stage-model {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.di-stage-duration {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.di-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.di-footer-spaced {
    margin-top: 1.5rem;
}

.di-elapsed {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.di-error {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #b71c1c;
}

.di-error a {
    color: #b71c1c;
    font-weight: 600;
}

.di-error-hint {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(183, 28, 28, 0.12);
}

.di-error-hint-copy {
    margin: 0.45rem 0 0.6rem;
    color: #7f1d1d;
}

.di-error-hint-list,
.di-error-selected-list {
    margin: 0;
    padding-left: 1.1rem;
}

.di-error-hint-list li,
.di-error-selected-list li {
    margin-bottom: 0.35rem;
}

.di-error-selected {
    margin-top: 0.75rem;
}

.di-error-selected-title {
    margin: 0 0 0.45rem;
    font-weight: 700;
}

.di-error-selected-list span {
    display: block;
    font-size: 0.84rem;
    color: #8a2d2d;
}

.di-success {
    background: #f1f8e9;
    border: 1px solid #aed581;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    color: #33691e;
}

.cp-panel {
    border: 2px solid #f9a825;
    border-radius: 10px;
    background: #fffde7;
    padding: 1.25rem 1.5rem;
}

.cp-panel-header {
    margin-bottom: 1rem;
}

.cp-panel-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e65100;
    margin: 0 0 0.3rem;
}

.cp-panel-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.cp-content {
    background: #fff;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.88rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cp-notes label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.cp-notes textarea {
    width: 100%;
    min-height: 72px;
    font-size: 0.88rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    resize: vertical;
    box-sizing: border-box;
}

.cp-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-approve {
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-approve:hover {
    background: #1b5e20;
}

.btn-approve:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
}

.btn-cancel {
    background: transparent;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.92rem;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #fce4ec;
}

.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: 1px solid #bdbdbd;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.92rem;
    cursor: pointer;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary-warm {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.btn-secondary-cool {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 1px solid #ce93d8;
}

.btn-compact {
    font-size: 0.88rem;
    padding: 0.4rem 1rem;
}

.btn-compact.btn-cancel {
    padding-inline: 0.75rem;
}

.cp0-candidates-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cp-separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
    color: #bbb;
    font-size: 0.78rem;
    font-weight: 600;
    transition: color 0.3s;
}

.cp-separator.active {
    color: #f9a825;
}

.cp-separator::before,
.cp-separator::after {
    content: "";
    flex: 1;
    border-top: 1px dashed currentColor;
}

.cp-revise-panel {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
}

.cp-revise-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.cp-revise-panel textarea {
    font-size: 0.88rem;
}

.cp-revise-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-list-claims {
    display: inline;
}
.claim-tag {
    display: inline-block;
    font-size: 0.73rem;
    background: var(--bg-alt, #f0f4f8);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    border: 1px solid var(--border-color, #ddd);
    margin-left: 0.2rem;
    vertical-align: middle;
}
.nowrap {
    white-space: nowrap;
}

/* ===== インサイト一覧（2段レイアウト） ===== */
.insights-table {
    border-collapse: collapse;
}
.insights-table .insight-row-title td {
    border-bottom: none;
    vertical-align: top;
}
.insight-title-cell {
    max-width: 540px;
    padding-bottom: 0.4rem;
}
.badge-sm {
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.badge-type {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    vertical-align: middle;
    display: inline-block;
    min-width: 3.5rem;
    text-align: center;
}

/* ===== フィルタバー ===== */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
}

.filter-bar input[type="search"] {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.filter-bar .filter-input-wide {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.filter-bar select {
    width: auto;
    min-width: 120px;
    margin-bottom: 0;
}

.filter-bar button {
    margin-bottom: 0;
    width: auto;
    background: var(--pep-blue);
    border-color: var(--pep-blue);
    color: var(--text-on-dark);
}

.filter-bar button:hover {
    background: var(--pep-blue-hover);
    border-color: var(--pep-blue-hover);
}

.article-filter-bar input[type="search"] {
    flex: 2.4 1 360px;
    min-width: 320px;
}

.article-filter-bar select {
    flex: 0 0 auto;
}

.article-filter-bar button {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 0.72rem 1rem;
    font-size: 0.92rem;
}

@media (max-width: 720px) {
    .article-filter-bar input[type="search"] {
        min-width: 100%;
        flex-basis: 100%;
    }

    .article-filter-bar button {
        min-width: 84px;
    }
}

/* ===== 件数表示 ===== */
.count-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.inline-muted {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ===== テーブルラッパ ===== */
.table-wrap {
    overflow-x: auto;
}

/* ===== ページネーション ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination strong,
.pagination span {
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
}

.pagination a {
    color: var(--text-secondary);
    border: 1px solid var(--border-main);
    background: var(--bg-white);
    transition: all 0.15s;
}

.pagination a:hover {
    background: var(--pep-blue-light);
    border-color: var(--pep-blue-second);
    color: var(--pep-blue);
}

.pagination strong.current {
    background: var(--pep-blue);
    color: var(--text-on-dark);
    border: 1px solid var(--pep-blue);
}

.pagination .disabled {
    opacity: 0.4;
}

.pagination .ellipsis {
    padding: 0.35rem 0.3rem;
    color: var(--text-muted);
}

/* ===== 詳細テーブル ===== */
.detail-table th {
    width: 160px;
    text-align: right;
    padding-right: 1rem;
    white-space: nowrap;
    vertical-align: top;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    background: transparent;
    border-bottom: 1px solid var(--border-light);
}

.detail-table td {
    font-size: 0.9rem;
}

/* ===== importance バー ===== */
.importance-bar-wrap {
    display: inline-block;
    width: 100px;
    height: 8px;
    background: var(--border-main);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.importance-bar {
    height: 100%;
    background: var(--pep-blue-second);
    border-radius: 4px;
}

/* ===== タグ ===== */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tag-region {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ===== バッジ ===== */
.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.badge-article_analysis { background: var(--pep-blue-light); color: var(--pep-blue); }
.badge-weekly           { background: #ede7f6; color: #4527a0; }
.badge-comparison       { background: #fff3e0; color: #e65100; }
.badge-factcheck        { background: #e8f5e9; color: #2e7d32; }
.badge-matching         { background: #fce4ec; color: #b71c1c; }
.badge-cross_insight       { background: #e1f5fe; color: #01579b; }
.badge-deep_insight        { background: #ede7f6; color: #4527a0; }
.badge-narrative_cluster   { background: #e8f5e9; color: #2e7d32; }

.badge-reviewed {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-expired {
    background: #fff3e0;
    color: #e65100;
}

/* ===== プロジェクトバッジ ===== */
.badge-project-active   { background: #e8f5e9; color: #2e7d32; }
.badge-project-paused   { background: #fff3e0; color: #e65100; }
.badge-project-archived { background: #eceff1; color: #546e7a; }
.badge-article          { background: var(--pep-blue-light); color: var(--pep-blue); }
.badge-insight          { background: #ede7f6; color: #4527a0; }
.badge-note             { background: #fffde7; color: #f57f17; }

/* ===== メモカード ===== */
.note-card {
    background: #fffde7;
    border: 1px solid #fff9c4;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

/* ===== Insight ヘッダー ===== */
.insight-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.insight-header-tight {
    margin-bottom: 0;
}

.insight-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 280px);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(48, 63, 159, 0.12);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(232, 234, 246, 0.68), rgba(255, 255, 255, 0.96)),
        var(--bg-white);
}

.insight-hero-main {
    min-width: 0;
}

.insight-hero .detail-date {
    margin-bottom: 0.35rem;
}

.insight-hero h2 {
    margin-bottom: 0.9rem;
}

.insight-hero-summary {
    margin: 1rem 0 0;
    max-width: 54rem;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.insight-hero-confidence {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.insight-hero-meta {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.insight-hero-stat {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(48, 63, 159, 0.08);
}

.insight-hero-label {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.insight-hero-stat strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.insight-spotlight {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid transparent;
}

.insight-spotlight-cross {
    background: linear-gradient(180deg, #eef7fd, #f8fbff);
    border-color: rgba(1, 87, 155, 0.14);
}

.insight-spotlight-narrative {
    background: linear-gradient(180deg, #eef9f0, #fafdf9);
    border-color: rgba(46, 125, 50, 0.14);
}

.insight-spotlight-resonance {
    background: linear-gradient(180deg, #f0f2fd, #fafbff);
    border-color: rgba(57, 73, 171, 0.16);
}

.insight-spotlight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.insight-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pep-blue);
    font-weight: 700;
}

.insight-spotlight-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text-primary);
    font-size: 1.02rem;
}

.insight-spotlight-copy {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.insight-chip-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.insight-chip-row-spaced {
    margin-top: 0.45rem;
}

.insight-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(48, 63, 159, 0.12);
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.insight-badge-strong {
    background: #3949ab;
    color: #fff;
}

.insight-inline-badge {
    font-size: 0.72rem;
    white-space: nowrap;
}

.insight-inline-soft-badge {
    background: var(--bg-subtle);
    margin: 0.1rem;
}

.insight-module {
    margin-bottom: 1.25rem;
}

.insight-module-header {
    margin-bottom: 0.6rem;
}

.insight-module-header h3 {
    margin-top: 0;
}

.insight-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.insight-module-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.insight-module-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.insight-column-title {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.insight-module-card {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.92);
}

.insight-module-card-compact {
    padding: 0.7rem 0.8rem;
}

.insight-module-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.insight-module-card-head-wrap {
    flex-wrap: wrap;
}

.insight-module-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.insight-module-copy {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.insight-module-copy-compact {
    font-size: 0.79rem;
}

.insight-module-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.insight-module-note {
    margin: 0.35rem 0 0;
    font-size: 0.81rem;
    color: var(--text-muted);
}

.insight-module-footnote {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

.insight-list-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.insight-list-stack-spacious {
    gap: 0.75rem;
}

.insight-change-item,
.insight-mapping-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.88rem;
}

.insight-mapping-arrow {
    color: var(--text-muted);
}

.insight-mapping-score {
    margin-left: auto;
}

.insight-source-flow {
    margin-top: 0.55rem;
}

.insight-source-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
}

.insight-source-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.7rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.insight-source-connection {
    padding: 0.05rem 0 0.2rem 4.35rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.insight-source-list {
    margin: 0.55rem 0 0;
    padding-left: 1.15rem;
}

.insight-warning-box {
    margin-top: 2rem;
}

.insight-detail-table-compact {
    font-size: 0.85rem;
}

.insight-th-compact {
    white-space: nowrap;
    vertical-align: top;
}

.insight-inline-group {
    padding: 0.3rem 0;
}

.insight-inline-group.has-divider {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.insight-inline-meta {
    font-size: 0.82rem;
}

.insight-inline-row {
    padding: 0.15rem 0;
}

.insight-counter-section {
    margin-top: 2rem;
}

.insight-body-copy {
    line-height: 1.8;
}

.insight-body-copy-compact {
    font-size: 0.9rem;
    line-height: 1.6;
}

.insight-verify-row {
    margin-bottom: 0.5rem;
}

.insight-verify-form {
    margin-top: 0.5rem;
}

.insight-form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.insight-form-field {
    margin-bottom: 0.5rem;
}

.insight-history-heading {
    margin-top: 1rem;
    font-size: 0.88rem;
}

.insight-empty-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.insight-project-form {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.insight-project-select {
    margin-bottom: 0;
    width: auto;
    min-width: 200px;
}

.insight-reframe-card {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #c8e6c9;
    background: #f5fbf6;
}

/* ===== 警告・情報ボックス ===== */
.warning-box {
    background: #fff8e1;
    border-left: 4px solid #ffa000;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.warning-box h4 {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.warning-box p {
    margin-bottom: 0;
}

/* ===== レビュー・プライマリボタン ===== */
.review-btn {
    background: #2e7d32;
    border-color: #2e7d32;
    color: var(--text-on-dark);
}

.btn-primary {
    background: var(--pep-blue);
    border-color: var(--pep-blue);
    color: var(--text-on-dark);
}

.btn-primary:hover {
    background: var(--pep-blue-hover);
    border-color: var(--pep-blue-hover);
}

/* ===== 本文表示 ===== */
.content-body {
    border: 1px solid var(--border-main);
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    background: var(--bg-white);
    line-height: 1.9;
    font-size: 0.95rem;
    color: var(--text-primary);
    max-height: 600px;
    overflow-y: auto;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.content-body h1:first-child,
.content-body h2:first-child,
.content-body h3:first-child {
    margin-top: 0;
}

.content-body p {
    margin-bottom: 1.2rem;
}

.content-body ul,
.content-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.4rem;
}

.content-body blockquote {
    border-left: 3px solid var(--pep-blue-second);
    padding: 0.75rem 1.25rem;
    margin: 1.2rem 0;
    background: var(--pep-blue-light);
    color: var(--text-secondary);
}

.content-body a {
    color: var(--pep-blue);
}

.content-body a:hover {
    color: var(--pep-blue-hover);
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
    font-size: 0.88rem;
}

.content-body table thead th {
    background: var(--pep-blue-light);
    color: var(--pep-blue);
    border-bottom: 2px solid var(--pep-blue-second);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.content-body table tbody td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    line-height: 1.6;
}

.content-body table tbody tr:hover {
    background: var(--bg-subtle);
}

.content-body table th,
.content-body table td {
    border: 1px solid var(--border-main);
    padding: 0.55rem 0.75rem;
}

/* 詳細ページの本文は高さ制限を外す */
.detail-content .content-body {
    max-height: none;
    overflow-y: visible;
}

/* ===== 使用率バー ===== */
.usage-bar-wrap {
    width: 100%;
    height: 14px;
    background: var(--border-main);
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.usage-bar {
    height: 100%;
    background: var(--pep-blue-second);
    border-radius: 7px;
    transition: width 0.3s;
}

.usage-bar.usage-warning {
    background: #ff9800;
}

.usage-bar.usage-danger {
    background: #c62828;
}

/* ===== ログレベルバッジ ===== */
.badge-log-error   { background: #ffcdd2; color: #b71c1c; }
.badge-log-warning { background: #fff3e0; color: #e65100; }
.badge-log-info    { background: var(--pep-blue-light); color: var(--pep-blue); }

/* ===== ログ行の背景色 ===== */
tr.log-error   { background: #fff5f5; }
tr.log-warning { background: #fffbe6; }

/* ===== フォームエラー・警告 ===== */
.form-errors {
    background: #ffcdd2;
    color: #b71c1c;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-errors p,
.form-warnings p {
    margin: 0.2rem 0;
}

.form-warnings {
    background: #fff3e0;
    color: #e65100;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===== チェックボックスグリッド ===== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.3rem 1rem;
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: auto;
}

/* ===== 操作リンク ===== */
.action-links {
    white-space: nowrap;
}

.action-links a {
    margin-right: 0.5rem;
    font-size: 0.82rem;
}

.link-danger {
    color: #c62828;
}

/* ===== 無効行 ===== */
tr.row-inactive {
    opacity: 0.45;
}

/* ===== 削除ボタン ===== */
.btn-danger {
    background: #c62828;
    border-color: #c62828;
    color: var(--text-on-dark);
}

/* ===== レポート生成グリッド ===== */
.generate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.generate-card {
    border: 1px solid var(--border-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-white);
}

/* ===== 小ボタン ===== */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* ===== レポート操作バー ===== */
.report-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* ===== コピー成功メッセージ ===== */
.copy-status {
    font-size: 0.82rem;
    color: #2e7d32;
    font-weight: 600;
}

/* ===== コピードロップダウン ===== */
.copy-dropdown {
    position: relative;
    display: inline-block;
}
.copy-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 300;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.13);
    min-width: 210px;
    padding: 4px 0;
}
.copy-menu.is-open {
    display: block;
}
.copy-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 0;
    padding: 8px 14px;
    font-size: 0.88rem;
    line-height: 1.3;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: none;
    margin: 0;
}
.copy-menu-item:hover {
    background: #f3f4f6;
}
.copy-menu-item small {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 1px;
}

.source-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.source-form-layout,
.source-analysis-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 360px);
    gap: 1.25rem;
    align-items: start;
}

.source-analysis-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.source-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.source-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    padding: 1.15rem 1.2rem;
}

.source-panel-soft {
    background: var(--bg-subtle);
}

.source-panel-header {
    margin-bottom: 0.85rem;
}

.source-panel-header h3 {
    margin: 0 0 0.25rem;
    color: var(--pep-blue);
    font-size: 1rem;
}

.source-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.source-stepper-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

.source-stepper-item.is-active {
    border-color: rgba(48, 63, 159, 0.25);
    background: var(--pep-blue-light);
}

.source-stepper-item.is-complete .source-stepper-num {
    background: var(--pep-blue);
    color: var(--text-on-dark);
}

.source-stepper-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.source-stepper-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.source-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.source-choice-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    border-radius: 12px;
    border: 1px solid var(--border-main);
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.source-choice-card strong {
    font-size: 0.96rem;
    color: var(--text-primary);
}

.source-choice-card span {
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.source-choice-card:hover {
    border-color: rgba(48, 63, 159, 0.3);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.source-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.source-form-divider {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.source-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.source-form-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-form-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.source-helper {
    margin: -0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.source-guide-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.7;
}

.source-guide-list li + li {
    margin-top: 0.35rem;
}

.source-radio-stack {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.source-radio-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-main);
    border-radius: 12px;
    background: var(--bg-white);
}

.source-radio-card input[type="radio"] {
    margin-top: 0.25rem;
}

.source-radio-card p {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    word-break: break-all;
}

.source-ai-note {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #f4f6ff;
    border: 1px solid rgba(48, 63, 159, 0.15);
    margin-bottom: 1rem;
}

.source-ai-note p {
    margin: 0;
}

.source-ai-label {
    margin-bottom: 0.35rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pep-blue);
}

.source-analysis-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.source-analysis-summary article {
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
}

.source-stat-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.source-analysis-summary strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-primary);
    word-break: break-word;
}

.source-test-callout {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #edf7ed;
    border: 1px solid #c8e6c9;
}

.source-test-callout strong {
    display: block;
    margin-bottom: 0.2rem;
}

.source-test-callout p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.source-register-box {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.source-register-copy {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.source-url-cell {
    font-size: 0.8rem;
    word-break: break-all;
}

.sources-table {
    border-collapse: collapse;
}

.sources-table .source-title-cell {
    max-width: 280px;
}

.source-action-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.source-success-box {
    margin-top: 0.85rem;
    background: #edf7ed;
    border-left-color: #43a047;
}

.source-error-box {
    margin-top: 0.85rem;
    background: #fff5f5;
    border-left-color: #c62828;
}

.article-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 280px);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 1.15rem 1.2rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(232, 234, 246, 0.68), rgba(255,255,255,0.96));
    border: 1px solid rgba(48, 63, 159, 0.12);
}

.source-hero {
    margin-bottom: 1.25rem;
}

.article-hero-main {
    min-width: 0;
}

.article-hero-main h2 {
    margin-bottom: 0.7rem;
}

.article-hero-score {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.article-hero-link {
    margin: 0.8rem 0 0;
    font-size: 0.88rem;
    word-break: break-all;
}

.article-hero-meta {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.article-hero-stat {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(48, 63, 159, 0.08);
    background: rgba(255, 255, 255, 0.88);
}

.article-hero-label {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.article-hero-stat strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.article-analysis-panel {
    margin-bottom: 1.5rem;
}

.article-analysis-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.article-summary-card {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

.article-summary-primary {
    background: linear-gradient(180deg, #eef5fd, #f9fbff);
    border-color: rgba(48, 63, 159, 0.14);
}

.article-summary-label {
    margin: 0 0 0.35rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pep-blue);
    font-weight: 700;
}

.article-summary-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-summary-body p:last-child {
    margin-bottom: 0;
}

.article-claim-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.88rem;
}

.article-claim-list li + li {
    margin-top: 0.35rem;
}

.article-tag-zone,
.article-tag-groups {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.article-tag-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-tag-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.article-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.article-soft-badge {
    font-size: 0.78rem;
}

.article-badge-neutral {
    background: #eceff1;
    color: #37474f;
}

.article-tags-expandable {
    margin-top: 0.9rem;
}

.article-side-list li {
    padding: 0.45rem 0;
}

/* ===== daily_briefing / weekly_report バッジ ===== */
.badge-daily_briefing { background: var(--pep-blue-light); color: var(--pep-blue); }
.badge-weekly_report  { background: #e0f2f1; color: #00695c; }

/* ===== ソース状態バッジ ===== */
.badge-source-ok     { background: #e8f5e9; color: #2e7d32; }
.badge-source-error  { background: #fff3e0; color: #e65100; }
.badge-source-paused { background: #eceff1; color: #546e7a; }

/* ===== カテゴリ選択グリッド ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--pep-blue-second);
}

/* ==========================================================
   詳細ページ（レポート・インサイト・記事）
   ========================================================== */

.back-link {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--pep-blue);
}

.detail-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    border: none;
    padding-bottom: 0;
}

.detail-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-header {
    margin-bottom: 1.25rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 360px);
    gap: 1.5rem;
    align-items: start;
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-side-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.detail-panel-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pep-blue);
}

.detail-side-panel p {
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.detail-side-panel p:last-child {
    margin-bottom: 0;
}

.detail-actions.detail-actions-stacked {
    margin: 0;
    padding: 0;
    border: 0;
    flex-direction: column;
    align-items: stretch;
}

.detail-actions.detail-actions-stacked > * {
    width: 100%;
    margin: 0;
}

.detail-actions.detail-actions-stacked form {
    width: 100%;
}

.detail-action-form {
    margin: 0;
}

.detail-actions.detail-actions-stacked button,
.detail-actions.detail-actions-stacked a[role="button"] {
    width: 100%;
    justify-content: center;
}

.detail-kv {
    display: grid;
    gap: 0.7rem;
}

.detail-kv-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    font-size: 0.86rem;
    line-height: 1.5;
}

.detail-kv-row + .detail-kv-row {
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-light);
}

.detail-kv-row dt {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-kv-row dd {
    margin: 0;
    text-align: right;
    color: var(--text-primary);
    flex: 1;
}

.detail-kv-row dd a {
    word-break: break-word;
}

.detail-side-note {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.detail-side-callout {
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.detail-subheading {
    margin-top: 0;
}

.detail-textarea {
    font-family: monospace;
    font-size: 0.9rem;
}

.detail-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.detail-source-link-wrap {
    margin-top: 0.25rem;
}

.detail-source-link {
    display: inline-block;
    font-size: 0.9rem;
    word-break: break-all;
}

.detail-source-note {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.detail-expandable-spaced {
    margin-top: 0.9rem;
}

.copy-toggle-caret {
    font-size: 0.7em;
    opacity: 0.7;
}

.detail-panel-action {
    margin-bottom: 0.75rem;
}

.detail-expandable {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    padding: 0.8rem 0.9rem;
}

.detail-expandable > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-expandable .table-wrap,
.detail-expandable .source-list,
.detail-expandable .detail-kv,
.detail-expandable p,
.detail-expandable ul,
.detail-expandable form {
    margin-top: 0.8rem;
}

.detail-page h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pep-blue);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pep-blue);
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.detail-page h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.detail-section {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    margin-top: 0;
}

/* メタ情報テーブル（詳細ページ用） */
.detail-page .detail-table th {
    font-weight: 500;
    font-size: 0.82rem;
}

/* 出典リスト */
.source-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-list li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
    line-height: 1.5;
}

.source-list li:last-child {
    border-bottom: none;
}

.source-list a {
    color: var(--pep-blue);
    text-decoration: none;
    word-break: break-all;
}

.source-list a:hover {
    text-decoration: underline;
    color: var(--pep-blue-hover);
}

/* 不確実性ボックス（詳細ページ内） */
.detail-page .warning-box {
    background: #fff8e1;
    border-left-color: #ffa000;
}

/* 操作ボタンバー（詳細ページ） */
.detail-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* ==========================================================
   一覧ページ（Insights / Reports / Articles）
   ========================================================== */

.list-page table thead th {
    background: var(--pep-blue-light);
    border-bottom: 2px solid var(--pep-blue-second);
    color: var(--pep-blue);
}

.list-page table tbody td a {
    color: var(--text-primary);
    text-decoration: none;
}

.list-page table tbody td a:hover {
    color: var(--pep-blue);
}

/* ==========================================================
   公開共有ページ
   ========================================================== */

.share-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.share-page h2 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.share-page .insight-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-main);
}

.share-page .content-body {
    border: none;
    padding: 0;
    max-height: none;
    overflow-y: visible;
    line-height: 2;
    font-size: 1rem;
}

.share-page h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pep-blue);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--pep-blue);
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.share-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-main);
    text-align: center;
    color: var(--text-muted);
}

/* ==========================================================
   ログインページ
   ========================================================== */

.login-card {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    overflow: hidden;
}

.login-card header {
    background: var(--pep-blue);
    color: var(--text-on-dark);
    padding: 1.5rem;
    text-align: center;
}

.login-card header h2 {
    color: var(--text-on-dark);
    margin: 0;
    font-size: 1.2rem;
}

.login-card .login-body {
    padding: 2rem 1.5rem;
}

.login-card button[type="submit"] {
    background: var(--pep-blue);
    border-color: var(--pep-blue);
    color: var(--text-on-dark);
    width: 100%;
}

.login-card button[type="submit"]:hover {
    background: var(--pep-blue-hover);
    border-color: var(--pep-blue-hover);
}

/* ==========================================================
   ダッシュボード追加セクション
   ========================================================== */

.dashboard-section {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pep-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* ==========================================================
   政策タイムライン
   ========================================================== */

/* スレッドステータスバッジ */
.badge-thread-active   { background: #e8f5e9; color: #2e7d32; }
.badge-thread-dormant  { background: #fff3e0; color: #e65100; }
.badge-thread-resolved { background: #eceff1; color: #546e7a; }
.badge-phase {
    background: #e3f2fd;
    color: #1565c0;
    font-weight: 600;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* イベントタイプバッジ */
.badge-event-proposal       { background: #e8eaf6; color: #283593; }
.badge-event-legislation    { background: #fce4ec; color: #880e4f; }
.badge-event-regulation     { background: #f3e5f5; color: #6a1b9a; }
.badge-event-public_comment { background: #e0f2f1; color: #00695c; }
.badge-event-council_meeting { background: #fff8e1; color: #f57f17; }
.badge-event-international  { background: #e1f5fe; color: #01579b; }
.badge-event-implementation { background: #e8f5e9; color: #2e7d32; }
.badge-event-evaluation     { background: #fafafa; color: #424242; }
.badge-event-media_attention { background: #fff3e0; color: #e65100; }
.badge-event-other          { background: #f5f5f5; color: #616161; }

/* スレッドカード一覧 */
.timeline-cards {
    display: grid;
    gap: 0.75rem;
}

.timeline-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.timeline-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--pep-blue-second);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    border: none;
    padding: 0;
}

.timeline-card-badges {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* 縦タイムライン */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-main);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pep-blue-second);
    border: 3px solid var(--bg-page);
    z-index: 1;
}

.timeline-marker-legislation    { background: #880e4f; }
.timeline-marker-regulation     { background: #6a1b9a; }
.timeline-marker-public_comment { background: #00695c; }
.timeline-marker-council_meeting { background: #f57f17; }
.timeline-marker-international  { background: #01579b; }
.timeline-marker-implementation { background: #2e7d32; }
.timeline-marker-proposal       { background: #283593; }
.timeline-marker-media_attention { background: #e65100; }

.timeline-content {
    background: var(--bg-white);
    border: 1px solid var(--border-main);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.timeline-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ==========================================================
   レスポンシブ
   ========================================================== */

@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .queue-summary {
        grid-template-columns: 1fr;
    }

    .priority-grid,
    .metric-strip {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-columns {
        grid-template-columns: 1fr;
    }

    .dashboard-subgrid {
        gap: 0.75rem;
    }

    .candidate-main {
        grid-template-columns: 1fr;
    }

    .candidate-actions {
        flex-direction: column;
    }

    .candidate-dismiss-form {
        width: 100%;
        min-width: 0;
    }

    .page-header {
        margin-bottom: 1.25rem;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .insight-hero,
    .article-hero,
    .insight-module-columns {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
        top: auto;
    }

    .di-form-layout,
    .di-inline-grid,
    .source-form-layout,
    .source-analysis-layout,
    .article-analysis-summary,
    .source-form-grid,
    .source-form-grid-compact,
    .source-analysis-summary {
        grid-template-columns: 1fr;
    }

    .site-header .container {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .site-header-shell,
    .site-header-main {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .site-nav-rail {
        width: 100%;
    }

    .site-nav-link,
    .site-action-link {
        min-height: 1.95rem;
        padding: 0.4rem 0.68rem;
    }

    .site-header-actions {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }

    .source-stepper {
        grid-template-columns: 1fr 1fr;
    }

    .detail-section {
        padding: 1rem;
    }

    .content-body {
        padding: 1.25rem;
    }

    .detail-page h2 {
        font-size: 1.3rem;
    }

    .filter-bar {
        padding: 0.75rem;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .utility-link-row {
        gap: 0.5rem 0.9rem;
    }

    .list-primary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .generate-actions,
    .detail-edit-actions,
    .cp-actions,
    .cp-revise-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .generate-actions > *,
    .detail-edit-actions > *,
    .cp-actions > *,
    .cp-revise-actions > * {
        width: 100%;
    }

    .di-progress-wrap {
        margin: 1.5rem auto;
    }

    .cp-panel {
        padding: 1rem;
    }

    .insight-source-connection {
        padding-left: 0;
        margin-left: 0.2rem;
    }
}

@media (max-width: 560px) {
    .summary-cards,
    .queue-summary,
    .priority-grid,
    .metric-strip {
        grid-template-columns: 1fr;
    }

    .di-submit-bar {
        align-items: stretch;
    }

    .priority-panel .priority-count {
        font-size: 1.7rem;
    }

    .utility-link-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions > a[role="button"],
    .page-header-actions > button,
    .page-header-actions > form {
        width: 100%;
    }

    .site-header-actions {
        width: 100%;
    }

    .site-header-actions > a {
        flex: 1 1 100%;
    }

    .source-stepper {
        grid-template-columns: 1fr;
    }

    .list-next-action,
    .list-status-badge {
        white-space: nowrap;
    }

    .insight-module-card-head,
    .insight-change-item,
    .insight-mapping-row {
        align-items: flex-start;
    }

    .insight-mapping-score {
        margin-left: 0;
    }

    .insight-project-select {
        width: 100%;
        min-width: 0;
    }
}


/* ═══════════════ Hypothesis Pipeline ═══════════════ */

/* Widen page container for hypothesis pipeline (needs space for heatmap) */
main.container:has(.hyp-layout) { max-width: 1600px; }
.hyp-layout { position: relative; }

/* Stage progress bar */
.hyp-stage-bar {
    display: flex; gap: 0; border-bottom: 1px solid var(--border-main);
    margin-bottom: 1.5rem; padding: 0;
}
.hyp-stage-step {
    flex: 1; text-align: center; padding: 0.75rem 0.5rem;
    font-size: 0.82rem; color: var(--text-muted);
    border-bottom: 3px solid transparent; text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.hyp-stage-step:hover { color: var(--pep-blue); }
.hyp-stage-step.is-active {
    color: var(--pep-blue); border-bottom-color: var(--pep-blue); font-weight: 600;
}
.hyp-stage-step.is-done {
    color: var(--text-secondary); border-bottom-color: #4caf50;
}
.hyp-chat-toggle {
    flex: 0 0 auto; background: none; border: none; cursor: pointer;
    font-size: 0.82rem; color: var(--text-muted); padding: 0.75rem 1rem;
    border-bottom: 3px solid transparent;
}
.hyp-chat-toggle:hover { color: var(--pep-blue); }

/* Content with sidebar */
.hyp-content-wrap { position: relative; }
.hyp-content-wrap.has-sidebar .hyp-main {
    transition: margin-right 0.2s;
}

/* Chat sidebar */
.hyp-chat-sidebar {
    position: fixed; right: 0; top: 0; bottom: 0; width: min(480px, 40vw);
    background: var(--bg-white); border-left: 1px solid var(--border-main);
    box-shadow: -4px 0 12px rgba(0,0,0,0.08);
    transform: translateX(100%); transition: transform 0.2s ease;
    z-index: 200; display: flex; flex-direction: column;
}
.hyp-chat-sidebar.is-open {
    transform: translateX(0);
}
.hyp-chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-main);
    background: var(--bg-page);
}
.hyp-chat-header h4 { margin: 0; font-size: 0.9rem; }
.hyp-chat-close {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: var(--text-muted); padding: 0 0.25rem;
}
.hyp-chat-messages {
    flex: 1; overflow-y: auto; padding: 0.75rem;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.hyp-chat-msg {
    padding: 0.5rem 0.75rem; border-radius: 8px;
    font-size: 0.85rem; line-height: 1.5; max-width: 90%;
    white-space: pre-wrap;
}
.hyp-chat-msg.is-user {
    background: var(--pep-blue-light); align-self: flex-end;
}
.hyp-chat-msg.is-assistant {
    background: #f5f5f5; align-self: flex-start;
}
.hyp-chat-msg.is-system {
    background: transparent; color: var(--text-muted);
    font-size: 0.8rem; text-align: center; align-self: center;
}

/* Proposal cards in chat */
.hyp-proposal-card {
    background: #f0f4ff; border: 1px solid var(--pep-blue-second);
    border-radius: 8px; padding: 0.6rem; margin: 0.3rem 0;
    align-self: stretch; font-size: 0.82rem;
}
.hyp-proposal-title {
    font-weight: 600; font-size: 0.78rem; color: var(--pep-blue);
    margin-bottom: 0.4rem;
}
.hyp-proposal-body { margin-bottom: 0.5rem; }
.hyp-proposal-field {
    padding: 0.2rem 0; font-size: 0.8rem; line-height: 1.5;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.hyp-proposal-field strong { color: var(--text-secondary); }
.hyp-proposal-actions {
    display: flex; gap: 0.4rem; margin-top: 0.3rem;
}
.hyp-proposal-actions button {
    padding: 0.25rem 0.6rem; font-size: 0.75rem; border-radius: 4px;
    border: 1px solid var(--border-main); cursor: pointer;
}
.hyp-chat-input-form {
    padding: 0.75rem; border-top: 1px solid var(--border-main);
    display: flex; flex-direction: column; gap: 0.5rem;
}
.hyp-chat-input-form textarea {
    flex: 1; resize: vertical; font-size: 0.85rem;
    border: 1px solid var(--border-main); border-radius: 6px;
    padding: 0.5rem; min-height: 4rem; max-height: 12rem;
    width: 100%; box-sizing: border-box;
}
.hyp-chat-send {
    padding: 0.5rem 0.75rem; font-size: 0.82rem;
    background: var(--pep-blue); color: #fff; border: none;
    border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.hyp-chat-send:hover { background: var(--pep-blue-dark); }

/* Cards */
.hyp-card {
    background: var(--bg-white); border: 1px solid var(--border-main);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem;
    transition: border-color 0.15s;
}
.hyp-card.is-approved { border-left: 4px solid #4caf50; }
.hyp-card.is-rejected { border-left: 4px solid #ef5350; opacity: 0.6; }
.hyp-card.is-skipped { border-left: 4px solid #bdbdbd; opacity: 0.5; }
.hyp-card.has-focus { border-left: 4px solid var(--pep-blue); }
.hyp-card.is-selected { box-shadow: 0 0 0 2px var(--pep-blue); }

.hyp-card-header {
    display: flex; justify-content: space-between; align-items: start;
    margin-bottom: 0.5rem;
}
.hyp-card-claim { font-weight: 600; font-size: 0.95rem; line-height: 1.5; }
.hyp-card-meta { font-size: 0.8rem; color: var(--text-muted); margin: 0.25rem 0; }
.hyp-card-actions {
    display: flex; gap: 0.4rem; margin-top: 0.75rem;
}
.hyp-card-actions button {
    padding: 0.3rem 0.6rem; font-size: 0.78rem; border-radius: 4px;
    border: 1px solid var(--border-main); background: var(--bg-white);
    cursor: pointer; transition: background 0.1s;
}
.hyp-card-actions .btn-approve { color: #2e7d32; border-color: #4caf50; }
.hyp-card-actions .btn-approve:hover { background: #e8f5e9; }
.hyp-card-actions .btn-approve.btn-active { background: #4caf50; color: #fff; font-weight: 600; }
.hyp-card-actions .btn-reject { color: #c62828; border-color: #ef5350; }
.hyp-card-actions .btn-reject:hover { background: #ffebee; }
.hyp-card-actions .btn-reject.btn-active { background: #ef5350; color: #fff; font-weight: 600; }
.hyp-card-actions .btn-skip { color: #757575; }
.hyp-card-actions .btn-skip:hover { background: #f5f5f5; }
.hyp-card-actions .btn-chat { color: var(--pep-blue); border-color: var(--pep-blue); }
.hyp-card-actions .btn-chat:hover { background: var(--pep-blue-light); }

/* Paragraphs preview */
.hyp-paragraphs { margin-top: 0.5rem; }
.hyp-para {
    font-size: 0.8rem; color: var(--text-secondary);
    padding: 0.4rem 0.6rem; background: var(--bg-page);
    border-radius: 4px; margin-bottom: 0.3rem;
    line-height: 1.5;
}
.hyp-para-source { font-size: 0.72rem; color: var(--text-muted); }

/* Focus input */
.hyp-focus-input {
    display: flex; gap: 0.5rem; margin-top: 0.5rem;
}
.hyp-focus-input input {
    flex: 1; font-size: 0.85rem; padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-main); border-radius: 4px;
}
.hyp-focus-input button {
    font-size: 0.78rem; padding: 0.3rem 0.6rem;
}

/* Type badge */
.hyp-type-badge {
    display: inline-block; font-size: 0.72rem; padding: 0.15rem 0.5rem;
    border-radius: 3px; font-weight: 600; letter-spacing: 0.02em;
}
.hyp-type-badge.policy_window { background: #e3f2fd; color: #1565c0; }
.hyp-type-badge.problem_structure { background: #fce4ec; color: #c62828; }
.hyp-type-badge.instrument_fit { background: #f3e5f5; color: #7b1fa2; }
.hyp-type-badge.implementation_friction { background: #fff3e0; color: #e65100; }
.hyp-type-badge.coalition_resource { background: #e8f5e9; color: #2e7d32; }

/* Score heatmap */
.hyp-heatmap { border-collapse: collapse; font-size: 0.82rem; width: 100%; }
.hyp-heatmap th {
    font-weight: 600; padding: 0.35rem 0.3rem; text-align: center;
    background: var(--bg-page); font-size: 0.7rem;
    white-space: nowrap;
}
.hyp-heatmap td {
    text-align: center; padding: 0.35rem 0.3rem; font-weight: 600;
    border: 1px solid var(--bg-page);
    white-space: nowrap;
}
.hyp-heatmap .hyp-claim-cell {
    text-align: left; font-weight: 400;
    white-space: normal;
}
.hyp-heatmap .hyp-type-badge {
    white-space: nowrap;
}
.hyp-claim-link {
    color: var(--text-primary); text-decoration: none;
}
.hyp-claim-link:hover {
    color: var(--pep-blue); text-decoration: underline;
}
.hyp-score-1 { background: #ffcdd2; color: #c62828; }
.hyp-score-2 { background: #ffe0b2; color: #e65100; }
.hyp-score-3 { background: #fff9c4; color: #f57f17; }
.hyp-score-4 { background: #c8e6c9; color: #2e7d32; }
.hyp-score-5 { background: #a5d6a7; color: #1b5e20; }

/* Weight sliders */
.hyp-weight-row td { padding: 0.2rem 0.3rem; }
.hyp-weight-slider {
    width: 100%; min-width: 40px; height: 4px;
    appearance: auto; cursor: pointer; accent-color: var(--pep-blue);
}
.hyp-weight-reset {
    background: none; border: 1px solid var(--border); border-radius: 3px;
    font-size: 0.85rem; cursor: pointer; padding: 0.1rem 0.4rem;
    color: var(--text-muted);
}
.hyp-weight-reset:hover { background: var(--bg-page); color: var(--text); }

/* Evaluation detail page */
.hyp-detail-page { max-width: 900px; }
.hyp-detail-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.5rem;
}
.hyp-detail-score { font-size: 1.1rem; font-weight: 700; }
.hyp-detail-status { font-size: 0.82rem; color: var(--text-muted); }
.hyp-detail-claim {
    font-size: 1.15rem; font-weight: 600; line-height: 1.5;
    margin-bottom: 1.5rem;
}
.hyp-detail-section { margin-bottom: 1.5rem; }
.hyp-detail-section h3 {
    font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem;
    color: var(--text-primary); border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
}
details.hyp-detail-section > summary {
    cursor: pointer; list-style: revert;
}
details.hyp-detail-section > summary > h3 {
    display: inline; border-bottom: none; padding-bottom: 0;
}
.hyp-detail-section p { font-size: 0.88rem; line-height: 1.6; }
.hyp-detail-reasoning { font-size: 0.88rem; line-height: 1.6; }

/* Score breakdown table */
.hyp-detail-scores { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.hyp-detail-scores tr { border-bottom: 1px solid var(--bg-page); }
.hyp-detail-criterion-name { padding: 0.5rem 0.5rem 0.5rem 0; font-weight: 400; white-space: nowrap; }
.hyp-detail-criterion-score { width: 40%; padding: 0.5rem; }
.hyp-detail-score-bar {
    height: 8px; background: var(--bg-page); border-radius: 4px; overflow: hidden;
}
.hyp-detail-score-fill { height: 100%; border-radius: 4px; }
.hyp-detail-criterion-value {
    padding: 0.5rem; font-weight: 700; text-align: center;
    border-radius: 3px; width: 3rem;
}
.hyp-detail-criterion-edit { padding: 0.5rem; }
.hyp-score-edit-btn {
    font-size: 0.72rem; padding: 0.15rem 0.5rem; cursor: pointer;
    background: none; border: 1px solid var(--border); border-radius: 3px;
    color: var(--text-muted);
}
.hyp-score-edit-btn:hover { background: var(--bg-page); color: var(--text); }

/* Export button */
.hyp-export-btn {
    display: inline-block; padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 600;
    background: var(--pep-blue); border: none; border-radius: 4px;
    color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.hyp-export-btn:hover { background: #1565c0; }

/* Evidence trail */
.hyp-evidence-trail { display: flex; flex-direction: column; gap: 0.5rem; }
.hyp-evidence-based-on, .hyp-evidence-seed {
    font-size: 0.82rem; padding: 0.4rem 0.6rem;
    background: var(--bg-page); border-radius: 4px;
    border-left: 3px solid var(--pep-blue);
}
.hyp-evidence-label {
    font-weight: 600; font-size: 0.75rem; color: var(--text-muted);
    display: block; margin-bottom: 0.15rem;
}
.hyp-evidence-item {
    font-size: 0.8rem; padding: 0.4rem 0.6rem;
    border-radius: 4px; border-left: 3px solid #ccc;
}
.hyp-evidence-support { border-left-color: #4caf50; background: #f1f8e9; }
.hyp-evidence-counter { border-left-color: #e53935; background: #fce4ec; }
.hyp-evidence-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.2rem; }
.hyp-evidence-role-badge {
    font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.35rem;
    border-radius: 3px; text-transform: uppercase; flex-shrink: 0;
}
.hyp-evidence-role-badge.support { background: #c8e6c9; color: #1b5e20; }
.hyp-evidence-role-badge.counter { background: #ffcdd2; color: #b71c1c; }
.hyp-evidence-article {
    font-size: 0.75rem; color: var(--pep-blue); text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hyp-evidence-article:hover { text-decoration: underline; }
.hyp-evidence-heading { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }
.hyp-evidence-content {
    font-size: 0.78rem; color: var(--text); line-height: 1.4;
    margin-top: 0.15rem;
}

/* Status message */
.hyp-status-msg {
    margin-top: 0.75rem; padding: 0.5rem 0.75rem;
    background: var(--pep-blue-light); border-radius: 4px;
    font-size: 0.85rem;
}

/* Inline edit */
.hyp-inline-edit textarea {
    width: 100%; font-size: 0.85rem; padding: 0.4rem;
    border: 1px solid var(--border-main); border-radius: 4px;
    resize: vertical; min-height: 2rem;
}

/* Required slots */
.hyp-slots { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.5rem 0; }
.hyp-slot {
    font-size: 0.72rem; padding: 0.15rem 0.4rem;
    border-radius: 3px; background: var(--bg-page);
}
.hyp-slot.is-filled { background: #e8f5e9; color: #2e7d32; }
.hyp-slot.is-empty { background: #fff3e0; color: #e65100; }

/* Progress */
.hyp-progress-bar {
    height: 6px; background: var(--bg-page); border-radius: 3px;
    overflow: hidden; margin: 0.5rem 0;
}
.hyp-progress-fill {
    height: 100%; background: var(--pep-blue);
    transition: width 0.3s ease;
}

/* Score modal */
.hyp-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 300; display: flex; align-items: center; justify-content: center;
}
.hyp-modal {
    background: var(--bg-white); border-radius: 8px;
    width: min(600px, 90vw); max-height: 80vh;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2); overflow: hidden;
    display: flex; flex-direction: column;
}
.hyp-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-main);
    background: var(--bg-page);
}
.hyp-modal-header h3 { margin: 0; font-size: 0.9rem; }
.hyp-modal-body {
    padding: 1rem; overflow-y: auto; flex: 1;
}
.hyp-score-btn {
    width: 2.2rem; height: 2.2rem; border-radius: 50%;
    border: 2px solid var(--border-main); background: var(--bg-white);
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    transition: all 0.1s;
}
.hyp-score-btn:hover { border-color: var(--pep-blue); color: var(--pep-blue); }
.hyp-score-btn.is-active {
    background: var(--pep-blue); color: #fff; border-color: var(--pep-blue);
}

/* Remark form */
.hyp-remark-form {
    display: flex; gap: 0.5rem; margin-top: 0.5rem;
}
.hyp-remark-form textarea {
    flex: 1; font-size: 0.82rem; padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-main); border-radius: 4px;
    resize: none; min-height: 2rem;
}
.hyp-remark-form button {
    font-size: 0.78rem; padding: 0.3rem 0.6rem; white-space: nowrap;
}
