:root {
    --background: #f5f7f4;
    --surface: #ffffff;
    --surface-muted: #edf2f0;
    --border: #dfe6e1;
    --text: #17201b;
    --muted: #65706b;
    --accent: #176b87;
    --accent-strong: #0f4d63;
    --green: #20744a;
    --amber: #9a6115;
    --danger: #9e342c;
    --shadow: 0 18px 45px rgba(23, 32, 27, 0.07);
}

* {
    box-sizing: border-box;
}

.skip-link {
    background: #ffffff;
    border: 2px solid #0f6f83;
    border-radius: 8px;
    color: #0f4d63;
    font-weight: 800;
    left: 14px;
    padding: 10px 12px;
    position: fixed;
    top: 14px;
    transform: translateY(-160%);
    transition: transform 0.16s ease;
    z-index: 1000;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(15, 111, 131, 0.36);
    outline-offset: 2px;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-body {
    align-items: center;
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.login-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 420px;
    padding: 24px;
    width: 100%;
}

.login-brand {
    color: var(--text);
    margin-bottom: 22px;
    padding: 0;
}

.login-brand span {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.error {
    background: #fff0ee;
    border: 1px solid #efc8c2;
    border-radius: 8px;
    color: #9e342c;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.success {
    background: #edf9f1;
    border: 1px solid #cde7d5;
    border-radius: 8px;
    color: #1c6a42;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #0f1c19;
    color: #f5f7f4;
    padding: 28px 18px;
}

.brand {
    display: grid;
    gap: 7px;
    margin-bottom: 34px;
    padding: 0 8px;
}

.brand strong {
    font-size: 19px;
    letter-spacing: 0;
}

.brand span {
    color: #b9c3bd;
    font-size: 13px;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a {
    border-radius: 8px;
    color: #dce4df;
    font-size: 14px;
    padding: 11px 12px;
    text-decoration: none;
}

.nav a.active,
.nav a:hover {
    background: #1e2a25;
}

.logout-link {
    color: #b9c3bd;
    cursor: pointer;
    display: inline-block;
    font-size: 13px;
    margin-top: 18px;
    padding: 0 8px;
}

.small-link {
    display: inline-block;
    cursor: pointer;
    margin-top: 0.35rem;
    color: #116d86;
    font-size: 0.88rem;
    font-weight: 700;
}

.small-note {
    color: var(--muted);
    display: inline-block;
    font-size: 0.88rem;
    margin-top: 0.35rem;
}

.content {
    padding: 34px;
    overflow: auto;
}

.dashboard-content {
    display: grid;
    gap: 18px;
}

.page-header {
    align-items: start;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-hero {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 0;
    padding: 22px;
}

h1 {
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 6px;
}

h2 {
    font-size: 18px;
    margin: 0 0 14px;
}

p {
    color: var(--muted);
    margin: 0;
    max-width: 760px;
}

.button {
    align-items: center;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.button-spinner {
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 999px;
    display: none;
    height: 15px;
    width: 15px;
}

.button.is-loading .button-spinner {
    animation: spin 0.75s linear infinite;
    display: inline-block;
}

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

.button.secondary {
    background: var(--surface-muted);
    color: var(--text);
}

.danger-link {
    color: var(--danger);
}

.archive-button {
    background: #fff;
    border: 1px solid #efc8c2;
    color: var(--danger);
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
}

.archive-button:hover {
    background: #fff0ee;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.posted-form {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
}

.posted-form input {
    width: min(680px, 100%);
}

.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.stats-grid {
    display: grid !important;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) !important;
    margin-bottom: 18px;
}

.stats-grid .card {
    border-radius: 10px;
    min-height: 74px;
    padding: 13px 16px;
}

.stats-grid .card span {
    color: #65756f;
    font-size: 12px;
    font-weight: 800;
}

.stats-grid .card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-top: 6px;
}

.card,
.panel,
.table-wrap,
.notice {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.metric-card {
    min-height: 104px;
    position: relative;
}

.metric-card::after {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    height: 7px;
    opacity: 0.16;
    position: absolute;
    right: 18px;
    top: 20px;
    width: 34px;
}

.card span,
.muted {
    color: var(--muted);
    font-size: 13px;
}

.card strong {
    font-size: 34px;
    line-height: 1;
}

code {
    background: #f3f5f2;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 2px 6px;
}

.panel,
.notice {
    margin-bottom: 0;
    padding: 18px;
}

.notice {
    margin-top: 0;
}

.dashboard-guide {
    line-height: 1.55;
}

.source-strip {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.source-strip-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
}

.source-strip-header strong {
    margin: 0;
}

.source-review-link {
    background: #edf5f2;
    border: 1px solid #d8e2dd;
    border-radius: 999px;
    color: #0f6f83;
    font-size: 11px;
    font-weight: 900;
    padding: 6px 9px;
    text-decoration: none;
    white-space: nowrap;
}

.source-card {
    align-items: center;
    background: #f7faf8;
    border: 1px solid #dfe9e4;
    border-radius: 10px;
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 10px 11px;
    text-decoration: none;
}

.source-card:hover {
    border-color: #0f6f83;
    box-shadow: 0 8px 18px rgba(9, 48, 53, 0.07);
}

.source-card span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.source-card strong,
.source-card small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-card strong {
    color: #1d2d27;
    font-size: 12px;
}

.source-card small {
    color: #63756e;
    font-size: 11px;
}

.source-card em {
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    padding: 5px 7px;
}

.source-live {
    background: #dff2e8;
    color: #17633f;
}

.source-warning {
    background: #fff0d9;
    color: #8b5b12;
}

.table-wrap {
    overflow: auto;
}

.opportunity-table-wrap {
    border-radius: 14px;
}

table {
    border-collapse: collapse;
    min-width: 1180px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 15px 16px;
    text-align: left;
    vertical-align: middle;
}

td span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 5px;
}

th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.opportunity-table tbody tr {
    transition: background 0.16s ease;
}

.opportunity-table tbody tr:hover {
    background: #f8faf8;
}

.thread-cell {
    min-width: 360px;
}

.thread-title {
    display: block;
    line-height: 1.35;
    max-width: 520px;
}

.thread-meta {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 9px;
    white-space: nowrap;
}

.status-link {
    cursor: pointer;
    margin-top: 0;
    text-decoration: none;
}

.status-link:hover {
    filter: brightness(0.97);
    text-decoration: none;
}

.status.NEW {
    background: #e8eef0;
    color: #2b4a55;
}

.status.DRAFTED {
    background: #fff0d9;
    color: var(--amber);
}

.status.APPROVED {
    background: #dff2e8;
    color: var(--green);
}

.score-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 10px;
    min-width: 44px;
    justify-content: center;
}

.score-badge.score-high {
    background: #dff2e8;
    color: #17633f;
}

.score-badge.score-medium {
    background: #fff2cc;
    color: #7a520e;
}

.score-badge.score-low {
    background: #ffe2dd;
    color: #9e342c;
}

.score-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 12px;
}

.source-badge {
    background: #eef3f1;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
    white-space: nowrap;
}

.source-search {
    background: #eef6f8;
    border-color: #cce5ee;
    color: #0f4d63;
}

.source-reddit {
    background: #fff0e8;
    border-color: #f2cdb8;
    color: #9b3f18;
}

.engagement-cell {
    white-space: nowrap;
}

.action-cell {
    white-space: nowrap;
}

.score-legend span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
}

