/* ============================================
   AI残業代ラボ - style.css (v1.0)
   AI手取りラボのトークン・コンポーネントを流用。
   トークン定義 → 全体レイアウト → コンポーネント の順
   ============================================ */

   :root {
    /* Color */
    --color-bg: #F4F6F5;
    --color-surface: #FFFFFF;
    --color-surface-sunken: #EEF1F0;
    --color-text-primary: #14181A;
    --color-text-secondary: #5B6560;
    --color-text-muted: #8B948F;
    --color-border: #DDE3E0;
  
    --color-accent: #0F6E56;       /* ティール(信頼・落ち着き) */
    --color-accent-dark: #0A4E3D;
    --color-accent-bg: #E4F1EC;
  
    --color-indigo: #2B3A67;       /* 見出し等のアクセント差し色 */
  
    --color-error: #B3261E;
    --color-error-bg: #FBEAE9;
  
    /* Type */
    --font-sans: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, sans-serif;
    --font-num: "Roboto Mono", "SF Mono", "Hiragino Sans", monospace;
  
    /* Layout */
    --radius-card: 16px;
    --radius-control: 10px;
    --max-width: 480px;
  }
  
  * {
    box-sizing: border-box;
  }
  
  /* スクリーンリーダー専用(視覚的には非表示・SEO/アクセシビリティ用の見出しに使用) */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  html, body {
    margin: 0;
    padding: 0;
  }
  
  body {
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  
  /* ---------- Header ---------- */
  
  .header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
  }
  
  .header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .header__mark {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-indigo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
  }
  
  .header__brand {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
  }
  
  .header__title {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 500;
    color: var(--color-text-primary);
  }
  
  /* ---------- Main / layout ---------- */
  
  .main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px 20px;
  }
  
  .card__lead {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
  }
  
  .section-heading {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-primary);
    text-align: center;
  }
  
  .section-subheading {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
  }
  
  /* ---------- Form ---------- */
  
  .field {
    margin-bottom: 16px;
  }
  
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  label {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
  }
  
  input,
  select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 16px;
    font-family: var(--font-num);
    color: var(--color-text-primary);
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    appearance: none;
  }
  
  select {
    font-family: var(--font-sans);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%235B6560' stroke-width='1.5' fill='none' fill-rule='evenodd'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
  }
  
  input:focus,
  select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-bg);
  }
  
  .field-note {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
  }
  
  /* ---------- 残業単価ヘルプ導線 ---------- */
  
  .link-button {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-family: var(--font-sans);
    color: var(--color-accent);
    text-decoration: underline;
    cursor: pointer;
  }
  
  .link-note {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: var(--color-surface-sunken);
    border-radius: var(--radius-control);
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    text-align: center;
  }
  
  /* ---------- インラインエラー ---------- */
  
  .form-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-control);
    font-size: 13px;
    line-height: 1.6;
  }
  
  .field.field--invalid input,
  .field.field--invalid select {
    border-color: var(--color-error);
    background: var(--color-error-bg);
  }
  
  /* ---------- Buttons ---------- */
  
  .btn-primary {
    width: 100%;
    height: 50px;
    margin-top: 4px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-control);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
  }
  
  .btn-primary:active {
    background: var(--color-accent-dark);
  }
  
  .btn-secondary {
    width: 100%;
    height: 46px;
    margin-top: 20px;
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    font-size: 14px;
    font-family: var(--font-sans);
    cursor: pointer;
  }
  
  .btn-secondary:active {
    background: var(--color-surface-sunken);
  }
  
  /* ---------- Result ---------- */
  
  .result-headline {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
  }
  
  .result-headline__label {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-secondary);
  }
  
  .result-headline__value {
    margin: 6px 0 0;
    font-family: var(--font-num);
    font-size: 40px;
    font-weight: 500;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
  }
  
  .result-headline__value .unit {
    font-size: 16px;
    font-family: var(--font-sans);
    color: var(--color-text-secondary);
    margin-left: 4px;
  }
  
  .result-headline__sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
  }
  
  .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    background: var(--color-surface-sunken);
    border-radius: var(--radius-control);
    padding: 12px;
    text-align: center;
  }
  
  .stat-card__label {
    margin: 0;
    font-size: 11px;
    color: var(--color-text-muted);
  }
  
  .stat-card__value {
    margin: 4px 0 0;
    font-family: var(--font-num);
    font-size: 18px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
  
  .stat-card__value .unit-sm {
    font-size: 11px;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
    margin-left: 2px;
  }
  
  /* --- 概算手取りハイライト --- */
  
  .highlight-block {
    background: var(--color-accent-bg);
    border-radius: var(--radius-control);
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .highlight-block__label {
    margin: 0;
    font-size: 12px;
    color: var(--color-accent-dark);
  }
  
  .highlight-block__value {
    margin: 6px 0 0;
    font-family: var(--font-num);
    font-size: 28px;
    font-weight: 500;
    color: var(--color-accent-dark);
    font-variant-numeric: tabular-nums;
  }
  
  .highlight-block__value .unit-sm {
    font-size: 13px;
    font-family: var(--font-sans);
    color: var(--color-accent-dark);
    margin-left: 2px;
  }
  
  .highlight-block__sub {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--color-accent-dark);
    opacity: 0.8;
  }
  
  /* ---------- AI社員コメント ---------- */
  
  .ai-comment {
    background: var(--color-accent-bg);
    border-radius: var(--radius-control);
    padding: 12px 14px;
    margin-top: 4px;
  }
  
  .ai-comment__label {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-accent-dark);
  }
  
  .ai-comment__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-accent-dark);
  }
  
  .disclaimer {
    margin: 16px 0 0;
    font-size: 11px;
    line-height: 1.6;
    color: var(--color-text-muted);
    text-align: center;
  }
  
  /* ---------- Footer ---------- */
  
  .footer {
    padding: 20px;
    text-align: center;
    font-size: 11px;
    color: var(--color-text-muted);
  }
  
  /* ---------- 広告プレースホルダー ----------
     広告読み込み前後でレイアウトが崩れないよう、最小限のスタイルに留める。
     実際の広告タグは別途組み込む想定(本ファイルには含まない)。
  ------------------------------------------------- */
  .ad-slot {
    min-height: 1px;
  }
  
  .ad-slot--top {
    margin-bottom: 4px;
  }
  
  .ad-slot--bottom {
    margin: 8px 0 0;
  }
  
  /* ---------- FAQ(既存・結果表示後) ---------- */
  
  .faq {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    margin-top: 4px;
  }
  
  .faq__item {
    margin-bottom: 14px;
  }
  
  .faq__item:last-child {
    margin-bottom: 0;
  }
  
  .faq__question {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
  }
  
  .faq__answer {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-secondary);
  }
  
  /* ============================================
     ここから追加(Mission009: v1.1情報拡充)
     ============================================ */
  
  /* ---------- 情報セクション共通(このツールで分かること/計算の前提) ---------- */
  
  .card--info {
    text-align: left;
  }
  
  .card--info .section-heading {
    text-align: left;
    margin-bottom: 14px;
  }
  
  .info-block {
    margin-bottom: 16px;
  }
  
  .info-block:last-child {
    margin-bottom: 0;
  }
  
  .info-block__heading {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
  }
  
  .info-block__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text-secondary);
  }
  
  .assumptions-list {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
  }
  
  .assumptions-list__item {
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
  }
  
  .assumptions-list__item:last-child {
    margin-bottom: 0;
  }
  
  .assumptions-list__item strong {
    color: var(--color-text-primary);
    font-weight: 600;
  }
  
  /* ---------- FAQ(v1.1追加分・アコーディオン) ---------- */
  
  .card--faq .section-heading {
    text-align: left;
    margin-bottom: 14px;
  }
  
  .faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    overflow: hidden;
    background: var(--color-surface-sunken);
  }
  
  .faq-item__q {
    margin: 0;
  }
  
  .faq-item__button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    text-align: left;
    cursor: pointer;
  }
  
  .faq-item__button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
  }
  
  .faq-item__icon {
    flex-shrink: 0;
    position: relative;
    width: 16px;
    height: 16px;
  }
  
  .faq-item__icon::before,
  .faq-item__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--color-accent);
    transform: translate(-50%, -50%);
  }
  
  .faq-item__icon::before {
    width: 12px;
    height: 2px;
  }
  
  .faq-item__icon::after {
    width: 2px;
    height: 12px;
    transition: transform 0.2s ease;
  }
  
  .faq-item__button[aria-expanded="true"] .faq-item__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }
  
  .faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  
  .faq-item__answer p {
    margin: 0;
    padding: 0 14px 14px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text-secondary);
  }
  
  .faq-item__answer.is-open {
    max-height: 400px;
  }
  
  @media (prefers-reduced-motion: reduce) {
    .faq-item__answer {
      transition: none;
    }
    .faq-item__icon::after {
      transition: none;
    }
  }
  
  /* ---------- 関連ツール ---------- */
  
  .card--related .section-heading {
    text-align: left;
    margin-bottom: 14px;
  }
  
  .related-tool-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .related-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    padding: 14px;
    color: inherit;
    text-decoration: none;
  }
  
  .related-tool-card__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--color-indigo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
  }
  
  .related-tool-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  
  .related-tool-card__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
  }
  
  .related-tool-card__desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 2px;
  }
  
  .related-tool-card__cta {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-accent);
    white-space: nowrap;
  }