/* =========================================================
   AI時代の情報経営診断
   STRATEGIA Brand Style
   ========================================================= */

@import url(
    "https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700;800&display=swap"
);

:root {
    --color-aokachi: #222C55;
    --color-kuroai: #0F1528;
    --color-usukachi: #3A497A;
    --color-ibushigin: #A8A8A0;
    --color-kiraragin: #C8C8C2;
    --color-kinsusutake: #8C7A5A;

    --font-jp:
        "Noto Sans JP",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        "Meiryo",
        sans-serif;

    --font-en:
        "Montserrat",
        "Noto Sans JP",
        sans-serif;

    --text-main: var(--color-kuroai);
    --text-muted: #656A75;
    --text-light: #8A8E96;

    --background: #F5F6F7;
    --surface: #FFFFFF;
    --surface-subtle: #F8F9FA;
    --surface-blue: #F0F2F7;
    --surface-gold: #F6F2EA;

    --border: #E3E4E2;
    --border-strong: #D4D5D2;

    --accent: var(--color-aokachi);
    --accent-soft: #EEF0F6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-sm:
        0 2px 10px
        rgba(15, 21, 40, 0.045);

    --shadow-md:
        0 8px 28px
        rgba(15, 21, 40, 0.075);

    --content-width: 920px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text-main);
    font-family: var(--font-jp);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.diagnosis-shell {
    width:
        min(
            calc(100% - 40px),
            var(--content-width)
        );
    margin: 0 auto;
    padding: 52px 0 80px;
}

.page-header {
    margin-bottom: 34px;
}

.brand-label,
.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--color-aokachi);
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0 0 12px;
    color: var(--color-kuroai);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.page-header p {
    max-width: 720px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

#loading-area {
    text-align: center;
}

.loading-message {
    color: var(--text-muted);
}

.progress-area {
    margin-bottom: 26px;
}

#progress-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #E9EAE8;
}

.progress-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--color-aokachi);
    transition: width 0.25s ease;
}

#question-group {
    margin-bottom: 8px;
    color: var(--color-kinsusutake);
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#question-code {
    display: none;
}

#question-text {
    margin: 0 0 12px;
    color: var(--color-kuroai);
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    line-height: 1.55;
}

#help-text {
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.85;
}

#choice-list {
    display: grid;
    gap: 11px;
}

.choice-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
    color: var(--text-main);
    text-align: left;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.choice-item:hover {
    border-color: var(--color-usukachi);
    background: #F4F5F8;
}

.choice-item.selected {
    border-color: var(--color-aokachi);
    background: var(--accent-soft);
    box-shadow:
        inset 3px 0 0
        var(--color-aokachi);
}

.choice-item input[type="radio"] {
    margin-right: 10px;
}

#free-text-area {
    margin-top: 20px;
}

#free-text {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    padding: 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--surface-subtle);
    color: var(--text-main);
    line-height: 1.8;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

#free-text:focus {
    border-color: var(--color-aokachi);
    box-shadow:
        0 0 0 3px
        rgba(34, 44, 85, 0.08);
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
}

.navigation button,
.primary-button,
.secondary-button {
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 9px;
    font-weight: 600;
    transition: all 0.15s ease;
}

#next-button,
.primary-button {
    border: 1px solid var(--color-aokachi);
    background: var(--color-aokachi);
    color: #FFFFFF;
}

#next-button:hover,
.primary-button:hover {
    background: var(--color-kuroai);
    border-color: var(--color-kuroai);
}

#back-button,
.secondary-button {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--color-aokachi);
}

#back-button:hover,
.secondary-button:hover {
    border-color: var(--color-aokachi);
    background: var(--accent-soft);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

/* =========================================================
   RESULTS
   ========================================================= */

#complete-area {
    display: grid;
    gap: 20px;
}

.result-header {
    margin: 0;
}

