:root {
  --bg: #f8f6f0;
  --surface: #fffefb;
  --surface-2: #f1f1e9;
  --text: #25271f;
  --muted: #74786b;
  --border: #dedfd4;
  --primary: #477538;
  --primary-hover: #385f2c;
  --primary-text: #fbfff7;
  --accent: #e9f1dd;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 24px 60px -42px rgba(25, 35, 20, .55);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
body, button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, input, select { border: 0; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.03em; }
p { color: var(--muted); line-height: 1.7; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.container-wide { width: min(1440px, calc(100% - 32px)); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.align-right { text-align: right; }

.site-header { position: relative; z-index: 30; border-bottom: 1px solid rgba(222, 223, 212, .8); background: rgba(248, 246, 240, .9); backdrop-filter: blur(18px); }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--primary); color: #fff; box-shadow: 0 8px 20px -12px rgba(56, 95, 44, .8); }
.main-nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.main-nav > a:not(.button) { padding: 10px 12px; color: var(--muted); }
.main-nav > a:hover { color: var(--text); }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; padding: 0 16px; border: 1px solid transparent; font-size: 14px; font-weight: 650; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button-primary { background: var(--primary); color: var(--primary-text); }
.button-primary:hover { background: var(--primary-hover); color: #fff; }
.button-light { background: #c4e497; color: #1d2d16; }
.button-outline { border-color: var(--border); background: var(--surface); color: var(--text); }
.button-small { min-height: 34px; padding-inline: 13px; font-size: 13px; }
.button-large { min-height: 48px; padding-inline: 20px; font-size: 15px; }
.text-button { margin-left: auto; padding: 8px; background: transparent; color: var(--muted); font-size: 13px; }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(circle at 82% 10%, rgba(126,156,90,.18), transparent 32%), radial-gradient(circle at 10% 65%, rgba(208,218,188,.38), transparent 25%); }
.hero-grid { position: relative; display: grid; grid-template-columns: .92fr 1.08fr; gap: 64px; align-items: center; padding-block: 88px; }
.eyebrow-pill { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; background: var(--surface-2); color: #4b5545; font-size: 12px; }
.hero h1 { max-width: 660px; margin: 20px 0 24px; font-size: clamp(42px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -.055em; }
.lead { max-width: 600px; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.trust-note { display: inline-flex; align-items: center; gap: 8px; padding: 10px; color: var(--muted); font-size: 12px; }
.trust-note b { color: var(--primary); }
.demo-card { padding: 14px; border: 1px solid rgba(255,255,255,.5); border-radius: 25px; background: #141712; color: #fff; box-shadow: 0 35px 90px -35px rgba(20,30,15,.55); }
.demo-image { position: relative; overflow: hidden; margin: 0; border-radius: 17px; }
.demo-image img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.demo-caption { position: absolute; inset: auto 0 0; display: flex; align-items: end; justify-content: space-between; padding: 70px 22px 20px; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.demo-caption span:not(.saving-pill), .demo-stats span { display: flex; flex-direction: column; gap: 4px; }
.demo-caption small, .demo-stats small, .preset-grid small { color: rgba(255,255,255,.48); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.saving-pill { padding: 8px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(0,0,0,.35); color: #d1efaa; font-size: 12px; backdrop-filter: blur(8px); }
.demo-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 12px 2px 0; }
.demo-stats span { padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.055); font-size: 11px; }

.section { padding-block: 88px; }
.section-muted { border-block: 1px solid var(--border); background: var(--surface); }
.section-heading { max-width: 680px; margin: 0 auto 38px; }
.section-heading h2, .split-grid h2, .cta-section h2, .dark-cta h2 { margin: 10px 0 14px; font-size: clamp(31px, 4vw, 42px); }
.section-heading p { margin-bottom: 0; }
.kicker { color: var(--primary); font-size: 12px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.cards { display: grid; gap: 16px; }
.three-cols { grid-template-columns: repeat(3,1fr); }
.two-cols { grid-template-columns: repeat(2,1fr); }
.info-card { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.section-muted .info-card { background: var(--bg); }
.info-card h3 { margin: 22px 0 8px; font-size: 16px; }
.info-card p { margin: 0; font-size: 14px; }
.feature-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--accent); color: var(--primary); font-weight: 800; }
.feature-icon.large { width: 50px; height: 50px; margin-inline: auto; border-radius: 15px; }
.card-number { position: absolute; top: 25px; right: 24px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.split-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 72px; align-items: start; }
.split-grid > div:first-child > p { font-size: 14px; }
.compact-cards .info-card h3 { margin-top: 16px; }
.compact-cards .info-card p { font-size: 12px; }
.format-section { grid-template-columns: .7fr 1.3fr; }
.format-list { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.format-list article { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 24px; }
.format-list article + article { border-top: 1px solid var(--border); }
.format-list h3 { margin: 0; color: var(--primary); font-size: 16px; }
.format-list p { margin: 0; font-size: 14px; }
.faq-list { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.faq-list article { padding: 24px; }
.faq-list article + article { border-top: 1px solid var(--border); }
.faq-list h3 { margin-bottom: 8px; font-size: 16px; }
.faq-list p { margin: 0; font-size: 14px; }
.cta-section p { margin-inline: auto; max-width: 620px; }
.cta-section .button, .dark-cta .button { margin-top: 18px; }
.dark-cta { padding-block: 74px; background: #151812; color: #fff; }
.dark-cta p { color: rgba(255,255,255,.6); }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.site-footer a:hover { color: var(--text); }

.breadcrumbs { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.breadcrumbs .container { display: flex; gap: 9px; padding-block: 11px; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { color: var(--text); }
.seo-hero .hero-grid { padding-block: 74px; }
.preset-showcase { padding: 24px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.preset-showcase-header { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.preset-showcase-header > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.preset-showcase-header small { color: var(--muted); }
.preset-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 18px; }
.preset-grid > span { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.preset-grid small { color: var(--muted); }
.preset-note { margin: 14px 0 0; padding: 14px; border-radius: 12px; background: var(--accent); color: #405336; font-size: 12px; }
.checklist-layout { grid-template-columns: .7fr 1.3fr; }
.checklist { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.checklist li > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 750; }
.checklist h3 { margin-bottom: 6px; font-size: 15px; }
.checklist p { margin: 0; font-size: 13px; }

/* Optimizer */
.optimizer-page { min-height: 100vh; }
.privacy-badge { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.optimizer-layout { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); gap: 24px; padding-block: 30px; }
.optimizer-column { min-width: 0; display: grid; gap: 18px; }
.tool-heading { margin-bottom: 2px; }
.tool-heading h1 { margin: 6px 0 7px; font-size: 30px; }
.tool-heading p { margin: 0; font-size: 14px; }
.tool-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.tool-panel-header { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.tool-panel-header > div { min-width: 0; flex: 1; }
.tool-panel-header h2 { margin: 0 0 2px; font-size: 16px; }
.tool-panel-header p { margin: 0; font-size: 12px; line-height: 1.45; }
.step-number { display: grid; width: 29px; height: 29px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 750; }
.tool-panel-body { padding: 18px; }
.dropzone { width: 100%; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; border: 1px dashed #bdc2b3; border-radius: 13px; background: #f4f4ed; color: var(--text); text-align: center; transition: .18s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--accent); }
.dropzone-icon { display: grid; width: 45px; height: 45px; place-items: center; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--primary); font-size: 20px; box-shadow: 0 8px 20px -15px rgba(0,0,0,.4); }
.dropzone b { font-size: 14px; }
.dropzone small { color: var(--muted); font-size: 12px; }
.file-section { margin-top: 15px; }
.file-summary { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.file-list { max-height: 225px; overflow: auto; display: grid; gap: 8px; padding-right: 3px; }
.file-row { display: flex; align-items: center; gap: 11px; padding: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.file-row.is-selected { border-color: rgba(71,117,56,.36); background: var(--accent); }
.file-select { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; background: transparent; color: inherit; text-align: left; }
.file-select img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; }
.file-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-meta b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-meta small { color: var(--muted); }
.file-remove { width: 30px; height: 30px; border-radius: 8px; background: transparent; color: var(--muted); }
.file-remove:hover { background: #fae7e5; color: var(--danger); }
.file-section .button { margin-top: 12px; }

.preset-fieldset, .field { min-width: 0; margin: 0; padding: 0; border: 0; }
.preset-fieldset > legend, .field > legend, .field > span:first-child { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 650; }
.preset-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.preset-button { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: #f4f4ed; color: var(--text); text-align: left; }
.preset-button:hover { border-color: rgba(71,117,56,.35); }
.preset-button[aria-pressed="true"] { border-color: rgba(71,117,56,.4); background: var(--accent); box-shadow: 0 5px 18px -15px rgba(0,0,0,.35); }
.preset-icon { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--surface); color: var(--primary); box-shadow: 0 5px 14px -12px rgba(0,0,0,.4); }
.preset-button[aria-pressed="true"] .preset-icon { background: var(--primary); color: #fff; }
.preset-button > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 2px; }
.preset-button b { font-size: 13px; }
.preset-button small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.preset-check { visibility: hidden; color: var(--primary); }
.preset-button[aria-pressed="true"] .preset-check { visibility: visible; }
.active-preset { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; margin-top: 22px; }
.field-full { grid-column: 1/-1; }
.field small { color: var(--muted); font-size: 11px; font-weight: 400; }
input, select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: var(--surface); color: var(--text); font-size: 13px; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(71,117,56,.13); }
input:disabled { cursor: not-allowed; opacity: .5; }
.segmented { display: grid; grid-template-columns: repeat(2,1fr); padding: 4px; border-radius: 9px; background: var(--surface-2); }
.segmented button { height: 32px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.dimensions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 5px; }
.dimensions > label, .input-with-unit { position: relative; display: block; }
.dimensions i, .input-with-unit i { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-style: normal; pointer-events: none; }
.dimensions input { padding-right: 34px; }
.input-with-unit { max-width: 240px; }
.input-with-unit input { padding-right: 40px; }
.max-size-field > small { display: block; margin-top: 7px; }
.progress-box { margin-bottom: 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.progress-box > div { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 650; }
progress { width: 100%; height: 5px; display: block; overflow: hidden; border: 0; border-radius: 999px; background: var(--border); appearance: none; }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--primary); }
progress::-moz-progress-bar { background: var(--primary); }
.generate-button { min-width: 245px; justify-content: space-between; }
.result-box { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid rgba(71,117,56,.25); border-radius: 12px; background: var(--accent); }
.result-check { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; }
.result-box > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.result-box small { color: var(--muted); }
.error-message { margin: 12px 0 0; color: var(--danger); font-size: 13px; }

.preview-panel { position: sticky; top: 24px; height: calc(100vh - 48px); min-height: 560px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #2a2e25; border-radius: 18px; background: #11130f; color: #fff; box-shadow: 0 30px 80px -38px rgba(15,23,42,.75); }
.preview-panel > header { height: 59px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 13px; font-weight: 650; }
.preview-format { padding: 5px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; }
.preview-stage { position: relative; min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 40px; background: radial-gradient(circle at 50% 38%,#28301f 0%,#171a14 38%,#11130f 72%); }
.preview-stage::before { position: absolute; inset: 0; content: ""; opacity: .035; background-image: linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px); background-size: 32px 32px; }
.preview-empty, .preview-error { position: relative; max-width: 310px; text-align: center; }
.preview-empty > span { display: grid; width: 64px; height: 64px; place-items: center; margin: 0 auto 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.045); color: rgba(255,255,255,.45); font-size: 24px; }
.preview-empty b, .preview-error b { display: block; color: rgba(255,255,255,.82); font-size: 14px; }
.preview-empty p, .preview-error p { margin: 8px 0 0; color: rgba(255,255,255,.45); font-size: 12px; }
.preview-stage > img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 28px 70px rgba(0,0,0,.42); }
.preview-stage > img.is-loading { opacity: .45; }
.preview-loading { position: absolute; padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 11px; backdrop-filter: blur(8px); }
.preview-panel > footer { min-height: 66px; display: flex; align-items: center; padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.15); }
.preview-placeholder { color: rgba(255,255,255,.35); font-size: 11px; }
.preview-metrics { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); }
.preview-metrics > span { display: flex; flex-direction: column; gap: 4px; padding-inline: 14px; }
.preview-metrics > span:first-child { padding-left: 0; }
.preview-metrics > span + span { border-left: 1px solid rgba(255,255,255,.1); }
.preview-metrics small { color: rgba(255,255,255,.36); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.preview-metrics b { font-size: 11px; }
.preview-metrics b.is-positive { color: #c4e497; }

@media (max-width: 1000px) {
  .hero-grid, .split-grid, .optimizer-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; padding-block: 64px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .demo-card { max-width: 700px; margin-inline: auto; }
  .preview-panel { position: relative; top: 0; height: 680px; grid-row: 1; }
  .optimizer-column { grid-row: 2; }
  .checklist-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container, .container-wide { width: min(100% - 24px, 1180px); }
  .main-nav > a:not(.button) { display: none; }
  .privacy-badge { display: none; }
  .section { padding-block: 62px; }
  .three-cols, .two-cols, .preset-grid, .preset-options, .settings-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .trust-note { justify-content: center; }
  .demo-caption { padding: 55px 13px 13px; }
  .saving-pill { display: none; }
  .demo-stats { grid-template-columns: 1fr 1fr; }
  .demo-stats span:last-child { display: none; }
  .format-list article { grid-template-columns: 1fr; gap: 6px; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 24px; }
  .optimizer-layout { padding-block: 20px; }
  .preview-panel { height: 520px; min-height: 480px; }
  .preview-stage { padding: 22px; }
  .tool-heading h1 { font-size: 25px; }
  .field-full { grid-column: auto; }
  .result-box { align-items: stretch; flex-direction: column; }
  .result-box .button { width: 100%; }
  .generate-button { width: 100%; min-width: 0; }
}
