:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --ink: #17201c;
  --muted: #61706a;
  --line: #dce4df;
  --accent: #0f7b63;
  --accent-dark: #075944;
  --warn: #955f09;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: rgba(246, 248, 247, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 750;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

nav a,
footer a,
.text-button {
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration: none;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 5vw 56px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 430px;
  padding: 64px 0 38px;
}

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

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0;
  margin: 0 0 10px;
}

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

h1 {
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  line-height: 1.04;
  margin-bottom: 22px;
}

h2 {
  font-size: 2rem;
  line-height: 1.18;
  margin-bottom: 0;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

p,
li {
  color: var(--muted);
  line-height: 1.72;
}

.hero-copy p:last-child {
  font-size: 1.12rem;
  max-width: 720px;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.hero-panel div {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.hero-panel span {
  color: var(--muted);
}

.tool-shell,
.content-grid,
.notice-band {
  margin-top: 28px;
}

.tool-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

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

.dropzone {
  align-items: center;
  border: 2px dashed #9fb3aa;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 26px;
  text-align: center;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.dropzone.dragover,
.dropzone:focus {
  background: #eef7f3;
  border-color: var(--accent);
  outline: none;
}

.dropzone input {
  display: none;
}

.drop-icon {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 2rem;
  height: 52px;
  justify-content: center;
  margin-bottom: 14px;
  width: 52px;
}

.dropzone p {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 4px;
}

.dropzone span,
.status,
.file-list span {
  color: var(--muted);
}

.controls {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: 160px minmax(220px, 1fr) 150px 110px;
  margin-top: 22px;
}

.compact-controls {
  grid-template-columns: 190px 110px;
  justify-content: start;
}

.editor-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.small-dropzone {
  min-height: 180px;
}

.transparent-controls {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.transparent-controls label {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

input[type="color"] {
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 42px;
  padding: 0;
  width: 100%;
}

.preview-panel {
  min-width: 0;
}

.preview-panel canvas {
  aspect-ratio: 3 / 2;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #dfe7e2 25%, transparent 25%),
    linear-gradient(-45deg, #dfe7e2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe7e2 75%),
    linear-gradient(-45deg, transparent 75%, #dfe7e2 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: crosshair;
  display: block;
  max-height: 620px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 8px;
}

select,
input[type="range"] {
  min-height: 42px;
}

select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 0 12px;
}

button {
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 760;
  min-height: 44px;
  padding: 0 16px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button.secondary {
  background: #e7eee9;
  color: var(--accent-dark);
}

output {
  color: var(--muted);
  font-weight: 650;
}

.status {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 12px 14px;
}

.file-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.file-list li {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

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

.content-grid .section-head {
  grid-column: 1 / -1;
}

article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.notice-band {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #ead7aa;
  border-radius: 8px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 28px;
}

.notice-band .eyebrow,
.notice-band h2 {
  color: var(--warn);
}

.text-button {
  background: white;
  border: 1px solid #ead7aa;
  border-radius: 8px;
  padding: 12px 16px;
  white-space: nowrap;
}

footer {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 26px 5vw 34px;
}

footer span {
  color: var(--muted);
}

.page {
  max-width: 860px;
  padding-top: 48px;
}

.article-page {
  padding-bottom: 72px;
}

.article-page h1 {
  font-size: clamp(2.15rem, 6vw, 4rem);
  max-width: 780px;
}

.page section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 24px;
}

.page ol,
.page ul {
  color: var(--muted);
  line-height: 1.72;
  padding-left: 22px;
}

.page section a,
.content-grid article a {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 16px;
    padding-top: 16px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .controls,
  .content-grid,
  .notice-band,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .tool-shell,
  .notice-band {
    padding: 20px;
  }

  .text-button {
    text-align: center;
    white-space: normal;
  }
}
