:root {
  --page: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #eef6f4;
  --ink: #263238;
  --muted: #62727b;
  --line: #d8e3df;
  --brand: #1f7a6d;
  --brand-dark: #104b50;
  --accent: #d88932;
  --accent-soft: #fff1df;
  --link: #0b67b2;
  --shadow: 0 18px 48px rgba(21, 45, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eaf3f1 0, var(--page) 360px);
  color: var(--ink);
  font-size: 16px;
  text-align: center;
}

#main {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 40px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

a:visited {
  color: #6650a4;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

#site-hero {
  min-height: 280px;
  background:
    linear-gradient(90deg, rgba(14, 49, 54, 0.86) 0%, rgba(14, 49, 54, 0.58) 44%, rgba(14, 49, 54, 0.08) 100%),
    url("../img/site-hero.png") center / cover no-repeat;
  display: flex;
  align-items: center;
  padding: clamp(32px, 7vw, 72px);
}

#site-hero a {
  color: #fff;
  text-decoration: none;
  display: block;
  max-width: 720px;
}

.site-name {
  display: block;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.site-tagline {
  display: block;
  margin-top: 14px;
  font-size: clamp(15px, 2.1vw, 20px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

#main > table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

td {
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
  vertical-align: top;
}

#main > table > tbody > tr > td,
#main > table > tr > td {
  padding: 24px;
}

#main table table {
  max-width: 100%;
  border-collapse: collapse;
}

#main table[bgcolor="#006600"],
#main table[bgcolor="#333333"] {
  background: transparent !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 22px;
}

#main tr[bgcolor="#DFFFDF"],
#main td[bgcolor="#EEEEEE"] {
  background: var(--surface-soft) !important;
}

#main td[bgcolor="#FFFFFF"],
#main tr[bgcolor="#FFFFFF"] {
  background: var(--surface) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--brand-dark);
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 22px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  background: none;
  font-size: 28px;
  font-weight: 750;
}

h2 {
  width: auto;
  margin: 28px 0 14px;
  padding: 0 0 0 14px;
  border-left: 4px solid var(--brand);
  border-bottom: 0;
  background: none;
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 750;
  text-indent: 0;
}

h3 {
  width: auto;
  margin: 24px 0 10px;
  padding: 0 0 0 12px;
  border-top: 0;
  border-bottom: 0;
  border-left: 3px solid var(--accent);
  background: none;
  color: #293f45;
  font-size: 19px;
  font-weight: 700;
  text-indent: 0;
}

h4 {
  margin: 20px 0 8px;
  background: none;
  font-size: 17px;
  font-weight: 700;
  text-indent: 0;
}

p {
  margin: 0 0 1.05em;
}

ul,
ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

li + li {
  margin-top: 0.35em;
}

.lead {
  color: #40545b;
  font-size: 18px;
}

.content-block {
  margin: 26px 0;
}

.article-core {
  margin: 28px 0 34px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.article-support {
  margin: 34px 0 0;
  padding: 18px 20px;
  border: 1px dashed #c2d5d0;
  border-radius: 8px;
  background: #f7fbfa;
}

.article-support .search-intent-panel,
.article-support .learning-panel,
.article-support .related-nav {
  margin-top: 18px;
  margin-bottom: 18px;
}

.article-area-label {
  width: fit-content;
  margin: 0 0 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px;
}

.modern-page {
  padding: clamp(24px, 4vw, 48px);
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

table.ttype1,
table.ttype0 {
  width: 100%;
  margin: 18px 0 26px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  background: var(--surface);
}

table.ttype1 th,
table.ttype1 td,
table.ttype0 th,
table.ttype0 td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

table.ttype1 th {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.menutable td {
  font-size: 14px !important;
  line-height: 1.65;
}

.site-directory,
.learning-panel,
.search-intent-panel {
  margin: 30px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.home-directory {
  background: linear-gradient(180deg, #fbfdfc 0, #f3faf8 100%);
}

.home-primary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.home-primary-card {
  display: block;
  min-height: 178px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-dark);
  text-decoration: none;
}

.home-primary-card:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.home-primary-card strong,
.home-primary-card small {
  display: block;
}

.home-primary-card strong {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.45;
}

.home-primary-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.home-service-hub {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr);
  gap: 18px;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #c9ded9;
  border-radius: 8px;
  background: #ffffff;
}

.home-service-hub h3 {
  margin-top: 0;
}

.home-service-hub p {
  color: var(--muted);
  font-size: 14px;
}

.service-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-link-grid a {
  display: block;
  min-height: 86px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--brand-dark);
  text-decoration: none;
}

.service-link-grid a:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.service-link-grid strong,
.service-link-grid small {
  display: block;
}

.service-link-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-index-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.home-index-group h3 {
  margin: 0 0 10px;
  padding-left: 0;
  border-left: 0;
  color: var(--brand-dark);
  font-size: 16px;
}

.home-index-group a {
  display: block;
  padding: 7px 0;
  border-top: 1px solid #e7efec;
  color: var(--link);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
}

.home-index-group a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.home-knowledge-entry {
  margin-top: 18px;
}

.home-knowledge-entry a {
  display: block;
  padding: 18px 20px;
  border: 1px solid #efd3ac;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.home-knowledge-entry a:hover {
  border-color: var(--accent);
}

.home-knowledge-entry strong,
.home-knowledge-entry small {
  display: block;
}

.home-knowledge-entry strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.home-knowledge-entry small {
  color: #5f5142;
  font-size: 13px;
}

.directory-card {
  display: block;
  min-height: 158px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-dark);
  text-decoration: none;
}

.directory-card:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.directory-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #8f4d0e;
  font-size: 12px;
  font-weight: 700;
}

