/* 住まいのレスキューポータル — 外部フォント・ライブラリは読み込まない */
:root {
  --ink: #111111;
  --ink-soft: #444444;
  --paper: #fbf8f1;
  --white: #ffffff;
  --yellow: #ffd400;
  --red: #ff3b1f;
  --red-dark: #d92a10;
  --line: #111111;
  --shadow: 6px 6px 0 var(--ink);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, -apple-system, "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--ink); }
h1, h2, h3 { line-height: 1.3; margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
.sp { display: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--white); padding: 8px 12px; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--yellow); color: var(--ink); }
.logo-text { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.logo-text b { color: var(--yellow); font-weight: 900; }
.global-nav { display: flex; gap: 24px; }
.global-nav a { color: var(--white); text-decoration: none; font-size: 14px; font-weight: 700; }
.global-nav a:hover { color: var(--yellow); }

/* ヒーロー */
.hero { background: var(--yellow); padding: 64px 0 0; position: relative; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-weight: 700; font-size: 14px; }
.hero-eyebrow span { background: var(--ink); color: var(--yellow); font-weight: 900; letter-spacing: .14em; padding: 2px 10px; font-size: 12px; }
.hero-title {
  font-size: clamp(34px, 6.6vw, 80px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.18;
}
.bang { color: var(--red); display: inline-block; transform: skewX(-8deg); margin-left: .04em; }
.hero-lead { font-size: clamp(15px, 1.6vw, 18px); font-weight: 600; margin: 24px 0 32px; max-width: 760px; }

.finder {
  background: var(--white); border: 3px solid var(--ink); box-shadow: var(--shadow);
  padding: 20px; max-width: 820px;
}
.finder-label { display: block; font-weight: 900; font-size: 17px; margin-bottom: 10px; }
.finder-row { position: relative; }
.finder input {
  width: 100%; font: inherit; font-size: 19px; font-weight: 600;
  padding: 16px 48px 16px 16px;
  border: 3px solid var(--ink); border-radius: 0; outline: none; background: var(--paper);
  -webkit-appearance: none; appearance: none;
}
.finder input:focus { background: var(--white); outline: 4px solid var(--red); outline-offset: 0; }
.finder input::-webkit-search-cancel-button { display: none; }
.finder-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: var(--ink); color: var(--white); font-size: 18px; cursor: pointer;
}

.finder-result:empty { display: none; }
.finder-result { margin-top: 14px; display: grid; gap: 8px; }
.result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 2px solid var(--ink); background: var(--white); text-decoration: none; color: var(--ink);
}
a.result:hover { background: var(--ink); color: var(--white); }
a.result:hover span { color: var(--white); }
.result strong { display: block; font-weight: 900; }
.result span { font-size: 13px; color: var(--ink-soft); }
.result .go { flex: none; font-weight: 900; font-size: 14px; color: inherit; }
.result-urgent { background: var(--red); border-color: var(--red); color: var(--white); }
.result-urgent span { color: var(--white); }
.result-empty { font-size: 14px; margin: 0; font-weight: 600; }

.quick { margin-top: 28px; padding-bottom: 56px; }
.quick-label { margin: 0 0 10px; font-weight: 900; font-size: 14px; }
.finder-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit; font-size: 15px; font-weight: 700; padding: 8px 16px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.chip:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }

.hazard {
  height: 22px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 18px, var(--yellow) 18px 36px);
}

/* セクション共通 */
.section { padding: 80px 0; }
.section-title { font-size: clamp(28px, 4.4vw, 48px); font-weight: 900; letter-spacing: -.01em; margin-bottom: 40px; }
.section-title:has(+ .section-lead) { margin-bottom: 12px; }
.section-lead { font-size: clamp(15px, 1.6vw, 18px); font-weight: 700; margin: 0 0 36px; }
.section-dark { background: var(--ink); color: var(--white); }
.section-yellow { background: var(--yellow); }

