/*
Theme Name: Blocksy Child (Texas MA)
Theme URI: https://texas-ma.com/
Description: Child theme of Blocksy. Elegant palette drawn from the original Dallas-skyline hero — hazy blue-grey body with deep navy and champagne gold accents.
Author: texas-ma renewal
Template: blocksy
Version: 0.2.0
*/

/* ========== Design tokens ========== */
:root {
    --tma-deep-navy:    #0a2540;   /* ヘッダー・濃いCTA */
    --tma-smoke-blue:   #1e466e;   /* 主要アクセント */
    --tma-hazy-blue:    #a8c0d0;   /* 元画像の支配色 */
    --tma-mist:         #f0f2f4;   /* セクション地 */
    --tma-warm-white:   #fafaf7;   /* メイン背景 */
    --tma-gold:         #c9a96e;   /* エレガントアクセント */
    --tma-gold-soft:    #e5d3b3;   /* gold hover/border */
    --tma-ink:          #1a2332;   /* 本文 */
    --tma-muted:        #5a6478;   /* セカンダリ文字 */
    --tma-border:       #e2e6ec;   /* 罫線 */

    --tma-serif-ja: "Noto Serif JP", "Noto Serif JP fallback", "游明朝", "Yu Mincho", serif;
    --tma-serif-en: "Playfair Display", "Playfair Display fallback", Georgia, serif;
    --tma-sans-ja:  "Noto Sans JP", "Noto Sans JP fallback", "Hiragino Kaku Gothic ProN", sans-serif;
    --tma-sans-en:  Inter, "Inter fallback", -apple-system, BlinkMacSystemFont, sans-serif;

    --tma-radius-sm: 4px;
    --tma-radius:    8px;
    --tma-radius-lg: 14px;

    --tma-shadow-1: 0 1px 2px rgba(10, 37, 64, 0.05);
    --tma-shadow-2: 0 8px 28px rgba(10, 37, 64, 0.08);
}

/* ========== Metric-adjusted fallback fonts (FOUT / CLS 対策) ==========
   Web フォント読込前に表示されるシステムフォントへ、各 Web フォントの
   実測縦メトリクスを override で焼き込み、swap 時の行ボックス高変化＝
   レイアウトシフトを消す（next/font・fontaine と同じ手法）。
   CJK は全角字が 1em で字幅が動かないため size-adjust は 100% 固定にし
   （縮めると和文見出しが reflow して逆効果）、ascent/descent/line-gap
   だけを Web フォント側に揃える。値は woff2 の hhea/OS-2 実測から算出
   （Serif JP 1151/286・Sans JP 1160/288・Playfair 1082/251・Inter
   1984/494, upm は CJK=1000 / Latin=2048）。PSI モバイルは Android
   実機相当なので、Win/Mac の游明朝・ヒラギノに加え Android の Noto CJK
   も local() で拾えるよう横断指定する。 */
@font-face {
    font-family: "Noto Serif JP fallback";
    src: local("Yu Mincho"), local("YuMincho"), local("Hiragino Mincho ProN"),
         local("Hiragino Mincho Pro"), local("Noto Serif CJK JP"), local("MS PMincho");
    ascent-override: 115.1%;
    descent-override: 28.6%;
    line-gap-override: 0%;
    size-adjust: 100%;
}
@font-face {
    font-family: "Noto Sans JP fallback";
    src: local("Yu Gothic Medium"), local("Yu Gothic"), local("YuGothic"),
         local("Hiragino Sans"), local("Hiragino Kaku Gothic ProN"),
         local("Noto Sans CJK JP"), local("Meiryo");
    ascent-override: 116%;
    descent-override: 28.8%;
    line-gap-override: 0%;
    size-adjust: 100%;
}
@font-face {
    font-family: "Playfair Display fallback";
    src: local("Georgia"), local("Times New Roman"), local("Times");
    ascent-override: 108.2%;
    descent-override: 25.1%;
    line-gap-override: 0%;
    size-adjust: 100%;
}
@font-face {
    font-family: "Inter fallback";
    src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
    ascent-override: 96.88%;
    descent-override: 24.12%;
    line-gap-override: 0%;
    size-adjust: 100%;
}

/* ========== Base typography ========== */
body {
    font-family: var(--tma-sans-ja), var(--tma-sans-en);
    color: var(--tma-ink);
    background: var(--tma-warm-white);
    letter-spacing: 0.01em;
    line-height: 1.8;
}

h1, h2, h3, .tma-serif {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    color: var(--tma-deep-navy);
    letter-spacing: 0.02em;
    font-weight: 600;
}
/* Blocksy 本体 CSS は `body, h1..h6, label, ... { font-family: var(--theme-font-family) }`
   で見出しをテーマ既定（システムゴシック）に上書きする。上の子テーマ規則とは同詳細度
   （要素1個＝0,0,1）でソース順は Blocksy が後＝後負けし、設計の核である明朝見出しが
   効かずゴシックで描画されていた。`body` プレフィクスで詳細度を 0,0,2 に一段上げて勝つ。
   クラス指定で意図的にゴシックにしている例外（例: `.tma-archive-layout__filters h2`＝0,1,1）
   は 0,0,2 に勝つので不変。font-family だけを上書きし、色/字間/ウェイトは上の規則に委ねる。 */
body h1, body h2, body h3, body .tma-serif {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
}

/* ========== Buttons (.tma-cta = primary, ghost variant for outline) ========== */
.tma-cta {
    display: inline-block;
    background: var(--tma-deep-navy);
    color: var(--tma-warm-white);
    padding: 14px 32px;
    border: 1px solid var(--tma-deep-navy);
    border-radius: var(--tma-radius-sm);
    font-family: var(--tma-sans-ja), var(--tma-sans-en);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tma-cta:hover {
    background: var(--tma-smoke-blue);
    border-color: var(--tma-gold);
    color: var(--tma-warm-white);
    transform: translateY(-1px);
    box-shadow: var(--tma-shadow-2);
}
.tma-cta--ghost {
    background: transparent;
    color: var(--tma-warm-white);
    border-color: rgba(255,255,255,0.6);
}
.tma-cta--ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--tma-gold);
}
.tma-cta--gold {
    background: var(--tma-gold);
    color: var(--tma-deep-navy);
    border-color: var(--tma-gold);
}
.tma-cta--gold:hover {
    background: var(--tma-gold-soft);
    color: var(--tma-deep-navy);
    border-color: var(--tma-gold);
}