.legend-dot {
    border-radius: 999px;
    display: inline-block;
    height: 11px;
    width: 11px;
}

.legend-high {
    background: #17633f;
}

.legend-medium {
    background: #d99b16;
}

.legend-low {
    background: #c7473e;
}

/* Dashboard makeover */
.shell {
    background: #f3f6f4;
    grid-template-columns: 222px minmax(0, 1fr);
}

.app-sidebar.sidebar {
    background: radial-gradient(circle at 0 0, rgba(20, 113, 128, 0.28), transparent 38%), #071b18;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fbfa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    padding: 20px 14px;
    position: sticky;
    top: 0;
}

.app-sidebar .brand {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    padding: 0 8px;
}

.brand-mark {
    align-items: center;
    background: rgba(41, 173, 189, 0.18);
    border: 1px solid rgba(126, 219, 226, 0.4);
    border-radius: 10px;
    color: #e8fffb;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.ui-icon {
    display: block;
    fill: none;
    height: 1em;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1em;
}

.brand-mark .ui-icon {
    height: 19px;
    width: 19px;
}

.app-sidebar .brand strong {
    display: block;
    font-size: 16px;
    line-height: 1;
}

.app-sidebar .brand span {
    color: #8eb0aa;
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.app-sidebar .nav {
    gap: 6px;
}

.sidebar-bottom-nav {
    margin-top: auto;
    padding-top: 16px;
}

.app-sidebar .nav a {
    align-items: center;
    border-radius: 7px;
    color: #dce9e5;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 11px;
    min-height: 38px;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.app-sidebar .nav a.has-badge {
    background: rgba(255, 207, 74, 0.12);
    box-shadow: inset 3px 0 0 #ffcf4a;
    flex-wrap: wrap;
    padding-right: 10px;
}

.app-sidebar .nav a .nav-icon {
    align-items: center;
    color: #9ed4d4;
    display: inline-flex;
    justify-content: center;
    width: 25px;
}

.app-sidebar .nav-label {
    flex: 1;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.menu-badge {
    align-items: center;
    background: #ffcf4a;
    border: 1px solid rgba(6, 32, 29, 0.65);
    border-radius: 999px;
    color: #0a2727;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    min-width: 0;
    order: 3;
    padding: 0 9px;
    position: static;
    width: 100%;
}

.app-sidebar .nav a .ui-icon {
    height: 25px;
    width: 25px;
}

.app-sidebar .nav a.active,
.app-sidebar .nav a:hover {
    background: #0a6170;
    color: #ffffff;
}

.app-sidebar .logout-link {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #a9c7c1;
    margin-top: 26px;
    padding: 14px 8px 0;
}

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

.dashboard-content {
    gap: 12px;
    padding: 18px 22px 32px;
}

.admin-content {
    display: grid;
    gap: 14px;
    padding: 18px 22px 32px;
}

.dashboard-hero {
    align-items: center;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(12, 31, 27, 0.06);
    gap: 18px;
    padding: 20px 18px;
}

.dashboard-hero h1 {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 8px;
}

.dashboard-hero p {
    color: #6b7872;
    font-size: 13px;
    line-height: 1.45;
    max-width: 620px;
}

.dashboard-hero .button {
    background: #0f6f83;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.05;
    min-height: 38px;
    min-width: 112px;
    padding: 0 14px;
    text-align: center;
}

.admin-hero {
    margin-bottom: 0;
}

.admin-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f4faf8 100%);
    border-color: #cfe3dc;
    box-shadow: 0 12px 34px rgba(12, 31, 27, 0.055), inset 4px 0 0 #0f6f83;
}

.admin-panel .provider-header {
    margin-bottom: 18px;
}

.admin-password-grid {
    align-items: start;
}

.dashboard-stats {
    gap: 10px;
}

.dashboard-stats .metric-card {
    align-items: center;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(12, 31, 27, 0.05);
    display: flex;
    gap: 14px;
    min-height: 78px;
    padding: 14px 16px;
}

.dashboard-stats .metric-card::after {
    display: none;
}

.metric-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.metric-icon .ui-icon {
    height: 20px;
    width: 20px;
}

.dashboard-stats .metric-card:nth-child(1) .metric-icon {
    background: #e9f1ff;
    color: #306bcc;
}

.dashboard-stats .metric-card:nth-child(2) .metric-icon {
    background: #dff3e8;
    color: #1b7b50;
}

.dashboard-stats .metric-card:nth-child(3) .metric-icon {
    background: #fff1d8;
    color: #8b5b12;
}

.dashboard-stats .metric-card:nth-child(4) .metric-icon {
    background: #eee7ff;
    color: #6f4ec8;
}

.dashboard-stats .metric-card span {
    color: #71817a;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-stats .metric-card strong {
    display: block;
    font-size: 26px;
    margin-top: 4px;
}

.dashboard-info-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
}

