/* =====================
   Article shared styles
   ===================== */
:root {
  --navy:        #4A6274;
  --navy-dark:   #2C3E50;
  --navy-light:  #EBF0F5;
  --navy-mid:    #7A9BB0;
  --accent:      #C9975A;
  --accent-light:#FBF3E8;
  --bg:          #F4F6F8;
  --fg:          #2C3540;
  --card:        #ffffff;
  --muted:       #E8ECF0;
  --muted-fg:    #7A8898;
  --border:      #D4DBE2;
  --radius:      1rem;
  --radius-lg:   1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
               'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =====================
   Site header
   ===================== */
.site-header {
  width: 100%;
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .15s;
}
.back-link:hover { color: #fff; }
.site-header-title {
  font-size: .92rem;
  font-weight: 700;
  opacity: .9;
}

/* =====================
   Eyecatch hero
   ===================== */
.article-hero {
  width: 100%;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  color: #fff;
  padding: 40px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%);
}
.article-hero-tag {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 14px;
  margin-bottom: 14px;
  letter-spacing: .05em;
  position: relative;
}
.article-hero h1 {
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  font-weight: 800;
  line-height: 1.4;
  position: relative;
  max-width: 540px;
  margin: 0 auto 12px;
}
.article-hero-sub {
  font-size: .82rem;
  opacity: .78;
  position: relative;
}

/* =====================
   Article body
   ===================== */
.article-wrap {
  width: 100%;
  max-width: 640px;
  padding: 28px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Points box */
.points-box {
  background: var(--navy-light);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.points-box-title {
  font-size: .8rem;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 2px;
}
.points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.points-list li {
  display: flex;
  gap: 10px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--fg);
}
.points-list li::before {
  content: '✓';
  color: var(--navy);
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Section */
.article-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-dark);
  border-bottom: 2.5px solid var(--navy);
  padding-bottom: 8px;
  line-height: 1.4;
}
.article-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  padding-left: 10px;
  border-left: 3px solid var(--navy-mid);
  line-height: 1.4;
}

.article-section p {
  font-size: .92rem;
  line-height: 1.85;
  color: rgba(44,53,64,.88);
}

.article-section ul,
.article-section ol {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-section ul li,
.article-section ol li {
  font-size: .9rem;
  line-height: 1.7;
  color: rgba(44,53,64,.85);
  padding-left: 18px;
  position: relative;
}
.article-section ul li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--navy-mid);
  font-weight: 700;
}
.article-section ol { counter-reset: ol-counter; }
.article-section ol li { counter-increment: ol-counter; }
.article-section ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--navy);
  font-weight: 800;
  font-size: .85rem;
}

/* Highlight card */
.highlight-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.highlight-card-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.highlight-card p {
  font-size: .88rem;
  line-height: 1.75;
  color: rgba(44,53,64,.82);
}

/* Tip box */
.tip-box {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tip-box-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.tip-box p {
  font-size: .85rem;
  line-height: 1.7;
  color: #7a5c30;
}

/* Ratio table */
.ratio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.ratio-table th {
  background: var(--navy);
  color: #fff;
  padding: 10px 12px;
  font-weight: 700;
  text-align: center;
  font-size: .82rem;
}
.ratio-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  text-align: center;
  line-height: 1.4;
}
.ratio-table tr:last-child td { border-bottom: none; }
.ratio-table td:first-child { font-weight: 700; color: var(--navy); text-align: left; }

/* Summary box */
.summary-box {
  background: var(--navy-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-box-title {
  font-size: .8rem;
  font-weight: 800;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.summary-box p {
  font-size: .9rem;
  line-height: 1.75;
  opacity: .92;
}

/* CTA — 計算機へ戻る */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 20px;
}
.cta-section p {
  font-size: .85rem;
  color: var(--muted-fg);
  text-align: center;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  padding: 15px 32px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(74,98,116,.35);
  transition: opacity .15s, transform .15s;
}
.cta-btn:hover { opacity: .88; transform: translateY(-1px); }
.cta-btn:active { transform: translateY(0); }

/* コラム一覧リンク */
.related-articles {
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.4;
  transition: opacity .15s;
}
.related-link:hover { opacity: .7; }
.related-link-arrow { color: var(--navy-mid); flex-shrink: 0; }
