:root {
  --ink: #17211d;
  --ink-deep: #0d1713;
  --muted: #54635d;
  --paper: #f6f8f3;
  --surface: #ffffff;
  --soft: #edf4ef;
  --line: rgba(23, 33, 29, 0.14);
  --line-strong: rgba(23, 33, 29, 0.24);
  --green: #1e6b4f;
  --teal: #1f7f8c;
  --coral: #c85f48;
  --amber: #d8a13d;
  --indigo: #4b5fa8;
  --white: #fffefa;
  --shadow: 0 18px 46px rgba(23, 33, 29, 0.12);
  --content: 1160px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--ink-deep);
  background: rgba(216, 161, 61, 0.35);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  margin-bottom: 0;
}

.container,
.qc-container {
  width: min(100% - 40px, var(--content));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px max(20px, calc((100vw - var(--content)) / 2));
  color: var(--ink);
  background: rgba(255, 254, 250, 0.9);
  border-bottom: 1px solid rgba(23, 33, 29, 0.12);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 254, 250, 0.96);
  border-color: rgba(23, 33, 29, 0.18);
  box-shadow: 0 10px 28px rgba(23, 33, 29, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  line-height: 1;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: var(--white);
  object-fit: cover;
}

.brand span {
  font-size: 1.06rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: var(--radius);
  color: #31413b;
  font-size: 0.82rem;
  font-weight: 800;
}

.site-nav a:hover {
  color: var(--green);
  background: rgba(30, 107, 79, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: center;
  padding: 118px 24px 92px;
  color: var(--white);
  background-color: var(--ink-deep);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.hero-home {
  background-image: url("img/qchain-fictional-observatory.png");
  background-position: center right;
}

.hero-lp {
  background-image: url("img/value-circulation.jpg");
}

.page-hero {
  min-height: 52svh;
  padding: 122px 24px 74px;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 14, 12, 0.96) 0%, rgba(7, 14, 12, 0.84) 38%, rgba(7, 14, 12, 0.46) 66%, rgba(7, 14, 12, 0.18) 100%),
    linear-gradient(0deg, rgba(7, 14, 12, 0.82), rgba(7, 14, 12, 0.06) 56%, rgba(7, 14, 12, 0.22));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--content));
  margin: 0 auto;
}

.eyebrow,
.qc-kicker,
.qc-eyebrow {
  margin-bottom: 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd48a;
}

.hero h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.95;
  font-weight: 900;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.hero-copy,
.hero .lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 254, 250, 0.9);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.button-row,
.qc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.qc-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  line-height: 1.28;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.qc-button:hover {
  transform: translateY(-1px);
}

.button-primary,
.qc-primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 14px 34px rgba(30, 107, 79, 0.25);
}

.button-secondary {
  color: var(--white);
  background: var(--teal);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 254, 250, 0.34);
  background: rgba(255, 254, 250, 0.08);
}

.button-light {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.hero-index {
  position: absolute;
  z-index: 2;
  right: max(24px, calc((100vw - var(--content)) / 2));
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(520px, calc(100vw - 48px));
}

.hero-index span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: rgba(255, 254, 250, 0.9);
  background: rgba(255, 254, 250, 0.1);
  border: 1px solid rgba(255, 254, 250, 0.22);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.section {
  padding: 96px 24px;
}

.section-white {
  background: var(--surface);
}

.section-soft,
.article-section,
.lp-preview,
.certification-section,
.final-cta {
  background: var(--paper);
}

.workflow-section,
.intro-band,
.founder-band,
.trust-band {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(13, 23, 19, 0.98), rgba(25, 74, 62, 0.96)),
    var(--ink-deep);
}

.image-band {
  background:
    linear-gradient(180deg, rgba(31, 127, 140, 0.09), rgba(255, 255, 255, 0)),
    var(--surface);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 54px;
  align-items: center;
}

.section-head {
  max-width: 820px;
  margin-bottom: 36px;
}

.section h2,
.article-shell h2,
.qc-page h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.18;
  font-weight: 900;
}

.section h3,
.article-shell h3,
.qc-page h3 {
  line-height: 1.35;
}

