/* ============================================================
   フリーランス報酬シミュレーター（Claude Code版）
   Color: Blue #1e40af accent / #f8fafc background
   ============================================================ */

/* --- Frame & Globals --- */
.ffs-frame {
    --ffs-accent: #1e40af;
    --ffs-accent-hover: #1e3a8a;
    --ffs-accent-light: #dbeafe;
    --ffs-accent-muted: #93c5fd;
    --ffs-text: #0f172a;
    --ffs-text-muted: #64748b;
    --ffs-bg: #f8fafc;
    --ffs-card-bg: #ffffff;
    --ffs-border: #e2e8f0;
    --ffs-radius: 10px;
    --ffs-shell-width: 1120px;
    --ffs-success: #15803d;

    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: var(--ffs-text);
    background: var(--ffs-bg);
    line-height: 1.7;
}

.artifact-body--freelance-fee-simulator-claude-code {
    --artifact-header-accent: #1e40af;
    --artifact-header-muted: #64748b;
    --artifact-header-border: #d1d5db;
    --artifact-header-surface: #f8fafc;
}

.ffs-shell {
    max-width: var(--ffs-shell-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.ffs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--ffs-radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    line-height: 1.4;
}

.ffs-btn--primary {
    background: var(--ffs-accent);
    color: #fff;
    border-color: var(--ffs-accent);
}

.ffs-btn--primary:hover {
    background: var(--ffs-accent-hover);
    border-color: var(--ffs-accent-hover);
}

.ffs-btn--outline {
    background: transparent;
    color: var(--ffs-accent);
    border-color: var(--ffs-accent);
}

.ffs-btn--outline:hover {
    background: var(--ffs-accent-light);
}

.ffs-btn--sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.ffs-btn--lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* --- Labels --- */
.ffs-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ffs-accent);
    letter-spacing: 0.04em;
}

.ffs-label--light {
    color: var(--ffs-accent-muted);
}

/* --- Hero --- */
.ffs-hero {
    padding: 56px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, #eff6ff 0%, var(--ffs-bg) 100%);
}

.ffs-hero__badge {
    display: inline-block;
    padding: 6px 18px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ffs-accent);
    background: var(--ffs-accent-light);
    border-radius: 999px;
}

.ffs-hero__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 16px;
}

.ffs-hero__lead {
    font-size: 1rem;
    color: var(--ffs-text-muted);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.75;
}

.ffs-hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ffs-hero__points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    max-width: 840px;
    margin: 0 auto;
    text-align: left;
}

.ffs-hero__point {
    background: var(--ffs-card-bg);
    border: 1px solid var(--ffs-border);
    border-radius: var(--ffs-radius);
    padding: 16px 20px;
}

.ffs-hero__point strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.ffs-hero__point span {
    font-size: 0.82rem;
    color: var(--ffs-text-muted);
}

/* --- Section --- */
.ffs-section {
    padding: 56px 0;
}

.ffs-section--alt {
    background: #f1f5f9;
}

.ffs-section--dark {
    background: #0f172a;
    color: #e2e8f0;
}

.ffs-section--cta {
    background: linear-gradient(180deg, var(--ffs-bg) 0%, #eff6ff 100%);
}

.ffs-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.ffs-section-header h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    margin: 8px 0 12px;
    line-height: 1.4;
}

.ffs-section-header p {
    font-size: 0.95rem;
    color: var(--ffs-text-muted);
    max-width: 640px;
    margin: 0 auto;
}

.ffs-section-header--light h2 {
    color: #fff;
}

.ffs-section-header--light p {
    color: #94a3b8;
}

/* --- Tool Layout (2-col) --- */
.ffs-tool-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.ffs-tool-layout__result {
    position: sticky;
    top: 80px;
}

/* --- Fieldset --- */
.ffs-fieldset {
    border: 1px solid var(--ffs-border);
    border-radius: var(--ffs-radius);
    background: var(--ffs-card-bg);
    padding: 24px;
    margin: 0 0 20px;
}