/* ========== Case archive: card grid ========== */
.tma-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin: 28px 0 56px;
}

.tma-case-card {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.tma-case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tma-shadow-2);
    border-color: var(--tma-gold-soft);
}

.tma-case-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--tma-mist);
    overflow: hidden;
    display: block;
}

.tma-case-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.tma-case-card:hover .tma-case-card__media img { transform: scale(1.03); }

.tma-case-card__body {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.tma-case-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tma-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--tma-radius-sm);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.4;
    border: 1px solid;
}

.tma-badge--industry { color: var(--tma-smoke-blue); border-color: var(--tma-hazy-blue); background: rgba(168, 192, 208, 0.12); }
.tma-badge--city     { color: var(--tma-gold);       border-color: var(--tma-gold-soft); background: rgba(201, 169, 110, 0.08); }

.tma-case-card__title {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.65;
    color: var(--tma-deep-navy);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tma-case-card__title a {
    color: inherit;
    text-decoration: none;
}
.tma-case-card__title a:hover { color: var(--tma-smoke-blue); }

.tma-case-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--tma-border);
    font-size: 12px;
    color: var(--tma-muted);
    letter-spacing: 0.05em;
}

.tma-case-card__price-row strong {
    color: var(--tma-deep-navy);
    font-family: var(--tma-serif-en);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
}

/* ========== Archive header ========== */
.tma-archive-header {
    background: linear-gradient(135deg, var(--tma-deep-navy) 0%, var(--tma-smoke-blue) 100%);
    color: #fff;
    padding: 80px 32px;
    margin-bottom: 40px;
    border-radius: var(--tma-radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tma-archive-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 30% 20%, rgba(201, 169, 110, 0.12), transparent 50%);
    pointer-events: none;
}

.tma-archive-header h1 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 34px;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
}

.tma-archive-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
    letter-spacing: 0.06em;
}

/* ========== Single case ========== */
.tma-single-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    margin: 24px 0 40px;
    padding: 0;
    background: var(--tma-mist);
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    overflow: hidden;
}

.tma-single-meta__item {
    padding: 20px 24px;
    border-right: 1px solid var(--tma-border);
}
.tma-single-meta__item:last-child { border-right: 0; }

.tma-single-meta__item .label {
    display: block;
    font-size: 11px;
    color: var(--tma-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tma-single-meta__item .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--tma-deep-navy);
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
}

/* ========== Archive layout ========== */
.tma-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

.tma-archive-layout__filters {
    position: sticky;
    /* sticky ヘッダー実高 141px を避けて停止させる（+16px の余白）。
       100px だとフィルタ上端がヘッダー裏に潜り込んで重なる。 */
    top: 157px;
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 26px;
}

.tma-archive-layout__filters h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--tma-muted);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tma-border);
    font-family: var(--tma-sans-ja);
    font-weight: 500;
}

@media (max-width: 900px) {
    .tma-archive-layout { grid-template-columns: 1fr; }
    .tma-archive-layout__filters { position: static; }
}

/* ========== Filter form widgets ========== */
.tma-filter-label {
    display: block;
    font-size: 11px;
    color: var(--tma-muted);
    margin: 16px 0 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tma-filter-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius-sm);
    background: #fff;
    color: var(--tma-ink);
    font-family: inherit;
    transition: border-color 0.15s ease;
}
.tma-filter-select:focus {
    outline: none;
    border-color: var(--tma-smoke-blue);
}

.tma-filter-submit {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: var(--tma-deep-navy);
    color: var(--tma-warm-white);
    border: 1px solid var(--tma-deep-navy);
    border-radius: var(--tma-radius-sm);
    font-family: var(--tma-sans-ja), var(--tma-sans-en);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: all 0.2s ease;
}
.tma-filter-submit:hover {
    background: var(--tma-smoke-blue);
    border-color: var(--tma-gold);
    color: var(--tma-warm-white);
    transform: translateY(-1px);
    box-shadow: var(--tma-shadow-2);
}

.tma-filter-clear {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--tma-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
}
.tma-filter-clear:hover { color: var(--tma-deep-navy); }

/* JS 有効時は変更即反映なので submit ボタンは冗長 → 隠す（非JSでは残す）。
   Blocksy のボタン規則が display を持つので、クラス2段で確実に上書きする。
   ボタンが消えた分の余白はクリアリンク側で補う。 */
.tma-filter--js .tma-filter-submit { display: none; }
.tma-filter--js .tma-filter-clear { margin-top: 22px; }

.tma-archive-count {
    font-size: 13px;
    color: var(--tma-muted);
    margin: 0 0 20px;
    letter-spacing: 0.04em;
}

/* AJAX 絞り込み中の控えめなフェード。スピナーは使わず、トーンに合わせて
   薄くするだけ。クリックを一時的に無効化して二重操作を防ぐ。 */
