/* citybooks — brand tokens from the citybooks brand guide */
:root {
  --navy: #0B1F45;
  --royal: #2563FF;
  --sky: #3B82F6;
  --soft: #60A5FA;
  --white: #FFFFFF;
  --charcoal: #1F2937;
  --cool: #6B7280;
  --light: #E5E7EB;
  --ivory: #FFF8F1;
  --blush: #FFE4D6;
  --sunrise: #FF8020;
  --tangerine: #FFA800;
  --yellow: #FCD34D;
  --green: #10B981;
  --red: #EF4444;
  --purple: #8B5CF6;
  --page: #F4F7FC;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgba(11, 31, 69, .06), 0 8px 24px -12px rgba(11, 31, 69, .18);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--sunrise); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: var(--white); padding: 8px 14px; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--cool); }
.small { font-size: 13px; }
.mt0 { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Logo ---------- */
.logo { font-weight: 800; font-size: 26px; letter-spacing: -.045em; line-height: 1; display: inline-flex; }
.logo:hover { text-decoration: none; }
.l-city { color: var(--navy); }
.l-books { color: var(--royal); }
.logo-light .l-city { color: var(--white); }
.logo-light .l-books { color: var(--soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font);
  padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--royal); color: var(--white); cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  text-decoration: none !important;
}
.btn:hover { background: #1550E8; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--light); }
.btn-ghost:hover { background: var(--white); border-color: var(--royal); color: var(--royal); }
.btn-sun { background: var(--sunrise); }
.btn-sun:hover { background: #F06D0C; }
.btn-danger { background: var(--white); color: var(--red); border-color: #FCA5A5; }
.btn-danger:hover { background: #FEF2F2; }
.btn-ok { background: var(--green); }
.btn-ok:hover { background: #0E9F70; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--royal); font: inherit; cursor: pointer; }

/* ---------- Top bar ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--light); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.topsearch { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--page); border-radius: 999px; padding: 0 16px; border: 1.5px solid transparent; }
.topsearch:focus-within { border-color: var(--royal); background: var(--white); }
.topsearch .ic { color: var(--cool); width: 18px; }
.topsearch input { flex: 1; border: 0; background: none; font: 14px var(--font); padding: 11px 0; outline: none; color: var(--navy); min-width: 0; }
.mainnav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.mainnav > a:not(.btn) { color: var(--navy); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.mainnav > a:not(.btn):hover { color: var(--royal); text-decoration: none; }
.navcart { position: relative; }
.navcart .count { position: absolute; top: -8px; right: -10px; background: var(--sunrise); color: var(--white); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.navtoggle { display: none; background: none; border: 0; color: var(--navy); cursor: pointer; padding: 8px; margin-left: auto; }

/* ---------- Flash ---------- */
.flash { margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; border-left: 4px solid; }
.flash-success { background: #ECFDF5; border-color: var(--green); color: #065F46; }
.flash-error { background: #FEF2F2; border-color: var(--red); color: #991B1B; }
.flash-info { background: #EFF6FF; border-color: var(--royal); color: var(--navy); }
.dash-main .flash { margin: 0 0 16px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #F2F5FA 0%, #EEF2F9 100%); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 24px; padding-top: 56px; }
.hero-copy { padding-bottom: 72px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 20px; }
.hero h1 .l2 { display: block; color: var(--royal); }
.hero p.lead { font-size: 17px; color: var(--charcoal); max-width: 44ch; margin-bottom: 28px; }
.hero-search { display: flex; background: var(--white); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); max-width: 520px; margin-bottom: 20px; }
.hero-search input { flex: 1; border: 0; font: 15px var(--font); padding: 0 18px; outline: none; min-width: 0; background: none; color: var(--navy); }
.hero-art { position: relative; justify-self: center; width: min(100%, 420px); }
.hero-art img { width: 100%; height: auto; mix-blend-mode: multiply; animation: wave-in .9s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes wave-in { from { transform: translateY(40px) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-cats a { background: var(--white); border: 1px solid var(--light); color: var(--navy); font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 999px; }
.hero-cats a:hover { border-color: var(--royal); color: var(--royal); text-decoration: none; }

/* Promise strip */
.promise { background: var(--white); border-top: 1px solid var(--light); border-bottom: 1px solid var(--light); }
.promise-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.promise-in > div { display: flex; gap: 12px; align-items: flex-start; padding: 22px 20px; }
.promise-in > div + div { border-left: 1px solid var(--light); }
.promise .ic { color: var(--royal); width: 26px; height: 26px; }
.promise strong { display: block; color: var(--navy); font-size: 14px; }
.promise span { font-size: 13px; color: var(--cool); line-height: 1.4; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }

/* ---------- Book cards & generated covers ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 32px 22px; }
.book-card { display: flex; flex-direction: column; color: var(--charcoal); }
.book-card:hover { text-decoration: none; }
.book-card:hover .cover { transform: translateY(-4px) rotate(-1deg); box-shadow: 6px 14px 24px -10px rgba(11, 31, 69, .45); }
.cover { aspect-ratio: 2 / 3; border-radius: 3px 8px 8px 3px; overflow: hidden; background: var(--light); box-shadow: 3px 8px 16px -8px rgba(11, 31, 69, .4); transition: transform .2s, box-shadow .2s; position: relative; margin-bottom: 12px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.12) 70%, transparent); z-index: 1; pointer-events: none; }
.cover.gen { background: var(--cv); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; padding: 16% 12% 12% 16%; }
.cover.gen::after { content: ""; position: absolute; left: 16%; right: 12%; top: 50%; height: 2px; background: rgba(255,255,255,.35); }
.gen-title { font-weight: 700; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.gen-author { font-size: 12px; opacity: .85; font-weight: 500; }
.cover.lg { max-width: 340px; width: 100%; }
.cover.lg .gen-title { font-size: 26px; }
.cover.lg .gen-author { font-size: 15px; }
.cover.xs { width: 52px; margin: 0; flex: none; border-radius: 2px 4px 4px 2px; }
.cover.xs.gen { padding: 6px; }
.cover.xs .gen-title { font-size: 7px; }
.cover.xs .gen-author, .cover.xs.gen::after { display: none; }
.bc-title { font-weight: 600; color: var(--navy); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-author { font-size: 13px; color: var(--cool); }
.bc-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.bc-meta strong { color: var(--navy); font-size: 16px; }
.bc-store { font-size: 12px; color: var(--sky); margin-top: 2px; }

.chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--light); color: var(--charcoal); white-space: nowrap; }
.chip-new { background: #DCFCE7; color: #166534; }
.chip-like_new { background: #DBEAFE; color: #1E40AF; }
.chip-very_good { background: #E0E7FF; color: #3730A3; }
.chip-good { background: var(--ivory); color: #9A3412; border: 1px solid var(--blush); }
.chip-acceptable { background: #F3F4F6; color: var(--cool); }

/* ---------- Seller CTA band ---------- */
.sell-band { background: var(--navy); color: var(--white); border-radius: var(--r-lg); padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.sell-band h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
.sell-band p { color: #C7D2FE; }
.sell-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.sell-steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.sell-steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--sunrise); color: var(--white); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.sell-steps strong { display: block; color: var(--white); }
.sell-steps span { font-size: 13px; color: #A5B4FC; }

/* ---------- Store cards ---------- */
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.store-card { background: var(--white); border-radius: var(--r); overflow: hidden; border: 1px solid var(--light); color: var(--charcoal); display: flex; flex-direction: column; }
.store-card:hover { border-color: var(--royal); text-decoration: none; }
.store-card .band { height: 56px; background: var(--sc, var(--royal)); }
.store-card .body { padding: 0 18px 18px; margin-top: -26px; }
.avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--white); border: 3px solid var(--white); box-shadow: var(--shadow); display: grid; place-items: center; font-weight: 800; color: var(--navy); font-size: 20px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-card h3 { margin: 10px 0 2px; }
.store-card p { font-size: 13px; color: var(--cool); margin: 0; }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--green); }
.verified .ic { width: 15px; height: 15px; }

/* ---------- Browse ---------- */
.browse { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding: 32px 0 64px; }
.filters { position: sticky; top: 88px; align-self: start; }
.filters h3 { font-size: 13px; color: var(--cool); font-weight: 600; margin: 20px 0 8px; }
.filters a { display: block; color: var(--navy); font-size: 14px; padding: 5px 10px; border-radius: var(--r-sm); }
.filters a:hover { background: var(--white); text-decoration: none; }
.filters a[aria-current] { background: var(--navy); color: var(--white); }
.filters .field { margin-bottom: 0; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.results-head h1 { margin: 0; font-size: 1.6rem; }

/* ---------- Book page ---------- */
.book-page { display: grid; grid-template-columns: 340px 1fr; gap: 56px; padding: 40px 0 64px; }
.book-page h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; margin-bottom: 4px; }
.book-page .by { font-size: 17px; color: var(--cool); margin-bottom: 20px; }
.price-line { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.price-line .price { font-size: 30px; font-weight: 700; color: var(--navy); }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; font-size: 14px; margin: 24px 0; }
.specs dt { color: var(--cool); }
.specs dd { margin: 0; color: var(--navy); font-weight: 500; }
.buy-box { background: var(--white); border: 1px solid var(--light); border-radius: var(--r); padding: 20px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; max-width: 520px; }
.seller-box { margin-top: 28px; display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--light); }
.breadcrumb { font-size: 13px; color: var(--cool); padding-top: 20px; }
.breadcrumb a { color: var(--cool); }

/* ---------- Storefront ---------- */
.sf-head { background: var(--sc, var(--royal)); color: var(--white); padding: 48px 0 0; }
.sf-head-in { display: flex; gap: 24px; align-items: flex-end; }
.sf-head .avatar { width: 104px; height: 104px; border-radius: 22px; font-size: 40px; margin-bottom: -36px; }
.sf-head h1 { color: var(--white); margin-bottom: 4px; }
.sf-head p { color: rgba(255,255,255,.85); margin-bottom: 20px; }
.sf-meta { padding: 52px 0 8px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--cool); }
.sf-meta span { display: inline-flex; gap: 6px; align-items: center; }
.sf-meta .ic { width: 17px; height: 17px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--cool); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; font: 14px var(--font); color: var(--navy);
  padding: 11px 14px; border: 1.5px solid var(--light); border-radius: var(--r-sm); background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(37, 99, 255, .15); }
input[type=file] { padding: 9px; font-size: 13px; }
textarea { min-height: 100px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--royal); }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--light); border-radius: var(--r); background: var(--white); cursor: pointer; font-weight: 400; }
.choice label:has(input:checked) { border-color: var(--royal); background: #F5F8FF; }
.choice input { margin-top: 4px; accent-color: var(--royal); }
.choice strong { display: block; color: var(--navy); font-size: 14px; }
.choice span { font-size: 13px; color: var(--cool); }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-bottom: 12px; padding: 0; }

/* Auth */
.auth { display: grid; place-items: center; padding: 56px 16px; }
.auth-card { background: var(--white); border-radius: var(--r-lg); padding: 36px; width: min(100%, 440px); box-shadow: var(--shadow); }
.auth-card .mascot { width: 84px; margin: -80px auto 8px; }
.auth-card h1 { text-align: center; font-size: 1.6rem; }
.auth-card .sub { text-align: center; color: var(--cool); margin-bottom: 24px; }

/* ---------- Panels, tables ---------- */
.panel { background: var(--white); border: 1px solid var(--light); border-radius: var(--r); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.1rem; }
.tbl-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--light); border-radius: var(--r); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--cool); padding: 12px 16px; border-bottom: 1px solid var(--light); white-space: nowrap; background: #FAFBFD; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--light); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl a.rowlink { font-weight: 600; color: var(--navy); }
.empty { text-align: center; padding: 48px 24px; color: var(--cool); }
.empty img { width: 96px; margin: 0 auto 12px; opacity: .9; }
.empty h3 { color: var(--navy); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-awaiting_payment, .badge-needs_info { background: #FEF3C7; color: #92400E; }
.badge-payment_review, .badge-submitted, .badge-under_review, .badge-pending { background: #DBEAFE; color: #1E40AF; }
.badge-confirmed { background: #E0E7FF; color: #3730A3; }
.badge-shipped { background: #EDE9FE; color: #5B21B6; }
.badge-completed, .badge-approved, .badge-active, .badge-pass, .badge-accepted { background: #DCFCE7; color: #166534; }
.badge-cancelled, .badge-rejected, .badge-suspended, .badge-fail, .badge-disabled { background: #FEE2E2; color: #991B1B; }
.badge-draft, .badge-hidden { background: #F3F4F6; color: var(--cool); }

/* ---------- Dashboard ---------- */
.layout-dash { background: var(--page); }
.dash { display: grid; grid-template-columns: 232px 1fr; gap: 32px; padding: 28px 0 64px; flex: 1; }
.sidenav { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--charcoal); font-size: 14px; font-weight: 500; }
.sidenav a:hover { background: var(--white); text-decoration: none; }
.sidenav a[aria-current] { background: var(--navy); color: var(--white); }
.sidenav-head { padding: 0 12px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--light); }
.sidenav-head strong { display: block; color: var(--navy); }
.sidenav-head a { padding: 0; font-size: 13px; color: var(--royal); }
.sidenav-out { margin-top: 12px; color: var(--cool) !important; }
.dash-main { min-width: 0; }
.dash-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-title h1 { margin: 0; font-size: 1.6rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--white); border: 1px solid var(--light); border-radius: var(--r); padding: 18px; color: var(--charcoal); display: block; }
a.kpi:hover { border-color: var(--royal); text-decoration: none; }
.kpi b { display: block; font-size: 28px; color: var(--navy); line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--cool); }
.kpi.hot { border-color: var(--sunrise); background: var(--ivory); }
.kpi.hot b { color: var(--sunrise); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--charcoal); background: var(--white); border: 1px solid var(--light); }
.tabs a:hover { text-decoration: none; border-color: var(--royal); }
.tabs a[aria-current] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.tabs a em { font-style: normal; opacity: .7; margin-left: 4px; }

/* Order detail */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.items { list-style: none; padding: 0; margin: 0; }
.items li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--light); }
.items li:last-child { border-bottom: 0; }
.items .grow { flex: 1; min-width: 0; }
.items .grow strong { color: var(--navy); display: block; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; margin-top: 12px; }
.totals .grand { font-weight: 700; color: var(--navy); font-size: 17px; padding-top: 8px; border-top: 1px solid var(--light); }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 20px; gap: 0; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--cool); position: relative; padding-top: 30px; }
.steps li::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 2px solid var(--light); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--light); }
.steps li:first-child::after { display: none; }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.done::after, .steps li.now::after { background: var(--green); }
.steps li.now { color: var(--navy); font-weight: 600; }
.steps li.now::before { border-color: var(--sunrise); background: var(--sunrise); box-shadow: 0 0 0 4px rgba(255,128,32,.2); }
.pay-card { background: var(--ivory); border: 1.5px dashed var(--sunrise); border-radius: var(--r); padding: 18px; }
.pay-card .acct { font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: .02em; }
.callout { background: #EFF6FF; border-radius: var(--r); padding: 16px 18px; font-size: 14px; color: var(--navy); }
.callout.warn { background: var(--ivory); border: 1px solid var(--blush); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--light); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.timeline time { color: var(--cool); display: block; font-size: 12px; }
.proof { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--light); }
.proof:last-child { border-bottom: 0; }
.proof a.thumb { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; background: var(--light); flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--navy); }
.proof a.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Cart */
.cart-group { background: var(--white); border: 1px solid var(--light); border-radius: var(--r); margin-bottom: 20px; overflow: hidden; }
.cart-group-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: #FAFBFD; border-bottom: 1px solid var(--light); gap: 12px; flex-wrap: wrap; }
.cart-group-head strong { color: var(--navy); display: inline-flex; gap: 8px; align-items: center; }
.cart-group .items { padding: 0 20px; }
.cart-group-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--light); gap: 12px; flex-wrap: wrap; }
.qty { width: 72px !important; }

