:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --white: #fffdf8;
  --ink: #262724;
  --muted: #545b52;
  --rule: #d7d7c9;
  --green: #254d3e;
  --leaf: #e2edc9;
  --error: #9b4029;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid #518060; outline-offset: 3px; }
[hidden] { display: none !important; }
.top, footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem max(1rem, calc((100vw - 1150px) / 2)); border-bottom: 1px solid var(--rule); font-size: .83rem; }
.brand { display: flex; align-items: center; gap: .58rem; font-weight: 750; text-decoration: none; }
.mark { display: inline-block; position: relative; background: var(--green); border-radius: 7px; width: 27px; height: 27px; }
.mark::before, .mark::after { content: ""; position: absolute; height: 10px; width: 10px; border-radius: 50%; border: 2px solid var(--leaf); left: 5px; top: 5px; }
.mark::after { border-color: transparent; background: var(--leaf); border-radius: 55% 44% 50% 24%; transform: translate(7px,7px); }
main { max-width: 1182px; margin: 0 auto; padding: 2.2rem 1rem 2.7rem; }
.intro { display: flex; align-items: end; flex-wrap: wrap; gap: .85rem 2.15rem; margin: 0 0 1.65rem; }
.intro h1 { margin: 0; font: 500 clamp(2.85rem, 6vw, 5.25rem)/.89 Georgia, serif; letter-spacing: -.06em; }
.intro p { margin: 0 0 .12rem; max-width: 32ch; font-size: 1.02rem; line-height: 1.45; color: var(--muted); }
.actions, .panel { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; }
.actions { padding: .78rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem; }
.source, .controls, .extras, .examples { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.source { flex: 1 1 235px; min-width: 0; }
.source p { margin: 0; line-height: 1.4; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.file, .primary, .secondary, select { padding: .58rem .75rem; border-radius: 7px; font-size: .84rem; font-weight: 660; }
.file { cursor: pointer; position: relative; background: var(--leaf); color: var(--green); white-space: nowrap; }
.file input { cursor: pointer; position: absolute; opacity: 0; width: 100%; inset: 0; }
.file:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.primary { background: var(--green); border: 1px solid var(--green); color: white; }
.secondary, select { background: var(--white); border: 1px solid var(--rule); color: var(--ink); }
.secondary span, .file span { margin-inline-start: .35rem; }
.status { min-height: 2.8rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .5rem .15rem; }
.status p { color: var(--muted); font-size: .79rem; margin: 0; }
.status p[data-error] { color: var(--error); }
.status progress { accent-color: var(--green); width: 9rem; max-width: 100%; height: .55rem; }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.panel { overflow: hidden; }
.panel h2 { display: flex; justify-content: space-between; gap: .65rem; margin: 0; padding: .72rem .82rem; font-size: .9rem; }
.panel h2 span { color: var(--muted); font-size: .78rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.canvas-well { min-height: 13rem; height: clamp(260px, 42vw, 460px); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: .72rem; }
.canvas-well p { margin: .5rem; text-align: center; color: var(--muted); font-size: .86rem; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: .65rem .76rem; }
.original { background: #e7e9df; }
.output { background-color: #fff; background-size: 24px 24px; background-image: conic-gradient(#e6e9e0 0% 25%, #fff 25% 50%, #e6e9e0 50% 75%, #fff 75%); }
.output[data-white] { background: #fff; }
canvas { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: contain; }
.extras { justify-content: space-between; margin-top: .82rem; }
.examples strong, .text { color: var(--green); font-size: .83rem; }
.examples button { display: inline-flex; align-items: center; gap: .42rem; color: var(--green); background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: .23rem .55rem .23rem .25rem; font-size: .78rem; }
.examples button[aria-pressed="true"] { border-color: #57836c; }
.examples img { width: 28px; height: 25px; object-fit: cover; border-radius: 4px; }
.text { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
footer { color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 0; }
.info { max-width: 760px; line-height: 1.6; }
.info h1 { font: 500 2.8rem Georgia, serif; letter-spacing: -.035em; }
.info h2 { margin: 1.5rem 0 .35rem; font-size: 1.18rem; }
.info a { overflow-wrap: anywhere; }
@media (max-width: 650px) {
  main { padding-top: 1.7rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .canvas-well { height: min(72vw, 390px); }
}
@media (max-width: 380px) {
  .top { padding-inline: .7rem; font-size: .72rem; }
  .controls { gap: .45rem; }
}