#tma-case-results {
    transition: opacity 0.2s ease;
}
#tma-case-results.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ========== Front page: Hero ========== */
.tma-hero {
    position: relative;
    min-height: 560px;
    border-radius: var(--tma-radius);
    overflow: hidden;
    margin: 0 0 80px;
    background: var(--tma-deep-navy);
    color: #fff;
    display: flex;
    align-items: center;
}
.tma-hero__bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.45) saturate(0.85);
}
.tma-hero::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.5) 0%, rgba(30, 70, 110, 0.25) 100%);
    pointer-events: none;
}
.tma-hero__inner {
    position: relative;
    z-index: 1;
    padding: 80px 56px;
    max-width: 720px;
}
.tma-hero__eyebrow {
    display: inline-block;
    /* ロゴと同じ要領でちらつきを消す。"Playfair Logo"(functions.php・font-display:optional
       ＋同一 latin サブセットを preload 済み)を先頭にし、swap 版 "Playfair Display" を連鎖から
       外す。セクションのエイブロウ(.tma-section__eyebrow)は対象外＝従来どおり。 */
    font-family: "Playfair Logo", "Playfair Display fallback", Georgia, serif;
    color: var(--tma-gold);
    letter-spacing: 0.24em;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tma-gold);
}
.tma-hero h1 {
    color: #fff;
    font-size: 44px;
    line-height: 1.4;
    margin: 0 0 24px;
    font-weight: 500;
}
.tma-hero p {
    font-size: 16px;
    line-height: 1.95;
    margin: 0 0 36px;
    opacity: 0.92;
    max-width: 540px;
}
.tma-hero__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ========== Front page: sections ========== */
.tma-section {
    margin: 0 0 100px;
}
.tma-section__eyebrow {
    display: block;
    text-align: center;
    font-family: var(--tma-serif-en);
    color: var(--tma-gold);
    letter-spacing: 0.24em;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.tma-section__title {
    font-size: 32px;
    text-align: center;
    margin: 0 0 12px;
    color: var(--tma-deep-navy);
}
.tma-section__lead {
    text-align: center;
    color: var(--tma-muted);
    margin: 0 auto 48px;
    max-width: 580px;
    font-size: 15px;
    line-height: 1.9;
}

.tma-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.tma-feature {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 36px 30px;
    text-align: center;
    transition: all 0.25s ease;
}
.tma-feature:hover {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-2);
    transform: translateY(-2px);
}
.tma-feature__num {
    display: inline-block;
    font-family: var(--tma-serif-en);
    font-size: 18px;
    color: var(--tma-gold);
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--tma-gold);
    padding-bottom: 4px;
    margin-bottom: 18px;
}
.tma-feature h3 {
    font-size: 19px;
    margin: 0 0 14px;
    color: var(--tma-deep-navy);
}
.tma-feature p {
    margin: 0;
    color: var(--tma-muted);
    line-height: 1.9;
    font-size: 14px;
}

/* ========== CTA band ========== */
.tma-cta-band {
    background: var(--tma-deep-navy);
    color: #fff;
    text-align: center;
    padding: 80px 32px;
    border-radius: var(--tma-radius);
    position: relative;
    overflow: hidden;
}
.tma-cta-band__bg-wrap {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: saturate(0.6);
    z-index: 0;
}
.tma-cta-band > *:not(.tma-cta-band__bg-wrap) { position: relative; z-index: 1; }

.tma-cta-band__eyebrow {
    display: block;
    font-family: var(--tma-serif-en);
    color: var(--tma-gold);
    letter-spacing: 0.24em;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.tma-cta-band h2 {
    color: #fff;
    font-size: 28px;
    margin: 0 0 14px;
    font-weight: 500;
}
.tma-cta-band p {
    margin: 0 auto 28px;
    max-width: 480px;
    opacity: 0.85;
    line-height: 1.9;
    font-size: 15px;
}

/* ========== Misc ========== */
.entry-content p { line-height: 2; }

/* Style WP's pagination to match */
.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    color: var(--tma-muted);
    text-decoration: none;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius-sm);
    font-size: 14px;
}
.page-numbers.current {
    background: var(--tma-deep-navy);
    color: #fff;
    border-color: var(--tma-deep-navy);
}
.page-numbers:hover:not(.current) {
    border-color: var(--tma-gold-soft);
    color: var(--tma-deep-navy);
}

@media (max-width: 768px) {
    .tma-hero { min-height: 460px; }
    .tma-hero__inner { padding: 56px 28px; }
    .tma-hero h1 { font-size: 30px; }
    .tma-section { margin-bottom: 64px; }
    .tma-section__title { font-size: 26px; }
}

/* ========== Footer (overrides Blocksy default) ========== */
.tma-footer {
    background: var(--tma-deep-navy);
    color: rgba(255,255,255,0.78);
    margin-top: 100px;
    font-size: 14px;
    line-height: 1.9;
}

.tma-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 32px 56px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 56px;
}

.tma-footer__col h4 {
    color: #fff;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.4);
}

.tma-footer__brand {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 20px;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: 0.04em;
}

.tma-footer__tagline {
    margin: 0;
    font-size: 13px;
    line-height: 1.95;
    color: rgba(255,255,255,0.65);
}

.tma-footer__menu,
.tma-footer__social {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tma-footer__menu li,
.tma-footer__social li {
    margin-bottom: 8px;
}

.tma-footer__menu a,
.tma-footer__social a,
.tma-footer__address a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    transition: color 0.15s ease;
}

.tma-footer__menu a:hover,
.tma-footer__social a:hover,
.tma-footer__address a:hover {
    color: var(--tma-gold);
}

.tma-footer__address {
    margin: 0;
    font-size: 13px;
    line-height: 1.95;
}

.tma-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 22px 32px;
    text-align: center;
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    letter-spacing: 0.06em;
}

@media (max-width: 880px) {
    .tma-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding-top: 56px;
    }
}
@media (max-width: 520px) {
    .tma-footer__inner { grid-template-columns: 1fr; }
}

/* ========== CF7 form styling ========== */
.tma-form label {
    display: block;
    margin: 18px 0;
    font-size: 13px;
    color: var(--tma-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}
.tma-form .required { color: var(--tma-gold); margin-left: 4px; }

.tma-form input[type="text"],
.tma-form input[type="email"],
.tma-form input[type="tel"],
.tma-form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--tma-ink);
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius-sm);
    transition: border-color 0.15s ease;
}
.tma-form input:focus,
.tma-form textarea:focus {
    outline: none;
    border-color: var(--tma-smoke-blue);
}

.tma-form__submit {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
.tma-form .wpcf7-submit {
    background: var(--tma-deep-navy);
    color: #fff;
    border: 1px solid var(--tma-deep-navy);
    padding: 14px 40px;
    border-radius: var(--tma-radius-sm);
    font-size: 15px;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tma-form .wpcf7-submit:hover {
    background: var(--tma-smoke-blue);
    border-color: var(--tma-gold);
}

.tma-form .wpcf7-not-valid-tip { color: #b91c1c; font-size: 12px; }

/* ========== Generic page polish (about-us, our-team, qa, service, contact) ========== */
.entry-content,
.ct-container article {
    line-height: 2;
}

.entry-content h2,
.ct-container article h2 {
    margin: 56px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tma-border);
    color: var(--tma-deep-navy);
    font-size: 26px;
}

.entry-content h3,
.ct-container article h3 {
    margin: 36px 0 14px;
    color: var(--tma-smoke-blue);
    font-size: 19px;
}

.entry-content img,
.ct-container article img {
    border-radius: var(--tma-radius-sm);
}

.entry-content ol,
.ct-container article ol {
    padding-left: 1.4em;
}

.entry-content ol li,
.ct-container article ol li {
    margin-bottom: 10px;
}

/* details accordion (Q&A) */
.wp-block-details {
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 16px 24px;
    margin-bottom: 14px;
    background: #fff;
    transition: border-color 0.15s ease;
}
.wp-block-details[open] {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-1);
}
.wp-block-details > summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-weight: 500;
    color: var(--tma-deep-navy);
    padding: 8px 0;
    font-size: 16px;
}
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after {
    content: "+";
    float: right;
    color: var(--tma-gold);
    font-family: var(--tma-serif-en);
    font-size: 22px;
    line-height: 1;
}
.wp-block-details[open] > summary::after { content: "−"; }
.wp-block-details p { margin: 12px 0 8px; color: var(--tma-ink); }

