:root {
  --page: #f7f5ee;
  --ink: #23271e;
  --muted: #58594e;
  --line: #d9d6cb;
  --accent: #3c432d;
  --on-accent: #fffdf5;
  --display: Georgia, "Times New Roman", serif;
  --body: "Segoe UI", Arial, sans-serif;
  --radius: 3px;
  color-scheme: light;
  font-family: var(--body);
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
main { flex: 1; }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.shell { width: min(100% - 36px, 1256px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 10; padding: 12px 16px; background: #fff; color: #171717; }

.site-header { border-bottom: 1px solid var(--line); }
.site-nav, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 12px;
}
.wordmark { display: inline-flex; gap: 9px; align-items: center; font: 600 1.25rem/1 var(--display); letter-spacing: -.055em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 1px; transform: rotate(15deg); }
.brand-mark i { width: 7px; height: 7px; background: currentColor; border-radius: 70% 20%; }
.nav-browse, .footer-inner > a:not(.wordmark) { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; font-weight: 650; }
.nav-browse:hover, .footer-inner > a:not(.wordmark):hover { text-decoration: underline; text-underline-offset: 5px; }

.hero-inner { padding-block: 38px 34px; display: grid; gap: 32px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: .71rem; font-weight: 720; line-height: 1.5; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 19px; border-top: 1px solid currentColor; }
.hero h1 { margin: 12px 0 15px; font: 400 clamp(3.6rem, 12.4vw, 7rem)/.91 var(--display); letter-spacing: -.075em; }
.hero h1 em { color: var(--accent); font-weight: inherit; }
.hero-description { max-width: 33ch; color: var(--muted); font-size: 1.03rem; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--accent); border-radius: var(--radius); background: transparent; color: var(--accent); font-size: .88rem; font-weight: 700; }
.primary { margin-top: 21px; color: var(--on-accent); background: var(--accent); }
.button:hover { filter: brightness(1.15); }
.button:focus-visible { outline-color: var(--ink); }
.template-image { display: block; overflow: hidden; }

.art {
  --art-bg: #cdbba3;
  --paper: #eee8dd;
  --mini-ink: #30291f;
  --mini-font: Georgia, serif;
  display: grid;
  place-items: center;
  aspect-ratio: 1.48;
  background: radial-gradient(ellipse at 35% 12%, #ffffff45, #ffffff00 66%), var(--art-bg);
  overflow: hidden;
  container-type: inline-size;
}
.art--daymark { --art-bg: #cdd69a; --paper: #e9efaf; --mini-ink: #1735a9; --mini-font: Arial, sans-serif; }
.art--onda { --art-bg: #c87362; --paper: #fae7c8; --mini-ink: #8a281a; }
.art--fieldwork { --art-bg: #bfd3b0; --paper: #e7eee0; --mini-ink: #254631; --mini-font: Arial, sans-serif; }
.art--studio-hour { --art-bg: #e4bcb7; --paper: #f8e5e2; --mini-ink: #6d3650; }
.art--ledger { --art-bg: #b8cbb7; }
.art--ledger .mini-site { width: 91%; }
.art--ledger img { display: block; width: 100%; height: auto; }
.mini-site {
  width: 82%;
  overflow: hidden;
  text-align: left;
  border-radius: 4px;
  color: var(--mini-ink);
  background: var(--paper);
  box-shadow: 0 18px 36px #29211836, 0 2px 5px #2e29182b;
  transition: transform .22s ease;
}
.template-preview:hover .mini-site { transform: translateY(-3px); }
.mini-window { display: flex; align-items: center; gap: 1cqw; height: 3.5cqw; padding-inline: 2cqw; background: #fbf9f4; border-bottom: 1px solid #221b1718; }
.mini-window i { width: .75cqw; height: .75cqw; border-radius: 50%; background: #b9b0a5; }
.mini-nav { display: flex; min-height: 7cqw; padding-inline: 3cqw; align-items: center; justify-content: space-between; gap: 6px; font: 700 2.65cqw/1 var(--mini-font); }
.mini-nav span + span { font: 650 1.45cqw/1 var(--body); text-transform: uppercase; letter-spacing: .08em; }
.mini-body { display: grid; grid-template-columns: 38% 62%; height: 39cqw; }
.mini-copy { display: grid; align-content: center; justify-items: start; padding: 3cqw; }
.mini-copy strong { font: 400 5.1cqw/.98 var(--mini-font); letter-spacing: -.085em; }
.art--daymark .mini-copy strong { font-weight: 800; }
.mini-copy > span { width: 8cqw; height: 2cqw; margin-top: 2.7cqw; background: var(--mini-ink); opacity: .86; }
.mini-body img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }

.catalog { border-top: 1px solid var(--line); padding-block: 24px 48px; scroll-margin-top: 12px; }
.catalog-intro { display: grid; gap: 15px; }
.catalog h2 { margin: 0 0 5px; font: 400 clamp(2.5rem, 6vw, 3.9rem)/1 var(--display); letter-spacing: -.065em; }
.catalog-intro p { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding-inline: 12px; min-height: 46px; }
.search:focus-within { border-color: currentColor; outline: 1px solid currentColor; }
.search-icon { position: relative; width: 13px; height: 13px; flex: 0 0 13px; border: 1.5px solid currentColor; border-radius: 50%; margin-right: 2px; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -2px; width: 6px; height: 1.5px; transform: rotate(46deg); background: currentColor; }
.search input { width: 100%; min-width: 0; min-height: 44px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .94rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.catalog-controls { display: flex; justify-content: space-between; gap: 2px 12px; flex-wrap: wrap; align-items: center; margin-block: 12px 15px; }
.filters { display: flex; gap: 5px; flex-wrap: wrap; }
.filters button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  font-size: .81rem;
  font-weight: 650;
}
.filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.filters button:hover:not([aria-pressed="true"]) { border-color: currentColor; }
.result-count { color: var(--muted); font-size: .8rem; padding-block: 4px; }
.template-list { display: grid; gap: 26px; }
.template-card { min-width: 0; display: flex; flex-direction: column; }
.template-preview { display: block; flex: 1; }
.template-details { padding-top: 13px; }
.template-category { margin-bottom: 3px; color: var(--muted); font-size: .78rem; }
.template-details h3 { margin: 0; font: 400 1.9rem/.98 var(--display); letter-spacing: -.05em; }
.template-preview:hover h3, .template-preview:focus-visible h3 { text-decoration: underline; text-underline-offset: .12em; }
.template-description { color: var(--muted); margin-top: 8px; line-height: 1.4; font-size: .91rem; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; margin-top: 8px; padding-bottom: 2px; }
.card-buy { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #f0eaff; color: var(--accent); font-size: .85rem; font-weight: 750; }
.card-buy:hover { border-color: currentColor; }
.preview-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 3px; font-size: .88rem; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.preview-link:hover { text-decoration-thickness: 2px; }
.empty { padding: 24px 0; }
.empty h3 { margin: 0 0 8px; font: 400 1.6rem var(--display); }
.empty p { margin-bottom: 15px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 12px; flex-wrap: wrap; }

.preview {
  position: fixed;
  width: min(calc(100% - 14px), 1250px);
  height: min(calc(100% - 14px), 940px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d1d0c6;
  border-radius: 10px;
  color: #25271e;
  background: #fbfaf6;
  color-scheme: light;
}
.preview[open] { display: flex; flex-direction: column; }
.preview::backdrop { background: #181915b8; }
.preview-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 8px; padding: 8px 9px; border-bottom: 1px solid #dcd9ce; }
.preview-title-group h2 { margin: 0; font: 600 1.28rem/1.06 Georgia, serif; }
.preview-title-group p { font-size: .76rem; color: #595a50; margin-top: 4px; }
.device-toggle { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 4px; }
.device-toggle button, .close-preview {
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid #dcd9ce;
  border-radius: 4px;
  background: transparent;
  color: #292b23;
  font-size: .81rem;
  font-weight: 700;
}
.device-toggle button[aria-pressed="true"] { color: #fff; background: #373d2b; border-color: #373d2b; }
.preview-actions { display: flex; align-items: center; justify-content: end; gap: 6px; }
.preview-actions a { display: grid; place-items: center; min-height: 44px; color: #25271e; font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.close-preview { padding: 0; font-size: 1.45rem; }
.device-toggle button:hover, .close-preview:hover { border-color: #373d2b; }
.preview-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #d8d6cc; }
.preview-stage iframe { position: absolute; top: 0; border: 0; transform-origin: left top; background: white; box-shadow: 0 0 30px #29251f24; }

[data-design="gallery"] {
  --page: #fffdf9;
  --ink: #22204b;
  --muted: #55516e;
  --line: #ded8ef;
  --accent: #3920bb;
  --on-accent: #ffffff;
  --display: Arial, sans-serif;
  --radius: 14px;
}
[data-design="gallery"] .site-header { background: #e8e0ff; border-color: #cfc3f1; }
[data-design="gallery"] .wordmark { font-weight: 850; }
[data-design="gallery"] .brand-mark { transform: rotate(45deg); }
[data-design="gallery"] .brand-mark i { background: var(--accent); border-radius: 50%; }
[data-design="gallery"] .hero { overflow: hidden; background: #e8e0ff; border-bottom: 1px solid #cfc3f1; }
[data-design="gallery"] .hero-inner { gap: 21px; padding-bottom: 0; }
[data-design="gallery"] .hero-copy { text-align: center; }
[data-design="gallery"] .eyebrow { justify-content: center; }
[data-design="gallery"] .hero h1 { font-weight: 850; letter-spacing: -.09em; font-size: clamp(3.45rem, 11vw, 7.5rem); }
[data-design="gallery"] .hero h1 em { font-style: normal; }
[data-design="gallery"] .hero h1 { max-width: 18ch; margin-inline: auto; text-wrap: balance; }
[data-design="gallery"] .hero-description { margin-inline: auto; }
[data-design="gallery"] .button, [data-design="gallery"] .filters button { border-radius: 99px; }
.gallery-stack { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; margin-inline: auto; width: min(95%, 810px); min-width: 0; isolation: isolate; }
.gallery-stack .art { width: 130%; background: transparent; overflow: visible; }
.gallery-stack .art:first-child { transform: rotate(-11deg) translate(1%, 15%); }
.gallery-stack .art:nth-child(2) { z-index: 1; transform: translate(-12%, 1%); }
.gallery-stack .art:last-child { transform: rotate(11deg) translate(-26%, 20%); }
.gallery-stack .mini-site { width: 100%; border: 2px solid #30244a; }
[data-design="gallery"] .catalog { border-top: 0; }
[data-design="gallery"] .catalog h2, [data-design="gallery"] .template-details h3 { font-weight: 800; }
[data-design="gallery"] .template-card { border: 1px solid var(--line); border-radius: 17px; overflow: clip; box-shadow: 0 5px 0 #e9e0ff; }
[data-design="gallery"] .template-image { border-radius: 0; }
[data-design="gallery"] .template-preview:focus-visible { outline-offset: -4px; }
[data-design="gallery"] .template-details { padding: 14px 15px 0; }
[data-design="gallery"] .card-actions { padding: 0 15px 9px; }
[data-design="gallery"] .preview-link { color: var(--accent); }
[data-design="gallery"] .template-image .art--stillhouse { --art-bg: #ecd6bf; }
[data-design="gallery"] .template-image .art--daymark { --art-bg: #d5dfae; }
[data-design="gallery"] .template-image .art--onda { --art-bg: #edabb0; }

.notice { margin-block: 15px; padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #f0eaff; }
.product-dialog {
  width: min(100% - 24px, 520px);
  max-height: min(100% - 30px, 720px);
  padding: clamp(16px, 4vw, 27px);
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
}
.product-dialog::backdrop { background: #201938b5; }
.product-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.product-top h2 { margin: 0; font: 800 clamp(2rem, 8vw, 3rem)/1 var(--display); letter-spacing: -.065em; }
.product-features { margin: 13px 0; padding-inline-start: 19px; }
.product-features:empty, .product-integration:empty, .product-status:empty, #flow-status:empty { display: none; }
.product-integration, .product-status { color: var(--muted); font-size: .94rem; }
.product-facts { display: grid; gap: 8px; margin-block: 17px; padding-block: 12px; border-block: 1px solid var(--line); }
.product-facts > div { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 8px; font-size: .9rem; }
.product-facts dt { font-weight: 750; }
.product-facts dd { margin: 0; }
.purchase-actions, .flow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 15px; }
.purchase-actions .button, .flow-actions .button { margin: 0; }
.purchase-actions a, .flow-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.button:disabled { opacity: .65; cursor: default; }

.flow { max-width: 650px; padding-block: clamp(38px, 9vw, 88px) 50px; }
.flow h1 { margin: 0 0 14px; font: 800 clamp(2.6rem, 8vw, 4rem)/.98 var(--display); letter-spacing: -.065em; }
.flow p { max-width: 52ch; color: var(--muted); line-height: 1.55; }
.flow form { display: grid; justify-items: start; gap: 7px; margin-top: 23px; }
.flow form .button { margin-top: 8px; }
.flow label { font-weight: 700; }
.flow input { width: min(100%, 370px); min-height: 46px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.flow #flow-status { margin-top: 16px; }
.policy h2 { margin: 2rem 0 .5rem; font: 600 clamp(1.4rem, 4vw, 1.85rem)/1.2 var(--display); }
.policy p { max-width: 64ch; }
.policy p + p, .policy-link { margin-top: .8rem; }
.policy a, .policy-link a { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.policy [id] { scroll-margin-block-start: 1rem; }

.kit-page { max-width: 1060px; padding-block: 22px 64px; }
.kit-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 650; }
.kit-back:hover { text-decoration: underline; }
.kit-layout { display: grid; align-items: center; gap: 24px; margin-block: 18px 32px; }
.kit-copy h1 { margin: 0 0 14px; font: 800 clamp(2.8rem, 7vw, 5rem)/1 var(--display); letter-spacing: -.06em; }
.kit-copy h1 span { display: block; margin-top: .55rem; font-size: clamp(1.15rem, 3vw, 1.55rem); line-height: 1.2; letter-spacing: -.025em; }
.kit-copy p { color: var(--muted); line-height: 1.5; }
.kit-copy .kit-price { margin-top: 14px; color: var(--ink); font-weight: 700; }
.kit-preview { display: block; }
.kit-photo { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.kit-details { max-width: 680px; line-height: 1.5; }
.kit-details h2 { margin: 0; font: 750 1.6rem/1.2 var(--display); letter-spacing: -.035em; }
.screens-link, .screenshot-grid figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.screens-link { margin-inline-start: 10px; font-size: .9rem; }
.kit-screenshots { margin-block: 32px 40px; scroll-margin-top: 16px; }
.kit-screenshots h2 { margin: 0 0 16px; font: 750 1.6rem/1.2 var(--display); letter-spacing: -.035em; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; align-items: start; }
.screenshot-grid figure { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.screenshot-thumb { display: block; overflow: hidden; background: #f3f0e9; aspect-ratio: 4 / 3; }
.screenshot-thumb:focus-visible { outline-offset: -3px; }
.has-mobile .thumb-desktop { display: none; }
@media (min-width: 620px) {
  .has-mobile .thumb-desktop { display: block; }
  .thumb-mobile { display: none; }
}
.screenshot-grid img { display: block; width: 100%; height: auto; }
.screenshot-grid figcaption { padding: 7px 13px; border-top: 1px solid var(--line); }
.screenshot-grid strong { display: block; padding-top: 4px; }
.screenshot-grid span { display: flex; gap: 16px; }
.screenshot-grid figcaption a { font-size: .88rem; }

@media (min-width: 620px) {
  .kit-layout { grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
  .shell { width: min(100% - 72px, 1256px); }
  .site-nav { min-height: 76px; }
  .wordmark { font-size: 1.5rem; }
  .catalog-intro { grid-template-columns: minmax(0, 1fr) minmax(205px, 260px); align-items: end; }
  .template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .filters button { padding-inline: 14px; }
  .preview { width: min(calc(100% - 32px), 1250px); height: min(calc(100% - 32px), 940px); }
  .preview-toolbar { padding: 9px 12px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .device-toggle { grid-row: auto; grid-column: auto; }
  .preview-actions { gap: 12px; }
}

@media (min-width: 900px) {
  .shell { width: min(100% - 104px, 1256px); }
  .hero-inner { align-items: center; }
  .hero-description { font-size: 1.14rem; }
  .primary { margin-top: 26px; }
  .catalog { padding-block: 29px 64px; }
  .catalog-controls { margin-block: 16px 17px; }
  .template-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-design="gallery"] .hero-inner { grid-template-columns: 1fr; padding-block: 36px 0; gap: 15px; }
  [data-design="gallery"] .gallery-stack { height: 206px; }
  [data-design="gallery"] .gallery-stack .art { width: 117%; }
  [data-design="gallery"] .gallery-stack .art:nth-child(2) { transform: translate(-7%, 1%); }
  [data-design="gallery"] .gallery-stack .art:last-child { transform: rotate(11deg) translate(-15%, 20%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mini-site { transition: none; }
}