/* Compliance review */
.doclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.doc { border: 1px solid var(--light); border-radius: var(--r-sm); overflow: hidden; background: var(--white); color: var(--charcoal); font-size: 12px; }
.doc .prev { height: 110px; background: var(--page); display: grid; place-items: center; font-weight: 700; color: var(--navy); }
.doc .prev img { width: 100%; height: 100%; object-fit: cover; }
.doc div.cap { padding: 8px 10px; }
.doc div.cap strong { display: block; color: var(--navy); font-size: 12px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--light); align-items: center; }
.checklist li:last-child { border-bottom: 0; }
.checklist .seg { display: inline-flex; border: 1.5px solid var(--light); border-radius: 999px; overflow: hidden; }
.checklist .seg label { padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--cool); }
.checklist .seg input { position: absolute; opacity: 0; pointer-events: none; }
.checklist .seg label:has(input:checked) { color: var(--white); }
.checklist .seg label.p:has(input:checked) { background: var(--green); }
.checklist .seg label.f:has(input:checked) { background: var(--red); }
.checklist .seg label.n:has(input:checked) { background: var(--cool); }
.checklist .seg label:has(input:focus-visible) { outline: 3px solid var(--sunrise); }
.checklist input[type=text] { grid-column: 1 / -1; padding: 7px 12px; font-size: 13px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--cool); }
.kv dd { margin: 0; color: var(--navy); font-weight: 500; overflow-wrap: anywhere; }