/* ========== Service page: card grid ========== */
.tma-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.tma-service-card {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 36px 32px 32px;
    position: relative;
    transition: all 0.25s ease;
    overflow: hidden;
}

.tma-service-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--tma-gold) 0%, var(--tma-gold-soft) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tma-service-card:hover {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-2);
    transform: translateY(-3px);
}
.tma-service-card:hover::before { transform: scaleX(1); }

.tma-service-card__num {
    display: inline-block;
    font-family: var(--tma-serif-en);
    font-size: 14px;
    color: var(--tma-gold);
    letter-spacing: 0.16em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--tma-gold);
    margin-bottom: 18px;
}

.tma-service-card__title {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 19px;
    line-height: 1.6;
    color: var(--tma-deep-navy);
    margin: 0 0 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tma-service-card__body {
    margin: 0;
    color: var(--tma-muted);
    line-height: 1.95;
    font-size: 14px;
}

/* ========== Service page: M&A flow timeline ========== */
.tma-flow {
    list-style: none;
    margin: 0;
    padding: 0 0 0 12px;
    position: relative;
    counter-reset: tma-flow;
}

.tma-flow::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 28px;
    width: 1px;
    background: linear-gradient(to bottom, var(--tma-gold-soft) 0%, var(--tma-border) 100%);
}

.tma-flow__step {
    position: relative;
    padding: 0 0 32px 76px;
    min-height: 64px;
}

.tma-flow__step:last-child {
    padding-bottom: 0;
}

.tma-flow__num {
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--tma-gold);
    border-radius: 50%;
    color: var(--tma-deep-navy);
    font-family: var(--tma-serif-en);
    font-size: 16px;
    letter-spacing: 0.06em;
    font-weight: 600;
    z-index: 1;
    transition: all 0.2s ease;
}

.tma-flow__step:hover .tma-flow__num {
    background: var(--tma-deep-navy);
    color: var(--tma-gold);
}

.tma-flow__body {
    padding-top: 8px;
}

.tma-flow__title {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 18px;
    color: var(--tma-deep-navy);
    margin: 0 0 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tma-flow__copy {
    margin: 0;
    color: var(--tma-muted);
    line-height: 1.9;
    font-size: 14px;
}

@media (max-width: 540px) {
    .tma-flow__step { padding-left: 64px; }
    .tma-flow__num { width: 48px; height: 48px; font-size: 14px; }
    .tma-flow::before { left: 24px; }
}

/* ========== Page hero (shared by all static pages) ========== */
.tma-page-hero {
    padding: 72px 32px;
}
.tma-page-hero__eyebrow {
    display: block;
    font-family: var(--tma-serif-en);
    color: var(--tma-gold);
    letter-spacing: 0.24em;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

/* ========== Q&A page polish ========== */
.tma-qa {
    margin-top: 16px;
}
.tma-qa .wp-block-details {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 18px 28px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}
.tma-qa .wp-block-details[open] {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-2);
}

/* ========== About / Team imported (emanon blocks) sanitizer ==========
   Strip overly-bold imported styling so it harmonises with our elegant
   palette. Override Emanon's inline colour/border/padding choices to
   match our muted tone, while keeping the basic block structure intact. */
.tma-imported {
    margin-top: 24px;
}

/* Headings — re-skin Emanon's heading blocks to our serif tone. */
.tma-imported .epb-advance-headling h2,
.tma-imported .epb-advance-headling h3 {
    font-family: var(--tma-serif-ja), var(--tma-serif-en) !important;
    color: var(--tma-deep-navy) !important;
    background: transparent !important;
    letter-spacing: 0.04em !important;
    font-weight: 600 !important;
}
.tma-imported .epb-advance-headling {
    background: transparent !important;
    padding: 0 !important;
    margin: 36px 0 18px !important;
}

/* Broken grid (team profile) — soften the borders, control image size. */
.tma-imported .epb-broken-grid {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 32px !important;
    margin: 24px 0;
    box-shadow: var(--tma-shadow-1);
}
.tma-imported .epb-broken-grid img {
    border-radius: var(--tma-radius);
    max-width: 100%;
    height: auto;
}
.tma-imported .epb-broken-grid__media {
    max-width: 320px;
}
.tma-imported .epb-broken-grid__content--inner {
    padding: 0 !important;
}
.tma-imported .epb-broken-grid__content--inner > * { background: transparent !important; }

/* Tables (company info, etc.) — clean two-column key/value look. */
.tma-imported table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    overflow: hidden;
}
.tma-imported table th,
.tma-imported table td {
    padding: 16px 22px;
    border-bottom: 1px solid var(--tma-border);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.8;
}
.tma-imported table tr:last-child th,
.tma-imported table tr:last-child td { border-bottom: 0; }
.tma-imported table th {
    background: var(--tma-mist);
    color: var(--tma-muted);
    font-weight: 500;
    width: 200px;
    letter-spacing: 0.04em;
}
.tma-imported table td { color: var(--tma-ink); }

/* Paragraphs in imported content */
.tma-imported p {
    line-height: 2;
    margin: 14px 0;
    color: var(--tma-ink);
}

/* Generic figure / image */
.tma-imported figure {
    margin: 28px 0;
}
.tma-imported figure img {
    border-radius: var(--tma-radius);
    width: 100%;
    height: auto;
    box-shadow: var(--tma-shadow-1);
}

/* ========== Contact page polish ========== */
.tma-contact {
    margin-top: 16px;
}
.tma-contact > p:first-of-type {
    text-align: center;
    color: var(--tma-muted);
    font-size: 15px;
    margin: 0 auto 32px;
    max-width: 640px;
    line-height: 1.95;
}
.tma-contact .tma-form-note,
.tma-contact .wpcf7-response-output {
    background: var(--tma-mist);
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius-sm);
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--tma-muted);
    margin-top: 24px;
}