.ffs-fieldset__legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ffs-accent);
    padding: 0 8px;
}

.ffs-fieldset__icon {
    font-size: 1.1rem;
}

/* --- Form Fields --- */
.ffs-field {
    display: block;
    margin-bottom: 16px;
}

.ffs-field:last-child {
    margin-bottom: 0;
}

.ffs-field__label,
.ffs-field > span:first-child {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ffs-text);
    margin-bottom: 6px;
}

.ffs-field__input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ffs-field__input-wrap input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--ffs-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-weight: 600;
    color: var(--ffs-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    text-align: right;
    min-width: 0;
}

.ffs-field__input-wrap input:focus {
    outline: none;
    border-color: var(--ffs-accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.ffs-field__suffix {
    font-size: 0.85rem;
    color: var(--ffs-text-muted);
    font-weight: 600;
    white-space: nowrap;
    min-width: 36px;
}

.ffs-field__note {
    font-size: 0.78rem;
    color: var(--ffs-text-muted);
    margin: 8px 0 0;
}

.ffs-field--compact {
    margin-bottom: 10px;
}

.ffs-field--compact > span:first-child {
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.ffs-field--compact .ffs-field__input-wrap input {
    padding: 8px 10px;
    font-size: 0.9rem;
}

/* --- Result Panel --- */
.ffs-result-panel {
    border: 2px solid var(--ffs-accent);
    border-radius: var(--ffs-radius);
    background: var(--ffs-card-bg);
    overflow: hidden;
}

.ffs-result-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ffs-border);
    background: #f8fafc;
}

.ffs-result-panel__header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 4px 0 0;
}

.ffs-result-panel__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--ffs-border);
    margin: 0;
}

/* --- Result Card --- */
.ffs-result-card {
    background: var(--ffs-card-bg);
    padding: 16px 20px;
    text-align: center;
}

.ffs-result-card__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ffs-text-muted);
    margin-bottom: 4px;
}

.ffs-result-card__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    color: var(--ffs-accent);
    line-height: 1.2;
    margin-bottom: 2px;
}

.ffs-result-card__unit {
    display: block;
    font-size: 0.72rem;
    color: var(--ffs-text-muted);
}

/* --- Detail Table --- */
.ffs-result-panel__detail {
    padding: 16px 20px;
}

.ffs-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ffs-detail-table th,
.ffs-detail-table td {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ffs-detail-table th {
    font-weight: 600;
    color: var(--ffs-text-muted);
    text-align: left;
}

.ffs-detail-table td {
    text-align: right;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-weight: 600;
}

.ffs-detail-table__total th,
.ffs-detail-table__total td {
    border-bottom: none;
    padding-top: 10px;
    font-size: 0.95rem;
    color: var(--ffs-accent);
    font-weight: 800;
}

.ffs-result-panel__footer {
    padding: 10px 20px;
    border-top: 1px solid var(--ffs-border);
    background: #f8fafc;
}

.ffs-result-panel__footer p {
    font-size: 0.75rem;
    color: var(--ffs-text-muted);
    margin: 0;
}

/* --- Compare Section --- */
.ffs-compare__inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ffs-compare-col {
    background: var(--ffs-card-bg);
    border: 1px solid var(--ffs-border);
    border-radius: var(--ffs-radius);
    padding: 16px;
}

.ffs-compare-col__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ffs-accent);
    margin: 0 0 12px;
    text-align: center;
}

.ffs-compare__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ffs-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ffs-card-bg);
    border-radius: var(--ffs-radius);
    overflow: hidden;
    border: 1px solid var(--ffs-border);
    min-width: 480px;
}

.ffs-compare-table th,
.ffs-compare-table td {
    padding: 12px 16px;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--ffs-border);
}

.ffs-compare-table thead th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--ffs-text);
    font-size: 0.85rem;
}

