/* リハビリ職のみちさき案内 — Phase 0/P2 base styles.
   Theme: 静かなキャリア案内所. Restrained visual system per Phase 0 scope
   (template/nav spec section 7): no ranking cues, no image-heavy hero,
   calm whitespace, white ground with a quiet blue-green accent. Phase P2
   adds: readable width hierarchy on Top, a zero-JS mobile nav disclosure,
   lightweight (non-card) section grouping for Top's 5 entry points, and a
   clearer visual split between body links / Related Links / Official
   Information Link so the last never reads as an affiliate-style CTA. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f6f9f9;
  --color-text: #1f2a2c;
  --color-text-muted: #45565a;
  --color-border: #dbe6e6;
  --color-accent: #2c7a72;
  --color-focus: #1a5c9c;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  --max-width: 780px;
  --max-width-wide: 960px;
  --lede-width: 680px;
  --space-section: 3rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
}

img { max-width: 100%; }

a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 0.5em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3.25rem;
}
.site-header__brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.3;
}
.site-header__site-name {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.site-header__line-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

/* <details>/<summary> is a native, script-free disclosure widget --
   keyboard-operable and focus-visible out of the box. At desktop width
   the details block is forced permanently "open" (see media query
   below) and the <summary> marker/affordance is hidden, so it reads as
   a plain nav list; only <640px does it behave as a real toggle. */
.site-nav__details { position: relative; }
.site-nav__toggle {
  display: none;
  cursor: pointer;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.55em 0.9em;
  font-size: 0.95rem;
  user-select: none;
}
.site-nav__toggle::-webkit-details-marker { display: none; }
.site-nav__toggle::after {
  content: "";
  display: inline-block;
  margin-left: 0.4em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.site-nav__details[open] .site-nav__toggle::after { transform: rotate(-135deg); }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.site-nav__list a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  padding: 0.25em 0;
}
.site-nav__list a:hover { color: var(--color-accent); }

@media (max-width: 640px) {
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px; /* comfortable, mis-tap-resistant tap target */
  }
  .site-nav__list {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 0.5rem;
  }
  .site-nav__list a {
    display: block;
    padding: 0.75em 0.25em;
    border-top: 1px solid var(--color-border);
    min-height: 44px;
  }
  .site-nav__details[open] .site-nav__list { display: flex; }
}

/* ---- Breadcrumb ---- */
.breadcrumb { max-width: var(--max-width); margin: 1rem auto 0; padding: 0 1rem; }
.breadcrumb__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.breadcrumb__item:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
}
.breadcrumb__item a { color: var(--color-text-muted); }

/* ---- Main content ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1rem 3.5rem;
}
main.main--wide { max-width: var(--max-width-wide); }

/* H1 / Intro / Key Points stay at a narrower reading width even inside
   the wider Top <main> -- this is what makes the page read as "H1, then
   intro, then a clear next thing" instead of one undifferentiated block
   of centered text (REHAB-P2 section 2A). */
.page-lede { max-width: var(--lede-width); }

h1 { font-size: 1.7rem; line-height: 1.5; margin: 0.2em 0 0.8em; max-width: 18em; }
h2 { font-size: 1.25rem; margin: var(--space-section) 0 0.7em; }
h3 { font-size: 1.05rem; margin: 1.4em 0 0.5em; }

p { max-width: 34em; }

.key-points {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
}
.key-points__heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 0.6em;
  text-transform: none;
}
.key-points__list { margin: 0; padding-left: 1.2em; }
.key-points__list li { margin-bottom: 0.5em; }
.key-points__list li:last-child { margin-bottom: 0; }

.inline-links { display: flex; flex-direction: column; gap: 0.3em; }
.inline-links a { font-weight: 600; }

/* ---- Top page: section entry points (資格/働く場所・分野/仕事の探し方/
   サービス/ガイド) -- a light "which group am I in" cue via a colored
   kicker rule above each H2, plus a lightweight item grid. Deliberately
   NOT shadowed/elevated cards, per P2 section 2C's "カードだらけにしな
   い" constraint: a border and a soft fill on hover is as far as this
   goes. */
.entry-group { margin-top: var(--space-section); }
.entry-group__heading {
  position: relative;
  padding-top: 0.9rem;
}
.entry-group__heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.entry-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--color-bg);
}
.entry-card h3 { margin: 0 0 0.4em; font-size: 1rem; }
.entry-card p { margin: 0 0 0.7em; font-size: 0.92rem; color: var(--color-text-muted); }
.entry-card .inline-links { margin: 0; }
.entry-card .inline-links a { font-size: 0.92rem; }

/* Service chips on Top: same family as .entry-card's link styling, used
   for the two 紹介型/直接応募＋スカウト groups (converted to real links
   in Phase P2 -- same service names, same target pages already defined
   in Phase 0, no wording change). */
.entry-chip-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.entry-chip-list a {
  display: inline-block;
  padding: 0.5em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.entry-chip-list a:hover { border-color: var(--color-accent); }

.related-links {
  margin-top: var(--space-section);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.related-links__group { margin-bottom: 1.25rem; }
.related-links__group-heading { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 600; }
.related-links__list { list-style: none; padding: 0; margin: 0.4em 0 0; display: flex; flex-wrap: wrap; gap: 0.5em 1em; }
.related-links__list a {
  display: inline-block;
  padding: 0.4em 0.8em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}
.related-links__list a:hover { border-color: var(--color-accent); }

/* Official Information Link -- deliberately styled as a plain, labeled
   text link (an eyebrow label + underlined link), never a bordered
   button/pill: P2 section 8/9 explicitly require this to read as "go
   verify the primary source", not as an affiliate-style CTA. */
.official-info { margin-top: 2rem; }
.official-info__eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.35em;
}
.official-info__note { color: var(--color-text-muted); font-size: 0.9rem; }
.official-info__link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.updated-info { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 1rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.site-footer__line { margin: 0 0 0.3em; }
.site-footer__tagline { margin: 0; }

/* ---- Guardrails ---- */
h1, h2, h3, p, a { overflow-wrap: break-word; }