/* CF7 wrapper inside the contact section */
.tma-contact .wpcf7 {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 32px 36px;
    margin: 0 0 8px;
}

@media (max-width: 540px) {
    .tma-contact .wpcf7 { padding: 24px 22px; }
}

/* ========== Contact: direct-contact panel ========== */
.tma-contact-direct {
    margin: 40px 0 80px;
    padding: 28px 32px;
    background: var(--tma-mist);
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
}
.tma-contact-direct h3 {
    margin: 0 0 16px;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 16px;
    color: var(--tma-deep-navy);
    letter-spacing: 0.06em;
    font-weight: 600;
}
.tma-contact-direct ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tma-contact-direct li {
    padding: 12px 0;
    border-bottom: 1px solid var(--tma-border);
    font-size: 14px;
    line-height: 1.85;
    color: var(--tma-ink);
}
.tma-contact-direct li:last-child { border-bottom: 0; }
.tma-contact-direct__label {
    display: inline-block;
    min-width: 110px;
    font-size: 11px;
    color: var(--tma-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    margin-right: 16px;
    vertical-align: middle;
}
.tma-contact-direct a {
    color: var(--tma-smoke-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--tma-gold-soft);
    padding-bottom: 1px;
}
.tma-contact-direct a:hover { color: var(--tma-gold); }

@media (max-width: 540px) {
    .tma-contact-direct__label {
        display: block;
        min-width: auto;
        margin-bottom: 4px;
        margin-right: 0;
    }
}

/* ========== Company info table (About Us) ========== */
.tma-info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    overflow: hidden;
}
.tma-info-table th,
.tma-info-table td {
    padding: 20px 26px;
    border-bottom: 1px solid var(--tma-border);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.9;
}
.tma-info-table tr:last-child th,
.tma-info-table tr:last-child td { border-bottom: 0; }
.tma-info-table th {
    background: var(--tma-mist);
    color: var(--tma-muted);
    font-weight: 500;
    width: 200px;
    letter-spacing: 0.06em;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
}
.tma-info-table td { color: var(--tma-ink); }
.tma-info-table a {
    color: var(--tma-smoke-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--tma-gold-soft);
    padding-bottom: 1px;
}
.tma-info-table a:hover { color: var(--tma-gold); }

@media (max-width: 600px) {
    .tma-info-table th, .tma-info-table td { display: block; width: auto; padding: 14px 20px; }
    .tma-info-table th { padding-bottom: 4px; border-bottom: 0; }
    .tma-info-table td { padding-top: 4px; }
}

/* ========== Team member cards ========== */
.tma-members {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tma-member {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 32px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: start;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.tma-member::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--tma-gold) 0%, var(--tma-gold-soft) 100%);
    opacity: 0.7;
}

.tma-member:hover {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-2);
    transform: translateY(-2px);
}

.tma-member__photo {
    background: var(--tma-mist);
    border-radius: var(--tma-radius);
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.tma-member__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tma-member__profession {
    display: inline-block;
    font-family: var(--tma-serif-en);
    font-size: 11px;
    color: var(--tma-gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--tma-gold);
    margin-bottom: 14px;
}

.tma-member__name {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 22px;
    color: var(--tma-deep-navy);
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.5;
}
.tma-member__name-en {
    display: inline-block;
    margin-left: 12px;
    font-family: var(--tma-serif-en);
    font-size: 14px;
    color: var(--tma-muted);
    letter-spacing: 0.06em;
    font-style: italic;
    font-weight: 400;
}

.tma-member__role {
    margin: 0 0 18px;
    color: var(--tma-smoke-blue);
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tma-border);
}

.tma-member__paragraphs p {
    margin: 0 0 12px;
    color: var(--tma-muted);
    font-size: 14px;
    line-height: 1.95;
}
.tma-member__paragraphs p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
    .tma-member {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px;
    }
    .tma-member__photo {
        max-width: 200px;
        margin: 0 auto;
    }
    .tma-member__name { font-size: 20px; }
    .tma-member__name-en { display: block; margin-left: 0; margin-top: 4px; }
}

/* ========== Case detail page ========== */
.tma-case-detail__back {
    margin: 0 0 24px;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.tma-case-detail__back a {
    color: var(--tma-smoke-blue);
    text-decoration: none;
}
.tma-case-detail__back a:hover { color: var(--tma-gold); }

.tma-case-detail__header {
    background: var(--tma-deep-navy);
    color: #fff;
    padding: 56px 56px 48px;
    border-radius: var(--tma-radius);
    position: relative;
    overflow: hidden;
}
.tma-case-detail__header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(201, 169, 110, 0.16), transparent 55%);
    pointer-events: none;
}

.tma-case-detail__badges {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.tma-case-detail__header .tma-badge {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}
.tma-case-detail__header .tma-badge--city {
    color: var(--tma-gold);
    border-color: var(--tma-gold-soft);
    background: rgba(201, 169, 110, 0.08);
}

.tma-case-detail__title {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 28px;
    line-height: 1.6;
    margin: 0;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.04em;
    max-width: 880px;
}

.tma-case-detail__media {
    margin: -24px 0 0;
    aspect-ratio: 16/8;
    overflow: hidden;
    border-radius: var(--tma-radius);
    box-shadow: var(--tma-shadow-2);
    position: relative;
    z-index: 2;
}

/* Key facts strip — sits visually attached under the media */
.tma-case-detail__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    overflow: hidden;
    margin: 28px 0 60px;
    box-shadow: var(--tma-shadow-1);
}

.tma-case-detail__fact {
    padding: 22px 26px;
    border-right: 1px solid var(--tma-border);
}
.tma-case-detail__fact:last-child { border-right: 0; }
.tma-case-detail__fact--wide { grid-column: span 2; }

.tma-case-detail__fact-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tma-muted);
    margin-bottom: 8px;
    font-family: var(--tma-sans-ja);
    font-weight: 500;
}
.tma-case-detail__fact-value {
    display: block;
    font-family: var(--tma-serif-en);
    font-size: 24px;
    color: var(--tma-deep-navy);
    font-weight: 600;
    letter-spacing: 0;
}
.tma-case-detail__fact-value--accent { color: var(--tma-smoke-blue); }
.tma-case-detail__fact-value--text {
    font-family: var(--tma-sans-ja);
    font-size: 13px;
    line-height: 1.85;
    color: var(--tma-ink);
    font-weight: 400;
}

