/* Shared styles for the recommender, research, and indexed-work pages. */

.seo-page {
    --text-muted: #7c7c90;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 107, 157, 0.1), transparent 30%),
        radial-gradient(circle at 86% 16%, rgba(111, 168, 255, 0.1), transparent 32%),
        var(--bg-dark);
}

.seo-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 18px clamp(20px, 5vw, 72px);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(10, 10, 16, 0.9);
    backdrop-filter: blur(18px);
}

.seo-nav .nav-brand {
    color: var(--text-primary);
    text-decoration: none;
}

.seo-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.seo-nav-links a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color var(--transition);
}

.seo-nav-links a:hover,
.seo-nav-links a[aria-current="page"] {
    color: var(--text-primary);
}

.seo-main {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 110px;
}

.seo-main.narrow {
    width: min(860px, calc(100% - 40px));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.seo-eyebrow {
    margin-bottom: 14px;
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.seo-hero {
    padding: clamp(36px, 6vw, 72px);
    border: 1px solid var(--border-subtle);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(26, 26, 38, 0.96), rgba(15, 15, 24, 0.94));
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.32);
}

.seo-hero h1,
.article-header h1,
.work-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 4.7rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.seo-hero .lead,
.article-header .lead,
.work-hero .lead {
    max-width: 800px;
    margin: 24px 0 0;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.seo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.seo-section {
    padding-top: 88px;
}

.seo-section h2,
.article-body h2 {
    margin: 0 0 20px;
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    letter-spacing: -0.03em;
}

.seo-section > p,
.article-body > p {
    max-width: 820px;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.85;
}

.feature-panel-grid,
.research-card-grid,
.directory-grid,
.metric-grid,
.related-grid {
    display: grid;
    gap: 18px;
}

.feature-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 32px;
}

.feature-panel,
.research-card,
.directory-card,
.metric-card,
.related-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.feature-panel {
    padding: 30px;
}

.feature-panel .panel-number {
    display: block;
    margin-bottom: 22px;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.feature-panel h3,
.research-card h3,
.directory-card h3,
.related-card h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: 1.16rem;
}

.feature-panel p,
.research-card p,
.directory-card p,
.related-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.seo-screenshot {
    display: block;
    width: 100%;
    margin-top: 34px;
    border: 1px solid rgba(192, 132, 252, 0.28);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.research-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 28px;
}

.research-card {
    display: block;
    padding: 28px;
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition);
}

.research-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 157, 0.4);
}

.article-header {
    padding-bottom: 44px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-meta {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.article-body {
    padding-top: 18px;
}

.article-body h2 {
    padding-top: 64px;
}

.article-body h3 {
    margin: 38px 0 14px;
    font-size: 1.3rem;
}

.article-body p,
.article-body li {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.85;
}

.article-body strong {
    color: var(--text-primary);
}

.article-body a,
.work-copy a {
    color: var(--accent-tertiary);
}

.article-body a.btn-primary {
    color: var(--bg-dark);
}

.article-figure {
    margin: 34px 0 18px;
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    background: #fff;
    cursor: zoom-in;
}

.article-figure img:focus-visible {
    outline: 3px solid var(--accent-tertiary);
    outline-offset: 4px;
}

.article-figure figcaption {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.method-note {
    margin-top: 34px;
    padding: 24px 26px;
    border-left: 3px solid var(--accent-tertiary);
    border-radius: 0 14px 14px 0;
    background: rgba(111, 168, 255, 0.07);
}

.method-note p,
.method-note li {
    color: var(--text-secondary);
    line-height: 1.75;
}

.data-table-wrap {
    margin: 28px 0;
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    background: rgba(18, 18, 28, 0.9);
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.data-table td {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.data-table a {
    color: var(--accent-tertiary);
}

.data-table a:hover {
    color: var(--accent-secondary);
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.work-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
    gap: 44px;
    padding: clamp(30px, 5vw, 56px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(27, 27, 40, 0.96), rgba(15, 15, 24, 0.96));
}

.work-hero h1 {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.work-japanese-title {
    margin: 13px 0 0;
    color: var(--text-secondary);
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1.05rem;
}

.work-cover {
    width: 100%;
    max-height: 330px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.42);
}

.work-cover-placeholder {
    display: grid;
    min-height: 280px;
    place-items: center;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    color: var(--text-muted);
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 107, 157, 0.08), rgba(111, 168, 255, 0.06));
}

.work-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.fact-chip {
    padding: 7px 11px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.025);
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 30px;
}

.metric-card {
    padding: 22px;
}

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

.metric-label {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.work-copy {
    max-width: 820px;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.85;
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.related-card {
    display: block;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition);
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(111, 168, 255, 0.35);
}

.directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
}

.directory-card {
    display: block;
    padding: 26px;
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition);
}

.directory-card:hover {
    transform: translateY(-3px);
    border-color: rgba(192, 132, 252, 0.38);
}

.directory-count {
    display: block;
    margin-top: 18px;
    color: var(--accent-primary);
    font-size: 0.86rem;
    font-weight: 700;
}

.work-search {
    width: 100%;
    margin: 26px 0;
    padding: 15px 18px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    outline: 0;
    color: var(--text-primary);
    background: var(--bg-card);
    font: inherit;
}

.work-search:focus {
    border-color: rgba(255, 107, 157, 0.58);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.09);
}

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

.work-list-item {
    display: flex;
    flex-direction: column;
    min-height: 74px;
    justify-content: center;
    padding: 13px 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 11px;
    color: var(--text-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.018);
}

.work-list-item:hover {
    border-color: rgba(111, 168, 255, 0.34);
    background: rgba(111, 168, 255, 0.04);
}

.work-list-item small {
    margin-top: 5px;
    color: var(--text-muted);
}

.work-list-empty {
    display: none;
    color: var(--text-muted);
}

.cta-panel {
    margin-top: 84px;
    padding: clamp(30px, 5vw, 52px);
    border: 1px solid rgba(255, 107, 157, 0.25);
    border-radius: 22px;
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 107, 157, 0.07), rgba(192, 132, 252, 0.06));
}

.cta-panel h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.cta-panel p {
    max-width: 680px;
    margin: 16px auto 0;
    color: var(--text-secondary);
    line-height: 1.75;
}

.seo-footer {
    padding: 40px 20px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.88rem;
}

.seo-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

@media (max-width: 900px) {
    .feature-panel-grid,
    .research-card-grid,
    .directory-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .seo-nav {
        position: static;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .seo-nav-links {
        justify-content: flex-start;
    }

    .seo-main {
        padding-top: 42px;
    }

    .work-hero {
        grid-template-columns: 1fr;
    }

    .work-cover,
    .work-cover-placeholder {
        max-width: 230px;
        grid-row: 1;
    }
}

@media (max-width: 520px) {
    .feature-panel-grid,
    .research-card-grid,
    .directory-grid,
    .related-grid,
    .metric-grid,
    .work-list {
        grid-template-columns: 1fr;
    }

    .seo-main,
    .seo-main.narrow {
        width: min(calc(100% - 28px), 1160px);
    }

    .seo-hero {
        padding: 28px 22px;
    }
}