.ffs-compare-table tbody td:first-child {
    font-weight: 600;
    color: var(--ffs-text-muted);
    text-align: left;
}

.ffs-compare-table tbody td {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-weight: 600;
}

.ffs-compare-table__best {
    background: #eff6ff;
    color: var(--ffs-accent) !important;
    font-weight: 800 !important;
    position: relative;
}

/* --- Insight Cards --- */
.ffs-insight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.ffs-insight-card {
    display: flex;
    gap: 16px;
    background: var(--ffs-card-bg);
    border: 1px solid var(--ffs-border);
    border-radius: var(--ffs-radius);
    padding: 20px;
}

.ffs-insight-card__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ffs-accent-light);
    border-radius: 8px;
}

.ffs-insight-card__body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.ffs-insight-card__body p {
    font-size: 0.85rem;
    color: var(--ffs-text-muted);
    margin: 0;
    line-height: 1.7;
}

/* --- Steps --- */
.ffs-steps {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ffs-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ffs-step__number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ffs-accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
}

.ffs-step__body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.ffs-step__body p {
    font-size: 0.9rem;
    color: var(--ffs-text-muted);
    margin: 0;
    line-height: 1.7;
}

/* --- FAQ --- */
.ffs-faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ffs-faq {
    background: #1e293b;
    border-radius: var(--ffs-radius);
    overflow: hidden;
}

.ffs-faq summary {
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ffs-faq summary::-webkit-details-marker {
    display: none;
}

.ffs-faq summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ffs-accent-muted);
    border: 1px solid #475569;
    border-radius: 6px;
    flex-shrink: 0;
    vertical-align: middle;
}

.ffs-faq[open] summary::before {
    content: '−';
}

.ffs-faq summary h3 {
    display: inline;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.ffs-faq p {
    padding: 0 20px 16px 56px;
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.7;
}

/* --- CTA --- */
.ffs-cta {
    text-align: center;
    padding: 20px 0;
}

.ffs-cta h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    margin: 8px 0 14px;
    line-height: 1.4;
}

.ffs-cta p {
    font-size: 0.95rem;
    color: var(--ffs-text-muted);
    max-width: 580px;
    margin: 0 auto 28px;
}

.ffs-cta__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Footer --- */
.ffs-footer {
    background: #0f172a;
    padding: 32px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.ffs-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ffs-footer__inner p {
    margin: 0;
}

.ffs-footer__links {
    display: flex;
    gap: 20px;
}

.ffs-footer__links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
}

.ffs-footer__links a:hover {
    color: #f1f5f9;
}

/* --- Print --- */
@media print {
    .ffs-hero,
    .ffs-section--alt,
    .ffs-section--dark,
    .ffs-section--cta,
    .ffs-footer,
    .ffs-tool-layout__form,
    .ffs-result-panel__header,
    .ffs-result-panel__footer,
    [data-ffs-copy],
    [data-ffs-compare] {
        display: none !important;
    }

    .ffs-frame {
        background: #fff;
    }

    .ffs-tool-layout {
        display: block;
    }

    .ffs-tool-layout__result {
        position: static;
    }

    .ffs-result-panel {
        border: 1px solid #ccc;
    }

    .ffs-section {
        padding: 0;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ffs-tool-layout {
        grid-template-columns: 1fr;
    }

    .ffs-tool-layout__result {
        position: static;
    }

    .ffs-hero {
        padding: 40px 0 36px;
    }

    .ffs-hero__points {
        grid-template-columns: 1fr;
    }

    .ffs-section {
        padding: 40px 0;
    }

    .ffs-result-panel__grid {
        grid-template-columns: 1fr;
    }

    .ffs-result-card__value {
        font-size: 1.3rem;
    }

    .ffs-compare__inputs {
        grid-template-columns: 1fr;
    }

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

    .ffs-fieldset {
        padding: 18px 16px;
    }

    .ffs-footer__inner {
        flex-direction: column;
        text-align: center;
    }
}