@media (max-width: 720px) {
    .tma-case-detail__fact { border-right: 0; border-bottom: 1px solid var(--tma-border); }
    .tma-case-detail__fact:last-child { border-bottom: 0; }
    .tma-case-detail__fact--wide { grid-column: auto; }
}

/* Overview paragraph */
.tma-case-detail__overview {
    text-align: center;
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 20px;
    line-height: 1.85;
    color: var(--tma-deep-navy);
    margin: 0;
    padding: 32px 40px;
    background: linear-gradient(135deg, var(--tma-mist) 0%, #fff 100%);
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    letter-spacing: 0.04em;
}

/* Highlights list — bullets with gold diamond */
.tma-case-detail__highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.tma-case-detail__highlights li {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 18px 22px 18px 50px;
    position: relative;
    line-height: 1.85;
    font-size: 14px;
    color: var(--tma-ink);
    transition: all 0.2s ease;
}
.tma-case-detail__highlights li::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 24px;
    width: 8px;
    height: 8px;
    background: var(--tma-gold);
    transform: rotate(45deg);
}
.tma-case-detail__highlights li:hover {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-1);
}

/* Detail tables — two-up cards with dl/dt/dd */
.tma-case-detail__details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .tma-case-detail__details-grid { grid-template-columns: 1fr; }
}

.tma-detail-card {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 32px 30px;
}
.tma-detail-card__title {
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 17px;
    color: var(--tma-deep-navy);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tma-gold-soft);
    letter-spacing: 0.06em;
    font-weight: 600;
}

.tma-detail-list { margin: 0; }
.tma-detail-list dt {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tma-muted);
    margin: 16px 0 6px;
    font-family: var(--tma-sans-ja);
    font-weight: 500;
}
.tma-detail-list dt:first-child { margin-top: 0; }
.tma-detail-list dd {
    margin: 0 0 0;
    font-size: 14px;
    line-height: 1.9;
    color: var(--tma-ink);
}

/* Expert pull quote */
.tma-case-detail__expert {
    background: var(--tma-mist);
    border-left: 4px solid var(--tma-gold);
    border-radius: var(--tma-radius);
    padding: 32px 36px;
    margin: 0;
    position: relative;
}
.tma-case-detail__expert::before {
    content: "“";
    position: absolute;
    top: 8px;
    left: 24px;
    font-family: var(--tma-serif-en);
    font-size: 56px;
    color: var(--tma-gold-soft);
    line-height: 1;
}
.tma-case-detail__expert p {
    margin: 0 0 12px 36px;
    font-size: 14px;
    line-height: 2;
    color: var(--tma-ink);
}
.tma-case-detail__expert p:last-child { margin-bottom: 0; }

/* ========== Site header (Blocksy type-1 override) ========== */
/* Blocksy のデフォルトヘッダーを TMA のトークンに寄せる。構造は触らず
   見た目だけ上書きする。最上部は白地、スクロールすると JS が付ける
   .tma-scrolled で Deep Navy バーに切り替わる（ヒーロー/CTA と呼応）。 */
#header.ct-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--tma-border);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* 背景色は Blocksy が行要素側に持つため、色切り替えは行に対して行う */
#header [data-row="middle"] {
    padding-block: 10px;
    background: transparent;
    transition: background 0.3s ease;
}

/* ロゴ: Playfair Display の英字明朝 + Deep Navy で品格を出す。
   先頭にゴールドの菱形◆（ファビコン/セクション装飾と同じモチーフ）を添える。
   金はライト地・濃紺バーのどちらでも視認できるのでスクロール時も色替え不要。 */
#header .site-title a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    /* ロゴ専用フォント。先頭の "Playfair Logo"(functions.php で定義・font-display:optional
       ＋preload)で swap を起こさず Playfair を出す。フォールバックには swap 版の
       "Playfair Display" を入れない（入れると optional 未読時にそこへ落ちて結局ちらつく）。
       metric 一致の "Playfair Display fallback" → Georgia → serif の順で安全に退避する。 */
    font-family: "Playfair Logo", "Playfair Display fallback", Georgia, serif;
    font-weight: 600;
    /* 明示 line-height で行ボックス高をフォント非依存に固定する。ロゴは
       Playfair Display を使うが、遅延読込のため低速回線では一旦システム
       serif で描画→Playfair に swap する。line-height:normal だと両者の
       メトリクス差でロゴ高が変わりヘッダーごと伸縮、#main-container 全体
       が押し下がって CLS 0.45 を生んでいた（PSI モバイル）。固定 line-height
       なら box 高が swap で動かず、local() フォールバックが無いヘッドレス
       環境（PSI ランナー）でもシフトしない。1.3 は Playfair の normal 相当で
       見た目は不変。 */
    line-height: 1.3;
    color: var(--tma-deep-navy) !important;
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}
#header .site-title a::before {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    background: var(--tma-gold);
    transform: rotate(45deg);
}
#header .site-title a:hover {
    color: var(--tma-smoke-blue) !important;
}

/* メニュー: 原色ブルーをやめて ink。ホバー/現在地はゴールド下線で示す */
#header .ct-menu-link {
    font-family: var(--tma-sans-ja), var(--tma-sans-en);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--tma-ink) !important;
    position: relative;
    transition: color 0.25s ease;
}
#header .ct-menu-link:hover {
    color: var(--tma-smoke-blue) !important;
}
/* ホバー/現在地のゴールド下線。リンクが行いっぱい(120px)に伸びるため
   absolute 配置はテキストからズレる。文字の真下に必ず出るネイティブの
   text-decoration を使い、色を transparent→gold に切り替えて見せる。 */
#header [data-id="menu"] .ct-menu-link {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
    transition: color 0.25s ease, text-decoration-color 0.25s ease;
}
#header [data-id="menu"] .menu-item:hover > .ct-menu-link,
#header [data-id="menu"] .current-menu-item > .ct-menu-link {
    text-decoration-color: var(--tma-gold);
}
/* 現在地は文字も濃く・太く（一目で分かるように） */
#header [data-id="menu"] .current-menu-item > .ct-menu-link {
    color: var(--tma-deep-navy) !important;
    font-weight: 600;
}

