/* static/css/financial_ratios.css
   経営指標の業種別平均と自社比較ツール専用の独自CSS(他ツールのCSSは読み込まない・共有しない)。 */

.breadcrumbs {
    margin: 1rem 0 1.25rem;
    font-size: .875rem;
    text-align: left;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: .375rem;
    color: #666;
}
.breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span[aria-current="page"] {
    color: #333;
    font-weight: 600;
}

.fr-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    box-sizing: border-box;
    background: #f6f8fb;
    font-family: 'M PLUS 1p', 'Sawarabi Gothic', sans-serif;
    line-height: 1.7;
    color: #1f2a44;
}
.fr-page h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 1.5rem 0 0.6rem;
    color: #111827;
}
.fr-page section {
    margin: 2rem 0 0;
}
.fr-page section > p {
    margin: 0 0 0.9rem;
    color: #4b5563;
}
.fr-page h2 {
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
    color: #222222;
}
.fr-lead {
    color: #4b5563;
    font-size: 1rem;
    margin: 0 0 1rem;
}

/* ===== ツール本体 ===== */
.fr-page .fr-tool-panel {
    margin: 1.25rem 0 1.75rem;
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
}

/* PC幅では関連する入力欄を横に並べてスペースを節約する。
   幅が足りない(スマホなど)場合は auto-fit により自然に1列へ戻る。 */
.fr-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0 1rem;
}
.fr-field {
    margin-bottom: 1rem;
}
.fr-field label,
.fr-field__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
}
.fr-input {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.9375rem;
    padding: 0.65rem 0.8rem;
    border: 0.0625rem solid #d6deeb;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1f2a44;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fr-input:focus {
    outline: none;
    border-color: #9eb8ef;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.fr-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #b42318;
    background: #fffafa;
    border: 0.0625rem solid #f1c0c0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9375rem;
    font-size: 0.875rem;
    margin: 0 0 1rem;
}
.fr-error::before {
    content: "⚠";
    flex: 0 0 auto;
}
.fr-error:empty {
    display: none;
}

.fr-hint {
    margin: 0 0 0.9rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.fr-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border: 0.0625rem solid #2f6ae6;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #2f6ae6;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.fr-copy-btn:hover {
    background: #eef4ff;
    transform: translateY(-0.0625rem);
}
.fr-copy-btn.is-copied {
    background: #2f6ae6;
    border-color: #2f6ae6;
    color: #fff;
}

/* ===== 表(article-table相当の見た目) ===== */
.fr-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 0.75rem 0 1rem;
    -webkit-overflow-scrolling: touch;
}
.fr-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.9375rem;
    background: #fff;
}
.fr-table th,
.fr-table td {
    border: 0.0625rem solid #cfcfcf;
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: middle;
    line-height: 1.6;
}
.fr-table thead th {
    background: #f2f2f2;
    font-weight: 700;
    white-space: nowrap;
}
.fr-table tbody th {
    background: #fafafa;
    font-weight: 700;
    white-space: nowrap;
}
.fr-table tr:nth-child(even) td {
    background: #fcfcfc;
}
.fr-table a {
    color: #2f6ae6;
}

/* 自社の値と業種平均の表 */
.fr-table--result {
    min-width: 30rem;
}
.fr-table--result td {
    text-align: right;
    white-space: nowrap;
}
.fr-table--result td.is-message {
    text-align: left;
    white-space: normal;
    font-size: 0.8125rem;
    color: #b42318;
}
.fr-table--result tbody th {
    white-space: normal;
}
.fr-table .fr-group-row th {
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 0.875rem;
}
.fr-row-link {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 400;
}

/* 業種別の一覧表 */
.fr-table--industry td {
    text-align: right;
    white-space: nowrap;
}
.fr-table--industry tbody th {
    white-space: normal;
    font-weight: 400;
}

.fr-field__note {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* ===== 関連コラムのカード ===== */
.fr-other-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}
.fr-other-tools__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: #222222;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fr-other-tools__card:hover,
.fr-other-tools__card:focus-visible {
    transform: translateY(-0.0938rem);
    box-shadow: 0 0.3125rem 1rem rgba(47, 106, 230, 0.16);
    outline: none;
}
.fr-other-tools__title {
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.fr-other-tools__more {
    margin-top: auto;
    padding-top: 0.5rem;
    color: #2f6ae6;
    font-size: 0.8125rem;
    font-weight: 700;
}

.fr-source {
    margin: 2rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}
.fr-source a {
    color: #2f6ae6;
}

@media (max-width: 36rem) {
    .fr-page h1 {
        font-size: 1.5rem;
    }
    .fr-page .fr-tool-panel {
        padding: 1rem 0.9rem 1.25rem;
        border-radius: 1rem;
    }
    .fr-table {
        font-size: 0.875rem;
    }
}