.section-lead,
.lead,
.preview-copy p,
.feature-card p,
.resource-card p,
.practice-card p,
.directory-card p,
.level-list p,
.article-shell p,
.article-shell li,
.article-empty {
  color: var(--muted);
}

.workflow-section .section-lead,
.intro-band .lead,
.founder-band p,
.trust-band p {
  color: rgba(255, 254, 250, 0.78);
}

.signal-panel {
  display: grid;
  gap: 14px;
}

.signal-panel div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 29, 0.06);
}

.signal-panel span {
  grid-row: span 2;
  color: var(--coral);
  font-weight: 900;
}

.signal-panel strong {
  font-size: 1.08rem;
}

.flow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.flow-board article {
  min-height: 216px;
  padding: 20px;
  border: 1px solid rgba(255, 254, 250, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.08);
}

.flow-board b {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  color: var(--ink);
  background: #ffd48a;
}

.flow-board h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.flow-board p {
  color: rgba(255, 254, 250, 0.78);
}

.feature-grid,
.resource-grid,
.practice-grid,
.directory-grid,
.menu-matrix {
  display: grid;
  gap: 16px;
}

.feature-grid,
.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-matrix {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.resource-card,
.practice-card,
.directory-card,
.media-panel,
.article-shell,
.qc-card,
.qc-panel,
.qc-hero-card,
.qc-quote,
.article-empty,
.level-list div,
.trust-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(23, 33, 29, 0.06);
}

.feature-card,
.resource-card,
.practice-card,
.directory-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.feature-card:hover,
.resource-card:hover,
.directory-card:hover,
.menu-matrix a:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 127, 140, 0.34);
  box-shadow: var(--shadow);
}

.resource-card,
.directory-card,
.practice-card,
.menu-matrix a {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.resource-card-large {
  min-height: 260px;
}

.resource-card span,
.directory-card span,
.practice-card span,
.feature-card .eyebrow,
.level-list span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resource-card strong,
.directory-card strong,
.feature-card h3,
.practice-card h3 {
  font-size: 1.22rem;
  line-height: 1.35;
}

.resource-card p,
.directory-card p,
.practice-card p,
.menu-matrix p {
  margin-bottom: 0;
}

.resource-card.is-protected {
  border-color: rgba(216, 161, 61, 0.46);
  background:
    linear-gradient(180deg, rgba(216, 161, 61, 0.12), rgba(255, 255, 255, 0.9)),
    var(--surface);
}

.feature-card {
  padding: 14px 14px 22px;
}

.feature-card img,
.media-panel img {
  width: 100%;
  object-fit: cover;
}

.feature-card img {
  aspect-ratio: 5 / 3.2;
  margin-bottom: 20px;
  border-radius: 6px;
}

.media-panel {
  margin: 0;
  overflow: hidden;
}

.media-panel img {
  aspect-ratio: 16 / 10;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  color: var(--green);
  font-weight: 900;
  border-bottom: 1px solid rgba(30, 107, 79, 0.34);
}

.tag-row,
.article-shell .meta,
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.article-shell .pill,
.hero .pill,
.menu-matrix em {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(31, 127, 140, 0.22);
  border-radius: var(--radius);
  color: var(--green);
  background: rgba(31, 127, 140, 0.1);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.menu-matrix a {
  justify-content: flex-start;
}

.menu-matrix span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-matrix strong {
  font-size: 1.24rem;
  line-height: 1.35;
}

.article-meta {
  color: rgba(255, 254, 250, 0.78);
  font-weight: 800;
}

.article-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px;
}

.article-shell.entry-content {
  max-width: var(--content);
}

.article-shell a {
  color: var(--green);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.article-shell .resource-card,
.article-shell .directory-card {
  text-decoration: none;
}

.article-shell h2,
.article-shell h3 {
  margin: 32px 0 14px;
}

.article-shell .section-head h2,
.article-shell .section-head h3 {
  margin-top: 0;
}

.article-shell ul,
.article-shell ol {
  padding-left: 1.35em;
}

.article-shell li + li {
  margin-top: 0.5em;
}

.article-shell figure {
  margin: 26px 0;
  overflow-x: auto;
}

.article-shell img {
  height: auto;
  border-radius: var(--radius);
}

.article-shell blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 5px solid var(--coral);
  background: rgba(200, 95, 72, 0.08);
}

.article-shell pre {
  white-space: pre-wrap;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-family: inherit;
}

.article-shell iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink-deep);
}

