/* ===================================================
   資格ガイド style.css — リニューアル版 2026
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ── Design Tokens ── */
:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-deeper: #1e3a8a;
  --blue-light:  #eff6ff;
  --blue-mid:    #bfdbfe;
  --gold:        #f59e0b;
  --gold-light:  #fef3c7;
  --green:       #10b981;
  --green-light: #d1fae5;
  --red:         #ef4444;
  --red-light:   #fee2e2;
  --text:        #0f172a;
  --text-sub:    #64748b;
  --text-muted:  #94a3b8;
  --bg:          #f8faff;
  --bg-card:     #ffffff;
  --border:      #e2e8f0;
  --border-blue: #bfdbfe;
  --shadow-sm:   0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:   0 4px 12px rgba(15,23,42,.09), 0 2px 4px rgba(15,23,42,.05);
  --shadow-lg:   0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);
  --shadow-blue: 0 8px 24px rgba(37,99,235,.22);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --max-w:       1040px;
  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--text);
  line-height: 1.75;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.hero-img { width:100%; max-height:420px; object-fit:cover; border-radius:var(--radius-lg); margin:20px 0 28px; box-shadow:var(--shadow-md); }
.section-img { width:100%; max-height:300px; object-fit:cover; border-radius:var(--radius); margin:16px 0 24px; box-shadow:var(--shadow-sm); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scroll progress bar ── */
@keyframes scrollProgress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  transform-origin: left;
  animation: scrollProgress linear both;
  animation-timeline: scroll(root);
  z-index: 9999;
}

/* ── Top bar ── */
.topbar {
  background: linear-gradient(90deg, var(--blue-deeper), var(--blue-dark));
  color: #fff;
  text-align: center;
  padding: 9px 20px;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.topbar strong { color: var(--gold); }
.topbar a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ── Header ── */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover {
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  line-height: 1.35;
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  position: relative;
}
.hero p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  opacity: .92;
  max-width: 600px;
  margin: 0 auto 28px;
  position: relative;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #000;
  font-weight: 900;
  padding: 15px 36px;
  border-radius: 999px;
  font-size: 1.05rem;
  box-shadow: 0 6px 20px rgba(245,158,11,.5);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245,158,11,.6);
  text-decoration: none;
}
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 24px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  opacity: .85;
  position: relative;
}
.hero-trust span::before { content: "✓ "; font-weight: 900; color: var(--gold); }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
main section { padding: 56px 0; }
main section + section { border-top: 1px solid var(--border); }

/* Section headings */
h2 {
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--blue);
  display: inline-block;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.sub { color: var(--text-sub); margin-bottom: 24px; font-size: 0.9rem; }

/* ── Shikaku grid cards ── */
.shikaku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.shikaku-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.shikaku-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
  border-color: var(--blue);
  text-decoration: none;
}
.shikaku-icon { font-size: 2.4rem; margin-bottom: 10px; }
.shikaku-card h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 5px; font-weight: 700; }
.shikaku-card p { font-size: 0.8rem; color: var(--text-sub); line-height: 1.5; }

