/* Funda — site + app chrome. Monochrome, quiet, type-led. */
:root {
  --paper: #FFFFFF;
  --cream: #F5F5F4;   /* soft surface */
  --ink: #0A0A0A;
  --ink-2: #262626;
  --muted: #737373;
  --line: #E7E7E5;
  --clay: #0A0A0A;    /* single accent = ink */
  --radius: 12px;
  --serif: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.serif { font-family: var(--serif); font-weight: 400; }
.eyebrow { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; cursor: pointer; transition: opacity .15s, background .15s; white-space: nowrap; }
.btn:hover { opacity: .82; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { opacity: 1; border-color: var(--ink); }
.btn.clay { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.danger { background: transparent; color: #B3261E; border-color: var(--line); }
.btn[disabled] { opacity: .35; pointer-events: none; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1; text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.logo-mark i { display: block; background: var(--ink); border-radius: 1px; }
.logo-mark i:nth-child(1) { border-radius: 9px 1px 1px 1px; }
.logo-mark i:nth-child(4) { border-radius: 1px 1px 9px 1px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.site-nav { display: flex; gap: 32px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.site-nav a:hover { color: var(--ink); }
.head-cta { display: flex; gap: 8px; }
@media (max-width: 860px) { .site-nav, .head-cta .ghost { display: none; } }

/* hero */
.hero { padding: 96px 0 0; text-align: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 9vw, 128px); line-height: .95; letter-spacing: -.035em; margin: 0 auto 28px; max-width: 12ch; }
.hero h1 span { color: var(--muted); }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 36em; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-shot { margin-top: 80px; background: var(--cream); border-radius: 20px; padding: clamp(16px, 5vw, 64px) clamp(16px, 5vw, 64px) 0; overflow: hidden; }

/* product mock (shows the sample brand's own colours) */
.mock { border-radius: 14px 14px 0 0; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, .25); overflow: hidden; text-align: left; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-body { display: grid; grid-template-columns: 180px 1fr; background: #F8F1E4; color: #2A1A12; min-height: 460px; }
.mock-side { border-right: 1px solid #E6D9C2; padding: 24px 18px; font-size: 12px; display: grid; align-content: start; gap: 10px; color: #7d6a5c; }
.mock-side b { font-family: var(--serif); font-weight: 500; font-size: 17px; color: #2A1A12; margin-bottom: 10px; }
.mock-main { padding: 28px; display: grid; gap: 16px; align-content: start; }
.mock-cover { background: #7A2E1D; color: #F3E3C7; border-radius: 10px; padding: 24px; height: 200px; display: flex; flex-direction: column; justify-content: flex-end; }
.mock-cover span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.mock-cover strong { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6vw, 72px); line-height: .9; letter-spacing: -.02em; }
.mock-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mock-swatches i { aspect-ratio: 1.3; border-radius: 8px; display: flex; align-items: flex-end; padding: 8px; font-size: 10px; font-style: normal; }
@media (max-width: 640px) { .mock-body { grid-template-columns: 1fr; min-height: 0; } .mock-side { display: none; } .mock-swatches i { font-size: 0; } }

/* sections */
.section { padding: 128px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: 56px; max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.4vw, 72px); line-height: 1; margin: 0; letter-spacing: -.03em; }
.section-head p { margin: 0; font-size: 18px; color: var(--muted); }
.row-head-link { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 40px; }
.row-head-link h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 56px); line-height: 1; margin: 0; letter-spacing: -.03em; }
.row-head-link a { font-size: 15px; color: var(--muted); text-decoration: none; }
.row-head-link a:hover { color: var(--ink); }

/* examples */
.examples { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.example { text-decoration: none; display: grid; gap: 14px; }
.example-cover { aspect-ratio: 4/5; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.example:hover .example-cover { transform: scale(.985); }
.example-cover strong { font-size: clamp(32px, 3vw, 44px); line-height: .95; font-weight: 500; letter-spacing: -.02em; }
.example-meta { display: flex; justify-content: space-between; font-size: 15px; }
.example-meta span:last-child { color: var(--muted); }

/* features */
.audience { display: grid; gap: 96px; }
.audience-block { display: grid; gap: 40px; }
@media (min-width: 960px) { .audience-block { grid-template-columns: 1fr 2fr; } }
.audience-block h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 16px; }
.audience-block > div:first-child p { color: var(--muted); margin: 0 0 24px; max-width: 30em; }
.features { display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { border-top: 1px solid var(--ink); padding-top: 20px; }
.feature h4 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* pricing */
.price-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-bottom: 40px; }
.seg { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg .save { font-size: 12px; margin-left: 4px; color: var(--muted); }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 1080px; margin-inline: auto; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 20px; position: relative; }
.plan.featured { border-color: var(--ink); }
.plan .tag { position: absolute; top: 24px; right: 24px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.plan h3 { margin: 0; font-size: 18px; font-weight: 500; }
.plan .price { font-family: var(--serif); font-size: clamp(40px, 4.4vw, 56px); line-height: 1; letter-spacing: -.03em; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.plan .price small { font-family: var(--sans); font-size: 15px; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.plan ul { list-style: none; padding: 20px 0 0; margin: 0; display: grid; align-content: start; gap: 10px; font-size: 15px; flex: 1; border-top: 1px solid var(--line); }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "—"; color: var(--muted); }
.plan .btn { width: 100%; }
.pay-note { text-align: center; margin-top: 28px; font-size: 14px; color: var(--muted); }

/* faq */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-top: 1px solid var(--line); padding: 24px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; color: var(--muted); max-width: 68ch; }

/* cta + footer */
.cta { text-align: center; padding: 160px 0; border-top: 1px solid var(--line); }
.cta h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 8vw, 112px); line-height: .95; margin: 0 0 36px; letter-spacing: -.035em; }
.site-foot { border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 2fr repeat(3, 1fr); margin-bottom: 64px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { margin: 0 0 14px; color: var(--ink); font-size: 14px; font-weight: 500; }
.foot-grid a { display: block; text-decoration: none; padding: 4px 0; }
.foot-grid a:hover { color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ============ APP ============ */
.app-head { border-bottom: 1px solid var(--line); background: #fff; }
.app-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.app-main { padding: 56px 0 96px; }
.app-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.app-title h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 56px); margin: 0; line-height: 1; letter-spacing: -.03em; }
.app-title .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { background: var(--cream); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); margin-bottom: 32px; }
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; }
.card-cover { aspect-ratio: 16/11; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.card-cover strong { font-size: 30px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.card-cover .chips { display: flex; gap: 4px; margin-top: 12px; }
.card-cover .chips i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); gap: 8px; }
.card-foot .menu { display: flex; gap: 2px; }
.icon-btn { border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; cursor: pointer; color: var(--muted); font-size: 13px; text-decoration: none; }
.icon-btn:hover { background: var(--cream); color: var(--ink); }
.card.new { border: 1px dashed var(--line); border-radius: var(--radius); align-items: center; justify-content: center; aspect-ratio: 16/11; cursor: pointer; background: transparent; gap: 6px; color: var(--muted); text-decoration: none; }
.card.new:hover { border-color: var(--ink); color: var(--ink); }
.card.new b { font-size: 28px; font-weight: 300; }

/* editor */
.ed { display: grid; grid-template-rows: 60px 1fr; height: 100vh; height: 100dvh; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; min-width: 0; }
.ed-top .name { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--serif); font-size: 20px; padding: 4px 8px; border-radius: 8px; text-overflow: ellipsis; letter-spacing: -.01em; }
.ed-top .name:hover, .ed-top .name:focus { background: var(--cream); outline: none; }
.ed-top .status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ed-top .tools { display: flex; gap: 6px; }
.ed-body { display: grid; grid-template-columns: 240px 360px 1fr; min-height: 0; }
.ed-list, .ed-inspect { border-right: 1px solid var(--line); overflow-y: auto; background: #fff; }
.ed-list { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.ed-list h4, .ed-inspect h4 { margin: 8px 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.ed-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; border: 0; background: none; text-align: left; width: 100%; color: var(--ink-2); }
.ed-item:hover { background: var(--cream); }
.ed-item.active { background: var(--cream); color: var(--ink); font-weight: 500; }
.ed-item .ic { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 11px; flex: none; color: var(--muted); }
.ed-item.active .ic { border-color: var(--ink); color: var(--ink); }
.ed-item .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-menu { position: relative; margin-top: 8px; }
.add-menu > button { width: 100%; }
.add-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .2); z-index: 5; display: none; }
.add-pop.open { display: block; }
.ed-inspect { padding: 18px 18px 60px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-size: 13px; }
.field > span { font-weight: 500; color: var(--ink-2); }
.field input[type="text"], .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; font-size: 14px; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.color-in { display: flex; gap: 8px; align-items: center; }
.color-in input[type="color"] { width: 40px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; flex: none; }
.row-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.row-card .row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.row-card .field { margin-bottom: 10px; }
.row-card .field:last-child { margin-bottom: 0; }
.upload { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; padding: 14px; cursor: pointer; font-size: 13px; color: var(--muted); background: var(--cream); text-align: center; }
.upload:hover { border-color: var(--ink); color: var(--ink); }
.upload img { max-height: 70px; max-width: 100%; }
.upload input { display: none; }
.ed-inspect .sec-tools { display: flex; gap: 6px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ed-preview { overflow-y: auto; background: var(--cream); min-width: 0; }
.ed-preview .frame { min-height: 100%; }
.ed-tabs { display: none; }
.hint { font-size: 12px; color: var(--muted); margin: -8px 0 14px; }

@media (max-width: 1100px) { .ed-body { grid-template-columns: 210px 1fr; } .ed-preview { display: none; } .ed.show-preview .ed-preview { display: block; grid-column: 1 / -1; } .ed.show-preview .ed-list, .ed.show-preview .ed-inspect { display: none; } .ed-tabs { display: inline-flex; } }
@media (max-width: 640px) { .ed-body { grid-template-columns: 1fr; } .ed-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; } .ed-list h4, .ed-list .add-menu { display: none; } .ed-item { width: auto; flex: none; } .ed-item .t { max-width: 120px; } .ed { grid-template-rows: 60px auto 1fr; } .ed-body { grid-template-rows: auto 1fr; } .ed-top .status, .ed-top .hide-sm { display: none; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.view-bar { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; gap: 8px; }
.empty-state { text-align: center; padding: 120px 16px; }
.empty-state h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; margin: 0 0 12px; letter-spacing: -.02em; }

/* auth */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 32px; padding: 48px 16px; background: var(--cream); }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-card h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.1; }
.auth-card > p.muted { margin: 0 0 24px; }
.auth-card input[type="password"] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; font-size: 14px; }
.auth-card input:focus { outline: none; border-color: var(--ink); }
.auth-card code { background: var(--cream); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.auth-msg { min-height: 20px; margin: 0 0 12px; font-size: 14px; color: #B3261E; }
.auth-msg.ok { color: var(--muted); }
.auth-switch { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 14px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.account .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .account .who { display: none; } }
.share-pop { position: absolute; right: 16px; top: 56px; width: min(360px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .25); z-index: 40; display: none; }
.share-pop.open { display: block; }
.share-pop h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.share-pop p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.share-row { display: flex; gap: 6px; margin-bottom: 12px; }
.share-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--cream); }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.toggle { position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--line); border: 0; cursor: pointer; transition: background .15s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle[aria-checked="true"] { background: var(--ink); }
.toggle[aria-checked="true"]::after { transform: translateX(16px); }
.ed-top { position: relative; }

/* ---------- bento layouts ---------- */
/* Landing examples: one feature tile, two small, one wide */
.examples { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 12px; grid-auto-flow: dense; }
@media (min-width: 900px) { .examples { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 300px; } }
.examples .example { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.examples .example:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.examples .example:nth-child(4) { grid-column: span 2; }
.examples .example-cover { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.examples .example-cover strong { font-size: clamp(28px, 3vw, 44px); }
.examples .example:nth-child(1) .example-cover strong { font-size: clamp(40px, 6vw, 88px); }
.examples .example-meta { position: absolute; top: 14px; left: 14px; right: 14px; justify-content: space-between; font-size: 13px; }
.examples .example-meta span { background: rgba(255, 255, 255, .92); color: var(--ink) !important; padding: 4px 10px; border-radius: 99px; }

/* Dashboard: newest guideline gets the big tile */
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
  .cards .card:first-child:not(.new):nth-last-child(n+3) { grid-column: span 2; grid-row: span 2; }
  .cards .card:first-child:not(.new):nth-last-child(n+3) .card-cover { flex: 1; aspect-ratio: auto; }
  .cards .card:first-child:not(.new):nth-last-child(n+3) .card-cover strong { font-size: clamp(40px, 4.4vw, 64px); }
}

[hidden] { display: none !important; }
.name-prompt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.name-prompt input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 14px; }
.name-prompt input:focus { outline: none; border-color: var(--ink); }

/* ---------- admin ---------- */
.admin-badge { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .02em; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: #fff; vertical-align: middle; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 48px; }
.stat { background: var(--cream); border-radius: 14px; padding: 20px; display: grid; gap: 6px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat strong { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.stat-sub { font-size: 13px; color: var(--muted); }
.admin-block { margin-bottom: 56px; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; letter-spacing: -.02em; }
.admin-head input { border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: 14px; width: min(280px, 100%); }
.admin-head input:focus { outline: none; border-color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }
.admin-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--cream); }
.admin-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .muted { font-size: 13px; }
.admin-table select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.admin-table tr.is-suspended td { background: #FBF3F2; }
.row-actions { white-space: nowrap; text-align: right; }
.usage { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 170px; }
.usage-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.usage-bar.is-full i { background: #B3261E; }
.limit-in { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.limit-in input { width: 80px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12px; }
.pill-live { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--ink); color: #fff; }
.account-usage { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: -12px 0 28px; }
.account-usage .usage { grid-template-columns: 160px auto; align-items: center; gap: 10px; }
.admin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.add-user { border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; background: #fff; }
.add-user h3 { margin: 0 0 14px; font-size: 16px; font-weight: 500; }
.add-user-grid { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.add-user em { font-style: normal; font-weight: 400; }
.row-actions .btn + .btn { margin-left: 4px; }

/* editor: size controls */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.num-in:focus-within { border-color: var(--ink); }
.num-in input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 11px; font-size: 14px; outline: none; }
.num-in em { font-style: normal; font-size: 12px; color: var(--muted); padding-right: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* dashboard: custom cover thumbnails */
.card-cover { position: relative; overflow: hidden; }
.card-cover.has-media { padding: 0; }
.card-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-name { font-size: 15px; font-weight: 500; margin-top: -2px; }

/* ---------- landing page: Plus Jakarta Sans ---------- */
.landing { --serif: 'Plus Jakarta Sans', system-ui, sans-serif; --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; }
/* the Funda wordmark and the example brands keep their own fonts */
.landing .logo { font-family: var(--sans); }
.landing .mock-side b, .landing .mock-cover strong { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; }
/* Jakarta headlines look best heavier and tighter */
.landing .hero h1 { font-weight: 700; letter-spacing: -.045em; line-height: .98; }
.landing .section-head h2, .landing .row-head-link h2, .landing .cta h2 { font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
.landing .audience-block h3 { font-weight: 600; letter-spacing: -.03em; }
.landing .plan .price { font-weight: 700; letter-spacing: -.04em; }
.landing .feature h4, .landing .plan h3 { font-weight: 600; }

/* share panel: password */
.pw-block { border-top: 1px solid var(--line); padding-top: 4px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.pw-block .share-row input { background: #fff; }
.pro-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--ink); color: var(--ink); }
/* public page: password screen */
.lock { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--cream); }
.lock .auth-card { text-align: left; }
.lock input[type="password"] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; background: #fff; }
.lock input:focus { outline: none; border-color: var(--ink); }

/* colours: suggest from logo */
.suggest { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--cream); margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.suggest-row { display: flex; gap: 6px; flex-wrap: wrap; }

.view-bar .view-pdf { background: #fff; }

/* editor: undo/redo + drag and drop */
.undo-btns { display: flex; gap: 2px; }
.undo-btns .icon-btn { font-size: 16px; padding: 4px 8px; }
.undo-btns .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.grip { cursor: grab; color: var(--muted); letter-spacing: -2px; margin-right: 8px; user-select: none; }
.grip:active { cursor: grabbing; }
.ed-item[draggable="true"] { cursor: grab; }
.dragging { opacity: .4; }
.drop-before { box-shadow: 0 -2px 0 var(--ink); }
.drop-after { box-shadow: 0 2px 0 var(--ink); }
@media (max-width: 640px) { .undo-btns { display: none; } }

/* share panel: custom domain help */
.dns-help { background: var(--cream); border-radius: 8px; padding: 10px 12px; color: var(--ink-2); }
.dns-help ol { margin: 6px 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.dns-help code, .pw-block code { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12px; word-break: break-all; }
.share-pop { max-height: calc(100vh - 80px); overflow-y: auto; }
.people-list { display: grid; gap: 2px; margin-bottom: 10px; }
.person { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.person b { font-weight: 500; }
.card-shared { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }

/* =====================================================================
   FUNDA BRAND IDENTITY (2026) — logo, purple #472AD8, Plus Jakarta Sans SemiBold
   ===================================================================== */
:root {
  --brand: #472AD8;
  --brand-hover: #3A1FC0;
  --brand-soft: #EEEBFD;
  --serif: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;  /* headings */
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;   /* body */
  --clay: var(--brand);
}
.landing { --serif: 'Plus Jakarta Sans', system-ui, sans-serif; --sans: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* logo */
.logo { gap: 10px; }
.logo-img { display: block; height: 24px; width: auto; }
.logo-mark-img { display: block; height: 24px; width: 24px; }
.site-foot .logo-img { height: 28px; }
.auth .logo-img { height: 30px; }

/* headings: SemiBold, tight */
.hero h1, .section-head h2, .row-head-link h2, .cta h2, .audience-block h3,
.app-title h1, .auth-card h1, .empty-state h1, .admin-head h2, .stat strong,
.plan .price, .split-card h3 {
  font-family: var(--serif); font-weight: 600 !important; letter-spacing: -.035em;
}
.landing .hero h1 { font-weight: 600 !important; }
.hero h1 span { color: var(--brand); }
.ed-top .name { font-weight: 600; letter-spacing: -.02em; }
.feature h4, .plan h3, .faq summary { font-weight: 600; }

/* primary buttons + accents in brand purple */
.btn, .btn.clay { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn:hover { opacity: 1; background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn.danger { background: transparent; color: #B3261E; border-color: var(--line); }
.btn.danger:hover { background: #FBF3F2; border-color: #B3261E; color: #B3261E; }
.view-bar .view-pdf { background: #fff; }

.site-nav a:hover, .foot-grid a:hover, .row-head-link a:hover, .link-btn { color: var(--brand); }
.toggle[aria-checked="true"] { background: var(--brand); }
.pill-live, .admin-badge, .plan .tag, .chip-btn.on, .pill b { background: var(--brand); border-color: var(--brand); color: #fff; }
.pro-tag { border-color: var(--brand); color: var(--brand); }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan li::before { color: var(--brand); }
.usage-bar i { background: var(--brand); }
.ed-item.active .ic { border-color: var(--brand); color: var(--brand); }
.drop-before { box-shadow: 0 -2px 0 var(--brand); }
.drop-after { box-shadow: 0 2px 0 var(--brand); }
.faq summary::after { color: var(--brand); }

/* focus states */
.field input:focus, .field textarea:focus, .field select:focus, .num-in:focus-within,
.auth-card input:focus, .admin-head input:focus, .lock input:focus, .name-prompt input:focus {
  border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft); }

/* example cards: brand font, SemiBold */
.example-cover strong { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; }
