:root {
  /* Ratlan brand: see brand/BRAND.md in the ratlan repo. */
  --accent: #d93a12;
  --ember: #ff5b2e;
  --side: #14141c;
  --side-2: #1d1d28;
  --bg: #fff8f2;
  --sand: #f4eadf;
  --card: #fff;
  --ink: #14141c;
  --muted: #5e5a66;
  --line: #e8dccf;
  --soft: #fff0ea;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --green: #15803d; --green-bg: #e7f7ec;
  --amber: #b45309; --amber-bg: #fdf3e2;
  --red: #c02646; --red-bg: #fde8ec;
  --blue: #1d5fd8; --blue-bg: #e6efff;
  --grey: #5f5b77; --grey-bg: #efedf5;
  --purple-bg: #fff0ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 28, .03), 0 4px 14px rgba(20, 20, 28, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.55 "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--display); letter-spacing: -.015em; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
small { font-size: 12.5px; }
.i { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.err { color: var(--red); }
.neg { color: var(--red); }
.pos { color: var(--green); }
.inline { display: inline; }

/* ---- app shell ---- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #d6d1db; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: flex-start; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; padding: 2px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.9); color: var(--side); border-radius: 99px; padding: 2px 9px; margin-left: auto; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand-mark img { width: 34px; height: 34px; }
.brand-mark .i { width: 19px; height: 19px; }
.nav-group { margin-bottom: 14px; }
.nav-title { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #8f8a98; font-family: "JetBrains Mono", monospace; padding: 8px 12px 6px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 12px; color: #e6e1ea; padding: 9px 12px; border-radius: 10px; font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav-link.active { background: #fff; color: var(--accent); font-weight: 600; }
.nav-link .count { margin-left: auto; background: var(--ember); color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 7px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 14px 6px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.who small { color: #9e99a6; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.who .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-top: 6px; flex: none; }
.icon-btn { background: transparent; border: 1px solid rgba(255,255,255,.2); color: inherit; border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.main { min-width: 0; }
.top { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.top-title { font-size: 16px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-weight: 700; font-size: 13px; background: var(--ember); }
.menu-btn { display: none; color: var(--ink); border-color: var(--line); }
.content { padding: 28px; max-width: 1180px; }
.scrim { display: none; }
.impersonate { grid-column: 1 / -1; background: #fde68a; color: #713f12; padding: 8px 16px; font-size: 13px; text-align: center; font-weight: 600; }

/* ---- hero, cards, stats ---- */
.hero { background: radial-gradient(420px 220px at 100% 120%, rgba(255, 91, 46, .55), transparent), var(--ink); color: #fff8f2; border-radius: 22px; padding: 30px 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; box-shadow: none; }
.hero h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.hero p { margin: 6px 0 0; opacity: .9; }
.hero a:not(.btn) { color: #fff; text-decoration: underline; }
.hero-sm { padding: 20px 24px; }
.hero-sm h2 { font-size: 21px; }
.hero .badge { background: rgba(255,255,255,.92); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.narrow { max-width: 760px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 14px; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.card-head a:not(.btn) { font-size: 13px; font-weight: 600; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); box-shadow: var(--shadow); display: block; }
a.stat:hover { text-decoration: none; border-color: #d9c6b4; }
.stat-head { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
.stat-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.stat-icon .i { width: 16px; height: 16px; }
.t-purple { background: var(--ember); }
.t-amber { background: #e7a400; }
.t-teal { background: #14b88a; }
.t-pink { background: #8d73f0; }
.t-green { background: #14b88a; }
.stat-value { font: 800 30px/1.1 var(--display); margin: 12px 0 4px; letter-spacing: -.03em; }
.stat-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols-wide { grid-template-columns: minmax(0, 1fr) 320px; }
.cols > * { min-width: 0; }

/* ---- lists & tables ---- */
.list { margin: 0 -20px -20px; }
.list-sm { margin: 10px 0 0; }
.list-sm .row { padding: 8px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--ink); }
a.row:hover { background: #fffaf6; text-decoration: none; }
.row small { display: block; color: var(--muted); }
.row-end { display: flex; align-items: center; gap: 12px; }
.row.act { justify-content: flex-start; }
.row.act > div { flex: 1; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #a8a3c3; flex: none; }
.dot-staff { background: var(--accent); }
.dot-client { background: #10b981; }
.table { width: 100%; border-collapse: collapse; }
.card > .table { margin: -6px 0 -8px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #fffaf6; }
.table a { color: var(--ink); }
.num { text-align: right !important; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 22px 10px; }
.empty div { margin-top: 12px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.dl-tight { gap: 6px 14px; font-size: 14px; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin-top: 14px; font-size: 14px; }

/* ---- badges ---- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-grey { background: var(--grey-bg); color: var(--grey); }
.b-purple { background: var(--purple-bg); color: var(--accent); }

/* ---- buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 9px 18px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #d9c6b4; background: #fffaf6; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); border-color: var(--accent); }
.btn-light { background: #fff; color: var(--accent); border-color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red); filter: brightness(1.07); }
.btn-danger-ghost { color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row form { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.actions-col { display: flex; flex-direction: column; gap: 10px; }
.actions-col form { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid2 .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 13.5px; }
.field label small { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #ddcfc1; border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255, 91, 46, .22); border-color: var(--accent); }
input[type="color"] { padding: 4px; height: 42px; }
input[type="file"] { padding: 8px; background: #fffaf6; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.check small { flex-basis: 100%; color: var(--muted); }
.money-in { display: flex; align-items: center; border: 1px solid #ddcfc1; border-radius: 10px; background: #fff; }
.money-in span { padding-left: 12px; color: var(--muted); }
.money-in input { border: 0; padding-left: 6px; }
.money-in:focus-within { outline: 3px solid rgba(255, 91, 46, .22); border-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.w-sm { width: 80px; padding: 5px 8px; font-size: 13px; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: 1fr 160px auto; gap: 10px; align-items: end; }
.search, .filters { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-end; }
.search input { max-width: 420px; }
.filters .field { width: 240px; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 14px 11px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 16px; color: var(--muted); font-size: 13px; }
details.danger-zone summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 14px; padding: 6px 0; }
details.danger-zone[open] { border: 1px solid var(--red-bg); border-radius: 10px; padding: 10px 12px; }
.dept { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.dept:first-of-type { border-top: 0; padding-top: 0; }

/* ---- notices ---- */
.flash, .notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.flash .i, .notice .i { margin-top: 2px; }
.flash-ok, .notice { background: #eefbf2; color: #14532d; border: 1px solid #bbf0cc; }
.notice { background: var(--soft); color: #7a2a12; border-color: #ffd3c4; }
.flash-err, .notice-err { background: var(--red-bg); color: #8a1531; border: 1px solid #f7c3cf; }

/* ---- client bits ---- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.product h3 { font-size: 18px; }
.product .price { font: 800 30px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.price small, .table small.per { font-size: 14px; color: var(--muted); font-weight: 500; }
.product-desc { color: var(--muted); flex: 1; }
.cycles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cycle { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 10px; cursor: pointer; }
.cycle:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.cycle span { display: flex; flex-direction: column; }
.saved-card { display: flex; gap: 14px; align-items: center; background: var(--soft); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.saved-card small { display: block; color: var(--muted); }
.secret { font-size: 15px; padding: 6px 10px; cursor: copy; }
.pay-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-color: #ffc6b4; background: linear-gradient(180deg, #fff, #fff5ef); }
.pay-box h3 { font-size: 20px; }
.pay-box p { margin: 4px 0 0; }
.pay-actions { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pay-box .bank { flex-basis: 100%; font-size: 14px; }
.pay-box .bank summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.invoice-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.invoice { padding: 34px; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.inv-brand { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.inv-meta { text-align: right; }
.inv-meta h2 { font-size: 20px; margin-bottom: 6px; }
.inv-meta dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 10px 0 0; justify-content: end; font-size: 14px; }
.inv-meta dt { color: var(--muted); }
.inv-meta dd { margin: 0; }
.inv-to { margin-bottom: 22px; }
.inv-to small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.inv-lines tfoot td { border: 0; padding: 6px 10px; }
.inv-lines tfoot .total td { font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); }
.inv-notes { margin-top: 18px; color: var(--muted); font-size: 14px; }
.close-form { margin-top: 12px; text-align: right; }

/* ---- tickets ---- */
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.msg-staff { border-left: 4px solid var(--accent); }
.msg-internal { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.msg header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.msg header time { margin-left: auto; color: var(--muted); font-size: 13px; }
.msg-body { overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.files a { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--ink); }
.files .i { width: 14px; height: 14px; }

/* ---- auth pages ---- */
.auth { min-height: 100vh; background: radial-gradient(900px 500px at 110% 110%, #ffe1d6, transparent), var(--bg); }
.auth-wrap { max-width: 430px; margin: 0 auto; padding: 56px 16px; }
.auth-wrap.wide { max-width: 620px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 22px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: 0 12px 40px rgba(20, 20, 28, .07); }
.auth-card h1 { font-size: 26px; margin-bottom: 18px; letter-spacing: -.025em; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; font-weight: 600; }
.cf-turnstile { min-height: 65px; }

/* ---- website layout (client area inside the public site) ---- */
.site { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.site-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff8f2; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 242, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; gap: 28px; height: 76px; }
.site-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 800 20px/1 var(--display); flex: none; }
.site-logo:hover { text-decoration: none; }
.site-logo img { height: 38px; width: auto; display: block; }
.site-nav { display: flex; gap: 4px; margin-right: auto; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: 16px; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--sand); text-decoration: none; }
.head-cta { display: flex; gap: 10px; align-items: center; }
.head-cta .login { color: var(--ink); font-weight: 600; font-size: 16px; padding: 8px 12px; }
.head-cta .icon-btn, .site-menu-btn { border-color: var(--line); color: var(--ink); background: #fff; }
.site-menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; }
.acct-tabs { background: var(--ink); }
.acct-tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; }
.acct-tabs-in::-webkit-scrollbar { display: none; }
.acct-tabs a { display: flex; align-items: center; gap: 8px; color: #d6d1db; font-weight: 600; font-size: 14.5px; padding: 9px 14px; border-radius: 999px; white-space: nowrap; }
.acct-tabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.acct-tabs a.on { background: #fff8f2; color: var(--ink); }
.acct-tabs .i { width: 17px; height: 17px; }
.acct-tabs .count { background: var(--ember); color: var(--ink); font-size: 11px; border-radius: 99px; padding: 1px 7px; }
.site-main { flex: 1; padding: 32px 0 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font: 800 clamp(30px, 4vw, 42px)/1.05 var(--display); letter-spacing: -.035em; }
.site .content { padding: 0; }
.site-foot { background: var(--sand); border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-in .site-logo img { height: 30px; }
.foot-in nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-in nav a { color: var(--ink); font-weight: 500; }
.foot-in small { color: var(--muted); margin-left: auto; font-size: 13px; }
.site-auth .auth-wrap { padding: 24px 0 8px; }
.site .impersonate { position: relative; z-index: 21; }
.eyebrow { font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.center { text-align: center; }
.center .i { display: inline; vertical-align: -3px; width: 15px; height: 15px; }

/* ---- checkout ---- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.checkout .card { margin-bottom: 0; }
.order-form { gap: 18px; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: 20px; margin-bottom: 16px; }
.step-title span { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff8f2; display: grid; place-items: center; font-size: 15px; flex: none; }
.summary { position: sticky; top: 96px; padding: 24px; }
.summary h3 { font-size: 28px; letter-spacing: -.03em; margin-bottom: 14px; }
.feat { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; font-size: 14.5px; }
.feat li { display: flex; gap: 9px; align-items: flex-start; }
.feat .i { width: 17px; height: 17px; color: #14b88a; margin-top: 2px; }
.product .feat { flex: 1; }
.sum-lines { margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.sum-lines div { display: flex; justify-content: space-between; }
.sum-lines dt { color: var(--muted); }
.sum-lines dd { margin: 0; font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.sum-total b { font: 800 34px/1 var(--display); letter-spacing: -.035em; }
.summary p { margin: 10px 0 0; }
.cycle { padding: 14px; border-radius: 14px; }
.cycle b { font-size: 15px; }
.cycle em { font-style: normal; font-size: 12px; font-weight: 700; color: #0b7a5b; background: #e3f7f0; border-radius: 99px; padding: 2px 8px; margin-top: 4px; align-self: flex-start; }
.cycle .price-label, .cycle small { color: var(--muted); }
[hidden] { display: none !important; }

/* ---- responsive ---- */
@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-nav, .head-cta { display: none; }
  .site-menu-btn { display: grid; }
  .site-head.open .head-in { flex-wrap: wrap; height: auto; padding: 16px 0; row-gap: 12px; }
  .site-head.open .site-nav { display: flex; flex-direction: column; width: 100%; order: 3; }
  .site-head.open .site-nav a { font-size: 18px; padding: 10px 8px; border-radius: 12px; }
  .site-head.open .head-cta { display: flex; order: 4; width: 100%; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .cols, .cols-wide { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 30; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 10, 40, .45); z-index: 20; }
  .menu-btn { display: grid; }
  .top { padding: 0 16px; }
  .content { padding: 18px 16px; }
  .hero { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .hero h2 { font-size: 22px; }
  .hide-sm { display: none !important; }
  .site-wrap { padding: 0 16px; }
  .head-in { height: 64px; }
  .site-logo img { height: 32px; }
  .site-main { padding: 22px 0 48px; }
  .foot-in small { margin-left: 0; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .line { grid-template-columns: 1fr 110px; }
  .line .check { grid-column: 1 / -1; }
  .invoice { padding: 20px; }
  .inv-meta { text-align: left; }
  .inv-meta dl { justify-content: start; }
  .card { padding: 16px; }
  .list { margin: 0 -16px -16px; }
  .row { padding: 12px 16px; }
  .table td, .table th { padding: 10px 6px; }
  .search, .filters { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .auth-card { padding: 22px; }
}

/* ---- print (invoices) ---- */
@media print {
  .side, .top, .no-print, .flash, .impersonate, .tabs { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .invoice { padding: 0; }
}
.order-form .cycles { border: 0; padding: 0; margin: 0; }
.order-form .cycle { align-items: flex-start; }
.order-form .cycle input { margin-top: 4px; }
.order-form .cycle span { gap: 2px; }
.order-form .cycle .price small, .order-form .cycle small { display: inline; }

/* Discount code on the order page */
.ok-text { color: var(--green); }
.promo-row { display: flex; gap: 10px; align-items: flex-end; }
.promo-row .field { flex: 1; }
.promo [data-promo-note]:empty { display: none; }
.promo [data-promo-note] { margin: 10px 0 0; }

/* "Client Area" tag under the logo */
.logo-stack { display: flex; flex-direction: column; gap: 5px; flex: none; }
.logo-tag { font: 600 10.5px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.brand-stack { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand .logo-tag { color: #8f8a98; }
