/* 介護職のみちさき案内 — Phase 0 base styles.
   Theme: 静かなキャリア案内所. Independent implementation for this line
   (no runtime dependency on any other みちさき案内 line's assets) --
   deliberately not warm/"やさしさ"-emphasis styled and with no person,
   elderly, or facility photography; a calm, neutral slate-blue tone
   keeps the same quiet register as the rest of the family while reading
   as its own distinct line. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f3f6f7;
  --color-text: #212a2e;
  --color-text-muted: #55636a;
  --color-border: #dbe3e6;
  --color-accent: #35586f;
  --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; align-items: center; gap: 0.5rem; text-decoration: none; line-height: 1.3; }
.site-header__brand-text { display: flex; flex-direction: column; }
.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); }

/* Brand mark (FAMILY-VISUAL-1): small inline signpost/wayfinding icon,
   same visual family as Root's brand mark, LOW intensity. No fixed
   color of its own -- `currentColor` inherits the accent color already
   set on the surrounding .site-header__brand link (var(--color-accent)
   via the global `a` rule), so this introduces no new color token. */
.brand-mark { flex-shrink: 0; color: var(--color-accent); }

/* 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 class 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, confirmed on the sibling 保育士/
   医療技術職 lines). 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 (Family Shell requirement): LOW-MEDIUM weight --
   accent-colored text + a thin underline, not a filled/boxed "pill"
   treatment, so it reads as "you are in this section" without competing
   with the page's own content for visual weight. Applied to whichever
   single nav group's `type` matches the current page (Top has none). */
.site-nav__list a.site-nav__link--active {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.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) {
  /* Brand and nav stack as two full-width rows instead of sharing one
     flex row with align-items:center -- with the previous side-by-side
     layout, opening the mobile menu made the nav column grow tall,
     which vertically centered the (short) brand block in that now-tall
     row and stranded the logo in a large empty space to its left
     (CARE-P2 section 7). Stacking removes the shared cross-axis
     entirely: the toggle button's position and the brand's position are
     both fixed regardless of whether the menu is open or closed. */
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .site-nav { width: 100%; }
  .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); }

/* Hero/Lead structural separation (FAMILY-VISUAL-1): H1 + intro now sit
   in their own .page-hero region, set apart from the .key-points box
   below by a LOW-intensity, CSS-only Route/Node accent -- a short
   vertical "route" line with a small waypoint "node" dot at its start,
   echoing the family's Map/Route/Node/Wayfinding vocabulary without any
   image asset and without exceeding Root's own (stronger) visual
   intensity. Built entirely from the existing --color-accent token. */
.page-hero { position: relative; padding-left: 1rem; }
.page-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  bottom: 0.3em;
  width: 2px;
  background: var(--color-accent);
  opacity: 0.35;
  border-radius: 999px;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 0.4em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

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

/* Hero Key Visual (Family Design System Phase 2, TOP only): a 2-column
   region, ~60-65% text / ~35-40% visual by flex-basis, LOW-MEDIUM
   weight -- the visual is a compact companion to the H1/intro, not a
   competing focal point. .page-lede's normal reading-width cap is lifted
   only in this variant so the 2 columns have room; the text column
   itself keeps --lede-width as its own cap so paragraph measure is
   unaffected. Stacks to a single column (text above image) under
   700px, where the ~35-40% visual would otherwise be too narrow to
   read. */
.page-lede--with-visual { max-width: none; }
.hero-visual-region { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; max-width: var(--max-width); }
.hero-visual-region__text { flex: 1 1 60%; min-width: 260px; max-width: var(--lede-width); }
.hero-visual-region__visual { flex: 1 1 35%; max-width: 320px; }
.hero-visual-region__frame { display: block; aspect-ratio: 620 / 413; }
.hero-visual-region__img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 700px) {
  .hero-visual-region { flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .hero-visual-region__text { max-width: none; }
  .hero-visual-region__visual { max-width: 260px; width: 100%; margin: 0 auto; order: 2; }
}

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.6rem 0 0.6em; color: var(--color-text); }
p { max-width: 34em; }

/* Typography fix: lead/intro text is modestly distinct from body text --
   LOW-MEDIUM weight (slightly larger, muted), not a separate visual
   block. */
.lede { font-size: 1.08rem; line-height: 1.75; color: var(--color-text-muted); }

.body-list { margin: 0.6em 0 1.2em; padding-left: 1.3em; max-width: 34em; }
.body-list li { margin-bottom: 0.4em; }
.body-list li:last-child { margin-bottom: 0; }

/* ---- Presentation Normalization (PM Supplemental Review) ----
   Top's Point-of-Mention links (Wave C) render as plain link-colored text
   indistinguishable from the surrounding long-form prose. Reuses the same
   restrained language already used across the Family (Medical-Tech's
   .entry-rows / Rehab's .entry-card: border + hover fill, no shadow, no
   elevation) -- applied ONLY to Top's own list (.entry-rows is added by
   PageRenderer only when isTop), and only to items that actually resolved
   to a real link (:has(a)) so the one exact-match-less mention on this
   page (see renderListItemText's NO_INVENTED_TARGET_URL note) is left as
   plain text, not a false affordance. This is deliberately NOT applied to
   every section on this long page -- .section-heading below is the only
   other change, no box-ification of paragraphs/prose. */
.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;
}
.entry-rows { list-style: none; padding-left: 0; }
.entry-rows li:has(a) {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.55em 0.85em;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.entry-rows li:has(a):hover { border-color: var(--color-accent); background: var(--color-surface); }
.entry-rows a { font-weight: 600; text-decoration-thickness: 1.5px; }

/* Comparison tables (bugfix: real <table> markup replacing a leaked raw
   Markdown pipe-table string). Scrolls horizontally on narrow viewports
   instead of squeezing or overflowing the page. */
.table-wrap { overflow-x: auto; margin: 0.6em 0 1.2em; max-width: 100%; }
.comparison-table { border-collapse: collapse; width: 100%; min-width: 32em; font-size: 0.92rem; }
.comparison-table th,
.comparison-table td { border: 1px solid var(--color-border); padding: 0.55em 0.8em; text-align: left; vertical-align: top; }
.comparison-table thead th { background: var(--color-surface); font-weight: 700; }
.comparison-table tbody th { background: var(--color-surface); font-weight: 700; white-space: nowrap; }

/* Surface refinement (FAMILY-VISUAL-1): a left accent rule ties this
   box's surface to the same Route/Node vocabulary as .page-hero and the
   family's existing .official-info block, at LOW intensity -- one
   thin accent-colored edge, no new color, no change to the box's
   content or copy. */
.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; }

.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 site's category hub -- a
   distinct surface + grid of its 6 category groups sets it apart from
   the reading-focused prose above. */
.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__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); }

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