@font-face { font-family: "xw-gar"; src: url(fonts/EBGaramond-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-gar-i"; src: url(fonts/EBGaramond-Italic.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-gar-sb"; src: url(fonts/EBGaramond-SemiBold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-inter"; src: url(fonts/Inter-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-inter-sb"; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-caveat"; src: url(fonts/Caveat-SemiBold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-fraunces"; src: url(fonts/Fraunces-Display.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "xw-kalam"; src: url(fonts/Kalam-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --paper: #f7f1e6; --card: #fffdf8; --ink: #2a221d; --soft: #6c5f55; --line: #e3d8c8;
  --accent: #8a2b36; --accent-d: #6f1f2a; --green: #2f6b4f; --gold: #c99a3b;
  --serif: "xw-gar-sb", Georgia, "Times New Roman", serif; --sans: "xw-inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
button, input, select { font: inherit; color: inherit; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; color: var(--ink); text-decoration: none; }
.logo { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.4; }
.logo .f { fill: var(--accent); stroke: var(--accent); }
.lang { font-size: 14px; color: var(--soft); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.lang:hover { color: var(--ink); border-color: var(--soft); }

.hero { max-width: 1180px; margin: 0 auto; padding: 18px 20px 30px; display: grid; gap: 22px; align-items: center; }
.hero h1 { font-size: clamp(34px, 6.4vw, 58px); letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--soft); max-width: 34em; margin: 0 0 22px; }
.note { font-size: 14px; color: var(--soft); margin-top: 12px; }
.hero-art img { width: 100%; height: auto; display: block; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 13px 26px; font-weight: 600; font-family: "xw-inter-sb", var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--accent-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-2 { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-2:hover { background: #f3e6e3; }
.btn-quiet { background: #fff; border: 1.5px dashed #cdbca6; border-radius: 10px; padding: 9px 16px; cursor: pointer; color: var(--ink); }
.btn-quiet:hover { border-color: var(--accent); }
.link { background: none; border: 0; color: var(--soft); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 6px 2px; min-height: 44px; }

.builder { max-width: 1180px; margin: 0 auto 40px; padding: 26px 20px; background: var(--card); border-radius: 22px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(60, 35, 20, .35); display: grid; gap: 26px; grid-template-areas: "s1" "pv" "s2" "s3"; }
.b-s1 { grid-area: s1; } .b-pv { grid-area: pv; } .b-s2 { grid-area: s2; } .b-s3 { grid-area: s3; }
.builder h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 16px/1 "xw-inter-sb", var(--sans); }
.field { margin: 0 0 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; font-family: "xw-inter-sb", var(--sans); margin-bottom: 5px; }
input, select { width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 43, 54, .12); }
.help { font-size: 14px; color: var(--soft); margin: 18px 0 10px; }
.rows-head { display: none; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 26px 1fr 44px; grid-template-areas: "n w x" "n c c" "n e e"; gap: 6px 8px; align-items: center; }
.row .rn { grid-area: n; align-self: start; padding-top: 10px; font-size: 13px; color: var(--soft); text-align: right; }
.row .w { grid-area: w; text-transform: uppercase; letter-spacing: .04em; font-family: "xw-inter-sb", var(--sans); }
.row .w::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.row .c { grid-area: c; }
.row .x { grid-area: x; width: 44px; height: 44px; border: 0; background: none; color: #a8998b; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px; }
.row .x:hover { color: var(--accent); background: #f6ece8; }
.row .err { grid-area: e; margin: 0; font-size: 13px; color: #9b2c1f; }
.row.bad input { border-color: #d9a79e; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 14px; }
.count { font-size: 14px; color: var(--soft); min-height: 1.4em; margin: 12px 0 0; }

.pv-title { font-size: 18px !important; color: var(--soft); }
.sheet { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 14px 34px -14px rgba(60, 35, 20, .35); border-radius: 3px; overflow: hidden; }
.sheet svg, .sheet img { display: block; width: 100%; height: auto; }
.sheet svg, .thumb svg { text-rendering: geometricPrecision; } /* hinted advances at small sizes ate the spaces between words */

.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.style-card { position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer; border: 2px solid var(--line); border-radius: 14px; padding: 8px 8px 10px; background: #fff; transition: border-color .15s; }
.style-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 43, 54, .12); }
.style-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.thumb { display: block; overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; background: #fff; }
.thumb svg, .thumb img { display: block; width: 100%; height: auto; }
.sn { font-family: var(--serif); font-size: 18px; }
.sd { font-size: 12.5px; color: var(--soft); line-height: 1.3; }

.buy { background: #fbf6ee; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.amount { font-family: var(--serif); font-size: 34px; }
.pnote { font-size: 13px; color: var(--soft); }
.incl { margin: 8px 0 16px; padding: 0; list-style: none; }
.incl li { padding-left: 24px; position: relative; margin: 4px 0; font-size: 15px; }
.incl li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.45; margin: 4px 0 16px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.btn-buy { width: 100%; font-size: 17px; padding: 15px; }
.btn-buy.soon { background: #b9aa9c; }
.msg { font-size: 14px; margin: 10px 0 0; min-height: 1.2em; }
.msg.bad { color: #9b2c1f; } .msg.info { color: var(--soft); }
.small { font-size: 13px; color: var(--soft); margin: 10px 0 0; }
.paid { background: #eef5f0; border: 1px solid #cfe1d5; border-radius: 16px; padding: 20px; }
.paid h3 { font-size: 24px; color: var(--green); }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dl .btn { min-height: 44px; }
.mine { margin-top: 20px; }
.mine h3 { font-size: 19px; }
.mine ul { list-style: none; padding: 0; margin: 0; }
.mine li { border-top: 1px solid var(--line); padding: 12px 0; }
.mt { display: block; font-family: var(--serif); font-size: 18px; }
.mu { display: block; font-size: 13px; color: var(--soft); }
.mine .btn { padding: 8px 16px; font-size: 14px; min-height: 44px; }

.how, .faq { max-width: 860px; margin: 0 auto; padding: 24px 20px; }
.how h2, .faq h2 { font-size: 32px; text-align: center; margin-bottom: 22px; }
.how ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
.how li { counter-increment: s; background: var(--card); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 0 var(--line); }
.how li h3 { font-size: 21px; }
.how li h3::before { content: counter(s) ". "; color: var(--accent); }
.how li p { margin: 0; color: var(--soft); }
.faq details { border-bottom: 1px solid var(--line); padding: 0; }
.faq summary { padding: 12px 0; cursor: pointer; font-family: var(--serif); font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--soft); margin: 0 0 14px; }

.foot { max-width: 1180px; margin: 30px auto 0; padding: 26px 20px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--soft); text-align: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 8px; }
.foot a { color: var(--soft); }

.article { max-width: 720px; margin: 0 auto; padding: 10px 20px 30px; }
.article h1 { font-size: 38px; }
.article h2 { font-size: 22px; margin-top: 1.4em; }
.muted { color: var(--soft); font-size: 14px; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr 1fr; padding: 30px 20px 44px; }
  .builder { padding: 34px; }
  .rows-head { display: grid; grid-template-columns: 26px minmax(150px, 1fr) minmax(0, 1.1fr) 44px; gap: 8px; font-size: 13px; color: var(--soft); margin-bottom: 6px; }
  .rows-head span:first-child { grid-column: 2; }
  .row { grid-template-columns: 26px minmax(150px, 1fr) minmax(0, 1.1fr) 44px; grid-template-areas: "n w c x" "n e e e"; }
  .row .rn { padding-top: 0; align-self: center; }
  .how ol { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1020px) {
  .builder { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "s1 pv" "s2 pv" "s3 pv"; column-gap: 44px; align-items: start; }
  .b-pv { position: sticky; top: 18px; grid-row: 1 / span 3; }
}
@media (max-width: 420px) {
  .styles { gap: 7px; }
  .style-card { padding: 6px 6px 8px; }
  .sn { font-size: 16px; }
  .sd { font-size: 11.5px; }
}