.result-header h2 {
    margin: 0 0 10px;
    color: var(--color-kuroai);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.5;
}

.result-target {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.result-section {
    margin: 0;
}

.result-section-label {
    margin: 0 0 6px;
    color: var(--color-kinsusutake);
    font-family: var(--font-en);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.result-section h3 {
    margin: 0 0 22px;
    color: var(--color-kuroai);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   総合診断
   --------------------------------------------------------- */

.overall-assessment-section {
    position: relative;
}

.overall-pattern-row {
    margin-bottom: 14px;
}

.overall-pattern-name {
    display: inline-flex;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--surface-gold);
    color: var(--color-kinsusutake);
    font-size: 12px;
    font-weight: 700;
}

.overall-headline {
    margin: 0 0 14px !important;
    font-size: 26px !important;
    line-height: 1.55 !important;
}

.overall-summary {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.95;
}

.diagnosis-reason-box {
    margin-top: 26px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
}

.diagnosis-reason-title {
    margin: 0 0 12px;
    color: var(--color-aokachi);
    font-size: 13px;
    font-weight: 700;
}

.overall-reasoning-list {
    margin: 0;
    padding-left: 1.4em;
}

.overall-reasoning-list li {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.overall-reasoning-list li:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   最優先アクション
   --------------------------------------------------------- */

.primary-action-section {
    border-left:
        5px solid
        var(--color-kinsusutake);
}

.primary-action-lead {
    margin: 0 0 6px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
}

.primary-action-title {
    margin: 0 0 22px !important;
    color: var(--color-kuroai);
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

.primary-action-reason {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.primary-action-reason strong,
.primary-action-next strong {
    display: block;
    margin-bottom: 6px;
    color: var(--color-aokachi);
    font-size: 12px;
    font-weight: 700;
}

.primary-action-reason p,
.primary-action-next p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
}

.primary-action-next {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--surface-gold);
}

.primary-action-next strong {
    color: var(--color-kinsusutake);
}

/* ---------------------------------------------------------
   Status
   --------------------------------------------------------- */

.result-status-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.dimension-name {
    color: var(--color-kuroai);
    font-size: 13px;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
}

.status-under {
    background: var(--surface-gold);
    color: var(--color-kinsusutake);
}

.status-fit {
    background: var(--accent-soft);
    color: var(--color-aokachi);
}

.status-over {
    background: #EDF0F5;
    color: var(--color-usukachi);
}

.status-mixed {
    background: #F1F1EF;
    color: #686B70;
}

/* ---------------------------------------------------------
   Dimension Grid
   --------------------------------------------------------- */

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

.dimension-item {
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-subtle);
}

.dimension-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dimension-meta {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 10px;
}

/* ---------------------------------------------------------
   Other Recommendations
   --------------------------------------------------------- */

.recommendation-list {
    display: grid;
}

.recommendation-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    padding: 19px 0;
    border-bottom: 1px solid var(--border);
}

.recommendation-item:first-child {
    padding-top: 0;
}

.recommendation-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.recommendation-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--color-aokachi);
    color: #FFFFFF;
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
}

.recommendation-content h4 {
    margin: 7px 0;
    color: var(--color-kuroai);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

.recommendation-content p {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.85;
}

.next-action-inline {
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.85;
}

.next-action-inline strong {
    color: var(--color-aokachi);
}

/* ---------------------------------------------------------
   AI
   --------------------------------------------------------- */

#ai-result-section {
    position: relative;
}

#ai-result-section::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 0;
    width: 3px;
    height: 42px;
    border-radius: 0 3px 3px 0;
    background: var(--color-usukachi);
}

#ai-recommendation-list {
    display: grid;
}