/* Application status page */
.status-hero { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; background: var(--white); border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--light); margin-bottom: 20px; }
.status-hero img { width: 120px; }

/* How it works */
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: h; list-style: none; padding: 0; }
.howto li { counter-increment: h; }
.howto li::before { content: counter(h); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--royal); color: var(--white); font-weight: 700; margin-bottom: 12px; }
.howto strong { display: block; color: var(--navy); margin-bottom: 4px; }
.howto span { font-size: 14px; color: var(--cool); }

/* Pager */
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 32px; font-size: 14px; }
.pager span { color: var(--cool); }

/* ---------- Footer ---------- */
.foot { background: var(--navy); color: #C7D2FE; margin-top: 40px; }
.layout-dash .foot { margin-top: 0; }
.foot-in { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 32px; padding: 40px 0; font-size: 14px; }
.foot p { margin: 8px 0 0; }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot nav a { color: var(--white); }
.foot-note { font-size: 13px; color: #A5B4FC; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { width: 240px; justify-self: end; margin-top: -40px; }
  .promise-in { grid-template-columns: 1fr 1fr; }
  .promise-in > div:nth-child(3) { border-left: 0; }
  .promise-in > div:nth-child(n+3) { border-top: 1px solid var(--light); }
  .sell-band { grid-template-columns: 1fr; padding: 32px 24px; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .book-page { grid-template-columns: 1fr; gap: 28px; }
  .book-page .cover.lg { max-width: 240px; }
  .dash { grid-template-columns: 1fr; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .sidenav a { white-space: nowrap; }
  .sidenav-head, .sidenav-out { display: none !important; }
  .two-col { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .navtoggle { display: block; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
  .mainnav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0 4px; }
  .mainnav.open { display: flex; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 8px; }
  .status-hero { grid-template-columns: 1fr; }
  .sf-head-in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
