/* 保育士のみちさき案内 — Phase 0 base styles.
   Theme: 静かなキャリア案内所. Independent implementation for this line
   (no runtime dependency on any other みちさき案内 line's assets) --
   deliberately not pink/kawaii/child-photo styled; a calm, neutral sage
   tone keeps the same quiet register as the rest of the family. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f5f7f4;
  --color-text: #22281f;
  --color-text-muted: #545f4d;
  --color-border: #dbe3d6;
  --color-accent: #3f6b4a;
  --color-focus: #1a5c9c;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  --max-width: 780px;
  --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); }

/* PC nav (site-nav__list--pc) is a plain, always-rendered <ul> OUTSIDE
   the <details> -- deliberately NOT dependent on overriding a closed
   <details>'s internal content layout (a known bug in this
   environment's Chromium: a closed <details> box measures 0x0
   regardless of any `display` override placed on its children -- see
   src/Render/Layout.php docblock). The <details>/<summary> below is
   used only for its one genuinely reliable job: the <640px mobile
   toggle, where "closed = truly collapsed, open = truly expanded" is
   exactly the native behavior wanted, no override needed either way. */
.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list a { text-decoration: none; color: var(--color-text); font-size: 0.92rem; }
.site-nav__list a:hover { color: var(--color-accent); }

.site-nav__list--pc { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-nav__list--pc a { display: inline-block; padding: 0.25em 0; }

.site-nav__details { display: none; }
.site-nav__list--sp { display: none; }

@media (max-width: 640px) {
  .site-nav__list--pc { display: none; }
  .site-nav__details { display: block; }
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    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--sp { flex-direction: column; width: 100%; gap: 0; padding-top: 0.5rem; }
  .site-nav__list--sp 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--sp { 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; }
.page-lede { max-width: var(--lede-width); }

.page-type-eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; color: var(--color-accent); margin: 0 0 0.5em; }

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; }
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; }
.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; }

.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); }

/* Top page only: this section doubles as the "選択肢を見る領域" (P2
   section 4) -- a distinct surface + wider max-width + grid of its 7
   category groups sets it apart from the reading-focused prose above,
   without turning it into a wall of individual cards (still plain
   text/pills inside each group, just arranged side by side on desktop). */
.related-links--hub {
  max-width: var(--max-width);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
}
.related-links--hub .related-links__heading { margin-top: 0; }
@media (min-width: 780px) {
  .related-links--hub {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
  .related-links--hub .related-links__heading { grid-column: 1 / -1; }
}

/* Bordered box with a left accent rule, deliberately distinct from
   Related Links' plain pill list -- external primary source vs.
   site-internal navigation must not be visually confused. */
.official-info {
  margin-top: 2rem;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
}
.official-info__eyebrow { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--color-text-muted); margin-bottom: 0.5em; }
.official-info__note { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }
.official-info__list { list-style: none; margin: 0; padding: 0; }
.official-info__list li { margin-bottom: 0.4em; }
.official-info__list li:last-child { margin-bottom: 0; }
.official-info__link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.official-info__link::after { content: " \2197"; text-decoration: none; display: inline-block; }
.official-info__updated { margin: 0.75em 0 0; color: var(--color-text-muted); font-size: 0.82rem; }

/* ---- 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, p, a { overflow-wrap: break-word; }
