:root {
  --ink: #132822;
  --muted: #5c7069;
  --paper: #f8f5ec;
  --card: #fffdf7;
  --line: #d9ded5;
  --mint: #b9f7d4;
  --mint-strong: #57d596;
  --orange: #ff8e63;
  --yellow: #f7d768;
  --blue: #6aa8ff;
  --shadow: 0 18px 50px rgba(19, 40, 34, .10);
  --radius: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(247, 215, 104, .28), transparent 34rem),
    radial-gradient(circle at 95% 8%, rgba(87, 213, 150, .22), transparent 30rem),
    var(--paper);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, label, select { touch-action: manipulation; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(19, 40, 34, .08);
  background: rgba(248, 245, 236, .88);
  backdrop-filter: blur(16px);
}

.nav-wrap, .container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--mint);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 720;
}
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: #19764d; }
.lang-link {
  padding: 7px 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
}

main { overflow: hidden; }
.section { padding: 96px 0; }
.section.compact { padding: 64px 0; }
.section.tint { background: rgba(255, 255, 255, .42); }

.hero {
  padding: 90px 0 46px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 7px 12px;
  border: 1px solid rgba(19, 40, 34, .18);
  border-radius: 999px;
  background: rgba(255, 253, 247, .76);
  color: #315e4d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-strong);
  box-shadow: 0 0 0 4px rgba(87, 213, 150, .18);
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; }
h1 {
  max-width: 960px;
  margin: 0 auto 24px;
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900;
}
.subpage h1 { max-width: 900px; font-size: clamp(44px, 7vw, 78px); }
h2 { margin-bottom: 18px; font-size: clamp(34px, 5vw, 56px); }
h3 { margin-bottom: 10px; font-size: 22px; }