.ai-item {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.ai-item:last-child {
    border-bottom: none;
}

.ai-item strong {
    display: block;
    color: var(--color-aokachi);
    font-size: 13px;
    font-weight: 700;
}

.ai-item p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.ai-problem {
    margin:
        4px 0
        6px;

    color:
        var(--text-main) !important;

    font-weight:
        600;
}


.ai-use {
    margin:
        0 !important;

    color:
        var(--text-muted);

    font-size:
        13px;

    line-height:
        1.85;
}

/* ---------------------------------------------------------
   Decision Intelligence / INTEGRITA
   --------------------------------------------------------- */

#integrita-result-section {
    position: relative;
}

#integrita-result-section
.result-section-label {
    color: var(--color-kinsusutake);
}

.integrita-fit {
    padding: 20px;
    border: 1px solid #E4E0D7;
    border-radius: var(--radius-md);
    background: var(--surface-gold);
}

.integrita-fit strong {
    display: block;
    color: var(--color-aokachi);
    font-size: 15px;
    font-weight: 700;
}

.integrita-fit p {
    margin: 9px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
    text-align: left;
}

::selection {
    background:
        rgba(58, 73, 122, 0.18);
    color: var(--color-kuroai);
}

.integrita-block {
    margin-top:
        18px;
}


.integrita-block:first-of-type {
    margin-top:
        14px;
}


.integrita-label {
    display:
        block;

    margin-bottom:
        5px;

    color:
        var(--color-kinsusutake);

    font-size:
        11px;

    font-weight:
        700;

    letter-spacing:
        0.03em;
}


.integrita-fit.medium {
    background:
        var(--surface-subtle);

    border-color:
        var(--border);
}

@media (max-width: 720px) {

    .diagnosis-shell {
        width:
            min(
                calc(100% - 24px),
                var(--content-width)
            );
        padding: 30px 0 52px;
    }

    .page-header {
        margin-bottom: 24px;
    }

    .page-header h1 {
        font-size: 27px;
    }

    .card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .dimension-list {
        grid-template-columns: 1fr;
    }

    .recommendation-item {
        grid-template-columns: 30px 1fr;
        gap: 10px;
    }

    .navigation {
        align-items: stretch;
    }

    .navigation button {
        flex: 1;
    }

    .overall-headline {
        font-size: 22px !important;
    }

    .primary-action-title {
        font-size: 23px !important;
    }
}

@media (max-width: 460px) {

    body {
        font-size: 14px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    #question-text {
        font-size: 20px;
    }

    .navigation {
        flex-direction: column-reverse;
    }

    .navigation button {
        width: 100%;
    }

    .result-status-row {
        align-items: flex-start;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .result-actions button {
        width: 100%;
    }
}

/* =========================================================
   Company Profile
   ========================================================= */

.profile-title {
    margin:
        0 0
        10px;

    color:
        var(--color-kuroai);

    font-size:
        24px;

    font-weight:
        700;

    line-height:
        1.5;
}


.profile-lead {
    margin:
        0 0
        26px;

    color:
        var(--text-muted);

    font-size:
        14px;

    line-height:
        1.9;
}


.profile-form {
    display:
        grid;

    gap:
        20px;
}


.form-field {
    display:
        grid;

    gap:
        7px;
}


.form-field label {
    color:
        var(--color-kuroai);

    font-size:
        13px;

    font-weight:
        700;
}


.required-mark {
    display:
        inline-block;

    margin-left:
        6px;

    color:
        var(--color-kinsusutake);

    font-size:
        10px;
}


.form-field input {
    width:
        100%;

    padding:
        13px
        14px;

    border:
        1px solid
        var(--border-strong);

    border-radius:
        var(--radius-md);

    outline:
        none;

    background:
        var(--surface-subtle);

    color:
        var(--text-main);

    transition:
        border-color
        0.15s
        ease,
        box-shadow
        0.15s
        ease;
}


.form-field input:focus {
    border-color:
        var(--color-aokachi);

    box-shadow:
        0 0 0
        3px
        rgba(34, 44, 85, 0.08);
}


.profile-actions {
    margin-top:
        28px;

    text-align:
        right;
}