:root {
  color-scheme: light;
  --navy-900: #123b5d;
  --navy-800: #174b73;
  --navy-100: #eaf2f8;
  --blue-700: #005ea8;
  --blue-100: #e9f3fb;
  --teal-700: #146b65;
  --teal-100: #e6f4f1;
  --amber-800: #754700;
  --amber-100: #fff4d6;
  --purple-800: #563a76;
  --purple-100: #f1ebf8;
  --ink: #1b1b1b;
  --muted: #4b5563;
  --line: #b8c2cc;
  --surface: #ffffff;
  --canvas: #f4f7f9;
  --focus: #ffbf47;
  font-family: "BIZ UDPGothic", "BIZ UDPゴシック", "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.7; }
a { color: var(--blue-700); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link { position: absolute; z-index: 20; top: .5rem; left: .5rem; padding: .5rem .8rem; transform: translateY(-160%); background: white; color: var(--navy-900); border: 2px solid var(--navy-900); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--navy-900); color: white; }
.header-inner, .hero-inner, .page-wrap, .footer-inner { width: min(1440px, calc(100% - 40px)); margin-inline: auto; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: white; text-decoration: none; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid white; border-radius: 50%; font-size: 1.2rem; }
.brand-name span { margin-left: .25rem; }
.top-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.top-nav a { color: white; font-size: .92rem; text-decoration: none; }
.top-nav a:hover { text-decoration: underline; }

.hero { background: var(--navy-900); color: white; padding: 50px 0 54px; }
.hero-inner { max-width: 1440px; }
.eyebrow { margin: 0 0 .5rem; color: var(--blue-700); font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.hero .eyebrow { color: #bfe3ff; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: .75rem; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.28; }
.hero-copy { max-width: 850px; margin-bottom: 1.35rem; color: #eef6fc; font-size: 1.05rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .9rem; border: 2px solid transparent; border-radius: 4px; font-weight: 700; text-align: center; text-decoration: none; }
.button-light { background: white; color: var(--navy-900); }
.button-light:hover { background: #eaf2f8; }
.button-primary { background: var(--blue-700); color: white; }
.button-primary:hover { background: #004b87; }
.button-secondary { background: white; color: var(--navy-900); border-color: #718096; }
.button-secondary:hover { background: var(--navy-100); }
.button-quiet { background: transparent; color: var(--navy-900); border-color: transparent; text-decoration: underline; }

.page-wrap { padding: 26px 0 64px; }
.notice { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .9rem; padding: 1rem 1.1rem; background: var(--amber-100); border-left: 5px solid #9b5d00; }
.notice-label { color: var(--amber-800); font-weight: 700; white-space: nowrap; }
.notice p { margin: 0; }
.search-section, .plan-section, .about-section { padding-top: 48px; scroll-margin-top: 20px; }
.section-heading { max-width: 900px; margin-bottom: 1.25rem; }
.section-heading h2 { margin-bottom: .45rem; color: var(--navy-900); font-size: clamp(1.55rem, 2.4vw, 2rem); line-height: 1.35; }
.section-heading > p:last-child { margin-bottom: 0; color: var(--muted); }

.filter-panel { padding: 1rem 1.1rem .75rem; background: white; border: 1px solid var(--line); border-radius: 6px; }
.filter-grid { display: grid; grid-template-columns: minmax(250px, 2fr) minmax(210px, 1fr) minmax(190px, 1fr) auto; align-items: end; gap: .8rem; }
.field-group { min-width: 0; }
.field-group label, .sort-control { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 700; }
input[type="search"], input[type="text"], select, textarea { width: 100%; min-height: 44px; padding: .55rem .65rem; color: var(--ink); background: white; border: 1px solid #65727e; border-radius: 4px; }
input::placeholder, textarea::placeholder { color: #66717c; opacity: 1; }
.filter-clear { white-space: nowrap; }
.filter-hint { margin: .65rem 0 0; color: var(--muted); font-size: .85rem; }
.results-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1.2rem; margin: 1rem 0 .25rem; }
.result-count { margin: 0; font-weight: 700; }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { padding: .12rem .55rem; background: var(--navy-100); border-radius: 99px; color: var(--navy-900); font-size: .8rem; }
.table-hint { margin: .2rem 0 .55rem; color: var(--muted); font-size: .85rem; }
.empty-state { margin-top: .75rem; padding: 1.2rem; background: white; border: 1px dashed #65727e; }

.matrix-scroll { overflow: auto; max-height: none; background: white; border: 1px solid #aab6c0; border-radius: 6px; }
.evaluation-matrix { width: 100%; min-width: 1320px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.evaluation-matrix thead { position: sticky; z-index: 3; top: 0; }
.evaluation-matrix th, .evaluation-matrix td { border-right: 1px solid #cbd3da; border-bottom: 1px solid #cbd3da; }
.evaluation-matrix thead th { padding: .65rem .75rem; background: #eef3f7; text-align: left; vertical-align: top; }
.evaluation-matrix thead th:first-child { width: 205px; }
.evaluation-matrix thead th:not(:first-child) { width: 278px; }
.evaluation-matrix tbody th { width: 205px; padding: .85rem .75rem; background: #f2f6f9; color: var(--navy-900); text-align: left; vertical-align: top; font-size: .92rem; }
.evaluation-matrix tbody .domain-group-row th { width: auto; padding: .55rem .75rem; background: var(--navy-100); color: var(--navy-900); border-top: 2px solid #8a9aa8; font-size: .95rem; }
.evaluation-matrix tr > :last-child { border-right: 0; }
.evaluation-matrix tbody tr:last-child > * { border-bottom: 0; }
.column-help { display: block; margin-top: .35rem; color: #394653; font-size: .78rem; font-weight: 400; line-height: 1.45; }
.example-cell { padding: .75rem; vertical-align: top; }
.cell-category { display: none; }
.indicator-text { margin: 0 0 .55rem; font-size: .9rem; line-height: 1.55; }
.cell-sources { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; margin: 0 0 .5rem; color: var(--muted); font-size: .82rem; }
.cell-sources a { font-weight: 700; }
.cell-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; }
.cell-actions .button { min-height: 38px; padding: .35rem .65rem; font-size: .83rem; }
.matrix-source-details { font-size: .82rem; }
.matrix-source-details summary { color: var(--blue-700); font-weight: 700; cursor: pointer; }
.matrix-source-details[open] { flex-basis: 100%; }
.source-list { display: grid; gap: .4rem; margin-top: .45rem; }
.source-item { padding: .55rem .65rem; background: #f5f7f9; border-left: 3px solid #8095a7; font-size: .8rem; overflow-wrap: anywhere; }
.is-empty { color: #68737d; background: #fafbfc; font-size: .83rem; }

.category-badge { display: inline-flex; align-items: center; min-height: 27px; padding: .12rem .55rem; border: 1px solid currentColor; border-radius: 3px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.category-structure { color: var(--navy-900); background: var(--navy-100); }
.category-process { color: var(--blue-700); background: var(--blue-100); }
.category-output { color: var(--teal-700); background: var(--teal-100); }
.category-outcome { color: var(--purple-800); background: var(--purple-100); }

.plan-section { border-top: 1px solid #c6d0d8; margin-top: 1.5rem; }
.custom-entry { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: #eaf2f8; border: 1px solid #b8c9d6; border-radius: 6px; }
.custom-entry h3 { margin: 0 0 .15rem; color: var(--navy-900); font-size: 1rem; }
.custom-entry p { margin: 0; color: #394653; font-size: .9rem; }
.custom-entry .button { flex: 0 0 auto; }
.custom-form { margin-top: .7rem; padding: 1rem 1.1rem; background: white; border: 1px solid var(--line); border-radius: 6px; }
.custom-fields { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(220px, 1.2fr) minmax(190px, 1fr); gap: .8rem; }
.custom-fields label, .plan-fields label { display: block; font-size: .85rem; font-weight: 700; }
.custom-fields input, .custom-fields select, .custom-fields textarea { display: block; margin-top: .3rem; font-weight: 400; }
.required-label { display: inline-block; margin-left: .3rem; padding: 0 .35rem; border-radius: 2px; background: #fce8e6; color: #8b1c1c; font-size: .74rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.form-note { margin: .65rem 0 0; color: var(--muted); font-size: .83rem; }
.plan-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; padding: .9rem 1rem; background: var(--navy-100); border-radius: 5px; }
.plan-toolbar p { margin: 0; font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.plan-list { display: grid; gap: .8rem; margin-top: .9rem; }
.plan-empty { padding: 1rem; background: white; border: 1px dashed #a9b3bc; color: var(--muted); }
.plan-item { padding: 1rem 1.1rem; background: white; border: 1px solid var(--line); border-radius: 6px; }
.plan-item-header { display: flex; justify-content: space-between; align-items: start; gap: .7rem; margin-bottom: .8rem; }
.plan-item-heading { min-width: 0; }
.plan-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.origin-badge { display: inline-flex; align-items: center; min-height: 26px; padding: .1rem .5rem; border: 1px solid #755000; border-radius: 3px; background: #fff4d6; color: #634000; font-size: .77rem; font-weight: 700; }
.origin-example { border-color: #526c7e; background: #f1f5f8; color: #263d4c; }
.plan-domain { margin: .4rem 0 0; color: var(--navy-900); font-weight: 700; }
.source-original { margin: .2rem 0 0; color: var(--muted); font-size: .84rem; }
.remove-item { flex: 0 0 auto; min-height: 40px; padding: .35rem .55rem; border: 1px solid #9f3030; border-radius: 4px; background: white; color: #8b1c1c; text-decoration: underline; font-weight: 700; }
.plan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.plan-fields label input, .plan-fields label textarea { display: block; margin-top: .25rem; font-weight: 400; }
.plan-fields textarea { min-height: 92px; resize: vertical; }
.wide-field { grid-column: 1 / -1; }
.pdca-details { margin-top: .8rem; border-top: 1px solid #d8dee4; padding-top: .65rem; }
.pdca-details summary { width: fit-content; color: var(--blue-700); font-weight: 700; cursor: pointer; }
.pdca-fields { margin-top: .7rem; }
.plan-source { margin: .7rem 0 0; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }

.steps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0; list-style: none; }
.steps-list li { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 5px; }
.steps-list h3 { margin-bottom: .25rem; color: var(--navy-900); font-size: .98rem; }
.steps-list p { margin: 0; color: var(--muted); font-size: .9rem; }
.definition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-top: 1rem; }
.definition-grid article { padding: .9rem; background: white; border-top: 4px solid var(--navy-800); }
.definition-grid article:nth-child(2) { border-color: var(--blue-700); }
.definition-grid article:nth-child(3) { border-color: var(--teal-700); }
.definition-grid article:nth-child(4) { border-color: var(--purple-800); }
.definition-grid h3 { margin-bottom: .25rem; font-size: .91rem; }
.definition-grid p { margin: 0; color: var(--muted); font-size: .88rem; }

.site-footer { padding: 2rem 0; background: #e6ebef; border-top: 1px solid #c6d0d8; }
.footer-inner { color: #35404a; font-size: .88rem; }
.footer-title { margin-bottom: .3rem; color: var(--navy-900); font-weight: 700; }
.footer-links { margin-top: 1rem; }
.copyright { margin: 0; font-size: .8rem; }

@media (max-width: 900px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: .8rem 0; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-fields label:first-child { grid-column: 1 / -1; }
  .steps-list { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .header-inner, .hero-inner, .page-wrap, .footer-inner { width: min(100% - 28px, 1440px); }
  .hero { padding: 40px 0 44px; }
  .brand-name { font-size: .92rem; }
  .top-nav { gap: .85rem; }
  .notice { grid-template-columns: 1fr; gap: .2rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-clear { justify-self: start; }
  .matrix-scroll { max-height: none; overflow: visible; border: 0; background: transparent; }
  .evaluation-matrix { display: block; min-width: 0; }
  .evaluation-matrix thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .evaluation-matrix tbody { display: grid; gap: .8rem; }
  .evaluation-matrix tbody tr { display: block; overflow: hidden; background: white; border: 1px solid #aab6c0; border-radius: 6px; }
  .evaluation-matrix tbody th { display: block; width: auto; padding: .75rem .85rem; border: 0; border-bottom: 1px solid #cbd3da; }
  .evaluation-matrix tbody td { display: grid; grid-template-columns: minmax(95px, 27%) minmax(0, 1fr); gap: .25rem .65rem; padding: .75rem .85rem; border: 0; border-bottom: 1px solid #e0e5e9; }
  .evaluation-matrix tbody tr td:last-child { border-bottom: 0; }
  .cell-category { display: block; grid-column: 1; grid-row: 1 / span 3; }
  .cell-category .category-badge { white-space: normal; }
  .indicator-text { grid-column: 2; margin: 0; }
  .cell-sources { grid-column: 2; margin: .25rem 0 0; }
  .cell-actions { grid-column: 2; margin-top: .15rem; }
  .is-empty { min-height: 54px; }
  .is-empty::before { content: attr(data-label); color: var(--muted); font-weight: 700; }
  .custom-entry { align-items: flex-start; flex-direction: column; }
  .custom-entry .button { width: 100%; }
  .custom-fields { grid-template-columns: 1fr; }
  .custom-fields label:first-child { grid-column: auto; }
  .plan-fields, .definition-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .plan-toolbar { align-items: flex-start; }
  .plan-toolbar .button-row { width: 100%; }
  .plan-toolbar .button-row .button { flex: 1 1 auto; }
}


.references-section { padding: 2rem 0; background: white; border-top: 1px solid var(--line); }
.references-inner { width: min(1440px, calc(100% - 40px)); margin-inline: auto; }
.references-inner h2 { margin-bottom: .4rem; color: var(--navy-900); font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
.references-inner > p:not(.eyebrow) { color: var(--muted); }
.reference-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.1rem; margin: 1rem 0 0; padding-left: 1.75rem; }
.reference-list li { padding: .75rem .85rem .75rem .35rem; border-bottom: 1px solid var(--line); }
.reference-copy strong { color: var(--ink); line-height: 1.5; }
.reference-copy p { margin: .3rem 0 .45rem; color: var(--muted); font-size: .86rem; }
.reference-list a { font-size: .9rem; font-weight: 700; }
@media (max-width: 700px) {
  .reference-list { grid-template-columns: 1fr; }
}