.hero-copy {
  max-width: 720px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.secondary { background: var(--card); }
.button.orange { background: #ffd1bd; }
.button.small { min-height: 42px; padding: 8px 14px; border-width: 1px; box-shadow: 3px 3px 0 var(--ink); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 30px 0 0;
  padding: 0;
  color: #436359;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}
.trust-row li::before { content: "✓"; margin-right: 7px; color: #13804e; }

.visualizer-shell {
  width: min(1160px, calc(100% - 28px));
  margin: 28px auto 0;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: #15241f;
  box-shadow: 10px 12px 0 rgba(19, 40, 34, .16);
}

.visualizer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 6px 14px;
  color: #dff4e9;
  font-size: 13px;
}
.window-dots { display: flex; gap: 7px; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; background: #6a7f76; }
.window-dots span:first-child { background: var(--orange); }
.window-dots span:nth-child(2) { background: var(--yellow); }
.window-dots span:last-child { background: var(--mint-strong); }

.canvas-wrap {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-radius: 18px;
  background: #0e1916;
}
#visualizer-canvas { width: 100%; height: 460px; display: block; }

.canvas-copy {
  position: absolute;
  z-index: 2;
  inset: auto 0 38px;
  padding: 0 24px;
  color: #f7fff9;
  text-align: center;
  pointer-events: none;
}
.canvas-copy strong { display: block; font-size: clamp(22px, 4vw, 42px); letter-spacing: -.04em; }
.canvas-copy span { color: #a9c4b9; font-size: 14px; }

.controls {
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr .8fr auto;
  gap: 10px;
  padding-top: 14px;
}

.file-control, .field-control {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #3d5149;
  border-radius: 13px;
  background: #20342d;
  color: #f4fff8;
}
.file-control { cursor: pointer; }
.file-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.control-label { display: block; color: #a9c4b9; font-size: 11px; line-height: 1.2; text-transform: uppercase; letter-spacing: .05em; }
.file-name { max-width: 220px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 760; }
.field-control { display: block; }
.field-control select, .field-control input[type="color"] {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-weight: 760;
}
.field-control select option { color: var(--ink); }
.field-control input[type="color"] { border-radius: 6px; }
.tool-action { min-height: 58px; box-shadow: none; }
.tool-action:hover { box-shadow: none; transform: none; filter: brightness(1.05); }

.tool-message {
  min-height: 24px;
  margin: 10px 6px 0;
  color: #bcd0c8;
  font-size: 13px;
}
.tool-message[data-state="error"] { color: #ffb5a5; }

.section-heading { max-width: 760px; margin-bottom: 42px; }
.section-heading p { color: var(--muted); font-size: 18px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, .88);
  box-shadow: 0 8px 28px rgba(19, 40, 34, .05);
}
.card p { margin-bottom: 0; color: var(--muted); }
.card .number {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}
.card.orange .number { background: #ffd1bd; }
.card.blue .number { background: #cfe2ff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 68px; align-items: center; }
.split-copy p { color: var(--muted); font-size: 18px; }
.feature-list { padding: 0; list-style: none; }
.feature-list li { position: relative; margin: 14px 0; padding-left: 30px; font-weight: 700; }
.feature-list li::before {
  content: "";
  position: absolute;
  top: .45em;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--mint);
}

.art-panel {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: #132822;
  box-shadow: 9px 9px 0 var(--yellow);
}
.disc {
  position: relative;
  width: min(70%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #213c33 0 4px, #152a23 5px 9px);
  box-shadow: 0 0 0 22px rgba(185, 247, 212, .06), 0 0 70px rgba(87, 213, 150, .25);
  animation: spin 18s linear infinite;
}
.disc::after {
  content: "";
  position: absolute;
  inset: 36%;
  border: 18px solid var(--orange);
  border-radius: 50%;
  background: var(--paper);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .disc { animation: none; } }

.keyword-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.keyword-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  font-weight: 820;
  text-decoration: none;
}
.keyword-link:hover { border-color: var(--ink); transform: translateY(-2px); }
.keyword-link::after { content: "↗"; color: #39745b; }

.format-table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.format-table th, .format-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.format-table th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.format-table td { color: var(--muted); }
.format-table td:first-child { color: var(--ink); font-weight: 800; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { padding: 22px 0; border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; font-size: 19px; font-weight: 820; letter-spacing: -.02em; }
.faq-list p { max-width: 780px; margin: 14px 0 0; color: var(--muted); }

.cta-panel {
  padding: clamp(34px, 7vw, 72px);
  border: 2px solid var(--ink);
  border-radius: 32px;
  background: var(--mint);
  box-shadow: 10px 10px 0 var(--ink);
  text-align: center;
}
.cta-panel p { max-width: 640px; margin: 0 auto 24px; color: #36584b; font-size: 18px; }

.callout {
  margin: 24px 0;
  padding: 22px 24px;
  border-left: 5px solid var(--orange);
  border-radius: 0 16px 16px 0;
  background: #fff4ec;
}
.callout strong { display: block; margin-bottom: 4px; }
.callout p { margin: 0; color: var(--muted); }

.inspector {
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 7px 7px 0 var(--mint);
}
.inspect-drop {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 24px;
  border: 2px dashed #91a69d;
  border-radius: 18px;
  cursor: pointer;
  text-align: center;
}
.inspect-drop:hover { border-color: var(--ink); background: #f6fbf7; }
.inspect-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.inspect-output { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.stat { padding: 14px; border-radius: 12px; background: #f1efe7; }
.stat span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat strong { display: block; overflow-wrap: anywhere; }
.ratio-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.ratio-option { padding: 10px 15px; border: 1px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 800; }
.ratio-option.active { background: var(--mint); box-shadow: 3px 3px 0 var(--ink); }
.ratio-result { min-height: 58px; padding: 16px; border-radius: 14px; background: #eef8f1; color: #315e4d; font-weight: 700; }

.breadcrumbs { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.breadcrumbs a { text-underline-offset: 3px; }

.site-footer { padding: 56px 0 34px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-copy { max-width: 360px; color: var(--muted); }
.footer-links { display: grid; gap: 9px; }
.footer-links strong { margin-bottom: 5px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 880px) {
  .main-nav a:not(.lang-link) { display: none; }
  .section { padding: 74px 0; }
  .controls { grid-template-columns: 1fr 1fr; }
  .file-control { grid-column: 1 / -1; }
  .card-grid, .split, .footer-grid { grid-template-columns: 1fr; }
  .card-grid.two { grid-template-columns: 1fr; }
  .split { gap: 36px; }
  .art-panel { min-height: 340px; }
}

@media (max-width: 600px) {
  .nav-wrap, .container { width: min(100% - 28px, 1160px); }
  .brand { font-size: 15px; }
  .hero { padding-top: 64px; }
  h1 { font-size: 48px; }
  .visualizer-shell { width: calc(100% - 16px); padding: 9px; border-radius: 21px; }
  .canvas-wrap, #visualizer-canvas { min-height: 380px; height: 380px; }
  .controls { grid-template-columns: 1fr; }
  .file-control { grid-column: auto; }
  .keyword-links { grid-template-columns: 1fr; }
  .format-table { display: block; overflow-x: auto; white-space: nowrap; }
  .cta-panel { box-shadow: 6px 6px 0 var(--ink); }
  .inspect-output { grid-template-columns: 1fr; }
}
