:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #182230;
    --text-soft: #637083;
    --line: #e2e8f0;
    --navy: #12253f;
    --accent: #246bfd;
    --accent-soft: #edf4ff;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(18, 37, 63, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans JP",
        sans-serif;
    line-height: 1.75;
}

a {
    color: inherit;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(1120px, calc(100% - 40px));
    margin: auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--navy);
}

.header-tagline {
    color: var(--text-soft);
    font-size: 13px;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: auto;
}

.hero {
    padding: 72px 0 56px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--navy);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.hero-copy {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text-soft);
    font-size: 17px;
}

.hero-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
    font-size: 14px;
    font-weight: 650;
}

.flow-item {
    padding: 7px 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.flow-arrow {
    color: var(--text-soft);
}

.section-header {
    margin: 12px 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.section-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 24px;
}

.section-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 72px;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(18, 37, 63, 0.10);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.category {
    display: inline-block;
    padding: 4px 9px;
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
}

.date {
    color: var(--text-soft);
    font-size: 12px;
}

.article-card h3 {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
    line-height: 1.5;
}

.article-card h3 a {
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--accent);
}

.summary {
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.read-more {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.empty-state {
    padding: 50px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-soft);
}

.site-footer {
    padding: 28px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
}

@media (max-width: 720px) {
    .header-tagline {
        display: none;
    }

    .hero {
        padding: 48px 0 38px;
    }

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

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}


/* =========================================================
   DESIGN ARTICLE
   1 Article = 1 Chat
   ========================================================= */

.design-article-page {
    min-height: 100vh;
    background: #f5f7fa;
}

.design-article {
    padding: 34px 0 70px;
}

.design-article-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.article-context {
    position: sticky;
    top: 24px;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 13px;
    text-decoration: none;
}

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

.article-context-card {
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.article-context-card h1 {
    margin: 16px 0 0;
    color: var(--navy);
    font-size: 24px;
    line-height: 1.5;
    letter-spacing: -.025em;
}

.article-context-summary {
    margin: 20px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.85;
}

.source-block {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.source-label {
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .1em;
}

.source-block a,
.source-block span {
    font-size: 13px;
}

.source-block a {
    color: var(--accent);
    text-decoration: none;
}

.article-chat {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.chat-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.chat-kicker {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
}

.chat-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 21px;
}

.chat-status {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    white-space: nowrap;
}

.quick-actions {
    padding: 18px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.quick-action {
    appearance: none;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.quick-action:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.chat-messages {
    min-height: 440px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 30px 28px 40px;
}

.chat-row {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.chat-row:last-child {
    margin-bottom: 0;
}

.ai-row {
    justify-content: flex-start;
}

.user-row {
    justify-content: flex-end;
}

.chat-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.ai-avatar {
    background: var(--navy);
    color: white;
}

.chat-message-wrap {
    max-width: min(700px, 82%);
}

.user-row .chat-message-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-name {
    margin: 0 0 6px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
}

.user-name {
    text-align: right;
}

.chat-bubble {
    padding: 16px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.8;
}

.chat-bubble p {
    margin: 0 0 12px;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble ol,
.chat-bubble ul {
    margin: 10px 0;
    padding-left: 22px;
}

.ai-bubble {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-top-left-radius: 5px;
}

.user-bubble {
    background: var(--navy);
    color: white;
    border-top-right-radius: 5px;
}

.chat-next {
    color: var(--accent);
    font-weight: 650;
}

.mock-notice {
    padding-top: 10px;
    color: var(--text-soft);
    font-size: 11px;
}

.chat-composer-wrap {
    padding: 18px 22px 15px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 9px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 15px;
}

.chat-composer:focus-within {
    border-color: #b8caf4;
}

.chat-composer textarea {
    width: 100%;
    min-height: 42px;
    max-height: 130px;
    padding: 9px 10px;
    resize: none;
    outline: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.send-button {
    min-width: 66px;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
}

.send-button:hover {
    opacity: .9;
}

.chat-note {
    margin: 9px 4px 0;
    color: var(--text-soft);
    font-size: 10px;
    text-align: center;
}


@media (max-width: 900px) {

    .design-article-shell {
        grid-template-columns: 1fr;
    }

    .article-context {
        position: static;
    }

    .article-context-card h1 {
        font-size: 21px;
    }

    .chat-messages {
        max-height: none;
        min-height: 400px;
    }
}


@media (max-width: 620px) {

    .design-article {
        padding-top: 20px;
    }

    .design-article-shell {
        width: min(100% - 24px, 1240px);
        gap: 16px;
    }

    .article-context-card {
        padding: 20px;
    }

    .chat-header {
        padding: 20px;
        align-items: flex-start;
    }

    .chat-status {
        display: none;
    }

    .quick-actions {
        padding: 14px 18px;
        gap: 7px;
    }

    .chat-messages {
        padding: 24px 18px 32px;
    }

    .chat-message-wrap {
        max-width: 88%;
    }

    .chat-composer-wrap {
        padding: 12px;
    }
}


/* =========================================================
   NEWS DESIGNER
   SPLIT DESIGN ARTICLE v2
   ========================================================= */

.split-article-page {
    margin: 0;
    overflow: hidden;
    background: #eef2f6;
}

.split-site-header {
    position: relative;
    z-index: 20;
}

.split-workspace {
    height: calc(100vh - 73px);
    padding: 14px;
}

.split-shell {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 50% 50%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: grid-template-columns .28s ease;
}

.split-shell.article-expanded {
    grid-template-columns: 85% 15%;
}

.split-shell.chat-expanded {
    grid-template-columns: 15% 85%;
}

.split-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.article-pane {
    border-right: 1px solid var(--line);
}

.pane-header {
    flex: 0 0 auto;
    min-height: 68px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.pane-label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
}

.pane-subtitle {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
}

.pane-expand {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}

.pane-expand:hover,
.pane-expand.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.pane-body {
    min-height: 0;
    overflow-y: auto;
}

.article-pane-body {
    padding: 28px clamp(24px, 4vw, 58px) 60px;
}

.split-back-link {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--text-soft);
    font-size: 12px;
    text-decoration: none;
}

.split-back-link:hover {
    color: var(--accent);
}

.split-article-content {
    width: min(720px, 100%);
    margin: 0 auto;
}

.split-article-content h1 {
    margin: 18px 0 0;
    color: var(--navy);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.45;
    letter-spacing: -.035em;
}

.article-lead {
    margin-top: 28px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: #475569;
    font-size: 15px;
    line-height: 1.95;
}

.article-text {
    margin-top: 34px;
    color: var(--text);
    font-size: 15px;
    line-height: 2;
}

.article-placeholder {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.9;
}

.placeholder-title {
    margin-top: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
}

.split-source {
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.source-name {
    margin-top: 5px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 650;
}

.source-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}


/* CHAT */

.chat-pane {
    position: relative;
}

.chat-pane-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.design-chat-intro {
    flex: 0 0 auto;
    padding: 22px 26px 14px;
}

.design-chat-intro h2 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
}

.design-chat-intro .chat-kicker {
    margin-bottom: 4px;
}

.chat-pane .quick-actions {
    flex: 0 0 auto;
    padding: 10px 26px 17px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.split-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 26px;
    background: #fbfcfe;
}

.split-chat-composer {
    flex: 0 0 auto;
    padding: 14px 18px 11px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}


/* 15%へ縮小した側 */

.split-shell.article-expanded .chat-pane .pane-body,
.split-shell.article-expanded .chat-pane .split-chat-composer {
    visibility: hidden;
}

.split-shell.chat-expanded .article-pane .pane-body {
    visibility: hidden;
}

.split-shell.article-expanded .chat-pane .pane-header,
.split-shell.chat-expanded .article-pane .pane-header {
    padding-left: 12px;
    padding-right: 12px;
}

.split-shell.article-expanded .chat-pane .pane-expand,
.split-shell.chat-expanded .article-pane .pane-expand {
    display: none;
}


/* =========================================================
   MOBILE
   上下 50:50 → 85:15
   ========================================================= */

@media (max-width: 760px) {

    .split-article-page {
        overflow: hidden;
    }

    .split-site-header .header-inner {
        min-height: 58px;
    }

    .split-workspace {
        height: calc(100dvh - 59px);
        padding: 7px;
    }

    .split-shell {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 50% 50%;
        border-radius: 13px;
        transition: grid-template-rows .28s ease;
    }

    .split-shell.article-expanded {
        grid-template-columns: 1fr;
        grid-template-rows: 85% 15%;
    }

    .split-shell.chat-expanded {
        grid-template-columns: 1fr;
        grid-template-rows: 15% 85%;
    }

    .article-pane {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .pane-header {
        min-height: 48px;
        padding: 8px 13px;
    }

    .pane-label {
        font-size: 11px;
    }

    .pane-subtitle {
        display: none;
    }

    .pane-expand {
        padding: 5px 9px;
        font-size: 10px;
    }

    .article-pane-body {
        padding: 18px 17px 35px;
    }

    .split-back-link {
        margin-bottom: 16px;
    }

    .split-article-content h1 {
        font-size: 23px;
    }

    .article-lead {
        margin-top: 20px;
        font-size: 13px;
    }

    .design-chat-intro {
        padding: 15px 16px 8px;
    }

    .design-chat-intro h2 {
        font-size: 16px;
    }

    .chat-pane .quick-actions {
        padding: 8px 16px 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .quick-action {
        flex: 0 0 auto;
    }

    .split-chat-messages {
        padding: 17px 14px;
    }

    .chat-message-wrap {
        max-width: 88%;
    }

    .split-chat-composer {
        padding: 8px;
    }

    .chat-note {
        display: none;
    }

    .chat-composer {
        padding: 5px;
    }

    .chat-composer textarea {
        min-height: 36px;
        font-size: 13px;
    }

    .send-button {
        min-width: 54px;
        height: 36px;
        padding: 0 11px;
    }


    /* 縮小された15%ペインはヘッダーだけ残す */

    .split-shell.article-expanded .chat-pane .pane-body,
    .split-shell.article-expanded .chat-pane .split-chat-composer,
    .split-shell.chat-expanded .article-pane .pane-body {
        visibility: hidden;
    }

    .split-shell.article-expanded .chat-pane .pane-expand,
    .split-shell.chat-expanded .article-pane .pane-expand {
        display: block;
    }
}


/* =========================================================
   SPLIT RATIO TUNING v3
   50:50 / 70:30
   両ペインを常時操作可能にする
   ========================================================= */

.split-shell.article-expanded {
    grid-template-columns: 70% 30%;
}

.split-shell.chat-expanded {
    grid-template-columns: 30% 70%;
}


/* 縮小側も隠さない */

.split-shell.article-expanded .chat-pane .pane-body,
.split-shell.article-expanded .chat-pane .split-chat-composer,
.split-shell.chat-expanded .article-pane .pane-body {
    visibility: visible;
}


/* 縮小側でも拡大ボタンを残す */

.split-shell.article-expanded .chat-pane .pane-expand,
.split-shell.chat-expanded .article-pane .pane-expand {
    display: block;
}


/* 縮小時でも内容が読めるように少しコンパクト化 */

.split-shell.article-expanded .chat-pane .design-chat-intro,
.split-shell.chat-expanded .article-pane .article-pane-body {
    padding-left: 18px;
    padding-right: 18px;
}

.split-shell.article-expanded .chat-pane .quick-actions {
    padding-left: 18px;
    padding-right: 18px;
}

.split-shell.article-expanded .chat-pane .split-chat-messages {
    padding-left: 18px;
    padding-right: 18px;
}


/* =========================================================
   MOBILE
   50:50 / 70:30
   ========================================================= */

@media (max-width: 760px) {

    .split-shell.article-expanded {
        grid-template-columns: 1fr;
        grid-template-rows: 70% 30%;
    }

    .split-shell.chat-expanded {
        grid-template-columns: 1fr;
        grid-template-rows: 30% 70%;
    }

    .split-shell.article-expanded .chat-pane .pane-body,
    .split-shell.article-expanded .chat-pane .split-chat-composer,
    .split-shell.chat-expanded .article-pane .pane-body {
        visibility: visible;
    }

    .split-shell.article-expanded .chat-pane .pane-expand,
    .split-shell.chat-expanded .article-pane .pane-expand {
        display: block;
    }
}


/* =========================================================
   HEADER ADJUSTMENT
   ========================================================= */

.split-site-header .split-header-inner {
    width: 100%;
    max-width: none;
    padding: 0 22px;
}

.split-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.split-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--navy);
    background: var(--surface);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.home-button:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

@media (max-width: 760px) {

    .split-site-header .split-header-inner {
        padding: 0 12px;
    }

    .split-header-actions {
        gap: 8px;
    }

    .split-site-header .header-tagline {
        display: none;
    }

    .home-button {
        font-size: 10px;
        padding: 6px 9px;
    }
}
