:root {
  color-scheme: light;
  --ink: #1e2430;
  --muted: #667085;
  --line: #ded7c8;
  --paper: #fffaf0;
  --panel: #fffdf7;
  --leaf: #1f8d63;
  --teal: #00a9a5;
  --sun: #ffcf4d;
  --berry: #e84c6a;
  --violet: #6957d9;
  --sky: #78c9ef;
  --shadow: 0 18px 45px rgba(40, 48, 64, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(246, 248, 235, 0.96) 42%, #f6f8eb),
    url("/assets/brand/og-image.jpg") center top / 100% auto no-repeat;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 250, 240, 0.86);
  border-bottom: 1px solid rgba(31, 36, 48, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #7c4bd2;
  box-shadow: 0 8px 18px rgba(31, 141, 99, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong {
  display: block;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-links a {
  padding: 9px 12px;
  color: #344054;
  font-size: 14px;
  font-weight: 750;
  border-radius: 999px;
}

.nav-links a:hover {
  background: rgba(31, 141, 99, 0.1);
  color: #176a4d;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(48px, 8vw, 110px) clamp(18px, 6vw, 86px) 44px;
}

.search-preview-image {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 18px;
  color: #134e3b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px rgba(255, 207, 77, 0.28);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  font-size: clamp(44px, 7vw, 104px);
  max-width: 900px;
}

h2 {
  font-size: clamp(28px, 4vw, 52px);
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy p {
  max-width: 650px;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.inline-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(30, 36, 48, 0.16);
}

.button.secondary {
  color: #16392f;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-panel {
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 14px;
}

.quick-card,
.panel,
.code-row,
.tatari-card,
.tier-row {
  border: 1px solid rgba(31, 36, 48, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow);
}

.quick-card {
  padding: 20px;
}

.quick-card h2 {
  font-size: 26px;
}

.code-preview {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.main {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.25), #fffaf0 8%, #f6f8eb);
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 6vw, 86px);
}

.section.compact {
  padding-top: 34px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head p {
  max-width: 620px;
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 22px;
}

.panel h3,
.panel h2 {
  margin-bottom: 10px;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  box-shadow: none;
}

.code-row h3 {
  margin: 6px 0 2px;
  font-size: 28px;
  letter-spacing: 0;
}

.code-row p,
.code-row small {
  margin: 0;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  color: #184835;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: #d8f7df;
}

.status.testing {
  color: #694500;
  background: #fff1bd;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #1f4f3d;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.icon-button.copied {
  color: #fff;
  background: var(--leaf);
}

.tier-controls,
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.tier-controls button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 850;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.tier-controls button.active {
  color: #fff;
  background: var(--leaf);
}

.tier-list {
  display: grid;
  gap: 16px;
}

.tier-band {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(31, 36, 48, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 247, 0.92)),
    url("/assets/brand/og-image.jpg") center / cover;
  box-shadow: var(--shadow);
}

.tier-band-label {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.tier-band-label .tier-badge {
  min-width: 76px;
  height: 52px;
  font-size: 28px;
}

.tier-band-label small {
  color: var(--muted);
  font-weight: 850;
}

.tier-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
}

.tier-unit {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tier-unit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(40, 48, 64, 0.14);
}

.tier-unit img {
  width: 100%;
  height: 88px;
  object-fit: contain;
}

.tier-unit strong,
.tier-unit small {
  display: block;
}

.tier-unit strong {
  margin-top: 8px;
  font-size: 16px;
}

.tier-unit small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tier-unit span {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  border-radius: 50%;
  background: var(--ink);
}

.tier-row {
  display: grid;
  grid-template-columns: 58px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  box-shadow: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tier-row:hover,
.tatari-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tier-row img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.tier-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.score {
  font-weight: 950;
  font-size: 24px;
}

.tier-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  color: #fff;
  font-weight: 950;
  border-radius: 999px;
}

.tier-splus {
  background: linear-gradient(135deg, #8e2de2, #ff4b6e 55%, #ffcf4d);
}

.tier-s {
  background: linear-gradient(135deg, #e84c6a, #ffb84d);
}

.tier-a {
  background: linear-gradient(135deg, #1f8d63, #00a9a5);
}

.tier-b {
  background: linear-gradient(135deg, #6957d9, #78c9ef);
}

.search-box {
  min-width: min(420px, 100%);
  padding: 0 14px;
}

.search-box svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
}

.tatari-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tatari-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  min-height: 210px;
  padding: 16px;
  box-shadow: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tatari-card img {
  width: 128px;
  height: 178px;
  object-fit: contain;
  align-self: end;
}

.tatari-card h3 {
  margin: 10px 0 8px;
}

.tatari-card p {
  margin: 0;
  font-size: 14px;
}

.tatari-card ul,
.clean-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.tatari-card li,
.clean-list li,
.tag-row span {
  padding: 5px 8px;
  color: #355044;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #edf5e8;
}

.page-hero,
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
  align-items: center;
  gap: 24px;
  padding: clamp(42px, 7vw, 80px) clamp(18px, 6vw, 86px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 24px clamp(18px, 6vw, 86px) 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.breadcrumb a {
  color: #176a4d;
}

.page-hero h1,
.detail-hero h1 {
  font-size: clamp(42px, 6vw, 78px);
}

.page-hero img,
.detail-hero img {
  max-height: 340px;
  margin-inline: auto;
  object-fit: contain;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 clamp(18px, 6vw, 86px) clamp(60px, 8vw, 96px);
}

.guide-body {
  max-width: 980px;
  padding: 0 clamp(18px, 6vw, 86px) clamp(60px, 8vw, 96px);
}

.guide-body .panel {
  margin-bottom: 16px;
}

.guide-body ol,
.guide-body ul {
  color: var(--muted);
  line-height: 1.8;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.source-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 6vw, 86px);
  color: #536055;
  background: #e8f0dd;
  border-top: 1px solid #d5dec9;
}

.site-footer p {
  max-width: 780px;
  margin: 6px 0 0;
  font-size: 14px;
}

.credit {
  font-size: 12px;
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 10px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 980px) {
  .hero,
  .page-hero,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .grid,
  .tatari-grid,
  .source-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 46px;
  }

  .section-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid,
  .tatari-grid,
  .content-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .tatari-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .tatari-card img {
    width: 104px;
    height: 154px;
  }

  .tier-row {
    grid-template-columns: 48px 58px minmax(0, 1fr);
  }

  .tier-band {
    grid-template-columns: 1fr;
  }

  .tier-row .score {
    grid-column: 3;
    font-size: 14px;
  }

  .hero-actions,
  .inline-actions,
  .tier-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .tier-controls button {
    width: 100%;
  }
}