/* ── Ranking cards ── */
.ranking { display: grid; gap: 18px; }
.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.rank-card:hover { box-shadow: var(--shadow-md); }
.rank-card.rank-1 { border-color: var(--gold); border-width: 2px; }
.rank-card.rank-2 { border-color: #94a3b8; }
.rank-card.rank-3 { border-color: #b45309; }

.rank-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.rank-card.rank-1 .rank-header { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.rank-card.rank-2 .rank-header { background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
.rank-card.rank-3 .rank-header { background: linear-gradient(135deg, #fdf8f0, #fef3e2); }

.rank-badge {
  font-weight: 900;
  font-size: 1rem;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 3px 8px rgba(245,158,11,.4); }
.badge-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.badge-3 { background: linear-gradient(135deg, #b45309, #92400e); color: #fff; }
.rank-name { font-size: 1.15rem; font-weight: 900; color: var(--text); }
.rank-tag {
  font-size: 0.75rem;
  background: var(--blue-light);
  color: var(--blue);
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}
.rank-body { padding: 22px; }
.rank-body p { margin-bottom: 14px; color: var(--text-sub); font-size: 0.9rem; line-height: 1.7; }
.rank-points { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.rank-points span {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--border-blue);
}
.rank-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-weight: 900;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.rank-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,.45);
  text-decoration: none;
}
.rank-price { font-size: 0.82rem; color: var(--text-muted); margin-left: 14px; }

/* ── Emergency / CTA box ── */
.emergency {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(245,158,11,.2);
}
.emergency h2 { border: none; font-size: 1.4rem; display: block; }
.emergency p { margin: 12px 0; color: var(--text-sub); }

/* ── Article ── */
.article {
  max-width: 780px;
  margin: 44px auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.article h1 {
  font-size: clamp(1.45rem, 3.5vw, 2.05rem);
  line-height: 1.4;
  margin-bottom: 10px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.meta { color: var(--text-sub); font-size: 0.82rem; margin-bottom: 18px; }

.disclosure {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 28px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* TOC */
.toc {
  background: linear-gradient(135deg, var(--blue-light), #e0eaff);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 36px;
}
.toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 900;
}
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 5px; }
.toc a { color: var(--blue); font-size: 0.875rem; font-weight: 500; }
.toc a:hover { text-decoration: underline; }

/* Article headings */
.article h2 {
  font-size: 1.3rem;
  margin: 40px 0 16px;
  padding: 12px 18px 12px 20px;
  background: var(--blue-light);
  border-left: 5px solid var(--blue);
  border-bottom: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: block;
  font-weight: 900;
  color: var(--blue-deeper);
  letter-spacing: -0.01em;
}
.article h3 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
  border-left: 4px solid var(--gold);
  padding: 2px 0 2px 12px;
  font-weight: 700;
  color: var(--text);
}
.article h4 {
  font-size: 0.95rem;
  margin: 20px 0 6px;
  color: var(--blue);
  font-weight: 700;
}
.article p { margin-bottom: 16px; line-height: 1.8; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 16px; }
.article li { margin-bottom: 5px; }

/* Callout boxes */
.warn {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 22px 0;
  font-size: 0.9rem;
}
.warn strong { color: var(--red); }
.ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 22px 0;
  font-size: 0.9rem;
}
.ok strong { color: #065f46; }
.note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Inline CTA */
.inline-cta {
  background: linear-gradient(135deg, var(--blue-light), #dbeafe);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 32px 0;
}
.inline-cta h3 {
  border: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--blue-deeper);
}
.inline-cta p { color: var(--text-sub); font-size: 0.875rem; margin-bottom: 14px; }
.inline-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  padding: 11px 26px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
  transition: transform var(--transition);
}
.inline-cta a:hover { transform: translateY(-2px); text-decoration: none; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 22px 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: var(--bg-card); }
.cmp-table th {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.cmp-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:nth-child(even) td { background: #fafbff; }
.cmp-table tr:hover td { background: var(--blue-light); }

/* Level badges */
.level {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.level-easy { background: var(--green-light); color: #065f46; }
.level-mid  { background: var(--gold-light);  color: #92400e; }
.level-hard { background: var(--red-light);   color: #991b1b; }

/* ── FAQ ── */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq details:hover { border-color: var(--blue-mid); }
.faq details[open] { border-color: var(--blue); }
.faq summary {
  padding: 15px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fafbff;
}
.faq summary:hover { background: var(--blue-light); }
.faq details[open] summary { background: var(--blue-light); color: var(--blue); }
.faq summary::after {
  content: "＋";
  color: var(--blue);
  font-size: 1.15rem;
  flex-shrink: 0;
  font-weight: 900;
}
.faq details[open] summary::after { content: "－"; }
.faq details p {
  padding: 14px 20px 16px;
  color: var(--text-sub);
  font-size: 0.875rem;
  line-height: 1.75;
  margin: 0;
  border-top: 1px solid var(--border);
}

/* ── Author ── */
.author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 40px 0;
}
.author-ava {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(37,99,235,.3);
}
.author h4 { font-size: 0.92rem; margin-bottom: 4px; font-weight: 700; }
.author p { font-size: 0.82rem; color: var(--text-sub); margin: 0; }

/* ── Related articles ── */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.related a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.related a:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.related strong { display: block; color: var(--text); font-size: 0.9rem; margin-bottom: 5px; font-weight: 700; }
.related span { font-size: 0.78rem; color: var(--text-sub); }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  padding: 48px 24px 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
}
.footer-inner h4 { color: #f1f5f9; margin-bottom: 12px; font-size: 0.88rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-inner p { font-size: 0.82rem; line-height: 1.6; }
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 7px; }
.footer-inner a { color: #94a3b8; font-size: 0.82rem; transition: color var(--transition); }
.footer-inner a:hover { color: #fff; }
.copyright {
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 0.78rem;
  color: #475569;
  border-top: 1px solid #1e3a5f;
  padding-top: 18px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .nav { gap: 4px; justify-content: center; }
  .hero { padding: 48px 20px 56px; }
  .rank-header { flex-wrap: wrap; gap: 8px; }
  .rank-tag { margin-left: 0; }
  .article { border-radius: var(--radius); padding: 22px 18px; margin: 20px 12px; }
}
