:root {
  --ink: #171713;
  --paper: #f5f4ef;
  --panel: #fbfaf5;
  --muted: #74736d;
  --line: #d6d3c8;
  --acid: #d9ff43;
  --orange: #ff5f36;
  --shadow: 0 24px 70px rgba(34, 32, 25, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  min-height: 100vh;
}
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .17; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E"); }
.topbar { max-width: 1240px; margin: 0 auto; padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-family: "Unbounded", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--acid); border-radius: 50%; }
.topbar-note { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.topbar-note span { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #80a600; box-shadow: 0 0 0 4px rgba(128, 166, 0, .12); }
main { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.hero { min-height: clamp(600px, calc(100svh - 83px), 760px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .92fr); align-items: center; gap: clamp(28px, 3vw, 42px); padding: 30px 0 38px; position: relative; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 38px; position: relative; z-index: 2; }
.hero-message { display: grid; gap: 27px; }
h1 { margin: 0; max-width: 660px; font: 700 clamp(42px, 4.45vw, 64px)/1.08 "Unbounded", sans-serif; letter-spacing: -.055em; }
h1 em { display: inline-block; color: var(--orange); font-style: normal; }
.lead { max-width: 525px; margin: 0; color: #66655f; font-size: 16px; line-height: 1.65; }
.hero-cta { display: grid; justify-items: start; gap: 14px; }
.hero-button { min-width: 292px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 0 23px 0 28px; color: var(--ink); background: var(--acid); border: 1px solid var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; box-shadow: 7px 7px 0 var(--ink); transition: transform .2s, box-shadow .2s, background-color .2s; }
.hero-button:hover { background: #e3ff72; transform: translate(2px, 2px); box-shadow: 5px 5px 0 var(--ink); }
.hero-button:active { transform: translate(7px, 7px); box-shadow: none; }
.hero-button svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-hint { padding-left: 3px; color: #5f5e58; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.hero-visual { min-height: 0; width: 100%; display: grid; place-items: center stretch; position: relative; isolation: isolate; }
.visual-glow { position: absolute; width: 390px; height: 390px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(217,255,67,.48) 0, rgba(217,255,67,.13) 45%, transparent 70%); animation: glow 5s ease-in-out infinite; }
@keyframes glow { 50% { scale: 1.08; opacity: .7; } }
.example-card { width: 100%; max-width: 500px; justify-self: end; position: relative; z-index: 1; padding: 30px; background: rgba(255,255,252,.96); border: 1px solid rgba(23,23,19,.32); box-shadow: 0 2px 5px rgba(24,23,18,.04), 0 18px 45px rgba(24,23,18,.11); animation: card-enter .75s .15s cubic-bezier(.2,.75,.2,1) both; }
@keyframes card-enter { from { opacity: 0; transform: translateY(22px); } }
.example-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: #8b8981; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.example-top i { padding: 6px 9px; color: #536219; background: var(--acid); font-style: normal; }
.example-card h2 { margin: 24px 0 18px; font: 600 19px/1.35 "Unbounded", sans-serif; }
.example-card p { margin: 0 0 13px; color: #5e5d57; font-size: 12px; line-height: 1.72; }
.example-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: #98968e; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.example-footer strong { color: #5e6e1b; }
.example-footer i { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; color: var(--ink); background: var(--acid); font-style: normal; }
.hero-features { display: flex; justify-content: center; gap: clamp(30px, 6vw, 80px); margin: 0 0 38px; padding: 20px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #66655f; font-size: 11px; font-weight: 700; }
.hero-features i { width: 17px; height: 17px; display: inline-grid; place-items: center; margin-right: 6px; border: 1px solid #a7a49a; border-radius: 50%; color: #687f0a; font-style: normal; font-size: 9px; }
.workspace { display: grid; grid-template-columns: .91fr 1.09fr; align-items: start; gap: 18px; }
.panel { min-width: 0; padding: 34px; border: 1px solid var(--ink); box-shadow: var(--shadow); }
.input-panel { position: sticky; top: 18px; background: var(--panel); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.panel-heading > div { display: flex; align-items: center; gap: 12px; }
.step { display: grid; place-items: center; width: 35px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; font-size: 10px; font-weight: 800; }
h2 { margin: 0; font: 600 17px/1 "Unbounded", sans-serif; letter-spacing: -.03em; }
button, textarea, input, select { font: inherit; }
button { color: inherit; }
.text-button { background: none; border: 0; padding: 5px; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.field-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.field-label span, .field-label small { color: #96938a; font-size: 9px; font-weight: 600; letter-spacing: .05em; align-self: end; }
.textarea-wrap { position: relative; }
textarea, input, select { width: 100%; color: var(--ink); background: #f6f4ed; border: 1px solid #c8c5ba; border-radius: 0; outline: none; transition: border .2s, box-shadow .2s, background .2s; }
textarea { resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { border-color: var(--ink); background: white; box-shadow: 4px 4px 0 var(--acid); }
#title { height: 58px; padding: 0 76px 0 17px; font-size: 14px; }
.counter { position: absolute; right: 12px; bottom: 11px; padding: 3px 6px; color: var(--muted); background: #ebe9e1; font-size: 10px; font-weight: 700; }
.counter-warning { color: #b13f25; background: #ffe0d7; }
.field-help { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.divider { height: 1px; background: var(--line); margin: 25px 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; }
.settings-grid label { min-width: 0; }
.fixed-setting { padding: 13px 14px; border: 1px solid #c8c5ba; background: #f6f4ed; }
.fixed-setting span { display: block; margin-bottom: 5px; color: #96938a; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.fixed-setting strong { font-size: 11px; }
.formula-setting { min-width: 0; padding: 10px 14px; border: 1px solid #c8c5ba; background: #f6f4ed; }
.formula-setting span { display: block; margin-bottom: 5px; color: #96938a; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.formula-setting select { width: 100%; height: 30px; padding: 0 4px; border: 0; background: transparent; font-size: 11px; }
select, input { height: 44px; padding: 0 12px; font-size: 12px; }
.details-label { margin-top: 23px; }
.details { min-height: 78px; padding: 12px; font-size: 12px; }
.generate-button { width: 100%; height: 57px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px 0 23px; margin-top: 22px; border: 1px solid var(--ink); background: var(--acid); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; box-shadow: 5px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.generate-button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.generate-button:active { transform: translate(5px, 5px); box-shadow: none; }
.generate-button svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.error { min-height: 17px; margin: 12px 0 -12px; color: #c63217; font-size: 11px; font-weight: 700; }
.access-hint { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.access-modal[hidden] { display: none; }
.access-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.access-backdrop { position: absolute; inset: 0; background: rgba(23, 23, 19, .62); }
.access-dialog { position: relative; width: min(100%, 430px); padding: 30px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.access-dialog h2 { margin: 8px 0 12px; font-family: Unbounded, sans-serif; font-size: 24px; line-height: 1.2; }
.access-dialog p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.access-dialog .field-label { display: block; margin: 14px 0 7px; }
.access-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 25px; cursor: pointer; }
.access-error { min-height: 17px; margin: 12px 0 -8px !important; color: #c63217 !important; font-weight: 700; }
.access-submit { margin-top: 18px; }
.output-panel { display: flex; flex-direction: column; background: #e7e5dd; }
.output-heading { margin-bottom: 20px; }
.export-button, .copy-button { display: flex; align-items: center; gap: 7px; border: 1px solid #aaa79e; background: transparent; padding: 8px 10px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.export-button:disabled { opacity: .35; cursor: not-allowed; }
.export-button:not(:disabled):hover, .copy-button:hover { background: var(--ink); color: white; }
.export-button svg, .copy-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.results { min-height: 530px; display: flex; flex-direction: column; gap: 16px; }
.empty-state { margin: auto; text-align: center; color: #7d7a72; }
.empty-icon { width: 82px; height: 82px; position: relative; margin: 0 auto 22px; }
.empty-icon svg { width: 100%; fill: none; stroke: #9c9990; stroke-width: 1.3; }
.empty-icon span { position: absolute; right: -2px; top: -8px; color: var(--orange); font-size: 30px; }
.empty-state h3 { margin: 0 0 10px; color: #4b4a45; font: 600 14px "Unbounded", sans-serif; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.7; }
.result-card { background: var(--panel); border: 1px solid #bbb8ae; padding: 20px; animation: rise .35s both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.result-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.result-top > div { display: flex; min-width: 0; gap: 10px; align-items: baseline; }
.result-number { color: var(--orange); font: 700 10px "Unbounded", sans-serif; }
.result-title { overflow: hidden; margin: 0; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.copy-button { flex: 0 0 auto; border: 0; padding: 2px; color: #66645e; }
.quality-checks { display: flex; flex-wrap: wrap; gap: 6px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.quality-checks span { padding: 5px 7px; border: 1px solid #cac7bd; color: #68665f; background: #f0eee6; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.quality-checks .is-valid { color: #526411; border-color: #b9ca6f; background: #f3f9d9; }
.quality-checks .is-invalid { color: #b13f25; border-color: #efad9d; background: #fff0eb; }
.result-text { min-height: 270px; padding: 15px 4px 5px; border: 0; background: transparent; outline: none; font-size: 12.5px; line-height: 1.68; white-space: normal; }
.result-text:focus { box-shadow: none; background: #fff; }
.result-text p { margin: 0 0 13px; }
.result-text ul, .result-text ol { margin: 0 0 13px; padding-left: 23px; }
.result-text li { margin: 4px 0; }
.result-meta { display: flex; justify-content: space-between; color: #918e85; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.title-library { margin: 50px 0 0; padding: 30px; border: 1px solid var(--ink); background: var(--panel); }
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.library-heading > div { display: flex; align-items: center; gap: 12px; }
.library-heading p { max-width: 360px; margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.library-tools { display: grid; grid-template-columns: minmax(220px, 1fr) 220px; gap: 12px; margin-bottom: 18px; }
.library-tools input, .library-tools select { background: #f6f4ed; }
.library-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.library-grid button[hidden] { display: none; }
.library-grid button { padding: 10px 12px; border: 1px solid #c8c5ba; background: #f6f4ed; cursor: pointer; font-size: 11px; line-height: 1.35; text-align: left; transition: border-color .15s, background .15s, color .15s; }
.library-grid button:hover { border-color: var(--ink); }
.library-grid button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.library-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.library-actions > div { display: flex; align-items: center; gap: 17px; }
.library-insert { padding: 10px 14px; border: 1px solid var(--ink); color: var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; transition: transform .15s, box-shadow .15s; }
.library-insert:hover:not(:disabled) { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.library-insert:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); margin: 76px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles article { padding: 30px 27px; border-right: 1px solid var(--line); }
.principles article:last-child { border: 0; }
.principles span { color: var(--orange); font: 700 10px "Unbounded", sans-serif; }
.principles h3 { margin: 11px 0 7px; font: 600 13px "Unbounded", sans-serif; }
.principles p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
footer { max-width: 1240px; margin: 0 auto; padding: 0 28px 28px; display: flex; justify-content: space-between; color: #77756e; font-size: 10px; font-weight: 800; letter-spacing: .1em; }

@media (max-width: 900px) {
  .hero { height: auto; min-height: 0; grid-template-columns: 1fr; gap: 42px; padding: 70px 0 60px; }
  .hero-copy { align-items: center; gap: 32px; text-align: center; }
  .hero-message { justify-items: center; }
  .hero-cta { justify-items: center; }
  h1, .lead { margin-left: auto; margin-right: auto; }
  .hero-visual { width: min(100%, 560px); margin: 0 auto; }
  .example-card { justify-self: center; }
  .hero-features { flex-wrap: wrap; }
  .workspace { grid-template-columns: 1fr; }
  .input-panel { position: static; }
  .results { min-height: 400px; max-height: none; }
  .input-panel { align-self: start; }
}
@media (min-width: 901px) and (max-width: 1080px) {
  h1 { font-size: 42px; }
}
@media (max-width: 580px) {
  .topbar, main, footer { padding-left: 17px; padding-right: 17px; }
  .topbar-note { display: none; }
  .hero { padding: 48px 0 54px; gap: 38px; }
  h1 { font-size: clamp(34px, 10vw, 46px); }
  .lead { font-size: 14px; }
  .hero-button { width: 100%; min-width: 0; max-width: 330px; height: 62px; }
  .hero-visual { min-height: 0; }
  .visual-glow { width: 280px; height: 280px; }
  .example-card { padding: 21px; }
  .example-card h2 { font-size: 15px; }
  .example-card p { font-size: 10.5px; }
  .example-card p:nth-of-type(2) { display: none; }
  .example-footer { margin-top: 14px; }
  .hero-features { gap: 15px 24px; margin-bottom: 25px; padding: 18px 12px; }
  .panel { padding: 23px 18px; }
  .panel-heading { align-items: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .output-heading { display: block; }
  .output-heading .export-button { margin-top: 18px; }
  .copy-button span { display: none; }
  .title-library { margin-top: 28px; padding: 22px 18px; }
  .library-heading { display: block; }
  .library-heading p { margin-top: 15px; text-align: left; }
  .library-tools { grid-template-columns: 1fr; }
  .library-grid { max-height: 430px; overflow-y: auto; padding: 3px 5px 3px 3px; }
  .library-actions { align-items: flex-start; flex-direction: column; }
  .principles { grid-template-columns: 1fr; margin: 50px 0; }
  .principles article { border-right: 0; border-bottom: 1px solid var(--line); }
  footer { display: block; line-height: 2; }
}
