:root {
  --gold: #E9B63B;
  --cream: #FAF0D7;
  --olive: #575644;
  --orange: #F07827;
  --blue: #6699FF;
  --text: #575644;
  --container: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream); color: var(--text); overflow-x: hidden; }
body { font-family: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
h1, h2, h3 { font-family: "Red Hat Display", system-ui, sans-serif; margin: 0; line-height: 1.08; }
p { margin: 0; font-family: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 20; background: #faf0d7eb; backdrop-filter: blur(6px); border-bottom: 1px solid #0000001f; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font: 700 1.2rem "Red Hat Display"; letter-spacing: .02em; }
.brand span { color: var(--orange); }
.brand__logo { width: 24px; height: 24px; border-radius: 6px; display: block; }
.nav { display: flex; gap: 1.75rem; font-size: .95rem; }
.nav a { padding-bottom: .2rem; border-bottom: 2px solid transparent; }
.nav a.active { border-bottom-color: var(--orange); }

.header-actions { display: flex; align-items: center; gap: .55rem; position: relative; }
.drawer-toggle { position: absolute; opacity: 0; pointer-events: none; }
.user-icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 999px; border: 1.5px solid #3a3327; background: #fff8; cursor: pointer; font-size: 1rem; }
.hamburger-btn { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid #3a3327; background: #fff8; cursor: pointer; font-size: 1.15rem; align-items: center; justify-content: center; }
.mobile-menu-panel { position: fixed; top: 0; right: 0; width: min(320px, 90vw); height: 100vh; background: #fffaf0; border-left: 1px solid #00000026; box-shadow: -8px 0 26px #00000020; z-index: 60; padding: 1rem; overflow-y: auto; transform: translateX(110%); transition: transform .22s ease; }
.mobile-menu-links { display: grid; gap: .5rem; margin-top: .6rem; }
.mobile-menu-links a { padding: .6rem .65rem; border-radius: 8px; border: 1px solid #00000014; background: #fff; }
.mobile-menu-links a.active { background: #f3dfb7; border-color: #00000024; }
.cart-icon-btn { position: relative; }
.cart-badge { position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; border-radius: 999px; background: #f07827; color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 3px; border: 1px solid #fff; font-family: "Red Hat Mono", ui-monospace, monospace; }
.user-drawer,
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100vh;
  background: #fffaf0;
  border-left: 1px solid #00000026;
  box-shadow: -8px 0 26px #00000020;
  z-index: 60;
  padding: 1rem;
  overflow-y: auto;
  transform: translateX(110%);
  transition: transform .22s ease;
}

.drawer-overlay { position: fixed; inset: 0; background: #00000033; opacity: 0; pointer-events: none; z-index: 50; transition: opacity .18s ease; }
#user-drawer-toggle:checked ~ .user-drawer { transform: translateX(0); }
#user-drawer-toggle:checked ~ .user-overlay { opacity: 1; pointer-events: auto; }
#cart-drawer-toggle:checked ~ .cart-drawer { transform: translateX(0); }
#cart-drawer-toggle:checked ~ .cart-overlay { opacity: 1; pointer-events: auto; }
#mobile-menu-toggle:checked ~ .mobile-menu-panel { transform: translateX(0); }
#mobile-menu-toggle:checked ~ .mobile-menu-overlay { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.drawer-close { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid #00000024; cursor: pointer; font-size: .95rem; background: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: .68rem 1rem; border: 1.5px solid #3a3327; font-weight: 600; font-size: .92rem; cursor: pointer; font-family: "Red Hat Mono", ui-monospace, monospace; }
.btn--primary { background: var(--gold); box-shadow: inset 0 -4px 0 #3a332726; }
.btn--ghost { background: #fff8; }
.btn--small { padding: .4rem .75rem; font-size: .82rem; }

.hero--figma { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; padding: 3rem 0 2rem; align-items: center; }
.hero__media { position: relative; min-height: 420px; display: grid; place-items: center; }
.hero__blob { position: absolute; width: 540px; height: 540px; background: #f7dbb4; border-radius: 50%; }
.hero__book { width: min(92%, 430px); position: relative; z-index: 2; }
.hero__kicker { display: inline-block; font-size: .85rem; font-weight: 600; margin-bottom: .8rem; color: var(--olive); font-family: "Red Hat Mono", ui-monospace, monospace; }
.hero h1 { font-size: clamp(2rem, 4.3vw, 4rem); max-width: 16ch; }
.hero p { margin-top: .9rem; max-width: 58ch; }
.hero__actions { margin-top: 1.2rem; display: flex; gap: .7rem; flex-wrap: wrap; }

.sponsor-strip { text-align: center; padding: 2rem 0; }
.sponsor-strip > span { display: inline-block; margin-bottom: 1rem; font-weight: 600; }
.sponsor-spotlight { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 1rem; align-items: center; text-align: left; }
.sponsor-link { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #0000001e; border-radius: 12px; padding: 1rem 1.25rem; }
.sponsor-spotlight img { width: min(420px, 100%); height: auto; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: 2.5rem 0; }
.split h2 { font-size: clamp(1.6rem, 3vw, 3rem); margin-bottom: .8rem; }
.panel-image { width: 100%; border: 1px solid #0000001f; border-radius: 14px; }

.how-wrap { background: #f3dfb7; margin-top: 1rem; }
.split--how { padding: 3rem 0; }
.steps-list { margin: 1rem 0 0 1rem; padding: 0; display: grid; gap: .85rem; }

.tools { padding: 3rem 0; text-align: center; }
.tools h2 { font-size: clamp(1.7rem, 3.4vw, 3rem); margin-bottom: 1.4rem; }
.tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; text-align: left; }
.tool-card { border: 1px solid #00000026; background: #fff; padding: .8rem; border-radius: 10px; display: grid; gap: .7rem; }
.tool-card img { width: 100%; border-radius: 6px; }
.tool-card h3 { font-size: 1.2rem; }

.page { padding: 3rem 0; }
.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { background: #fff; border: 1px solid #0000001f; border-radius: 12px; padding: 1rem; }

.library-page { display: grid; gap: 1rem; }
.library-hero h1 { margin-bottom: .6rem; }
.library-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.step-card { border: 1px solid #0000001f; border-radius: 10px; padding: .8rem; background: #fffdfa; display: grid; gap: .45rem; }
.step-card h3 { font-size: 1.02rem; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.section-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.stamp-badge { width: 180px; max-width: 45vw; height: auto; object-fit: contain; transform: rotate(20deg); transform-origin: center; }
.btn--disabled { opacity: .45; pointer-events: none; filter: grayscale(100%); }
.remove-item-btn { width: 28px; height: 28px; border-radius: 999px; border: 1px solid #0000002a; background: #fff; cursor: pointer; font-size: .9rem; line-height: 1; }

.tool-download-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .6rem; }
.tool-download-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .7rem; border: 1px solid #0000001a; border-radius: 8px; background: #fffdfa; }
.tool-download-list li > div { display: grid; gap: .25rem; }
.tool-download-list li p { font-size: .92rem; opacity: .88; }

.step-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; }
.step-nav > div:first-child { justify-self: start; }
.step-nav > div:nth-child(2) { justify-self: center; }
.step-nav > div:last-child { justify-self: end; }

.contact-form { max-width: 640px; display: grid; gap: .8rem; }
.contact-form label { display: grid; gap: .35rem; }
.contact-form input, .contact-form textarea { border: 1px solid #00000030; border-radius: 10px; padding: .65rem .75rem; font: inherit; }

.auth-page { display: grid; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.auth-grid h1, .auth-grid h2 { margin-bottom: .5rem; }
.auth-grid .contact-form { max-width: 420px; margin-top: .5rem; }
.text-link { color: #1a56db; text-decoration: underline; }
.text-link-btn { background: none; border: 0; padding: 0; color: #1a56db; text-decoration: underline; cursor: pointer; font: inherit; font-family: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; justify-self: end; text-align: right; display: inline-block; }
.signup-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.signup-helper-link { color: #1a56db; text-decoration: underline; font-size: .95rem; }

.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.signup-grid .contact-form { max-width: 420px; margin-top: .5rem; }
.field-error { margin-top: -.35rem; margin-bottom: .3rem; color: #b42318; font-size: .9rem; }

.flash-wrap { margin-top: .8rem; }
.flash { padding: .55rem .8rem; border-radius: 10px; font-size: .9rem; margin-bottom: .35rem; }
.flash--notice { background: #e5f4e8; border: 1px solid #95c9a0; }
.flash--alert { background: #ffe5d6; border: 1px solid #f0a479; }

.site-header form.button_to { margin: 0; }

.site-footer { background: #3a3327; color: #f6ead2; border-top: 1px solid #0000001f; padding: 1.2rem 0 2rem; font-size: .88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.footer-logo { height: 22px; width: auto; display: block; }

.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.admin-sidebar { position: sticky; top: 88px; }
.admin-sidebar h2 { font-size: 1rem; margin-bottom: .6rem; }
.admin-nav { display: grid; gap: .4rem; }
.admin-nav a { padding: .45rem .55rem; border-radius: 8px; }
.admin-nav a.active { background: #f3dfb7; border: 1px solid #0000001a; }

@media (max-width: 980px) {
  .hero--figma, .split, .tools-grid, .list-grid, .sponsor-spotlight, .library-top-grid, .step-grid, .auth-grid, .signup-grid { grid-template-columns: 1fr; }
  .step-nav { grid-template-columns: 1fr; }
  .step-nav > div { justify-self: stretch !important; }
  .step-nav .btn { width: 100%; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .nav { display: none; }
  .hamburger-btn { display: inline-flex; }
  .site-header .btn--ghost { color: #111; }
  .hero__media { min-height: 320px; }
  .hero__blob { width: 320px; height: 320px; }
}
#mobile-menu-toggle:checked ~ body { overflow: hidden; position: fixed; width: 100%; }
#mobile-menu-toggle:not(:checked) ~ body { overflow: auto; position: static; }
