:root {
    --bg: #f3f5f8;
    --bg-elevated: #ffffff;
    --sidebar: #0f172a;
    --sidebar-soft: #1e293b;
    --sidebar-border: rgba(148, 163, 184, 0.16);
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --accent: #0f766e;
    --accent-soft: #ccfbf1;
    --accent-ink: #115e59;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-width: 250px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    background:
        radial-gradient(1200px 400px at 100% -10%, rgba(15, 118, 110, 0.08), transparent 55%),
        radial-gradient(900px 320px at 0% 0%, rgba(15, 23, 42, 0.04), transparent 50%),
        var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

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

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, #111827 0%, #0f172a 55%, #0b1220 100%);
    color: #f8fafc;
    border-right: 1px solid var(--sidebar-border);
}

.app-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem 2rem 2.5rem;
}

.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 15px;
    height: 15px;
}

.icon-xs {
    width: 13px;
    height: 13px;
}

.icon-brand {
    width: 18px;
    height: 18px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.25rem 0.9rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 0.35rem 0.5rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #ececec;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.brand-name {
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.brand-tag {
    font-size: 0.72rem;
    color: #94a3b8;
}

.sidebar-section + .sidebar-section {
    margin-top: 1.25rem;
}

.sidebar-label {
    margin: 0 0 0.45rem;
    padding: 0 0.7rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #f8fafc;
}

.sidebar-link.is-active {
    background: rgba(20, 184, 166, 0.14);
    color: #f0fdfa;
    box-shadow: inset 3px 0 0 #14b8a6;
    font-weight: 560;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.sidebar-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.85rem 0.8rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.45;
}

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

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

.eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.page-header h1,
.app-content h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-header p {
    margin: 0.55rem 0 0;
    color: var(--muted);
    max-width: 40rem;
    line-height: 1.55;
    font-size: 0.95rem;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #334155;
}

.stat-icon.accent {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.stat-icon.soft {
    background: #eef2ff;
    color: #3730a3;
}

.stat-label {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.stat-value {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.9rem;
}

.section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.section-hint {
    font-size: 0.78rem;
    color: var(--muted);
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tool-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #99f6e4;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tool-card-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, #14b8a6, #0f766e);
    color: #fff;
}

.tool-card-arrow {
    color: #94a3b8;
    transition: transform 0.15s ease, color 0.15s ease;
}

.tool-card:hover .tool-card-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

.tool-card h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.tool-card p {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.tool-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--accent-ink);
    font-size: 0.78rem;
    font-weight: 600;
}

.tool-form {
    margin-bottom: 1.5rem;
    padding: 1.35rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.form-head-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.form-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
}

.form-sub {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.url-row {
    display: flex;
    gap: 0.75rem;
}

.urls-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.field-textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    resize: vertical;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.mode-tabs {
    display: inline-flex;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0.3rem;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
}

.mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
}

.mode-tab.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mode-panel[hidden] {
    display: none !important;
}

.field-optional {
    font-weight: 500;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}

.field-hint {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.form-actions-row {
    margin-top: 0.85rem;
    display: flex;
    justify-content: flex-end;
}

.result-meta {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.url-list {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.url-list a {
    color: var(--accent-ink);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
}

.url-list a:hover {
    text-decoration: underline;
}

.input-with-icon {
    position: relative;
    flex: 1;
    min-width: 0;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.field-input {
    width: 100%;
    padding: 0.78rem 0.9rem 0.78rem 2.45rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.78rem 1.05rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: linear-gradient(180deg, #0f766e, #0d9488);
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #0d9488, #0f766e);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
    background: #f8fafc;
}

.btn-secondary .check-icon,
.btn-icon .check-icon,
.copy-btn .check-icon {
    display: none;
}

.btn-secondary.is-copied .copy-icon,
.btn-icon.is-copied .copy-icon,
.copy-btn.is-copied .copy-icon {
    display: none;
}

.btn-secondary.is-copied .check-icon,
.btn-icon.is-copied .check-icon,
.copy-btn.is-copied .check-icon {
    display: inline-block;
    color: var(--accent);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-icon:hover {
    background: #f8fafc;
    color: var(--accent-ink);
    border-color: #99f6e4;
}

.btn-icon.is-copied {
    color: var(--accent);
    border-color: #99f6e4;
    background: #f0fdfa;
}

.field-error {
    margin-top: 0.75rem;
    font-size: 0.84rem;
    color: var(--danger);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.result-card {
    padding: 1.15rem 1.2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.result-card-wide {
    grid-column: 1 / -1;
}

.result-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.result-value {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
    word-break: break-word;
    font-size: 0.95rem;
}

.result-value a {
    color: var(--accent-ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.result-value a:hover {
    text-decoration: underline;
}

.result-value.muted {
    color: var(--muted);
}

.result-multiline {
    max-width: 72ch;
}

.result-preline {
    white-space: pre-line;
    max-width: 78ch;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 560;
    color: var(--accent-ink);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.card-head .result-label {
    margin: 0;
}

.proposal-box {
    width: 100%;
    min-height: 240px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.55;
    resize: vertical;
    background: #f8fafc;
    color: var(--text);
}

.proposal-box:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

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

    .page-header-row {
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .app-content {
        padding: 1.25rem;
    }

    .url-row,
    .urls-row {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .result-grid {
        display: flex;
        flex-direction: column;
    }
}

.icon-spin {
    animation: spin 0.9s linear infinite;
}

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

.btn-primary:disabled {
    opacity: 0.75;
    cursor: wait;
}

.btn-primary .btn-loading,
.btn-primary .btn-ready {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.loading-panel {
    margin: 0 0 1.5rem;
    padding: 2rem 1.25rem;
    text-align: center;
    background: var(--bg-elevated);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.loading-spinner {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 0.85rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.loading-spinner .icon {
    width: 22px;
    height: 22px;
}

.loading-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
}

.loading-sub {
    margin: 0.4rem auto 0;
    max-width: 28rem;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

/* Compact WP Password page */
.page-compact {
    overflow: hidden;
}

.page-compact .app-shell,
.page-compact .app-content {
    min-height: 100vh;
    height: 100vh;
}

.page-compact .app-content {
    overflow: hidden;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.compact-tool {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
}

.compact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.compact-top h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.compact-top p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.compact-top code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8em;
    background: #e2e8f0;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

.compact-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.compact-controls {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.75rem;
    flex-shrink: 0;
}

.compact-alert {
    margin: 0;
    padding: 0.65rem 0.8rem;
    flex-shrink: 0;
}

.compact-outputs {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
    min-height: 0;
}

.wp-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.wp-field-grow {
    min-width: 0;
}

.wp-field-label {
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.wp-field-label em {
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: #94a3b8;
}

.wp-input {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wp-input::placeholder {
    color: #94a3b8;
}

.wp-input:hover {
    border-color: #94a3b8;
}

.wp-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.wp-input[readonly] {
    background: #f8fafc;
    color: #0f172a;
    cursor: text;
}

.wp-input[readonly]:focus {
    border-color: #cbd5e1;
    box-shadow: none;
}

.wp-input-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.wp-input[type="number"] {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    padding-right: 0.4rem;
}

.wp-input[type="number"]::-webkit-outer-spin-button,
.wp-input[type="number"]::-webkit-inner-spin-button {
    opacity: 1;
    height: 30px;
}

.wp-input-group {
    display: flex;
    align-items: stretch;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wp-input-group:focus-within {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.wp-input-group .wp-input {
    height: 42px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-right: 0.55rem;
}

.wp-input-group .wp-input:hover,
.wp-input-group .wp-input:focus {
    border: 0;
    box-shadow: none;
}

.wp-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    border: 0;
    border-left: 1px solid var(--line);
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-copy:hover {
    background: #f0fdfa;
    color: var(--accent-ink);
}

.wp-copy .check-icon {
    display: none;
}

.wp-copy.is-copied .copy-icon {
    display: none;
}

.wp-copy.is-copied .check-icon {
    display: inline-block;
    color: var(--accent);
}

.compact-note {
    margin: auto 0 0;
    padding-top: 0.25rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.compact-note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

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

    .page-compact .app-shell,
    .page-compact .app-content {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.saved-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #99f6e4;
    border-radius: var(--radius-sm);
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.9rem;
}

.saved-banner a {
    margin-left: auto;
    color: #0f766e;
    font-weight: 600;
    text-decoration: none;
}

.saved-banner a:hover {
    text-decoration: underline;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
}

.empty-state-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: #f0fdfa;
    color: #0f766e;
    margin-bottom: 0.35rem;
}

.empty-state h2 {
    margin: 0;
    font-size: 1.15rem;
}

.empty-state p {
    margin: 0 0 0.75rem;
    color: var(--muted);
    max-width: 32rem;
}

.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.analysis-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.analysis-table th,
.analysis-table td {
    padding: 0.95rem 1.1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.analysis-table th {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f8fafc;
}

.analysis-table tbody tr:last-child td {
    border-bottom: none;
}

.analysis-table tbody tr:hover {
    background: #f8fafc;
}

.analysis-row-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.analysis-row-skills {
    margin-top: 0.45rem;
}

.analysis-row-url {
    color: var(--muted);
    font-size: 0.82rem;
    word-break: break-all;
}

.analysis-domain {
    font-size: 0.9rem;
    color: var(--text);
}

.analysis-updated {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.85rem;
}

.analysis-row-actions {
    white-space: nowrap;
    text-align: right;
}

.analysis-row-actions .btn-icon {
    margin-left: 0.25rem;
    color: var(--text);
}

.analysis-row-actions .btn-danger-soft {
    color: #b91c1c;
}

.analysis-row-actions .btn-danger-soft:hover {
    background: #fef2f2;
}

.skill-list-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    max-width: none;
}

.skill-list-compact .skill-chip {
    flex-shrink: 0;
}

.skill-chip-sm {
    font-size: 0.68rem !important;
    padding: 0.1rem 0.4rem !important;
    line-height: 1.25;
    border-radius: 999px;
}

.modal-card.modal-card-wide {
    width: 92%;
    max-width: none;
    height: 94vh;
    max-height: 94vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.modal-head-fixed {
    flex-shrink: 0;
    margin: 0;
    padding: 1.25rem 1.4rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 2;
}

.modal-body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1.15rem 1.4rem;
}

.modal-actions-fixed {
    flex-shrink: 0;
    margin: 0;
    padding: 0.9rem 1.4rem 1.15rem;
    background: #fff;
    border-top: 1px solid var(--line);
}

.modal-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
}

.modal-nav-btn {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.modal-nav-btn:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.8);
    transform: scale(1.04);
}

.modal-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.modal-counter {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.analysis-grid-modal {
    grid-template-columns: 1fr;
}

.modal-actions-spread {
    justify-content: space-between;
    align-items: center;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.modal-card-wide .modal-head {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.modal-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}

@media (max-width: 900px) {
    .modal-shell {
        width: 100%;
        gap: 0.4rem;
        padding: 0 0.25rem;
    }

    .modal-nav-btn {
        width: 2.4rem;
        height: 2.4rem;
    }

    .modal-card.modal-card-wide {
        width: 90%;
        height: 92vh;
        max-height: 92vh;
    }

    .modal-actions-spread {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.55rem;
    }
}

.analysis-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.analysis-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.analysis-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    line-height: 1.3;
}

.analysis-url {
    color: var(--accent-ink, #0f766e);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
}

.analysis-url:hover {
    text-decoration: underline;
}

.analysis-meta {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.analysis-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-danger-soft {
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-danger-soft:hover {
    background: #fef2f2;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.analysis-block h3 {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.analysis-text {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.analysis-text-pre {
    white-space: pre-wrap;
}

.analysis-block-full {
    grid-column: 1 / -1;
}

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

    .analysis-card-head {
        flex-direction: column;
    }

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

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.45);
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-card {
    width: min(100%, 440px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem 1.4rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.modal-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.modal-copy {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.modal-copy code {
    display: inline-block;
    margin-top: 0.15rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.86rem;
    color: #0f766e;
    background: #f0fdfa;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.btn-danger {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.btn-danger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