.dashboard-guide,
.source-strip {
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(12, 31, 27, 0.045);
    padding: 14px;
}

.dashboard-guide {
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-guide > strong,
.source-strip > strong {
    display: block;
    font-size: 12px;
    margin-bottom: 7px;
}

.dashboard-guide p {
    color: #6b7872;
    font-size: 12px;
    line-height: 1.45;
    max-width: none;
}

.dashboard-guide .score-legend {
    gap: 7px 14px;
    margin-top: 8px;
}

.dashboard-guide .score-legend span {
    font-size: 11px;
}

.source-strip {
    align-content: start;
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr;
    min-width: 0;
}

.source-strip-header {
    grid-column: 1 / -1;
}

.source-strip-header strong {
    display: block;
    font-size: 12px;
    margin-bottom: 0;
}

.source-card {
    margin: 0;
}

.source-card strong,
.source-card small {
    max-width: 100%;
}

.opportunity-table-wrap {
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(12, 31, 27, 0.055);
    overflow: visible;
}

.opportunity-table {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    overflow: hidden;
    width: 100%;
}

.opportunity-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(230px, 1.8fr) minmax(78px, 0.65fr) minmax(48px, 0.45fr) minmax(72px, 0.55fr) minmax(92px, 0.75fr) minmax(120px, 1fr) minmax(118px, 0.95fr);
    min-width: 0;
    padding: 10px 12px;
}

.opportunity-row + .opportunity-row {
    border-top: 1px solid var(--border);
}

.opportunity-head {
    background: #fbfdfc;
    color: #6e7c75;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.opportunity-row > * {
    min-width: 0;
}

.opportunity-row:hover:not(.opportunity-head) {
    background: #f8fbfa;
}