/* お困りごとカード */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.topic {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 3px solid var(--ink); box-shadow: var(--shadow);
  padding: 24px 24px 22px; transition: transform .12s, box-shadow .12s, background .12s, color .12s;
}
.topic:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); background: var(--ink); color: var(--white); }
.topic-no {
  margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px;
  font-size: 44px; font-weight: 900; line-height: 1; color: var(--red);
}
.topic-no span { font-size: 13px; font-weight: 900; color: inherit; letter-spacing: .06em; }
.topic:hover .topic-no { color: var(--yellow); }
.topic h3 { font-size: clamp(22px, 2.2vw, 27px); font-weight: 900; }
.topic p:not(.topic-no) { font-size: 14px; margin: 12px 0 18px; flex: 1; color: inherit; opacity: .8; }
.topic-link {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 900; text-decoration: none; color: inherit;
  border-top: 2px solid currentColor; padding-top: 12px;
}
.topic-link::after { content: "→"; font-size: 20px; }
/* カード全体をクリックできるように */
.topic-link::before { content: ""; position: absolute; inset: 0; }
/* 7枚目は横長の帯にする */
.topic-wide {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto 1fr minmax(220px, 300px); align-items: center; gap: 8px 32px;
}
.topic-wide .topic-no { grid-row: 1 / 3; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.topic-wide h3 { grid-column: 2; }
.topic-wide p:not(.topic-no) { grid-column: 2; margin: 0; }
.topic-wide .topic-link { grid-column: 3; grid-row: 1 / 3; }
.topic.is-hit { background: var(--yellow); }
.topic.is-hit:hover { background: var(--ink); }

.badge {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 11px; font-style: normal; font-weight: 900; line-height: 1.7; letter-spacing: .04em;
  padding: 0 7px; background: var(--red); color: var(--white);
}
.badge-pr { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .7; }
.topic h3 .badge { vertical-align: super; }

/* 急ぎ度のタブ */
.tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  font: inherit; font-weight: 900; font-size: 16px; cursor: pointer;
  padding: 10px 22px; border: 2px solid var(--white); background: transparent; color: var(--white);
}
.tab[aria-selected="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
#tab-now[aria-selected="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.panel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: var(--white); color: var(--ink); border: 3px solid var(--white); padding: 26px; }
.card h3 { font-size: 22px; font-weight: 900; margin-bottom: 12px; }
.card p { margin: 0 0 18px; }
.card ol { margin: 0 0 18px; padding-left: 1.4em; font-weight: 600; }
.card ol li { margin-bottom: 6px; }
.card ol li::marker { color: var(--red); font-weight: 900; }
.card-urgent { border-color: var(--red); border-top-width: 10px; }
.card-kicker { margin: 0 0 4px !important; color: var(--red); font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.card .note { font-size: 14px; margin: 0; font-weight: 600; }
.card .note .badge { margin-left: 0; margin-right: 6px; background: var(--ink); color: var(--yellow); }

.btn {
  display: inline-block; text-decoration: none; font-weight: 900; font-size: 15px;
  padding: 12px 20px; background: var(--red); color: var(--white); border: 2px solid var(--red);
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.is-disabled, .topic-link.is-disabled { pointer-events: none; opacity: .5; }

/* ライフイベント */
.life-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 3px solid var(--ink); }
.life { padding: 28px 28px 24px 0; border-bottom: 3px solid var(--ink); }
.life:nth-child(even) { padding-left: 28px; padding-right: 0; border-left: 3px solid var(--ink); }
.life h3 { font-size: 24px; font-weight: 900; }
.life > p { margin: 8px 0 14px; font-size: 15px; color: var(--ink-soft); }
.life-links { list-style: none; margin: 0; padding: 0; }
.life-links li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid #d6d1c4; }
.life-links a { font-weight: 900; text-decoration: none; }
.life-links a:hover { color: var(--red); }
.life-links a::after { content: " →"; color: var(--red); }
.life-links span { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

/* 専門サイト一覧 */
.site-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.site-list li { background: var(--white); border: 3px solid var(--ink); padding: 16px 18px; }
.site-list a, .site-list strong { font-weight: 900; font-size: 17px; text-decoration: none; }
.site-list a:hover { color: var(--red); }
.site-list .domain { display: block; font-size: 12px; color: var(--ink-soft); font-family: ui-monospace, Menlo, monospace; }
.site-list p { margin: 6px 0 0; font-size: 14px; }

/* FAQ */
.faq { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 900; font-size: 17px; padding: 16px 36px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 26px; font-weight: 900; color: var(--red); }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0 0 18px; }

/* フッター */
.site-footer { background: var(--ink); color: #bdbdbd; padding: 40px 0; font-size: 14px; border-top: 8px solid var(--yellow); }
.footer-inner { display: grid; gap: 12px; }
.footer-logo { margin: 0; color: var(--white); font-weight: 700; font-size: 18px; }
.footer-logo b { color: var(--yellow); font-weight: 900; }
.footer-links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { color: #bdbdbd; }
.copy { margin: 0; color: #8a8a8a; }

/* レスポンシブ */
@media (max-width: 960px) {
  .topic-grid, .site-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .sp { display: inline; }
  .pc { display: none; }
  .global-nav { display: none; }
  .logo-text { font-size: 15px; }
  .hero { padding-top: 40px; }
  .hero-eyebrow { flex-wrap: wrap; gap: 8px; }
  .finder { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .finder input { font-size: 17px; }
  .quick { padding-bottom: 40px; }
  .section { padding: 56px 0; }
  .section-title { margin-bottom: 28px; }
  .topic-grid, .panel-grid, .life-grid, .site-list { grid-template-columns: 1fr; }
  .topic { box-shadow: 4px 4px 0 var(--ink); }
  .topic-wide { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .topic-wide .topic-no { flex-direction: row; align-items: baseline; margin-bottom: 14px; }
  .topic-wide p:not(.topic-no) { margin: 12px 0 18px; }
  .life, .life:nth-child(even) { padding: 24px 0 20px; border-left: 0; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic, .chip { transition: none; }
}
