:root {
  --ink: #17221F;
  --muted: #5E6B67;
  --bg: #F7F5F0;
  --card: #FFFFFF;
  --line: #E3DED3;
  --brand: #1F3D36;
  --brand-2: #2C5A4F;
  --accent: #F2B544;
  --danger: #B3261E;
  --ok: #1E6B4F;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23,34,31,.05), 0 8px 24px rgba(23,34,31,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 480px; margin: 3rem auto; }
.narrow-wide { max-width: 860px; margin: 2rem auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.big { font-size: 1.8rem; font-weight: 700; margin: .2rem 0 .6rem; }

/* nav */
.nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 18px; overflow-x: auto; white-space: nowrap; }
.nav nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav nav a:hover { color: var(--brand-2); }
@media (max-width: 860px) { .nav nav a:not(.btn):not([href="/pricing"]):not([href="/login"]) { display: none; } }
@media (max-width: 480px) { .nav nav { gap: 12px; } .brand { font-size: 1rem; gap: 8px; } .nav nav a { font-size: .88rem; } .seg button { padding: .45rem .6rem; font-size: .86rem; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff !important; border: 1px solid var(--brand); padding: .65rem 1.1rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--brand) !important; }
.btn-ghost:hover { background: #EEF3F1; }
.btn-sm { padding: .4rem .8rem; font-size: .88rem; }
.btn-wide { width: 100%; margin-top: .5rem; }
.btn.locked { background: #F1EFEA; border-color: var(--line); color: var(--muted) !important; }

/* hero */
.hero { padding: 3rem 0 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand-2); margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 2rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
.card p { margin: 0 0 .6rem; }
.use { text-decoration: none; color: inherit; transition: transform .15s; }
.use:hover { transform: translateY(-2px); }
.use span { color: var(--brand-2); font-weight: 600; font-size: .92rem; }

/* tool */
.tool { padding: 18px; }
.drop { border: 2px dashed #C9C2B3; border-radius: 12px; padding: 34px 16px; text-align: center; cursor: pointer; color: var(--brand); background: #FBFAF7; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over, .drop:focus-visible { background: #EEF3F1; border-color: var(--brand-2); outline: none; }
.drop p { margin: .3rem 0; color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 16px 0 6px; }
.seg { display: inline-flex; background: #F1EFEA; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .5rem .85rem; border-radius: 8px; font: inherit; font-size: .92rem; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.opt-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.opt { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; }
.opt[hidden] { display: none; }
.opt output { min-width: 2ch; font-variant-numeric: tabular-nums; }
.opt select { font: inherit; padding: .3rem .4rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.status { font-size: .9rem; color: var(--muted); padding: 6px 0 0; }
.rerun { margin: 12px 0 0; }

.result { display: grid; grid-template-columns: 1fr 1fr 240px; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .result { grid-template-columns: 1fr 1fr; } .result .dl { grid-column: 1 / -1; } }
@media (max-width: 520px) { .result { grid-template-columns: 1fr; } }
.label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.frame { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; padding: 8px; }
.frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #EFEDE8 25%, transparent 25%), linear-gradient(-45deg, #EFEDE8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EFEDE8 75%), linear-gradient(-45deg, transparent 75%, #EFEDE8 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.dl .fname { font-weight: 600; word-break: break-all; margin: 22px 0 10px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btns .btn { min-width: 72px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sections */
.steps { padding-left: 1.2rem; }
.steps li { margin: .35rem 0; }
.plans .price { font-size: 1.8rem; font-weight: 800; margin: .2rem 0 .8rem; }
.plans .price span { font-size: .9rem; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1rem; font-size: .94rem; min-height: 6.5em; }
.plan .btn, .plan form .btn { width: 100%; }
.plan.featured { border: 2px solid var(--brand); position: relative; }
.tag { position: absolute; top: -12px; left: 20px; background: var(--accent); color: var(--ink); font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin: 0 !important; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }
.more p { line-height: 2; }

/* forms */
.form-card label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 14px; }
.form-card input:not([type=checkbox]), .form-card select, .form-card textarea { display: block; width: 100%; margin-top: 6px; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
.error { color: var(--danger); background: #FCEDEC; padding: .6rem .8rem; border-radius: 8px; }
.notice, .flash { color: var(--ok); background: #E8F3EE; padding: .6rem .8rem; border-radius: 8px; margin: 1rem 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .notes { max-width: 260px; white-space: pre-wrap; }
form.inline { display: flex; gap: 6px; align-items: center; }
.stats .card p { margin: 0; }
.prose { line-height: 1.7; }

.foot { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--card); padding: 28px 0; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