.article-shell hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-shell table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.65;
}

.article-shell th,
.article-shell td {
  padding: 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.article-shell td:first-child {
  width: 1%;
  white-space: nowrap;
}

.article-shell .list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.article-shell .subject-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-shell .list-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.article-empty {
  padding: 24px;
}

.sub-head {
  margin-top: 56px;
}

.qc-page {
  color: var(--ink);
}

.qc-hero,
.qc-section {
  margin: 0 0 34px;
}

.qc-hero-grid,
.qc-grid {
  display: grid;
  gap: 16px;
}

.qc-grid-2,
.qc-hero-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qc-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qc-card,
.qc-panel,
.qc-hero-card,
.qc-quote {
  padding: 22px;
}

.qc-button {
  color: var(--white) !important;
  background: var(--green);
  text-decoration: none !important;
}

.qc-button:not(.qc-primary) {
  color: var(--ink) !important;
  background: var(--soft);
}

.library {
  background: var(--paper);
}

.practice-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.practice-card {
  min-height: 210px;
}

.level-list,
.trust-grid {
  display: grid;
  gap: 12px;
}

.level-list div {
  padding: 18px;
  border-left: 5px solid var(--amber);
}

.level-list strong,
.trust-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.12rem;
}

.trust-grid div {
  padding: 18px;
  border-color: rgba(255, 254, 250, 0.2);
  background: rgba(255, 254, 250, 0.08);
}

.trust-grid p {
  color: rgba(255, 254, 250, 0.76);
}

.final-inner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.final-inner h2 {
  max-width: 760px;
}

.site-footer {
  background: var(--ink-deep);
}

.footer-inner {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255, 254, 250, 0.74);
}

.footer-brand {
  color: var(--white);
}

.footer-brand img {
  border-color: rgba(255, 254, 250, 0.18);
}

.site-lock {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink-deep);
}

.site-lock-panel {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(255, 254, 250, 0.36);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-lock-panel img {
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: var(--radius);
}

.site-lock-panel h2 {
  margin-bottom: 22px;
  font-size: 1.55rem;
  line-height: 1.35;
}

.site-lock-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 900;
}

.site-lock-panel input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.lock-error {
  min-height: 1.8em;
  margin: 12px 0 0;
  color: #9b2f24;
  font-weight: 900;
}

.ez-toc-title {
  cursor: inherit;
}

.eztoc-hide {
  display: none;
}

.ez-toc-icon-toggle-span svg {
  color: #999;
  fill: #999;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .site-header {
    padding: 10px 18px;
  }

  .site-nav a {
    font-size: 0.78rem;
    padding-inline: 7px;
  }

  .flow-board,
  .practice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 18px;
    width: min(340px, calc(100vw - 36px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 254, 250, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 88svh;
    padding: 112px 18px 122px;
  }

  .hero-index {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

  .section {
    padding: 76px 18px;
  }

  .split,
  .feature-grid,
  .resource-grid,
  .directory-grid,
  .menu-matrix,
  .qc-grid-2,
  .qc-grid-3,
  .qc-hero-grid {
    grid-template-columns: 1fr;
  }
}

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

  .container,
  .qc-container {
    width: min(100% - 28px, var(--content));
  }

  .site-header {
    min-height: 58px;
    padding: 8px 14px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 86svh;
    padding: 102px 16px 126px;
  }

  .page-hero {
    min-height: auto;
    padding: 104px 16px 58px;
  }

  .hero h1 {
    font-size: clamp(42px, 16vw, 74px);
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .hero-actions,
  .button-row,
  .qc-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .qc-button {
    width: 100%;
  }

  .section {
    padding: 60px 16px;
  }

  .article-shell {
    padding: 22px;
  }

  .article-shell .subject-list,
  .flow-board,
  .practice-grid {
    grid-template-columns: 1fr;
  }

  .flow-board article,
  .resource-card,
  .directory-card,
  .practice-card,
  .menu-matrix a {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
