:root { color-scheme: light; --ink: #213c40; --muted: #63767a; --accent: #12665e; --border: #dce5e2; --paper: #fff; }
* { box-sizing: border-box; }
body { margin: 0; background: #f3f6f3; color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.page-header { max-width: 1500px; margin: auto; padding: 38px 36px 27px; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
h1 { font: 500 clamp(28px, 3vw, 40px)/1.15 Georgia, serif; margin: 5px 0 12px; letter-spacing: -.6px; }
h2 { font-size: 20px; font-weight: 650; margin: 0 0 20px; }
p { margin: 0 0 12px; }
.page-header p:last-child { color: var(--muted); max-width: 650px; }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; color: var(--accent); margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
.source-link { white-space: nowrap; font-size: 13px; }
.workspace { display: grid; grid-template-columns: minmax(320px, 410px) minmax(0, 1fr); gap: 24px; max-width: 1500px; padding: 0 36px; margin: auto; align-items: start; }
.studio-description { grid-column: 1 / -1; width: 100%; margin: 0; color: var(--muted); line-height: 1.6; }
.page-header.studio-header { padding-bottom: 10px; }
.studio-header p:last-child { margin-bottom: 0; }
.controls, .output { border: 1px solid var(--border); border-radius: 18px; background: var(--paper); padding: 26px; }
.controls { box-shadow: 0 5px 25px #203d3405; }
label { display: block; font-size: 13px; font-weight: 650; margin: 16px 0 6px; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; border: 1px solid #cbd8d3; border-radius: 7px; padding: 9px 10px; color: var(--ink); background: #fcfdfc; }
textarea { resize: vertical; font: 12px/1.6 ui-monospace, Consolas, monospace; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #5da99b; outline-offset: 2px; }
[aria-invalid=true] { border-color: #b13d35 !important; }
.field-error { color: #b13d35; font-size: 12px; font-weight: 700; line-height: 1.5; margin: 5px 0 8px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 7px 0 10px; }
.optional { font-weight: 400; color: var(--muted); margin-left: 5px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-divider { border: 0; border-top: 1px solid var(--border); margin: 22px 0 6px; }
.colour-launcher { padding-bottom: 0; margin-bottom: 0; }
.colour-picker { position: fixed; inset: auto; margin: 0; width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: white; color: var(--ink); box-shadow: 0 12px 55px #102e3440; }
.colour-picker::backdrop { background: #142d4059; }
.colour-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.colour-dialog-header h2 { margin: 0; font-size: 17px; }
.colour-dialog-header button { padding: 7px 10px; font-size: 12px; }
.appearance-heading { margin: 16px 0 0; font-size: 14px; font-weight: 650; }
.current-colour { display: flex; align-items: center; gap: 9px; margin-top: 8px; max-width: 100%; padding: 6px 9px; font-size: 12px; text-align: left; overflow-wrap: anywhere; }
.current-colour-chip { display: block; position: relative; flex: 0 0 30px; width: 30px; height: 24px; border: 1px solid #0003; border-radius: 4px; overflow: hidden; background: repeating-conic-gradient(#d1d5db 0% 25%, white 0% 50%) 0 0 / 10px 10px; }
.current-colour-paint { position: absolute; inset: 0; }
.colour-picker input[type=color] { width: 64px; height: 38px; padding: 3px; cursor: pointer; }
.colour-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.colour-shortcuts button { padding: 6px 8px; font-size: 11px; }
.colour-shades { display: grid; grid-template-columns: 48px repeat(8, minmax(0, 18px)); align-items: center; gap: 4px; margin: 5px 0; font-size: 11px; }
button.colour-swatch { width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid #0003; border-radius: 3px; }
button.colour-swatch:hover:not(:disabled) { outline: 2px solid var(--accent); }
button.colour-swatch[aria-pressed=true] { outline: 2px solid var(--ink); outline-offset: 1px; }
.history-actions, .project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#project-message.error-message { color: #b13d35; font-weight: 700; }
input[type=number] { appearance: auto; }
input[type=number]::-webkit-inner-spin-button { opacity: 1; }
.palette-previews { margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
.palette-previews legend { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.palette-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 260px; overflow-y: auto; padding: 3px; }
.palette-card { position: relative; display: block; margin: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 11px; font-weight: 500; cursor: pointer; }
.palette-card.selected { border-color: var(--accent); background: #eff7f2; box-shadow: 0 0 0 1px var(--accent); }
.palette-card:focus-within { outline: 3px solid #5da99b; outline-offset: 1px; }
.palette-card input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.palette-swatch { display: block; height: 12px; margin-top: 5px; border: 1px solid #0002; border-radius: 3px; }
details { border-top: 1px solid var(--border); padding: 15px 0 3px; margin-top: 18px; }
.title-appearance, .geometry-settings, .segment-colour-settings { border-top: 0; }
summary { cursor: pointer; font-size: 14px; font-weight: 650; }
.check { display: flex; align-items: center; gap: 9px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
button { border: 1px solid transparent; border-radius: 8px; padding: 11px 16px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 650; cursor: pointer; }
button:hover:not(:disabled) { background: #0b4e47; }
button.secondary { border-color: #cbd8d3; background: #fff; color: var(--ink); }
button.secondary:hover:not(:disabled) { background: #eef4f0; }
button:disabled { opacity: .45; cursor: default; }
.draw-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; }
.auto-draw-toggle { margin: 0; white-space: nowrap; }
.error { color: #8b2b25; background: #fff0ed; border: 1px solid #f4c9c1; border-radius: 8px; padding: 12px; margin-top: 18px; font-size: 13px; }
.output { position: sticky; top: 20px; min-height: 550px; }
.output-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.output-header h2 { margin: 4px 0 0; }
.output-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 100%; }
.downloads { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.downloads button { padding: 9px 12px; font-size: 12px; }
.status { color: var(--muted); font-size: 13px; margin: 22px 0 14px; min-height: 20px; }
.status.error-status { color: #b13d35; }
.preview-frame { position: relative; }
.generation-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; pointer-events: none; }
.generation-error-card { max-width: 100%; padding: 20px 24px; border: 1px solid #e4a49c; border-radius: 10px; background: rgba(255, 249, 247, .96); color: #b13d35; text-align: center; box-shadow: 0 4px 24px #4a171726; overflow-wrap: anywhere; }
.generation-error-card strong { font-size: 18px; }
.generation-error-card p { margin: 8px 0 0; font-size: 14px; }
.generation-error-card button { margin-top: 16px; pointer-events: auto; }
.preview { background-color: #f8faf8; border: 1px solid #e5ebe7; border-radius: 12px; min-height: 400px; padding: 24px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.preview.has-image { background-color: #f1f4f1; background-image: linear-gradient(45deg,#e8ede8 25%,transparent 25%),linear-gradient(-45deg,#e8ede8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e8ede8 75%),linear-gradient(-45deg,transparent 75%,#e8ede8 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.preview svg { display: block; max-width: 100%; max-height: 70vh; height: auto; flex-shrink: 0; }
.preview.has-image { cursor: zoom-in; }
.preview:focus-visible { outline: 3px solid #5da99b; outline-offset: 2px; }
.enlarged-preview { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 12px; border: 0; background: transparent; color: var(--ink); cursor: zoom-out; overflow: hidden; }
body.preview-open { overflow: hidden; }
.enlarged-preview::backdrop { background: #142d40b3; }
.enlarged-preview #close-preview { position: absolute; top: 16px; right: 16px; z-index: 1; }
.enlarged-artwork { width: 100%; height: 100%; }
.enlarged-artwork svg { display: block; width: 100%; height: 100%; }
.preview[aria-busy=true] { opacity: .65; }
.placeholder { color: var(--muted); text-align: center; max-width: 290px; padding: 45px 10px; }
.placeholder h3 { font-size: 16px; font-weight: 500; color: var(--ink); }
.placeholder p { font-size: 13px; }
.empty-symbol { font: 70px Georgia, serif; color: #a8c5b8; }
.output-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
footer { max-width: 1500px; margin: auto; padding: 24px 36px; font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 900px) { .workspace { grid-template-columns: minmax(280px,340px) minmax(0,1fr); gap: 16px; padding: 0 20px; } .controls,.output { padding: 20px; } .preview { padding: 12px; } }
@media (max-width: 680px) { .page-header { padding: 26px 18px 20px; align-items: start; flex-direction: column; gap: 8px; } .workspace { display: flex; flex-direction: column; padding: 0 14px; } .controls,.output { width: 100%; } .output { position: static; min-height: 400px; } .output-header { flex-direction: row; } .preview { min-height: 300px; } footer { padding: 22px 18px; } }
/* Author information on the About page. */
.about-page { max-width: 720px; margin: 0 auto; padding: 0 24px 32px; }
.about-page p { line-height: 1.7; }