.opportunity-table .thread-title {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.opportunity-table .thread-meta {
    color: #71817a;
    display: block;
    font-size: 11px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opportunity-table .small-link,
.opportunity-table .small-note {
    display: inline-block;
    font-size: 11px;
    margin-top: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opportunity-table .status {
    font-size: 10px;
    max-width: 100%;
    padding: 5px 7px;
    white-space: normal;
}

.opportunity-table .score-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    height: 30px;
    justify-content: center;
    min-width: 34px;
    padding: 0 9px;
}

.opportunity-table .source-badge {
    align-items: center;
    display: inline-flex;
    font-size: 10px;
    min-height: 26px;
    padding: 5px 7px;
    white-space: normal;
}

.opportunity-table .engagement-cell {
    color: #21312c;
    font-size: 12px;
    line-height: 1.35;
    min-width: 0;
}

.opportunity-table .engagement-cell span {
    color: #71817a;
    display: block;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opportunity-table .intent-cell {
    color: #33423d;
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.opportunity-table .action-cell {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    min-width: 0;
}

.opportunity-table .action-cell .small-button {
    border-radius: 7px;
    font-size: 10px;
    line-height: 1.1;
    max-width: 100%;
    min-height: 30px;
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
}

.opportunity-table .archive-button {
    background: #ffffff;
    border-color: #d8e2dd;
    color: #35423d;
    font-size: 11px;
    min-height: 30px;
    padding: 0 8px;
}

.opportunity-empty {
    color: #667970;
    font-size: 13px;
    padding: 16px;
}

.opportunity-table .archive-button:hover {
    background: #fff0ee;
    border-color: #efc8c2;
    color: var(--danger);
}

.compliance-note {
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(12, 31, 27, 0.045);
    font-size: 13px;
    line-height: 1.5;
}

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

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    min-width: 0;
}

input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 40px;
    padding: 9px 10px;
    width: 100%;
}

button,
.button,
a,
select,
input,
textarea {
    touch-action: manipulation;
}

button:focus-visible,
.button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(15, 111, 131, 0.35);
    outline-offset: 2px;
}

input[type="checkbox"] {
    min-height: auto;
}

.inline-form {
    align-items: center;
    display: inline-flex;
    gap: 10px;
}

.link-button {
    background: transparent;
    color: var(--accent);
    min-height: auto;
    padding: 0;
}

.draft {
    background: #fbfcfa;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    line-height: 1.5;
    margin: 0 0 12px;
    overflow: auto;
    padding: 14px;
    white-space: pre-wrap;
}

.draft-opportunity {
    scroll-margin-top: 18px;
}

.draft-opportunity:target {
    border-color: #0f6f83;
    box-shadow: 0 0 0 3px rgba(15, 111, 131, 0.14), var(--shadow);
}

.draft-work-header {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.draft-work-header h2 {
    font-size: 18px;
    line-height: 1.25;
    margin: 0 0 6px;
}

.draft-work-header p {
    font-size: 12px;
}

.draft-next-action {
    background: #eef6f8;
    border: 1px solid #cce5ee;
    border-radius: 10px;
    min-width: 180px;
    padding: 10px 12px;
}

.draft-next-action span {
    color: #65706b;
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.draft-next-action strong {
    color: #0f4d63;
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.draft-meta-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.draft-meta-row > span {
    margin-top: 0;
}

.draft-meta-pill {
    background: #f1f6f4;
    border: 1px solid #dfe9e4;
    border-radius: 999px;
    color: #4c5b55;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 10px;
}

.draft-context,
.draft-empty-state,
.draft-safety {
    background: #f8fbfa;
    border: 1px solid #dfe9e4;
    border-radius: 10px;
    margin: 12px 0;
    padding: 12px 14px;
}

.draft-context strong,
.draft-empty-state strong,
.draft-safety strong {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.draft-context p,
.draft-empty-state p,
.draft-safety p {
    font-size: 13px;
    max-width: none;
}

.draft-action-bar {
    border-top: 1px solid #e4ebe7;
    margin-top: 12px;
    padding-top: 12px;
}

.draft-response-box {
    border: 1px solid #d5e3de;
    border-radius: 12px;
    margin-top: 14px;
    overflow: hidden;
}

.draft-response-header {
    align-items: start;
    background: #f3f8f6;
    border-bottom: 1px solid #d5e3de;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.draft-response-header h3 {
    font-size: 15px;
    margin: 0 0 4px;
}

.draft-response-header p {
    font-size: 12px;
}

.draft-response-box .draft {
    border: 0;
    border-radius: 0;
    margin: 0;
}

.draft-ready-note {
    align-items: center;
    background: #edf9f1;
    border-bottom: 1px solid #cde7d5;
    color: #1c6a42;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 14px;
}

.draft-ready-note strong {
    color: #17633f;
    font-size: 13px;
}

.draft-ready-note span {
    color: #2f7650;
    font-size: 12px;
    margin: 0;
}

.draft-warning-note {
    align-items: center;
    background: #fff0d9;
    border-bottom: 1px solid #efd59b;
    color: #754b0f;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 14px;
}

.draft-warning-note strong {
    color: #6d4308;
    font-size: 13px;
}

.draft-warning-note span {
    color: #7a541b;
    font-size: 12px;
    margin: 0;
}

.disabled-button {
    cursor: not-allowed;
    opacity: 0.7;
}

.draft-edit-form {
    display: grid;
    gap: 12px;
}

.draft-editor {
    min-height: 260px;
    resize: vertical;
    width: 100%;
}

.seo-html-editor {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: 14px;
    line-height: 1.62;
    min-height: 520px;
    padding: 24px;
}

.seo-html-editor:focus {
    border-color: #0f6f83;
    box-shadow: 0 0 0 3px rgba(15, 111, 131, 0.12);
    outline: none;
}

.seo-html-editor h1,
.seo-html-editor h2,
.seo-html-editor p,
.seo-html-editor ul,
.seo-html-editor ol {
    margin: 0;
}

.seo-html-editor h1 {
    font-size: 30px;
    line-height: 1.18;
}

.seo-html-editor h2 {
    font-size: 21px;
    line-height: 1.3;
    margin-top: 12px;
}

.seo-html-editor ul,
.seo-html-editor ol {
    padding-left: 24px;
}

.seo-html-editor li + li {
    margin-top: 8px;
}

.seo-html-editor a {
    color: #0f6f83;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.seo-markdown-source {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 12px;
}

.seo-markdown-source summary {
    cursor: pointer;
    font-weight: 800;
}

.article-plan-panel {
    margin-top: 18px;
}

.article-plan-panel > .table-wrap {
    display: none;
}

.article-plan-command {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 0 18px;
    padding: 18px;
}

.article-plan-command h2 {
    color: var(--ink);
    font-size: 22px;
    line-height: 1.1;
    margin: 4px 0 6px;
}

.article-plan-command p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
    max-width: 760px;
}

.eyebrow {
    color: #0f6f83;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.article-command-stats {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.article-command-stats span {
    background: #eef7f3;
    border: 1px solid #d8e2dd;
    border-radius: 999px;
    color: #52645d;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 12px;
    white-space: nowrap;
}

.article-command-stats strong {
    color: #09241f;
    font-size: 15px;
}

.article-plan-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-plan-card {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(8, 41, 35, 0.05);
    display: grid;
    gap: 13px;
    min-width: 0;
    padding: 16px;
}

.article-card-head,
.article-card-badges,
.article-card-actions,
.article-status-form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.article-card-head {
    justify-content: space-between;
}

.article-plan-card h3 {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.25;
    margin: 0;
}

.article-plan-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.next-step-pill {
    background: #e8f6fa;
    border: 1px solid #cbe5ec;
    border-radius: 999px;
    color: #0f5160;
    font-size: 11px;
    font-weight: 900;
    padding: 7px 10px;
    white-space: nowrap;
}

.article-metric-row {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) auto;
}

.article-metric-row > div {
    background: #f8fbfa;
    border: 1px solid #e2ebe7;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
}

.article-metric-row span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.article-metric-row strong {
    color: #09241f;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.muted-score {
    color: var(--muted) !important;
    font-size: 18px !important;
}

.article-analysis-link {
    background: #f3f8f6;
    border: 1px solid #d8e2dd;
    border-radius: 8px;
    color: #0f6f83;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    padding: 9px 10px;
    text-decoration: none;
}

.article-stage-track {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-stage-track span {
    align-items: center;
    background: #edf3f1;
    border-radius: 999px;
    color: #6c7b75;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
}

.article-stage-track span.done {
    background: #0f6f83;
    color: #ffffff;
}

.article-next-action {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cbe5ec;
    border-radius: 10px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px;
}

.article-next-action span {
    color: #0f5160;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.article-next-action strong {
    color: #09241f;
    display: block;
    font-size: 17px;
    margin-top: 2px;
}

.article-next-action p {
    color: #52645d;
    font-size: 12px;
    margin: 4px 0 0;
}

.article-next-action form {
    margin: 0;
}

.article-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.article-secondary-actions a {
    background: #f3f8f6;
    border: 1px solid #d8e2dd;
    border-radius: 999px;
    color: #0f6f83;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    text-decoration: none;
}

.article-plan-card > .article-analysis-link,
.article-plan-card > .article-card-actions {
    display: none;
}

.article-card-actions {
    flex-wrap: wrap;
}

.article-card-actions form,
.article-status-form {
    margin: 0;
}

.article-status-form {
    border-top: 1px solid #e2ebe7;
    justify-content: space-between;
    padding-top: 12px;
}

.article-status-form select {
    min-width: 150px;
}

.article-plan-table th,
.article-plan-table td {
    vertical-align: top;
}

.article-plan-table td:nth-child(2) {
    min-width: 280px;
}

.table-subline {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 5px;
    max-width: 520px;
}

.priority-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.priority-1 {
    background: #d8f5df;
    color: #136b2c;
}

.priority-2 {
    background: #fff1c7;
    color: #805a00;
}

.priority-3 {
    background: #ffe1de;
    color: #9f2c22;
}

.article-plan-actions {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.article-plan-actions form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.article-plan-actions select {
    min-width: 126px;
}

.article-flow-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 18px;
}

.flow-step {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 13px;
}

.flow-step span {
    align-items: center;
    background: #eef7f3;
    border-radius: 999px;
    color: #0f6f83;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.flow-step strong {
    color: var(--ink);
    font-size: 15px;
}

.flow-step small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.flow-step.active {
    border-color: rgba(15, 111, 131, 0.35);
    box-shadow: 0 12px 24px rgba(8, 41, 35, 0.08);
}

.compact-button {
    min-height: 34px;
    padding: 8px 12px;
}

.seo-intelligence-content .source-chip {
    background: #eef7f3;
    border: 1px solid #cfe3dc;
    border-radius: 999px;
    color: #123832;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    margin: 3px 4px 3px 0;
    padding: 6px 9px;
}

.seo-intelligence-content .workqueue-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.seo-intelligence-content .workqueue-list {
    overflow-x: hidden;
}

.seo-intelligence-content .queue-card {
    gap: 7px;
    padding: 12px;
}

.seo-intelligence-content .queue-card > strong {
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.seo-intelligence-content .queue-card > span:not(.queue-card-meta) {
    font-size: 12px;
    line-height: 1.35;
}

.seo-intelligence-content .queue-card-meta {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
}

.seo-intelligence-content .queue-card-meta .draft-meta-pill {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seo-intelligence-content .queue-card-meta .score-pill {
    flex: 0 0 auto;
}

.seo-intelligence-help {
    display: none;
}

.seo-command-panel {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(8, 41, 35, 0.06);
    padding: 16px;
}

.seo-command-panel h2 {
    font-size: 20px;
    line-height: 1.15;
    margin: 3px 0 6px;
}

.seo-command-copy {
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 14px;
    max-width: 760px;
}

.seo-command-form .settings-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(360px, 1.8fr) minmax(130px, 0.55fr) minmax(90px, 0.38fr) auto;
}

.seo-command-form .settings-grid .button {
    grid-column: auto;
}

.seo-command-form label {
    min-width: 0;
}

.seo-command-form input {
    min-height: 38px;
    padding: 8px 10px;
}

.seo-command-form .field-span-2 {
    grid-column: auto;
}

.seo-command-form .button,
.seo-command-button {
    align-self: end;
    min-height: 38px;
    padding: 8px 14px;
    white-space: nowrap;
}

.seo-intel-summary {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cbe5ec;
    border-radius: 10px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.seo-intel-summary strong {
    color: #09241f;
    display: block;
    font-size: 18px;
    line-height: 1.15;
    margin-top: 4px;
}

.seo-intel-summary p {
    color: #52645d;
    line-height: 1.45;
    margin: 6px 0 0;
}

.seo-intel-summary form {
    margin: 0;
}

.seo-intel-summary .button {
    min-height: 38px;
    padding: 8px 14px;
    white-space: nowrap;
}

.seo-detail-drawer {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    padding: 0;
}

.seo-detail-drawer summary {
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    padding: 14px 16px;
}

.seo-detail-drawer summary::-webkit-details-marker {
    display: none;
}

.seo-detail-drawer[open] summary {
    border-bottom: 1px solid #e2ebe7;
}

.seo-detail-drawer > .seo-output-grid,
.seo-detail-drawer > .draft-context,
.seo-detail-drawer > .table-wrap {
    margin: 14px;
}

.seo-action-grid .inline-form {
    display: none;
}

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

.seo-score-card {
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 11px;
}

.seo-score-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.seo-score-card strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.15;
}

.seo-score-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.score-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    min-height: 26px;
    min-width: 34px;
    padding: 6px 9px;
}

.large-score {
    font-size: 20px !important;
    height: 42px;
    width: 42px;
}

.score-high {
    background: #d8f5df;
    color: #136b2c !important;
}

.score-mid {
    background: #fff1c7;
    color: #805a00 !important;
}

.score-low {
    background: #ffe1de;
    color: #9f2c22 !important;
}

.seo-breakdown {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px;
}

.seo-breakdown span {
    background: #eef7f3;
    border-radius: 999px;
    color: #52645d;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
}

.seo-breakdown strong {
    color: #09241f;
}

.seo-action-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-action-panel,
.seo-publish-panel {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.seo-action-panel strong,
.seo-publish-panel strong {
    color: var(--ink);
    font-size: 14px;
}

.seo-action-panel p,
.seo-publish-panel p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.inline-form {
    margin: 0;
}

.rank-check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.rank-check-pill {
    background: #eef7f3;
    border-radius: 999px;
    color: #123832;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
}

.status-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.task-list {
    color: var(--muted);
    margin: 0;
    padding-left: 18px;
}

.task-list li + li {
    margin-top: 8px;
}

.compact-table {
    min-width: 100%;
}

.status-badge {
    background: #eef3f1;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 6px 10px;
}

.settings-form {
    align-items: start;
}

.settings-stack {
    display: grid;
    gap: 18px;
}

.provider-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.security-provider-block {
    background: linear-gradient(135deg, #ffffff 0%, #f4faf8 100%);
    border-color: #cfe3dc;
    box-shadow: inset 4px 0 0 #0f6f83;
}

.provider-header {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.provider-header > * {
    min-width: 0;
}

.provider-header h3 {
    font-size: 18px;
    margin: 0 0 6px;
}

.provider-header p {
    font-size: 14px;
}

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

.field-span-2 {
    grid-column: span 2;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.checkbox-row {
    align-items: center;
    display: flex;
    gap: 10px;
    padding-top: 28px;
}

.checkbox-card {
    background: #f8faf8;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 46px;
    padding: 10px 12px;
}

.form-actions {
    align-items: end;
    display: flex;
}

.settings-inline-action {
    align-self: end;
    min-height: 100%;
}

.settings-inline-action .button {
    width: 100%;
}

/* Cross-page design pass */
.content:not(.dashboard-content):not(.admin-content) {
    align-content: start;
    display: grid;
    gap: 14px;
    padding: 18px 22px 32px;
}

.content > .page-header:not(.dashboard-hero) {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(12, 31, 27, 0.045);
    margin-bottom: 0;
    padding: 18px;
}

.content > .page-header:not(.dashboard-hero) h1 {
    font-size: 25px;
    line-height: 1.05;
    margin-bottom: 7px;
}

.content > .page-header:not(.dashboard-hero) p {
    font-size: 13px;
    line-height: 1.45;
    max-width: 720px;
}

.content > .notice,
.content > .panel,
.content > .table-wrap {
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(12, 31, 27, 0.045);
}

.content > .notice {
    color: #26352f;
    font-size: 13px;
    line-height: 1.5;
    padding: 14px 16px;
}

.content > .panel {
    padding: 18px;
}

.content > .panel > h2,
.content > .table-wrap + .panel > h2 {
    font-size: 17px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.content:not(.dashboard-content) .stats {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.content:not(.dashboard-content) .stats .card {
    border-radius: 10px;
    min-height: 78px;
    padding: 14px 16px;
}

.content:not(.dashboard-content) .stats .card span {
    color: #71817a;
    font-size: 11px;
    font-weight: 800;
}

.content:not(.dashboard-content) .stats .card strong {
    display: block;
    font-size: 26px;
    margin-top: 6px;
}

.content:not(.dashboard-content) table {
    min-width: 920px;
}

.content:not(.dashboard-content) th {
    color: #6e7c75;
    font-size: 10px;
    letter-spacing: 0;
    padding: 12px 14px;
}

.content:not(.dashboard-content) td {
    font-size: 13px;
    padding: 12px 14px;
}

.content:not(.dashboard-content) tbody tr:hover td {
    background: #f8fbfa;
}

.content:not(.dashboard-content) input,
.content:not(.dashboard-content) select,
.content:not(.dashboard-content) textarea {
    background: #ffffff;
    border-color: #d8e2dd;
    min-height: 42px;
}

.content:not(.dashboard-content) input:focus,
.content:not(.dashboard-content) select:focus,
.content:not(.dashboard-content) textarea:focus {
    border-color: #0f6f83;
    box-shadow: 0 0 0 3px rgba(15, 111, 131, 0.12);
}

.content:not(.dashboard-content) .button.secondary {
    background: #edf3f1;
    color: #24352f;
}

.content:not(.dashboard-content) .button.secondary:hover,
.content:not(.dashboard-content) .button:hover {
    filter: brightness(0.98);
}

.content:not(.dashboard-content) .provider-block {
    background: #fbfdfc;
    border-radius: 10px;
}

.content:not(.dashboard-content) .status-grid {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 0;
}

.content:not(.dashboard-content) .task-list {
    font-size: 13px;
    line-height: 1.45;
}

.content:not(.dashboard-content) .actions {
    gap: 8px;
}

.content:not(.dashboard-content) .draft {
    background: #f8fbfa;
    border-radius: 10px;
    font-size: 13px;
}

/* Settings overflow control */
.settings-content,
.settings-content .panel,
.settings-content .provider-block,
.settings-content .provider-header,
.settings-content .settings-grid,
.settings-content label {
    min-width: 0;
}

.settings-content .panel,
.settings-content .provider-block {
    overflow: hidden;
}

.settings-content .provider-header {
    align-items: start;
}

.settings-content .provider-header p,
.settings-content .field-help,
.settings-content .status-badge,
.settings-content td,
.settings-content th,
.settings-content code {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.settings-content input,
.settings-content select,
.settings-content textarea {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-content .field-help {
    display: block;
    line-height: 1.35;
}

.settings-content .checkbox-card {
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-content .compact-table {
    min-width: 0;
    table-layout: fixed;
}

.settings-content .compact-table th,
.settings-content .compact-table td {
    white-space: normal;
}

.settings-content .compact-table code {
    display: inline-block;
    white-space: normal;
}

.dashboard-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dashboard-action-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.dashboard-action-card {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    color: #253832;
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    text-decoration: none;
}

.dashboard-action-card:hover {
    border-color: #0f6f83;
    box-shadow: 0 8px 18px rgba(9, 48, 53, 0.08);
}

.dashboard-action-card span {
    font-size: 13px;
    font-weight: 900;
}

.dashboard-action-card small {
    color: #667970;
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-action-card.action-high {
    border-left: 4px solid #1fa971;
}

.dashboard-action-card.action-medium {
    border-left: 4px solid #e3a51a;
}

.dashboard-action-card.action-low {
    border-left: 4px solid #96b3ac;
}

/* Intuitive workflow */
.compact-page-header {
    min-height: auto;
}

.workflow-rail {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
}

.workflow-rail span,
.workflow-rail strong {
    background: #eef5f2;
    border-radius: 999px;
    color: #52645d;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 9px 11px;
}

.workflow-rail strong {
    background: #0f6f83;
    color: #ffffff;
}

.workqueue-layout,
.followup-layout {
    align-items: start;
    display: grid;
    gap: 16px;
}

.workqueue-layout {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.followup-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
}

.workqueue-list {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 160px);
    overflow: auto;
    padding: 12px;
    position: sticky;
    top: 18px;
}

.queue-list-header {
    display: grid;
    gap: 3px;
    margin-bottom: 4px;
}

.queue-list-header strong {
    font-size: 15px;
}

.queue-list-header span {
    color: #667970;
    font-size: 12px;
}

.queue-card {
    border: 1px solid #dce7e2;
    border-radius: 10px;
    color: var(--text);
    display: grid;
    gap: 7px;
    padding: 12px;
    text-decoration: none;
}

.queue-card:hover,
.queue-card.active {
    border-color: #0f6f83;
    box-shadow: 0 8px 18px rgba(9, 48, 53, 0.08);
}

.queue-card.active {
    background: #eefafb;
}

.seo-content-card.active {
    box-shadow: inset 4px 0 0 #0f6f83, 0 8px 18px rgba(9, 48, 53, 0.08);
}

.queue-card strong {
    font-size: 13px;
    line-height: 1.25;
}

.queue-card > span {
    color: #62746d;
    font-size: 12px;
}

.queue-card-meta {
    align-items: center;
    display: flex;
    gap: 8px;
}

.workqueue-detail,
.followup-detail {
    display: grid;
    gap: 16px;
}

.detail-topline,
.draft-work-header {
    align-items: start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.detail-topline h2,
.draft-work-header h2 {
    margin-bottom: 5px;
}

.detail-topline p,
.draft-work-header p {
    color: #667970;
}

.next-action-card,
.draft-next-action {
    background: #eaf7fb;
    border: 1px solid #bfe5ef;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    min-width: 190px;
    padding: 12px 14px;
}

.next-action-card span,
.draft-next-action span {
    color: #52645d;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.next-action-card strong,
.draft-next-action strong {
    font-size: 15px;
}

.post-step-box,
.followup-form {
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.post-step-box p {
    color: #667970;
    font-size: 12px;
    margin: 0;
}

.locked-step-box {
    background: #f7faf8;
}

.locked-step-box strong {
    font-size: 13px;
}

.manual-post-guide {
    background: #ffffff;
    border: 1px solid #cfe1dc;
    border-radius: 12px;
    display: grid;
    gap: 14px;
    padding: 15px;
}

.manual-post-guide-header {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.manual-post-guide-header strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.manual-post-guide-header p {
    color: #667970;
    font-size: 12px;
    margin: 0;
}

.manual-post-steps {
    counter-reset: none;
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.manual-post-steps li {
    align-items: start;
    background: #f8fbfa;
    border: 1px solid #e0e9e5;
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 10px;
}

.manual-post-steps li > span {
    align-items: center;
    background: #0f6f83;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.manual-post-steps strong {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

.manual-post-steps p {
    color: #667970;
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
}

.followup-table-panel {
    min-width: 0;
}

.followup-table {
    min-width: 800px;
}

.monitor-panel {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 16px;
}

.monitor-panel p {
    color: #667970;
    font-size: 13px;
    margin: 4px 0 0;
}

.monitor-panel code {
    background: #f2f7f5;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    color: #0a302f;
    display: block;
    font-size: 12px;
    overflow-wrap: anywhere;
    padding: 10px 12px;
}

.monitor-status-card {
    align-items: start;
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.monitor-status-card p {
    color: #667970;
    font-size: 12px;
    margin: 4px 0 0;
}

.monitor-status-card a {
    color: #0f6f83;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    margin-top: 8px;
}

.error-text {
    color: #9c2a1d !important;
}

.inline-status {
    color: #52645d;
    font-size: 12px;
    font-weight: 800;
}

.feature-list {
    color: #52645d;
    display: grid;
    gap: 9px;
    line-height: 1.45;
    margin: 10px 0 0;
    padding-left: 18px;
}

.seo-output-panel {
    display: grid;
    gap: 16px;
}

.article-factory-panel {
    display: grid;
    gap: 18px;
}

.article-factory-header {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
}

.article-factory-header h2 {
    margin: 4px 0 8px;
}

.article-factory-header p {
    color: #52645d;
    line-height: 1.55;
    margin: 0;
    max-width: 860px;
}

.eyebrow {
    color: #0f6f83;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.factory-score-card {
    background: #073b40;
    border-radius: 12px;
    color: #ffffff;
    display: grid;
    gap: 9px;
    padding: 15px;
}

.factory-score-card span {
    color: #b8d9db;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.factory-score-card strong {
    font-size: 17px;
}

.factory-score-card .button {
    justify-content: center;
    width: 100%;
}

.factory-stats-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(105px, 1fr));
}

.factory-stats-grid article {
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: grid;
    gap: 6px;
    padding: 12px;
}

.factory-stats-grid span {
    color: #60746c;
    font-size: 12px;
    font-weight: 800;
}

.factory-stats-grid strong {
    font-size: 26px;
    line-height: 1;
}

.backlink-stats {
    margin-bottom: 16px;
}

.backlink-detail-grid .small-link {
    margin-top: 7px;
}

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

.factory-flow a {
    background: #ffffff;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    color: #253832;
    display: grid;
    gap: 6px;
    padding: 12px;
    text-decoration: none;
}

.factory-flow a:hover {
    border-color: #0f6f83;
    box-shadow: 0 8px 18px rgba(9, 48, 53, 0.08);
}

.factory-flow span {
    align-items: center;
    background: #0f6f83;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.factory-flow strong {
    font-size: 13px;
}

.factory-flow small {
    color: #667970;
    font-size: 12px;
    line-height: 1.35;
}

.seo-output-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-output-grid > div {
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    padding: 13px;
}

.seo-output-grid strong {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.seo-output-grid p {
    color: #52645d;
    font-size: 13px;
    margin: 0;
}

.publish-checklist {
    color: #52645d;
    display: grid;
    gap: 6px;
    margin: 10px 0 10px;
    padding-left: 18px;
}

.seo-publish-panel code {
    background: #f2f7f5;
    border: 1px solid #d8e2dd;
    border-radius: 10px;
    display: block;
    font-size: 12px;
    overflow-wrap: anywhere;
    padding: 10px 12px;
}

.selected-row td {
    background: #f2fbfc;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: #f7fbfa;
}

.clickable-row:focus-visible {
    outline: 3px solid rgba(15, 111, 131, 0.35);
    outline-offset: -3px;
}

.attention-pill {
    background: #edf3f1;
    border-radius: 999px;
    color: #253832;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    padding: 8px 10px;
    white-space: nowrap;
}

.attention-kræver-svar,
.attention-kraever-svar {
    background: #fff0c9;
    color: #6b4300;
}

.attention-mangler-link {
    background: #ffe1df;
    color: #8a2018;
}

.attention-overvåges,
.attention-overvaages {
    background: #dff6e8;
    color: #14613a;
}

.small-button {
    min-height: 34px;
    padding: 8px 10px;
}

.followup-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
}

.comment-link-form {
    gap: 10px;
}

.advanced-followup {
    background: #f8fbfa;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    padding: 12px 14px;
}

.advanced-followup summary {
    color: #253832;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    list-style-position: outside;
}

.advanced-followup .followup-form {
    margin-top: 12px;
}

.advanced-followup .followup-actions {
    margin-top: 10px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}

.backlink-command-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.backlink-command-row form {
    margin: 0;
}

.backlink-command-row .button,
.backlink-command-row .compact-button {
    min-height: 38px;
    padding: 9px 14px;
}

.analysis-ready {
    background: #e5f5ee;
    border-color: #c7e7d9;
    color: #145f43;
}

.backlink-analysis-panel,
.backlink-analysis-empty {
    border-radius: 12px;
    margin: 14px 0;
    padding: 16px;
}

.backlink-analysis-panel {
    background: linear-gradient(135deg, #f4fbf8 0%, #ffffff 100%);
    border: 1px solid #cfe7dc;
    box-shadow: inset 4px 0 0 #0f6f83;
}

.backlink-analysis-empty {
    background: #f8fbfa;
    border: 1px dashed #cddbd5;
}

.backlink-analysis-empty strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.backlink-analysis-empty p {
    color: #52645d;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.backlink-analysis-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.backlink-analysis-head h3 {
    font-size: 20px;
    line-height: 1.2;
    margin: 4px 0 0;
}

.analysis-score-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.analysis-copy {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dce9e3;
    border-radius: 10px;
    color: #20332d;
    font-size: 13px;
    line-height: 1.55;
    margin-top: 12px;
    padding: 13px;
}

.small-meta {
    font-size: 12px;
    margin: 10px 0 0;
}

@media (max-width: 900px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar.sidebar {
        padding: 16px;
    }

    .app-sidebar .brand {
        margin-bottom: 16px;
    }

    .page-header {
        display: grid;
    }

    .stats,
    .form-grid,
    .status-grid,
    .settings-grid,
    .article-plan-command,
    .article-plan-grid,
    .article-metric-row,
    .seo-command-form .settings-grid,
    .seo-intel-summary,
    .seo-score-grid,
    .seo-action-grid,
    .article-factory-header,
    .factory-flow,
    .seo-output-grid {
        grid-template-columns: 1fr;
    }

    .article-flow-strip,
    .factory-stats-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-command-stats,
    .article-card-head,
    .article-status-form,
    .article-next-action {
        align-items: stretch;
        display: grid;
        justify-content: stretch;
    }

    .dashboard-content {
        padding: 16px;
    }

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

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

    .field-span-2 {
        grid-column: auto;
    }

    .provider-header {
        display: grid;
    }

    .workqueue-layout,
    .followup-layout {
        grid-template-columns: 1fr;
    }

    .workqueue-list {
        max-height: none;
        position: static;
    }

    .detail-topline,
    .draft-work-header {
        display: grid;
    }

    .next-action-card,
    .draft-next-action {
        min-width: 0;
    }

    .manual-post-guide-header {
        grid-template-columns: 1fr;
    }
}