.directory-card strong,
.directory-card small {
  display: block;
}

.directory-card strong {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.45;
}

.directory-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.learning-goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}

.learning-goals li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.learning-goals strong,
.learning-goals span {
  display: block;
}

.learning-goals strong {
  color: var(--brand-dark);
}

.learning-goals span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.curriculum-map {
  display: grid;
  gap: 12px;
}

.curriculum-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.curriculum-card.is-current {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.curriculum-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.current-marker {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.curriculum-card p {
  color: var(--muted);
  font-size: 14px;
}

.curriculum-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.curriculum-links a,
.sub-cta a {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.intent-card {
  display: flex;
  min-height: 196px;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.intent-card span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.intent-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.intent-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.intent-card a {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.cta-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.cta-note-grid div {
  padding: 14px 16px;
  border: 1px solid #efd3ac;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.cta-note-grid strong,
.cta-note-grid span {
  display: block;
}

.cta-note-grid span {
  margin-top: 5px;
  color: #5f5142;
  font-size: 13px;
}

.sub-cta {
  margin-top: 10px;
}

.ad-unit {
  margin: 26px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  text-align: center;
}

.ad-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.related-nav {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.related-nav-head {
  margin-bottom: 16px;
}

.related-kicker {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.related-nav h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 21px;
}

.related-nav-head p:last-child {
  color: var(--muted);
}

.related-links,
.sister-link {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.related-links a,
.sister-link a {
  display: block;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--brand-dark);
  text-decoration: none;
}

.related-links a:hover,
.sister-link a:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
}

.related-links span {
  display: block;
  font-weight: 700;
}

.related-links small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.affiliate-text-nav {
  background: var(--accent-soft);
  border-color: #efd3ac;
}

.affiliate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.affiliate-cta:hover {
  background: var(--brand-dark);
}

.cta-disclosure {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.tool-panel {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tool-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 16px;
}

.tool-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.tool-grid select,
.tool-grid input {
  min-height: 44px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.tool-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #fff;
}

.reader-path-grid,
.decision-grid,
.case-grid,
.template-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.reader-path-card,
.decision-card,
.case-card,
.template-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.reader-path-card:hover,
.decision-card:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 24px rgba(31, 77, 107, 0.12);
}

.reader-path-card span,
.decision-card span,
.case-card span,
.template-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.reader-path-card strong,
.decision-card strong,
.case-card strong,
.template-card strong {
  display: block;
  line-height: 1.45;
}

.reader-path-card small,
.decision-card small,
.case-card small,
.template-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.visual-explainer {
  border-color: #dbe7ee;
  background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

.visual-flow {
  counter-reset: flow-step;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 18px;
}

.flow-step {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-step::before {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  content: counter(flow-step);
  counter-increment: flow-step;
  font-size: 13px;
  font-weight: 700;
  place-items: center;
}

.flow-step strong {
  display: block;
  line-height: 1.45;
}

.flow-step span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.mini-chart {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.chart-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(90px, 0.8fr) minmax(160px, 2fr);
  gap: 12px;
}

.chart-row strong {
  font-size: 14px;
}

.chart-bar {
  overflow: hidden;
  height: 16px;
  border-radius: 999px;
  background: #e8f0f4;
}

.chart-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.chart-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.prompt-box {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer {
  margin-top: 34px;
  padding: 26px 24px;
  border-top: 1px solid var(--line);
  background: #f8fbfa;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--brand-dark);
}

@media screen and (max-width: 760px) {
  body {
    font-size: 15px;
  }

  #main {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  #site-hero {
    min-height: 250px;
    padding: 30px 20px;
    background-position: center;
  }

  #main > table > tbody > tr > td,
  #main > table > tr > td {
    padding: 18px;
  }

  .columndown,
  .columndown tbody,
  .columndown tr,
  .columndown td {
    display: block;
    width: 100% !important;
  }

  table {
    max-width: 100%;
  }

  table.ttype1,
  table.ttype1 tbody,
  table.ttype1 tr,
  table.ttype1 th,
  table.ttype1 td {
    display: block;
    width: 100%;
  }

  table.ttype1 tr {
    border-bottom: 1px solid var(--line);
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .related-nav {
    padding: 18px;
  }

  .article-core,
  .article-support {
    padding: 16px;
  }

  .site-directory,
  .learning-panel,
  .search-intent-panel {
    padding: 18px;
  }

  .directory-card,
  .intent-card,
  .home-primary-card,
  .service-link-grid a {
    min-height: 0;
  }

  .home-primary-grid,
  .home-service-hub,
  .service-link-grid,
  .home-index-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
