/* 保育士のみちさき案内 — 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;
  /* Bug fix in scope: was a bare 1040px literal on .site-header__inner,
     the only hardcoded width in the file while everything else used a
     token. Value unchanged -- tokenized only. */
  --header-max-width: 1040px;
}

* { 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: var(--header-max-width);
  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;
}
/* Family Root Return + Profession Top Return: two distinct, adjacent
   links inside a plain (non-link) wrapper. `color` stays on the wrapper
   so the brand mark's `currentColor` still resolves to --color-accent,
   same as when the wrapper itself was the single <a>. */
.site-header__brand { display: flex; align-items: center; gap: 0.55rem; color: var(--color-accent); }
.site-header__brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.site-header__brand-text a { text-decoration: none; }
.site-header__brand-text a:hover { text-decoration: underline; }
.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); }

/* FAMILY-VISUAL-1 brand mark: sized to sit comfortably beside the
   two-line text at header height; color comes from `currentColor`
   resolving to the surrounding link's `color` (--color-accent), no new
   token. */
.brand-mark { flex-shrink: 0; }

/* 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); }
/* Active Navigation: LOW-intensity state (accent color + weight only, no
   background/pill) for the nav item matching the current page's category.
   Set via the [aria-current="page"] attribute rather than a class. */
.site-nav__list a[aria-current="page"] { color: var(--color-accent); font-weight: 700; }

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

/* FAMILY-VISUAL-1 Hero/Lead: groups the eyebrow + H1 + intro into their
   own region, with a LOW-intensity CSS-only Route/Node accent (a thin
   route line + a single waypoint node) in the left gutter -- the same
   Map/Route/Node/Wayfinding vocabulary as the family's Root portal, kept
   deliberately quiet here (2px line, one small dot, muted border color)
   since every Child site must read as MEDIUM/LOW, never as strong as
   Root's own Hero. No new color token: the node reuses --color-accent,
   the line reuses --color-border. */
.page-hero { position: relative; padding-left: 1.25rem; }
.page-hero::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.4em;
  bottom: 0.6em;
  width: 2px;
  background: var(--color-border);
}
.page-hero::after {
  content: "";
  position: absolute;
  left: calc(0.5rem - 3px);
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Family Design System Phase 2 Hero Key Visual (TOP only -- see
   Config::HERO_VISUALS). Text:Visual kept at roughly 70:30, the smallest
   visual proportion in the family, matching this site's LOW visual-
   weight mandate. No upscale, no crop: object-fit:contain shows the full
   Adopted Master composition at a modest size. */
.page-hero__inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.page-hero__text { flex: 7 1 0%; min-width: 0; }
.page-hero__visual { flex: 3 1 0%; max-width: 230px; }
.page-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .page-hero__inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .page-hero__visual { max-width: 180px; align-self: center; }
}

/* Typography fix: lead paragraphs (.page-hero intro) previously had no
   distinct styling from body text. Kept very subtle -- muted color only,
   same size as body -- per this site's quiet tone. */
.page-hero__lead { color: var(--color-text-muted); }

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

/* Left accent border reuses the same "route waypoint" treatment already
   established by .official-info below, tying this early surface into the
   same quiet visual family instead of introducing a new pattern. */
.key-points { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 3px solid var(--color-accent); 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; }

/* Family PM Wave C: Top page's "状況から見る" section-CTA link (see
   PageRenderer::renderSectionCta) -- the one Top section whose own
   prose names no specific page, so it needs an explicit way into its
   single child page rather than a Point-of-Mention inline link. Reuses
   .official-info__link's underline+arrow treatment (just a same-site
   "->" instead of that one's external "up-right" glyph) so this stays
   inside the site's existing restrained link-styling vocabulary instead
   of introducing a new visual pattern. */
.section-cta { margin: 0.6em 0 0; }
.section-cta__link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.section-cta__link::after { content: " \2192"; text-decoration: none; display: inline-block; }

/* ---- Presentation Normalization (PM Supplemental Review) ----
   Category説明→Hub/Detail CTA visibility. Two gaps: (1) Top's 8 H2
   sections had no visual grouping cue, same accent-bar kicker added
   family-wide (Medical-Tech/Care) below; (2) the Point-of-Mention terms
   named inline in running prose (.pom-link, e.g. "保育所"「認定こども園」
   within a sentence) were plain link-colored text with no more weight
   than surrounding prose. A bordered row/pill would break sentence flow,
   so this uses the same restrained "link affordance" idea at prose
   weight: bolder + a heavier accent underline, no box -- the paragraph
   itself is untouched, only the linked terms gain distinction. */
.section-heading {
  position: relative;
  padding-top: 0.8rem;
}
.section-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.pom-link { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.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 (Family Common Footer, QA-2U §1) ---- */
.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__inner { max-width: var(--width-shell, 960px); margin: 0 auto; }
.site-footer__brand { margin: 0 0 0.3em; font-weight: 700; }
.site-footer__tagline { margin: 0; }
.site-footer__legal-nav ul { list-style: none; margin: 0.85em 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; }
.site-footer__root-link,
.site-footer__company,
.site-footer__contact,
.site-footer__copyright { margin: 0.5em 0 0; }
.site-footer__root-link a,
.site-footer__company a { color: var(--color-text-muted); }

/* ---- Comparison table (architecture only -- see PageRenderer::
   renderComparisonTable; no page currently renders a 'table' block) ---- */
.comparison-table-wrap { overflow-x: auto; margin: var(--space-section) 0; }
.comparison-table { border-collapse: collapse; width: 100%; min-width: 32em; font-size: 0.92rem; }
.comparison-table caption { text-align: left; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 0.5em; }
.comparison-table th, .comparison-table td { border: 1px solid var(--color-border); padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
.comparison-table thead th { background: var(--color-surface); font-weight: 700; }
.comparison-table th[scope="row"] { font-weight: 600; background: var(--color-surface); }

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