:root {
  --bg: #f2efe9;
  --paper: #fbf9f5;
  --ink: #2f2d29;
  --muted: #6e685f;
  --line: #ded8ce;
  --line-soft: #ebe5dc;
  --teal: #287f79;
  --teal-dark: #175b57;
  --teal-pale: #e2efea;
  --clay: #b47b58;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--teal); }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

img, svg { max-width: 100%; }

.wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 249, 245, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}

.brand img {
  display: block;
  width: 184px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

main { display: block; }

.hero {
  padding: clamp(40px, 7vw, 84px) 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

h1, h2, h3, h4 {
  margin: 0 0 12px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.4rem, 6.4vw, 4.2rem); }
h2 { font-size: clamp(1.65rem, 3.8vw, 2.5rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem; }

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--teal-dark);
  border-radius: 999px;
  background: var(--teal-dark);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

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

.button.secondary:hover {
  background: var(--teal-pale);
  color: var(--teal-dark);
}

.hero-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 18px 48px rgba(47, 45, 41, 0.06);
}

.panel-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-top strong { font-size: 1rem; }
.panel-top span { color: var(--muted); font-size: 0.82rem; }

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

.hero-swatches div {
  min-height: 74px;
  border-radius: 14px;
  border: 1px solid rgba(47, 45, 41, 0.08);
}

.hero-swatches .swatch-a { background: linear-gradient(145deg, #c9ded2, #a8c8ba); }
.hero-swatches .swatch-b { background: linear-gradient(145deg, #d9c9aa, #b99370); }
.hero-swatches .swatch-c { background: linear-gradient(145deg, #a9c2c8, #789aa1); }

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.section { padding: 44px 0; }

.section-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card p:last-child { margin-bottom: 0; }

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.tile-scroll,
.table-scroll,
.chart-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: 16px;
}

.tile-scroll {
  padding: 4px 3px 14px;
  border: 1px solid transparent;
}

.tile-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 12px;
  min-width: 720px;
}

.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.tile-face {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(47, 45, 41, 0.08);
}

.tile-face::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 44%, rgba(43,40,36,0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 76%, rgba(255,255,255,0.5) 0 1px, transparent 2px);
  background-size: 17px 19px, 23px 21px, 29px 27px;
}

.glaze-celadon { background: linear-gradient(150deg, #cce1d6, #a6c6b7); }
.glaze-ash { background: linear-gradient(150deg, #b9cdd1, #8fa9b0); }
.glaze-iron { background: linear-gradient(150deg, #b08365, #7b5945); }
.glaze-rutile { background: linear-gradient(150deg, #e5d8b8, #c6ae83); }
.glaze-copper { background: linear-gradient(150deg, #84ab94, #5c856f); }
.glaze-tenmoku { background: linear-gradient(150deg, #625b52, #3d3934); }

.tile strong {
  display: block;
  margin-top: 9px;
  font-size: 0.88rem;
}

.tile span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.table-scroll {
  background: var(--paper);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

caption {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
  text-align: left;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

thead th {
  background: #f6f2eb;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: 0; }

.chart-scroll {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px;
}

.curve-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: #999187; stroke-width: 1.5; }
.curve-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.curve-fill { fill: rgba(40, 127, 121, 0.12); }
.chart-dot { fill: var(--teal-dark); }
.chart-label {
  fill: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11px;
}

.callout {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid var(--teal);
  border-radius: 0 14px 14px 0;
  background: var(--teal-pale);
}

.callout p:last-child { margin-bottom: 0; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f4ee;
  color: var(--muted);
  font-size: 0.8rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 22px 48px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--teal-dark);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 38px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.doc-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.doc-list a:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
}

.doc-list small {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}

.page-banner {
  padding: 54px 0 18px;
}

.page-banner .lede { margin-bottom: 0; }

.site-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: #ebe6dd;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
  padding: 34px 0;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-nav a:hover { border-bottom-color: currentColor; }

.copyright {
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-grid,
  .grid-three,
  .grid-four { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 24px, 1080px); }
  .header-inner { align-items: flex-start; }
  .site-nav { width: 100%; gap: 4px 14px; }
  .site-nav a { font-size: 0.86rem; }
  .grid-two { grid-template-columns: 1fr; }
  .hero-panel { padding: 20px; }
  .card { padding: 18px; }
  .section { padding: 34px 0; }
  .doc-list a { align-items: flex-start; flex-direction: column; gap: 4px; }
  .doc-list small { text-align: left; }
  .copyright { white-space: normal; }
}

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