/* 検索 / モバイルトリガーのアイコン色をネイビーに統一 */
#header .ct-header-search .ct-icon,
#header .ct-header-trigger .ct-icon {
    color: var(--tma-deep-navy);
    transition: color 0.25s ease;
}

/* ===== スクロール後: Deep Navy バーに切り替え ===== */
#header.ct-header.tma-scrolled {
    background: var(--tma-deep-navy);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 24px rgba(10, 37, 64, 0.28);
}
#header.ct-header.tma-scrolled [data-row="middle"] {
    background: var(--tma-deep-navy);
}
#header.tma-scrolled .site-title a {
    color: #fff !important;
}
#header.tma-scrolled .site-title a:hover {
    color: var(--tma-gold-soft) !important;
}
#header.tma-scrolled .ct-menu-link {
    color: rgba(255, 255, 255, 0.82) !important;
}
#header.tma-scrolled .ct-menu-link:hover {
    color: #fff !important;
}
#header.tma-scrolled [data-id="menu"] .current-menu-item > .ct-menu-link {
    color: #fff !important;
}
#header.tma-scrolled .ct-header-search .ct-icon,
#header.tma-scrolled .ct-header-trigger .ct-icon {
    color: #fff;
}

/* ========== 掲載日（投稿日） ========== */
.tma-case-card__date,
.tma-case-detail__date {
    font-family: var(--tma-sans-ja), var(--tma-sans-en);
    font-size: 12px;
    color: var(--tma-muted);
    letter-spacing: 0.04em;
}
.tma-case-card__date { margin: 0; }
.tma-case-detail__date {
    margin: 10px 0 0;
    color: var(--tma-hazy-blue); /* navy ヘッダー上で読める控えめなトーン */
}

/* ========== 成約済み（クローズ）案件 ========== */
/* 一覧カード: サムネイル右上の落ち着いたオーバーレイ。ゴールドは使わず navy 系で抑える */
.tma-case-card__status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    padding: 5px 12px;
    background: rgba(10, 37, 64, 0.88); /* --tma-deep-navy 半透明 */
    color: var(--tma-warm-white);
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 12px;
    letter-spacing: 0.06em;
    border-radius: var(--tma-radius-sm);
}
/* 現役でない感を出すための軽い減彩。情報は読める範囲に留める */
/* カード全体: 白地→ミスト地に落とし、文字をミュート寄りに。視線を引かないよう
   ゴールドのホバー強調も外す（成約済みは「目立たせない」のが意図） */
.tma-case-card--closed {
    background: var(--tma-mist);
    border-color: var(--tma-border);
}
.tma-case-card--closed .tma-case-card__media img {
    opacity: 0.7;
    filter: grayscale(45%);
}
.tma-case-card--closed:hover .tma-case-card__media img { opacity: 0.82; }
.tma-case-card--closed .tma-case-card__title a { color: var(--tma-muted); }
.tma-case-card--closed .tma-case-card__title a:hover { color: var(--tma-smoke-blue); }
.tma-case-card--closed .tma-case-card__price-row,
.tma-case-card--closed .tma-case-card__price-row strong { color: var(--tma-muted); }
.tma-case-card--closed:hover {
    border-color: var(--tma-border);
    box-shadow: var(--tma-shadow-1);
}

/* 詳細ページ: navy ヘッダー上で読める明るいチップ */
.tma-case-detail__header .tma-badge--closed {
    background: var(--tma-warm-white);
    color: var(--tma-deep-navy);
    border-color: var(--tma-warm-white);
}
/* 他コンテキスト用フォールバック */
.tma-badge--closed {
    color: var(--tma-deep-navy);
    border-color: var(--tma-deep-navy);
    background: transparent;
}

/* ========== Blog / article blocks ========== */

/* 旧 epb-underline-yellow の置換。控えめなゴールドのマーカー（下 40% に色） */
.tma-mark {
    background: linear-gradient(transparent 58%, rgba(201, 169, 110, 0.34) 0);
    color: inherit;
    padding: 0 0.05em;
}

/* 一覧カードの抜粋: 3 行クランプ */
.tma-post-card__excerpt {
    margin: 0;
    color: var(--tma-muted);
    font-size: 13px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* アイキャッチ無し記事のプレースホルダ（ネイビーグラデ + ゴールド菱形 + カテゴリ名） */
.tma-post-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--tma-deep-navy) 0%, var(--tma-smoke-blue) 100%);
    padding: 20px;
    text-align: center;
}
.tma-post-placeholder__mark {
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    background: var(--tma-gold);
}
.tma-post-placeholder__label {
    color: var(--tma-hazy-blue);
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 500;
}

/* --- single post header bits --- */
.tma-post-detail__date {
    text-align: center;
    color: var(--tma-muted);
    font-size: 13px;
    letter-spacing: 0.05em;
    margin: 0 0 14px;
}
.tma-post-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.tma-post-detail__badges .tma-badge { text-decoration: none; transition: all 0.2s ease; }
.tma-post-detail__badges .tma-badge:hover { border-color: var(--tma-gold); color: var(--tma-gold); }
.tma-post-detail__media {
    margin: 0 0 40px;
    border-radius: var(--tma-radius);
    overflow: hidden;
}
.tma-post-detail__media img { display: block; width: 100%; height: auto; }

/* --- entry-content blockquote (default) + TMA ゴールド引用 block style --- */
.entry-content blockquote,
.is-style-tma-gold-quote {
    position: relative;
    margin: 32px 0;
    padding: 6px 0 6px 28px;
    border-left: 4px solid var(--tma-gold);
    color: var(--tma-ink);
    font-style: normal;
}
.entry-content blockquote::before,
.is-style-tma-gold-quote::before {
    content: "\201C";
    position: absolute;
    left: 18px;
    top: -10px;
    font-family: var(--tma-serif-en);
    font-size: 56px;
    line-height: 1;
    color: var(--tma-gold-soft);
}
.entry-content blockquote p,
.is-style-tma-gold-quote p { margin: 0 0 8px; }
.entry-content blockquote cite,
.is-style-tma-gold-quote cite {
    display: block;
    font-size: 13px;
    color: var(--tma-muted);
    font-style: normal;
}

