.subpage-body { background: #f4f9ff; }
.subpage-main { overflow: hidden; }
.subpage-hero { position: relative; overflow: hidden; padding: 44px 0 58px; background: linear-gradient(145deg, #f8fbff 0%, #eaf4ff 58%, #f8fcff 100%); }
.subpage-hero::before, .subpage-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.subpage-hero::before { top: -260px; right: 6%; width: 480px; height: 480px; background: rgba(60,142,255,.1); }
.subpage-hero::after { bottom: -140px; left: -80px; width: 270px; height: 270px; background: rgba(40,197,184,.07); }
.subpage-hero .shell { position: relative; z-index: 1; }
.subpage-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 58px; margin-top: 28px; }
.subpage-hero-grid.single-column { grid-template-columns: minmax(0, 900px); }
.subpage-hero-grid.single-column .subpage-hero-copy { max-width: 900px; }
.subpage-hero-copy h1 { max-width: 720px; margin: 16px 0 14px; font-size: clamp(38px, 4.7vw, 62px); line-height: 1.15; }
.subpage-hero-copy > p { max-width: 660px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.subpage-notice { margin-top: 22px; padding: 14px 16px; color: #526b89; background: rgba(255,255,255,.74); border: 1px solid #d8e7f8; border-radius: 14px; font-size: 13px; line-height: 1.7; }
.subpage-visual { min-height: 310px; display: grid; place-items: center; padding: 36px; color: var(--blue-dark); background: linear-gradient(150deg, rgba(255,255,255,.9), rgba(220,237,255,.92)); border: 1px solid #d4e5f8; border-radius: 30px 30px 74px 30px; box-shadow: 0 20px 55px rgba(31,75,132,.1); text-align: center; }
.subpage-visual-mark { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 20px; color: #fff; background: var(--blue); border-radius: 25px; font-size: 34px; font-weight: 800; }
.subpage-visual strong, .subpage-visual small { display: block; }
.subpage-visual strong { font-size: 23px; }
.subpage-visual small { margin-top: 8px; color: #7288a4; font-size: 13px; }
.subpage-content { padding: 60px 0 76px; background: linear-gradient(180deg, #fff, #f4f9ff); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.content-stack { display: grid; gap: 16px; }
.content-card { padding: 28px; background: #fff; border: 1px solid #dfeaf7; border-radius: 22px; box-shadow: 0 12px 34px rgba(31,75,132,.055); }
.content-card h2 { margin: 0 0 12px; font-size: 25px; }
.content-card h3 { margin: 20px 0 8px; font-size: 18px; }
.content-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.content-card ul, .content-card ol { display: grid; gap: 9px; margin: 14px 0 0; padding-left: 22px; color: #526982; line-height: 1.7; }
.content-card li::marker { color: var(--blue); font-weight: 800; }
.content-side { position: sticky; top: 96px; display: grid; gap: 14px; }
.side-card { padding: 23px; background: #edf6ff; border: 1px solid #d1e4fa; border-radius: 20px; }
.side-card h2 { margin: 0 0 10px; font-size: 20px; }
.side-card p { margin: 0; color: #617790; font-size: 13px; line-height: 1.75; }
.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; margin-top: 18px; padding: 0 18px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 12px; font-weight: 800; box-shadow: 0 9px 20px rgba(60,142,255,.2); transition: .2s ease; }
.action-button:hover { transform: translateY(-2px); background: var(--blue-dark); border-color: var(--blue-dark); }
.action-button b { font-size: 18px; line-height: 1; }
.action-button.secondary { color: var(--blue-dark); background: #fff; box-shadow: none; }
.detail-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.detail-process li { min-height: 120px; padding: 17px; background: #f5f9ff; border: 1px solid #dce9f8; border-radius: 16px; }
.detail-process b { display: block; margin-bottom: 8px; color: var(--blue); font-size: 13px; }
.detail-process strong { display: block; font-size: 15px; }
.detail-process span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.nursing-service-directory { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.nursing-service-directory a { min-height: 132px; display: flex; flex-direction: column; align-items: flex-start; padding: 18px; color: inherit; background: #f6faff; border: 1px solid #dce9f8; border-radius: 16px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.nursing-service-directory a:hover { transform: translateY(-3px); border-color: #acd0fb; box-shadow: 0 12px 28px rgba(31,75,132,.08); }
.nursing-service-directory strong { color: var(--ink); font-size: 17px; }
.nursing-service-directory small { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.nursing-service-directory span { margin-top: auto; padding: 6px 11px; color: #fff; background: var(--blue-dark); border-radius: 8px; font-size: 12px; font-weight: 800; }
.home-service-contact { display: grid; gap: 5px; margin-top: 18px; padding: 16px 18px; color: #365878; background: #edf6ff; border: 1px solid #d6e7fa; border-radius: 14px; }
.home-service-contact strong { font-size: 14px; }
.home-service-contact strong a { color: var(--blue-dark); }
.home-service-contact span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.service-detail-list { grid-template-columns: 1fr 1fr; gap: 10px 18px; padding-left: 0 !important; list-style: none; }
.service-detail-list li { position: relative; padding: 12px 14px 12px 42px; color: #48627f; background: #f6faff; border: 1px solid #dce9f8; border-radius: 13px; font-size: 15px; line-height: 1.7; }
.service-detail-list li::before { content: "✓"; position: absolute; top: 16px; left: 14px; width: 18px; height: 18px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 11px; font-weight: 900; line-height: 1; }
.service-variant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.service-variant-grid article { padding: 18px; background: #f6faff; border: 1px solid #dce9f8; border-radius: 16px; }
.service-variant-grid h3 { margin: 0 0 8px; color: var(--ink); font-size: 17px; }
.service-variant-grid p { font-size: 14px; line-height: 1.75; }
.testing-intro { margin-bottom: 20px !important; }
.testing-group + .testing-group { margin-top: 26px; padding-top: 24px; border-top: 1px solid #e1ebf7; }
.testing-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--ink); font-size: 19px; }
.testing-group h3 span { padding: 4px 8px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 999px; font-size: 12px; }
.testing-name-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px !important; margin-top: 0 !important; padding: 0 !important; list-style: none; }
.testing-name-grid li { position: relative; min-height: 45px; padding: 11px 10px 11px 34px; color: #48627f; background: #f7faff; border: 1px solid #e0ebf7; border-radius: 11px; font-size: 13px; line-height: 1.55; }
.testing-name-grid li::before { content: "✓"; position: absolute; top: 14px; left: 11px; width: 15px; height: 15px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 9px; font-weight: 900; line-height: 1; }

@media (min-width: 901px) {
  .testing-name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .testing-name-grid li { min-height: 58px; display: flex; align-items: center; padding: 12px 14px 12px 42px; font-size: 14px; line-height: 1.6; text-wrap: balance; }
  .testing-name-grid li::before { top: 50%; left: 14px; transform: translateY(-50%); }
  .service-detail-list li { min-height: 56px; display: flex; align-items: center; text-wrap: balance; }
  .service-detail-list li::before { top: 50%; transform: translateY(-50%); }
}
.content-card-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.content-card-heading h2 { margin-top: 6px; margin-bottom: 0; }
.content-card-heading > p { max-width: 440px; font-size: 13px; }
.specialty-name-grid { grid-template-columns: repeat(3, 1fr); gap: 9px !important; padding-left: 0 !important; list-style: none; counter-reset: specialty-service; }
.specialty-name-grid li { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #365878; background: #f6faff; border: 1px solid #dce9f8; border-radius: 12px; font-size: 13px; line-height: 1.45; counter-increment: specialty-service; }
.specialty-name-grid li::before { content: counter(specialty-service, decimal-leading-zero); flex: 0 0 auto; color: #7fa8d6; font-size: 11px; font-weight: 800; }
.listing-page { padding: 58px 0 78px; background: linear-gradient(180deg, #fff, #f4f9ff); }
.listing-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.listing-heading h1 { margin: 12px 0 0; font-size: clamp(36px, 4.5vw, 56px); }
.listing-heading p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.75; }
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.listing-card { overflow: hidden; display: flex; flex-direction: column; background: #fff; border: 1px solid #dfeaf7; border-radius: 22px; transition: .2s ease; }
.listing-card:hover { transform: translateY(-4px); border-color: #bdd8f7; box-shadow: 0 16px 38px rgba(31,75,132,.08); }
.listing-cover { overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; color: #5d80a7; background: linear-gradient(145deg, #ddecff, #edf7ff); font-size: 14px; }
.listing-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.listing-card-body small { color: var(--blue-dark); font-weight: 800; }
.listing-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.listing-meta time { color: #8796a8; font-size: 13px; }
.listing-card-body h2 { min-height: 58px; margin: 9px 0; display: -webkit-box; overflow: hidden; font-size: 20px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.listing-card-body p { min-height: 72px; margin: 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.listing-card-body .action-button { align-self: flex-start; margin-top: auto; padding-top: 12px; padding-bottom: 12px; }
.listing-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; }
.listing-pagination > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.listing-pagination a, .listing-pagination span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dfeaf7; border-radius: 12px; background: #fff; color: var(--blue-dark); font-weight: 700; }
.listing-pagination a:hover, .listing-pagination a:focus-visible, .listing-pagination a.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.listing-pagination .disabled { color: var(--muted); opacity: .55; }
.article-page { padding: 50px 0 80px; background: linear-gradient(180deg, #f4f9ff, #fff); }
.article-shell { width: min(860px, calc(100% - 40px)); }
.article-header { margin-bottom: 24px; padding: 36px; background: #fff; border: 1px solid #dfeaf7; border-radius: 25px; }
.article-header h1 { margin: 13px 0; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.3; }
.article-header p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 17px; color: #75879c; font-size: 14px; }
.article-meta time, .article-meta span { display: inline-flex; align-items: center; }
.article-body { padding: 38px; background: #fff; border: 1px solid #dfeaf7; border-radius: 25px; }
.article-body h2 { margin: 30px 0 12px; font-size: 24px; }
.article-body h2:first-child { margin-top: 0; }
.article-body p { color: #526982; font-size: 16px; line-height: 2; }
.article-placeholder { margin: 22px 0; padding: 44px 20px; color: #6683a5; background: #eaf4ff; border-radius: 18px; text-align: center; }
.article-image-placeholder { overflow: hidden; margin: 26px 0 32px; color: #6683a5; background: #f4f9ff; border: 1px solid #d4e6fa; border-radius: 18px; }
.article-image-placeholder img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.article-image-placeholder figcaption { display: flex; flex-direction: column; gap: 6px; padding: 13px 18px 16px; }
.article-image-placeholder strong { color: #315d89; font-size: 18px; }
.article-image-placeholder span { font-size: 14px; }
.article-cover-placeholder { margin-top: 0; }
.article-section { padding-top: 8px; }
.article-section + .article-section { margin-top: 26px; padding-top: 28px; border-top: 1px solid #edf2f8; }
.article-section h2 { margin-top: 0; }
.article-lead { margin: 0 0 28px; padding: 20px 22px; color: #244d79 !important; background: #f1f7ff; border-left: 4px solid var(--blue); border-radius: 0 14px 14px 0; font-weight: 650; }
.article-section + .article-section { border-top: 1px solid #edf2f8; }
.article-note { margin: 30px 0; padding: 20px 22px; background: #eaf4ff; border: 1px solid #d4e6fa; border-radius: 16px; }
.article-note strong { color: var(--blue-dark); font-size: 17px; }
.article-note p { margin: 7px 0 0; }
.article-related-services > div { display: flex; flex-wrap: wrap; gap: 10px; }
.article-related-services a { padding: 10px 18px; color: var(--blue-dark); background: #f1f7ff; border: 1px solid #cfe2f8; border-radius: 10px; font-weight: 750; }
.article-related-reading > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.article-related-reading a { display: flex; flex-direction: column; gap: 6px; padding: 17px 18px; background: #f8fbff; border: 1px solid #dfeaf7; border-radius: 14px; }
.article-related-reading small { color: var(--blue-dark); font-weight: 750; }
.article-related-reading strong { color: var(--ink); line-height: 1.55; }
.article-back { margin-top: 30px; }
.legal-page { padding: 54px 0 80px; background: linear-gradient(180deg, #f4f9ff, #fff); }
.legal-shell { width: min(920px, calc(100% - 40px)); }
.legal-header { margin-bottom: 20px; }
.legal-header h1 { margin: 13px 0 8px; font-size: clamp(36px, 4.5vw, 54px); }
.legal-header p { color: var(--muted); }
.legal-card { padding: 38px; background: #fff; border: 1px solid #dfeaf7; border-radius: 24px; }
.legal-card h2 { margin: 30px 0 10px; font-size: 22px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { color: #526982; line-height: 1.9; }
.error-page { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 50px 20px; background: radial-gradient(circle at 72% 18%, rgba(60,142,255,.18), transparent 34%), linear-gradient(145deg, #f8fbff, #eaf4ff); }
.error-card { width: min(720px, 100%); padding: 58px; background: rgba(255,255,255,.88); border: 1px solid #d7e7f8; border-radius: 32px; box-shadow: 0 24px 60px rgba(31,75,132,.11); text-align: center; }
.error-code { color: var(--blue); font-size: clamp(80px, 15vw, 150px); font-weight: 900; line-height: .9; }
.error-card h1 { margin: 24px 0 9px; font-size: 34px; }
.error-card p { color: var(--muted); line-height: 1.7; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

@media (max-width: 900px) {
  .subpage-hero-grid, .content-layout { grid-template-columns: 1fr; }
  .subpage-visual { min-height: 240px; }
  .content-side { position: static; grid-template-columns: 1fr 1fr; }
  .detail-process { grid-template-columns: 1fr 1fr; }
  .listing-grid { grid-template-columns: 1fr 1fr; }
  .service-variant-grid { grid-template-columns: 1fr; }
  .testing-name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .subpage-hero { padding: 30px 0 42px; }
  .subpage-hero-grid { gap: 26px; }
  .subpage-hero-copy h1 { font-size: 38px; }
  .subpage-hero-copy > p { font-size: 16px; }
  .subpage-visual { min-height: 210px; padding: 28px 18px; border-radius: 24px 24px 50px 24px; }
  .subpage-content, .listing-page { padding: 42px 0 58px; }
  .content-card, .article-header, .article-body, .legal-card { padding: 23px 20px; border-radius: 20px; }
  .content-side, .listing-grid { grid-template-columns: 1fr; }
  .detail-process { grid-template-columns: 1fr; }
  .nursing-service-directory { grid-template-columns: 1fr; }
  .service-detail-list, .specialty-name-grid { grid-template-columns: 1fr; }
  .testing-name-grid { grid-template-columns: 1fr; }
  .content-card-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .listing-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .article-shell, .legal-shell { width: min(100% - 28px, 920px); }
  .article-related-reading > div { grid-template-columns: 1fr; }
  .error-card { padding: 42px 22px; }
}

/* Desktop subpages inherit the shared design tokens from styles.css. */
@media (min-width: 1024px) {
  .subpage-hero { padding: var(--space-7) 0 var(--space-8); }
  .subpage-hero-grid { gap: var(--space-7); margin-top: var(--space-5); }
  .subpage-hero-copy h1 { margin: var(--space-3) 0 var(--space-2); font-size: var(--font-page-h1); }
  .subpage-hero-copy > p { font-size: var(--font-body); line-height: 1.75; }
  .subpage-notice { margin-top: var(--space-4); padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); font-size: var(--font-body-small); line-height: 1.7; }
  .subpage-visual { min-height: 304px; padding: var(--space-5); border-radius: var(--radius-section); }
  .subpage-visual-mark { margin-bottom: var(--space-3); border-radius: var(--radius-control); }

  .subpage-content { padding: var(--space-8) 0 var(--space-9); }
  .content-layout { gap: var(--space-4); }
  .content-stack { gap: var(--space-4); }
  .content-card { padding: var(--space-5); border-radius: var(--radius-card); }
  .content-card h2 { margin-bottom: var(--space-2); font-size: var(--font-card-title); }
  .content-card h3 { margin: var(--space-4) 0 var(--space-1); font-size: var(--font-title); }
  .content-card p { font-size: var(--font-body); line-height: 1.7; }
  .content-card ul,
  .content-card ol { gap: var(--space-2); margin-top: var(--space-3); line-height: 1.7; }
  .content-side { gap: var(--space-3); }
  .side-card { padding: var(--space-4); border-radius: var(--radius-card); }
  .side-card h2 { margin-bottom: var(--space-2); font-size: var(--font-card-title); }
  .side-card p { font-size: var(--font-body-small); line-height: 1.7; }

  .action-button { min-height: var(--button-height); gap: var(--space-1); margin-top: var(--space-3); padding: 0 var(--space-4); border-radius: var(--radius-control); font-size: var(--font-body-small); line-height: 1; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
  .action-button:active { transform: translateY(0); }
  .action-button:focus-visible { outline: 3px solid rgba(60,142,255,.32); outline-offset: 3px; }

  .detail-process { gap: var(--space-3); margin-top: var(--space-3); }
  .detail-process li { padding: var(--space-3); border-radius: var(--radius-control); }
  .nursing-service-directory { gap: var(--space-3); margin-top: var(--space-4); }
  .nursing-service-directory a { padding: var(--space-4); border-radius: var(--radius-card); }
  .home-service-contact { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); }
  .service-detail-list { gap: var(--space-3); }
  .service-detail-list li,
  .service-variant-grid article { border-radius: var(--radius-control); }
  .service-variant-grid { gap: var(--space-3); margin-top: var(--space-4); }
  .testing-group + .testing-group { margin-top: var(--space-5); padding-top: var(--space-4); }
  .testing-name-grid { gap: var(--space-2) !important; }

  .listing-page { padding: var(--space-8) 0 var(--space-9); }
  .listing-heading { gap: var(--space-5); margin-bottom: var(--space-5); }
  .listing-heading h1 { margin-top: var(--space-2); font-size: var(--font-page-h1); }
  .listing-grid { gap: var(--space-4); }
  .listing-card { border-radius: var(--radius-card); }
  .listing-cover { aspect-ratio: 16 / 9; }
  .listing-card-body { padding: var(--space-4); }
  .listing-card-body h2 { font-size: var(--font-card-title); }
  .listing-card-body p { font-size: var(--font-body-small); line-height: 1.7; }
  .listing-meta small,
  .listing-meta time { font-size: var(--font-meta); }

  .article-page { padding: var(--space-8) 0 var(--space-9); }
  .article-shell,
  .legal-shell { width: min(var(--reading-width), calc(100% - (var(--page-gutter) * 2))); }
  .article-header { margin-bottom: var(--space-4); padding: var(--space-5); border-radius: var(--radius-card); }
  .article-header h1 { margin: var(--space-2) 0; font-size: var(--font-page-h1); }
  .article-header p { font-size: var(--font-body); line-height: 1.7; }
  .article-body { padding: var(--space-5); border-radius: var(--radius-card); }
  .article-body h2 { margin: var(--space-5) 0 var(--space-2); font-size: var(--font-card-title); }
  .article-body p { font-size: var(--font-body); line-height: 1.75; }
  .article-image-placeholder { margin: var(--space-4) 0 var(--space-5); border-radius: var(--radius-card); }
  .article-image-placeholder img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .article-image-placeholder figcaption { gap: var(--space-1); padding: var(--space-2) var(--space-3) var(--space-3); }
  .article-lead,
  .article-note { padding: var(--space-4); border-radius: var(--radius-control); }
  .article-related-reading > div { gap: var(--space-3); }
  .article-related-reading a { padding: var(--space-3); border-radius: var(--radius-control); }

  .legal-page { padding: var(--space-8) 0 var(--space-9); }
  .legal-card { padding: var(--space-5); border-radius: var(--radius-card); }
  .legal-header h1 { font-size: var(--font-page-h1); }
  .error-page { min-height: 0; padding: var(--space-9) var(--space-4); }
  .error-card { padding: var(--space-7); border-radius: var(--radius-section); }
}
