/*
 「会社税務の教科書」案B クリーン・エディトリアル
 Cocoon子テーマ style.css 追記用
 前提: スキン「なし」/ Noto Sans JP は functions.php で enqueue
*/

:root {
  --tx-navy: #16304d;
  --tx-blue: #2563eb;
  --tx-blue-bg: #eaf1fd;
  --tx-panel: #f5f8fb;
  --tx-amber: #a3822e;
  --tx-amber-bg: #fbf7ee;
  --tx-text: #2a3542;
  --tx-muted: #6b7684;
  --tx-line: #dde4ec;
  --tx-marker: #dbe9ff;
  --tx-shadow: 0 1px 2px rgba(22, 48, 77, 0.05);
}

/* ===== トップページ（教科書型の入口） ===== */
.tx-hero{background:linear-gradient(180deg,#f7fafd 0%,#fff 100%);border-bottom:1px solid var(--tx-line);padding:48px 20px 36px;margin:0 -20px}
.tx-hero .tx-hero-title{font-size:28px;font-weight:900;color:var(--tx-navy);line-height:1.45;margin:0 0 14px}
.tx-lead{font-size:16px;margin:0 0 8px;max-width:640px}
.tx-sub{font-size:14px;color:var(--tx-muted);margin:0 0 24px;max-width:640px}
.tx-hero-btns{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:760px}
.tx-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:3px;margin:0;padding:14px 16px;border-radius:10px;border:1.5px solid var(--tx-navy);color:var(--tx-navy);background:#fff;text-decoration:none}
.tx-btn .bt{font-weight:700;font-size:15px}
.tx-btn .bs{font-weight:400;font-size:11.5px;color:var(--tx-muted);line-height:1.4}
.tx-btn:hover{background:var(--tx-panel)}
.tx-btn.primary{background:var(--tx-navy);color:#fff}
.tx-btn.primary .bs{color:#c9d6e4}
.tx-btn.primary:hover{background:#1f4066}

.tx-trust{display:flex;flex-wrap:wrap;gap:22px;justify-content:center;background:var(--tx-panel);border-bottom:1px solid var(--tx-line);padding:14px 20px;margin:0 -20px 8px;font-size:13px;color:var(--tx-muted)}
.tx-trust b{color:var(--tx-navy)}

.tx-sec{padding:42px 0}
.tx-sec.tx-alt{background:var(--tx-panel);margin:0 -20px;padding-left:20px;padding-right:20px}
.tx-h2{font-size:22px;font-weight:900;color:var(--tx-navy);margin:0 0 6px;padding-left:15px;position:relative}
.tx-h2::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:5px;height:24px;background:var(--tx-blue);border-radius:3px}
.tx-desc{color:var(--tx-muted);font-size:14px;margin:6px 0 24px;padding-left:15px}

.tx-steps{background:#fff;border:1px solid var(--tx-line);border-radius:14px;overflow:hidden;box-shadow:0 2px 10px rgba(22,48,77,.06)}
.tx-step{display:flex;gap:16px;align-items:center;padding:16px 20px;border-bottom:1px solid var(--tx-line);text-decoration:none}
.tx-step:last-child{border-bottom:none}
.tx-step:hover{background:var(--tx-blue-bg)}
.tx-step .no{flex:none;width:34px;height:34px;border-radius:50%;background:var(--tx-navy);color:#fff;font-weight:900;display:flex;align-items:center;justify-content:center}
.tx-step .b{flex:1;display:flex;flex-direction:column}
.tx-step .t{font-weight:700;font-size:16px;color:var(--tx-navy)}
.tx-step .e{font-size:13.5px;color:var(--tx-muted)}
.tx-step .ar{color:var(--tx-blue);font-weight:900}

.tx-grid{display:grid;gap:16px}
.tx-grid.g3{grid-template-columns:repeat(3,1fr)}
.tx-grid.g2{grid-template-columns:repeat(2,1fr)}
.tx-card{display:block;background:#fff;border:1px solid var(--tx-line);border-radius:14px;padding:20px;text-decoration:none;box-shadow:0 2px 10px rgba(22,48,77,.06);transition:.15s}
.tx-card:hover{transform:translateY(-2px);border-color:#c2d4ea;box-shadow:0 6px 18px rgba(22,48,77,.1)}
.tx-card .ic{font-size:22px;display:block;margin-bottom:8px}
.tx-card .tag{display:inline-block;font-size:12px;font-weight:700;color:var(--tx-blue);background:var(--tx-blue-bg);border-radius:999px;padding:3px 12px;margin-bottom:10px}
.tx-card h3{margin:0 0 8px;font-size:16.5px;font-weight:700;color:var(--tx-navy);line-height:1.5}
.tx-card p{margin:0;font-size:13.5px;color:var(--tx-muted);line-height:1.7}

.tx-pick{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid var(--tx-line);border-radius:12px;padding:14px 16px;text-decoration:none;box-shadow:0 1px 2px rgba(22,48,77,.05)}
.tx-pick:hover{background:var(--tx-blue-bg)}
.tx-pick .rk{flex:none;width:28px;height:28px;border-radius:8px;background:var(--tx-amber-bg);color:var(--tx-amber);font-weight:900;display:flex;align-items:center;justify-content:center}
.tx-pick b{color:var(--tx-navy);font-size:15px}
.tx-pick .c{font-size:12px;color:var(--tx-muted)}

.tx-about{display:flex;gap:22px;align-items:flex-start;background:#fff;border:1px solid var(--tx-line);border-left:5px solid var(--tx-navy);border-radius:12px;padding:24px;box-shadow:0 2px 10px rgba(22,48,77,.06)}
.tx-about .seal{flex:none;width:60px;height:60px;border-radius:50%;background:var(--tx-navy);color:#fff;font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.3}
.tx-about h3{margin:0 0 8px;font-size:17px;color:var(--tx-navy)}
.tx-about p{margin:0 0 6px;font-size:14px}
.tx-about .fine{font-size:12.5px;color:var(--tx-muted)}

/* カテゴリアーカイブの既存パーツ間に必要な余白だけを補う */
.category .category-page-content{display:none}
.category .tx-about{margin-bottom:14px}
.category .tx-trust{border:1px solid var(--tx-line);border-radius:10px;margin:0 0 18px}
.category .tx-h2{margin-top:28px}
.category .tx-steps,.category .tx-grid{margin-bottom:24px}

.tx-center{text-align:center;margin-top:24px}

/* スリム検索バー */
.tx-search{margin:0 -20px 8px;padding:16px 20px;border-bottom:1px solid var(--tx-line);background:#fff}
.tx-search-form{display:flex;max-width:560px;margin:0 auto;border:1.5px solid var(--tx-line);border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 1px 2px rgba(22,48,77,.05)}
.tx-search-form:focus-within{border-color:var(--tx-blue)}
.tx-search-form .ic{display:flex;align-items:center;padding:0 4px 0 14px;color:var(--tx-muted);font-size:16px}
.tx-search-form input{flex:1;min-width:0;border:none;outline:none;font-size:15px;padding:12px 10px;color:var(--tx-text);font-family:inherit;background:transparent}
.tx-search-form input::placeholder{color:var(--tx-muted)}
.tx-search-form button{border:none;background:var(--tx-navy);color:#fff;font-weight:700;font-size:14px;padding:0 20px;cursor:pointer}
.tx-search-form button:hover{background:#1f4066}

/* スマホ（1カラム） */
@media(max-width:768px){
  .tx-grid.g3,.tx-grid.g2{grid-template-columns:1fr}
  .tx-hero .tx-hero-title{font-size:23px}
  .tx-hero-btns{grid-template-columns:1fr}
  .tx-about{flex-direction:column;align-items:flex-start;gap:14px}
  .tx-search-form button{padding:0 14px}
}

/* ===== トップ（固定ページID:101）：記事テンプレ装飾の除去 ===== */
.page-id-101 .entry-title,
.page-id-101 .date-tags,
.page-id-101 .eye-catch-wrap,
.page-id-101 .single-thumbnail,
.page-id-101 .toc,
.page-id-101 .sns-share,
.page-id-101 .sns-share-buttons,
.page-id-101 .sns-follow,
.page-id-101 .author-info,
.page-id-101 .author-box{
  display:none !important;
}

/* トップ(ID:101)だけヘッダーのグローバルメニューを非表示 */
.page-id-101 #navi,
.page-id-101 .navi-in{
  display:none !important;
}

/* トップ(ID:101)だけメイン幅を1160pxに拡大 */
.page-id-101 #main,
.page-id-101 .main{
  width:100%;
  max-width:none;
}
.page-id-101 #content,
.page-id-101 #content .content-in{
  width:100%;
  max-width:1160px;
  margin-left:auto;
  margin-right:auto;
}

/* ===== 全体 ===== */
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--tx-text);
}
.article {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}
.article a {
  color: var(--tx-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== ヘッダー ===== */
#header,
.header {
  background: var(--tx-navy);
}
.logo-text .site-name-text,
.tagline {
  color: #fff;
}
.site-name-text { font-weight: 900; letter-spacing: 0.02em; }
.tagline { color: #9fb3c8; font-size: 11px; }
#navi,
.navi-in > ul {
  background: var(--tx-navy);
}
.navi-in > ul li a {
  color: #d5dee8;
  font-size: 13.5px;
}
.navi-in > ul li a:hover {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--tx-blue);
}

/* ===== 記事ヘッダー ===== */
.article .entry-title,
.entry-content h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--tx-navy);
  letter-spacing: 0.01em;
}
.entry-date, .post-date, .post-update {
  color: var(--tx-muted);
  font-size: 12px;
}
/* カテゴリチップ（記事上・カード内共通） */
.cat-label,
.entry-card .cat-label,
.entry-categories .cat-link,
.tx-article-meta__cat {
  background: var(--tx-blue-bg);
  color: var(--tx-blue);
  font-weight: 700;
  font-size: 12px;
  border: none;
  border-radius: 999px;
  padding: 3px 12px;
  text-decoration: none;
}
.entry-categories .cat-icon { display: none; }
.tx-article-meta { margin: 0 0 12px; }

/* 記事冒頭は本文への集中を優先。共有導線は記事末に残す。 */
.article-header .sns-share.ss-top { display: none !important; }
.article-footer .sns-share-buttons a {
  background: var(--tx-navy) !important;
  color: #fff !important;
}

/* ===== 本文 ===== */
.entry-content {
  font-size: 16px;
  line-height: 2;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.entry-content p { margin-bottom: 1.4em; }

/* H2: 灰色背景を廃止 → 青バー＋極太 */
.article h2 {
  background: none;
  padding: 0 0 0 17px;
  position: relative;
  font-size: 21px;
  font-weight: 900;
  color: var(--tx-navy);
  margin-top: 2.2em;
  margin-bottom: 0.9em;
  border-radius: 0;
}
.article h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 24px;
  background: var(--tx-blue);
  border-radius: 3px;
}
.article h3 {
  border: none;
  padding: 0;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--tx-navy);
}

/* ===== テーブル ===== */
.article table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--tx-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13.5px;
  width: 100%;
}
.article table th {
  background: var(--tx-navy);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 11px 16px;
}
.article table td {
  border: none;
  border-bottom: 1px solid #e8edf3;
  padding: 12px 16px;
}
.article table tr:last-child td { border-bottom: none; }
.article table td.tx-hl {
  background: var(--tx-blue-bg);
  font-weight: 700;
  color: var(--tx-blue);
}

/* ===== 目次（Cocoon .toc） ===== */
.toc {
  background: var(--tx-panel);
  border: none;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 100%;
}
.toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-navy);
  letter-spacing: 0.1em;
  text-align: left;
}
.toc-content ol { counter-reset: tocnum; }
.toc-content ol > li {
  list-style: none;
  counter-increment: tocnum;
  font-size: 14.5px;
  line-height: 2.2;
}
.toc-content ol > li::before {
  content: counter(tocnum, decimal-leading-zero);
  color: var(--tx-blue);
  font-weight: 700;
  margin-right: 10px;
}
.toc-content a { color: var(--tx-text); text-decoration: none; }
.toc-content a:hover { color: var(--tx-blue); }

/* ===== 記事内パーツ ===== */
/* 監修ボックス */
.tx-author {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--tx-panel);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 26px;
}
.tx-author__icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--tx-navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex: none;
}
.tx-author__name { font-size: 12.5px; font-weight: 700; color: var(--tx-navy); }
.tx-author__desc { font-size: 11.5px; color: var(--tx-muted); line-height: 1.6; }

/* 注意ボックス（琥珀） */
.tx-note {
  display: flex;
  gap: 12px;
  background: var(--tx-amber-bg);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.9;
  color: #6b6350;
  margin: 0 0 28px;
}
.tx-note__label { font-weight: 700; color: var(--tx-amber); flex: none; }

/* ポイントボックス */
.tx-point {
  border: 1px solid var(--tx-line);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 34px;
}
.tx-point__label { font-size: 13px; font-weight: 700; color: var(--tx-blue); margin-bottom: 8px; }
.tx-point__body { font-size: 14.5px; line-height: 1.9; }

/* 青マーカー強調 */
.tx-marker {
  font-weight: 700;
  background: linear-gradient(transparent 62%, var(--tx-marker) 62%);
}

/* 「次に読む」CTA */
.tx-next {
  background: var(--tx-panel);
  border-radius: 14px;
  padding: 24px 26px;
  margin-top: 40px;
}
.tx-next__title { font-size: 15px; font-weight: 900; color: var(--tx-navy); margin-bottom: 14px; }
.tx-next__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tx-next__card {
  display: block;
  background: #fff;
  border: 1px solid var(--tx-line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: var(--tx-shadow);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tx-next__card:hover {
  border-color: var(--tx-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.tx-next__cat { font-size: 11.5px; font-weight: 700; color: var(--tx-blue); margin-bottom: 6px; }
.tx-next__t { font-size: 14px; font-weight: 700; color: var(--tx-navy); line-height: 1.6; margin-bottom: 8px; }
.tx-next__d { font-size: 12px; color: var(--tx-muted); line-height: 1.7; }

/* ===== 記事一覧カード ===== */
.entry-card-wrap {
  background: #fff;
  border: 1px solid var(--tx-line);
  border-radius: 10px;
  box-shadow: var(--tx-shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.entry-card-wrap:hover { border-color: var(--tx-blue); }
.entry-card-wrap .entry-card-thumb { display: none; }
.entry-card-wrap .entry-card-content {
  display: flex;
  flex-direction: column;
  margin-left: 0;
  max-width: none;
}
.entry-card-wrap .entry-card-meta { display: contents; }
.entry-card-wrap .entry-card-categorys {
  display: block;
  order: 1;
  align-self: flex-start;
  margin: 0 0 8px;
}
.entry-card-wrap .entry-card-categorys .entry-category {
  display: inline-block;
  background: var(--tx-blue-bg);
  color: var(--tx-blue);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.entry-card-wrap .entry-card-title { order: 2; }
.entry-card-wrap .entry-card-snippet {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  order: 3;
}
.entry-card-wrap .entry-card-info {
  order: 4;
  margin-top: 10px;
}

/* T4: カード内アクセス数を非表示 */
.entry-card .admin-pv { display: none !important; }
.entry-card-wrap a { min-height: 44px; }
.entry-card-title { font-size: 15.5px; font-weight: 700; color: var(--tx-navy); line-height: 1.6; }
.entry-card-snippet { font-size: 12.5px; color: var(--tx-muted); line-height: 1.8; }

/* ===== モバイル ===== */
@media screen and (max-width: 767px) {
  .content-in > .main { padding-right: 20px !important; padding-left: 20px !important; }
  .entry-content { font-size: 16px; padding: 0; }
  .article .entry-title { font-size: 22px; }
  .article h2 { font-size: 19px; }
  .tx-next__grid { grid-template-columns: 1fr; }
  .navi-in > ul li a { min-height: 44px; }
}

/* ===== ヘッダーロゴ：紺ヘッダーの上下ギリギリまで最大表示（tight版） 2026-07 ===== */
.logo-header,
#header .logo-header {
  display: flex;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

#site-title.site-name,
.logo-header .site-name {
  height: auto;
  max-height: none;
  margin: 0;
  line-height: 1;
}

#site-title.site-name a,
.logo-header .site-name-text-link {
  display: inline-block;
  height: 88px;
  width: auto;
  aspect-ratio: 937 / 208;
  background: url('images/logo-header-navy-tight.png') no-repeat left center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

@supports not (aspect-ratio: 1) {
  #site-title.site-name a,
  .logo-header .site-name-text-link { width: 397px; }
}

/* 長い記事タイトル・URL・表セルがスマホ幅ではみ出さないようにする */
.article .entry-title,
.entry-content h1,
.entry-content a,
.article table th,
.article table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 767px) {
  html,
  body,
  #container,
  #content,
  .wrap,
  .content,
  .content-in,
  .main {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .wrap,
  .content,
  .content-in,
  .main {
    width: 100% !important;
  }
  .article,
  .article-header,
  .entry-content {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .article .entry-title,
  .entry-content h1 {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-all;
  }
}

/* 実DOMではキャッチフレーズが .logo-header の直前にある。 */
#header .tagline { display: none; }

@media (max-width: 768px) {
  .logo-header,
  #header .logo-header {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  #site-title.site-name a,
  .logo-header .site-name-text-link { height: 60px; }

  @supports not (aspect-ratio: 1) {
    #site-title.site-name a,
    .logo-header .site-name-text-link { width: 270px; }
  }
}