/* --- TMA ゴールド菱形リスト block style --- */
.is-style-tma-diamond-list {
    list-style: none;
    padding-left: 0;
}
.is-style-tma-diamond-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 10px;
}
.is-style-tma-diamond-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--tma-gold);
}

/* --- TMA ポイントボックス block style --- */
.is-style-tma-point-box {
    background: var(--tma-mist);
    border-left: 3px solid var(--tma-gold);
    border-radius: var(--tma-radius);
    padding: 24px 28px;
    margin: 32px 0;
}
.is-style-tma-point-box > :first-child { margin-top: 0; }
.is-style-tma-point-box > :last-child { margin-bottom: 0; }
.is-style-tma-point-box h3 {
    margin: 0 0 12px;
    border: none;
    padding: 0;
}

/* --- リード文 pattern --- */
.tma-lead {
    font-size: 17px;
    line-height: 1.95;
    color: var(--tma-muted);
}

/* --- 記事末CTA pattern --- */
.tma-article-cta {
    background: linear-gradient(135deg, var(--tma-deep-navy) 0%, var(--tma-smoke-blue) 100%);
    border-radius: var(--tma-radius-lg);
    padding: 48px 32px;
    margin: 64px 0 0;
    text-align: center;
}
.tma-article-cta h3 {
    color: var(--tma-warm-white);
    border: none;
    margin: 0 0 12px;
    padding: 0;
}
.tma-article-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 24px;
}
.tma-article-cta .wp-block-button__link {
    background: var(--tma-gold);
    color: var(--tma-deep-navy);
    border-radius: var(--tma-radius-sm);
    padding: 14px 32px;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}
.tma-article-cta .wp-block-button__link:hover { background: var(--tma-gold-soft); }

/* --- 数字強調 KPI pattern --- */
.tma-kpi-row {
    margin: 32px 0;
}
.tma-kpi-row .wp-block-column {
    text-align: center;
}
.tma-kpi__num {
    font-family: var(--tma-serif-en);
    font-size: 40px;
    line-height: 1.1;
    color: var(--tma-deep-navy);
    margin: 0 0 6px;
}
.tma-kpi__label {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--tma-muted);
    margin: 0;
}

/* --- 注意・補足ボックス block style --- */
.is-style-tma-callout {
    position: relative;
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid var(--tma-gold-soft);
    border-radius: var(--tma-radius);
    padding: 22px 26px 22px 52px;
    margin: 32px 0;
}
.is-style-tma-callout::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 28px;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: var(--tma-gold);
}
.is-style-tma-callout > :first-child { margin-top: 0; }
.is-style-tma-callout > :last-child { margin-bottom: 0; }

/* --- 手順ステップ block style (ordered list + ゴールド丸番号) --- */
.is-style-tma-steps {
    list-style: none;
    counter-reset: tma-step;
    padding-left: 0;
    margin: 32px 0;
}
.is-style-tma-steps li {
    position: relative;
    counter-increment: tma-step;
    min-height: 32px;
    padding: 4px 0 16px 48px;
    margin: 0;
}
.is-style-tma-steps li::before {
    content: counter(tma-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tma-deep-navy);
    color: var(--tma-gold);
    font-family: var(--tma-serif-en);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 記事内 区切り小見出し pattern --- */
.tma-article-eyebrow {
    font-family: var(--tma-serif-en);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    color: var(--tma-gold);
    margin: 40px 0 4px;
}
.tma-article-heading {
    position: relative;
    margin: 0 0 20px;
    padding-bottom: 12px;
}
.tma-article-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: var(--tma-gold);
}

/* --- 2カラム比較 pattern --- */
.tma-compare {
    margin: 32px 0;
}
.tma-compare__col {
    background: #fff;
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 24px 26px;
    height: 100%;
}
.tma-compare__col h4 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tma-border);
    color: var(--tma-muted);
}
.tma-compare__col--accent {
    border-color: var(--tma-gold-soft);
    background: rgba(201, 169, 110, 0.05);
}
.tma-compare__col--accent h4 {
    color: var(--tma-deep-navy);
    border-bottom-color: var(--tma-gold-soft);
}

/* --- 関連リンクカード pattern --- */
.tma-link-card {
    border: 1px solid var(--tma-border);
    border-radius: var(--tma-radius);
    padding: 24px 28px;
    margin: 32px 0;
    transition: all 0.25s ease;
}
.tma-link-card:hover {
    border-color: var(--tma-gold-soft);
    box-shadow: var(--tma-shadow-2);
    transform: translateY(-2px);
}
.tma-link-card__eyebrow {
    font-family: var(--tma-serif-en);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: var(--tma-gold);
    margin: 0 0 6px;
}
.tma-link-card h4 {
    margin: 0 0 8px;
    border: none;
    padding: 0;
}
.tma-link-card p {
    margin: 0;
    color: var(--tma-muted);
    font-size: 14px;
}
.tma-link-card__link {
    margin-top: 12px;
}
.tma-link-card__link a {
    color: var(--tma-smoke-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}
.tma-link-card__link a:hover { color: var(--tma-gold); }

/* --- 図版＋明朝キャプション block style --- */
.is-style-tma-figure {
    margin: 32px 0;
}
.is-style-tma-figure img {
    display: block;
    border-radius: var(--tma-radius);
}
.is-style-tma-figure figcaption {
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px solid var(--tma-gold);
    font-family: var(--tma-serif-ja), var(--tma-serif-en);
    font-size: 13px;
    color: var(--tma-muted);
    text-align: left;
}

/* --- 出典・参考ボックス pattern --- */
.tma-source {
    background: var(--tma-mist);
    border-radius: var(--tma-radius);
    padding: 16px 22px;
    margin: 32px 0;
    font-size: 13px;
    color: var(--tma-muted);
}
.tma-source > :first-child { margin-top: 0; }
.tma-source > :last-child { margin-bottom: 0; }
.tma-source strong {
    color: var(--tma-ink);
    font-weight: 500;
}

/* --- core separator / table polish in article bodies --- */
.entry-content hr,
.entry-content .wp-block-separator {
    border: none;
    height: 1px;
    background: var(--tma-border);
    margin: 40px auto;
}
.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 24px 0;
    font-size: 14px;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--tma-border);
    padding: 10px 14px;
    text-align: left;
}
.entry-content table th { background: var(--tma-mist); color: var(--tma-deep-navy); }
