:root {
  --serif: Comfortaa, sans-serif;
  --script: "Lobster Two", cursive;
  --sans: Inter, sans-serif;
  --deep: #4b1a78; --brand: #b72f83; --gold: #ffd36e; --gold-deep: #d0408f;
  --paper: #fff8fc; --paper-2: #fde8f3; --ink: #3d1f3f; --soft: #7a5577; --line: #f5d4e6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
button, input { font: inherit; }

.hero {
  color: #f6efdc; padding: 22px clamp(20px, 5vw, 72px) 76px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(255,211,110,.3), transparent 65%),
    radial-gradient(700px 500px at -5% 110%, rgba(120,170,255,.4), transparent 60%),
    radial-gradient(1.6px 1.6px at 40px 50px, #fff, transparent) 0 0 / 260px 200px,
    radial-gradient(1.2px 1.2px at 150px 120px, #ffe9a8, transparent) 0 0 / 260px 200px,
    radial-gradient(2px 2px at 220px 30px, #ffc8ea, transparent) 0 0 / 260px 200px,
    linear-gradient(150deg, var(--brand), var(--deep) 75%);
  border-bottom: 4px solid var(--gold);
}
.top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; max-width: 1240px; margin: 0 auto; }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; font: italic 700 30px var(--script); }
.open-form { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 5px 5px 5px 16px; }
.open-form label { font-size: 14px; color: #fbdcef; }
.open-form input { width: 130px; border: 0; background: transparent; color: #fff; outline: none; font-family: "Source Code Pro", monospace; font-size: 14px; }
.open-form input::placeholder { color: rgba(255,255,255,.4); }
.open-form:focus-within { border-color: var(--gold); }
.open-form button { border: 0; border-radius: 999px; padding: 5px 14px; background: var(--gold); color: #4a1e3d; font-weight: 600; cursor: pointer; }

.hero-grid { max-width: 1240px; margin: 56px auto 0; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-family: var(--script); font-style: italic; font-weight: 700; letter-spacing: 0; font-size: clamp(46px, 6.2vw, 80px); line-height: 1.04; margin: 0 0 18px; color: #fffaf0; }
.lede { font-size: 19px; color: #fbe3f2; max-width: 34em; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.password { display: grid; gap: 5px; max-width: 380px; margin-bottom: 14px; }
.password label { font-size: 14px; font-weight: 600; color: #fff0f9; }
.password input { width: 100%; padding: 11px 13px; font-size: 16px; color: #fff; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.28); border-radius: 10px; outline: none; }
.password input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,180,95,.25); }
.denied { max-width: 34em; margin: 0 0 14px; padding: 9px 13px; font-size: 15px; color: #fff; background: #8f1f18; border-left: 4px solid #f0a59d; border-radius: 0 8px 8px 0; }
.note { margin: 14px 0 0; font-size: 14px; color: #f5d4ea; max-width: 34em; }
.cta {
  display: inline-block; border: 1px solid #fff0b8; border-radius: 999px; padding: 13px 26px; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, #fff0b8, #ffc24d); color: #4a1e3d; font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 8px 22px rgba(0,0,0,.28); transition: transform .12s, box-shadow .12s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 26px rgba(0,0,0,.34); }
.cta.ghost { background: transparent; color: #f6efdc; border-color: rgba(255,255,255,.35); box-shadow: none; }
.cta.ghost:hover { background: rgba(255,255,255,.08); }
.cta:focus-visible, .tpl:focus-visible, .recent a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.ledger { background: var(--paper); color: var(--ink); border-radius: 14px; overflow: hidden; transform: rotate(1.2deg); box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12); font-size: 15px; }
.ledger-tab { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 9px 16px; font: 13px "Source Code Pro", monospace; color: var(--soft); }
.ledger-tab b { color: var(--brand); }
.ledger-head, .ledger-row { display: grid; grid-template-columns: 40px 1.5fr 1fr 92px; }
.ledger-head { background: var(--brand); color: #f6efdc; font-weight: 600; font-size: 13px; }
.ledger-head span, .ledger-row span { padding: 9px 12px; border-right: 1px solid rgba(0,0,0,.08); min-height: 41px; position: relative; }
.ledger-row { border-bottom: 1px solid var(--line); }
.ledger-row span:first-child { background: var(--paper-2); color: var(--soft); text-align: center; font-size: 13px; }
.ledger-row.live span:nth-child(2) { box-shadow: inset 0 0 0 2px #8a3fd1; }
.caret { display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #8a3fd1; animation: blink 1s steps(2) infinite; }
.tag { position: absolute; top: -11px; right: -2px; background: #8a3fd1; color: #fff; font-size: 11px; padding: 0 6px; border-radius: 4px 4px 4px 0; }
.pill { font-style: normal; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.pill.amber { background: #f7e5bb; color: #775000; }
.pill.blue { background: #d6e4f5; color: #1f4f88; }
.tick { display: block; width: 18px; height: 18px; margin: 2px auto; border: 1.5px solid #a9a388; border-radius: 4px; background: #fff; }
.tick.on { background: var(--brand); border-color: var(--brand); position: relative; }
.tick.on::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
@keyframes blink { to { visibility: hidden; } }

.section { max-width: 1240px; margin: 0 auto; padding: 56px clamp(20px, 5vw, 72px) 0; }
.section h2 { font: italic 700 40px var(--script); margin: 0 0 6px; color: var(--brand); }
.section-lede { margin: 0 0 24px; color: var(--soft); }
.recent { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.recent a { display: block; padding: 14px 18px; background: #fffdf6; border: 1px solid var(--line); border-left: 4px solid var(--gold-deep); border-radius: 8px; text-decoration: none; color: inherit; transition: box-shadow .12s; }
.recent a:hover { box-shadow: 0 6px 18px rgba(190,70,150,.12); }
.recent strong { display: block; font: 600 18px var(--serif); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent span { font-size: 13px; color: var(--soft); }

.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.tpl { --c: #b72f83; --c2: #ffd36e; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 0 0 18px; background: #fffdf6; border: 1px solid var(--line); border-radius: 22px; cursor: pointer; overflow: hidden; color: inherit; transition: transform .14s, box-shadow .14s; }
.tpl:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(190,70,150,.16); }
.tpl strong { font: 700 18px var(--serif); padding: 12px 18px 0; }
.tpl > span:last-child { padding: 0 18px; color: var(--soft); font-size: 15px; }
.tpl-art { display: grid; gap: 7px; padding: 18px; background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 72%, black)); border-bottom: 3px solid var(--c2); }
.tpl-art i { display: block; height: 9px; border-radius: 3px; background: rgba(255,255,255,.2); }
.tpl-art i:first-child { background: var(--c2); width: 62%; }
.tpl-art i:nth-child(3) { width: 84%; }
.tpl-art i:nth-child(4) { width: 46%; }
.t-oxblood { --c: #c2264f; --c2: #ffc8a8; }
.t-harbor { --c: #177a9c; --c2: #ffd8f0; }
.t-plum { --c: #7d3cc4; --c2: #ffb8e6; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px; }
.features article { border-top: 2px solid var(--gold-deep); padding-top: 12px; }
.features h3 { font-size: 17px; margin: 0 0 4px; }
.features p { margin: 0; color: var(--soft); }
.foot a { color: inherit; }
.foot { margin-top: 60px; padding: 22px; text-align: center; color: var(--soft); font-size: 14px; background: var(--paper-2); border-top: 1px solid var(--line); }

.missing { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(150deg, var(--brand), var(--deep)); padding: 20px; }
.missing-card { background: var(--paper); max-width: 460px; padding: 40px; text-align: center; border-radius: 26px; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.missing-card h1 { font: italic 700 36px var(--script); color: var(--brand); margin: 16px 0 8px; }
.missing-card p { color: var(--soft); margin: 0 0 22px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; margin-top: 34px; }
  .ledger { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
