:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e8f0;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-dark: #4338ca;
  --brand-soft: #eef0ff;
  --low: #16a34a;
  --mid: #d97706;
  --high: #dc2626;
  --radius: 16px;
  --font-head: "Lexend Deca", "Noto Sans", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -6px rgba(15, 23, 42, .08);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 60px -12px rgba(49, 46, 129, .25);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

  /* Source colours: four strong/soft pairs in rotation (same as the PDF report) */
  --s1: #cb1476; --s2: #225ec6; --s3: #007546; --s4: #7533e7;
  --l1: #fedce7; --l2: #d6e5fb; --l3: #c1ecdf; --l4: #ecdffe;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(124, 58, 237, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(79, 70, 229, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
body > main { flex: 1; width: 100%; }
h1, h2, h3 { font-family: var(--font-head); }
h1 { font-size: 1.75rem; margin: 0 0 .35rem; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: 1.08rem; margin: 0 0 .9rem; font-weight: 700; letter-spacing: -.01em; }
::selection { background: rgba(79, 70, 229, .18); }
a { color: var(--brand); text-decoration: none; }
code { background: #eef0f6; padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }
pre { background: #0f172a; color: #e2e8f0; padding: .9rem 1rem; border-radius: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; white-space: pre; }
h3 { font-size: .95rem; margin: 1.1rem 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* --- top bar --- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 2rem;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 232, 240, .8);
}
.brand { display: flex; align-items: center; gap: .6rem; font: 800 1.15rem var(--font-head); letter-spacing: -.02em; color: var(--ink); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text small {
  font: 600 .66rem var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: .82rem; letter-spacing: -.02em;
  box-shadow: 0 4px 12px -2px rgba(79, 70, 229, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.topbar nav { display: flex; gap: .2rem; padding: .25rem; border-radius: 12px; }
.topbar nav a { color: var(--muted); padding: .45rem .9rem; border-radius: 9px; font-weight: 500; font-size: .92rem; transition: all .15s; }
.topbar nav a:hover { background: rgba(15, 23, 42, .04); color: var(--ink); }
.topbar nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* --- layout --- */
.container { max-width: 1180px; margin: 2rem auto; padding: 0 1.5rem; display: grid; gap: 1.5rem; }
.container > * { min-width: 0; }   /* wide tables scroll inside their card instead of widening the page */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.grid-2 aside { display: grid; gap: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; }

/* --- forms --- */
form { display: grid; gap: 1rem; margin-top: 1rem; }
.field { display: grid; gap: .35rem; font-weight: 500; font-size: .9rem; }
.field em { color: var(--muted); font-style: normal; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"],
input[type="search"], input[type="number"], input[type="date"], input[type="tel"], input[type="url"], input:not([type]),
textarea, select {
  width: 100%; font: inherit; color: inherit;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
select { width: auto; padding: .4rem .6rem; cursor: pointer; }
select.full { width: 100%; padding: .5rem .7rem; }
textarea { resize: vertical; min-height: 220px; }
textarea.short { min-height: 80px; }

.tabs { display: inline-flex; background: #f1f2f7; border-radius: 10px; padding: 4px; justify-self: start; }
.tab { border: 0; background: none; font: inherit; font-weight: 500; padding: .45rem 1rem; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; gap: .4rem; }

.dropzone {
  position: relative; display: grid; justify-items: center; gap: .35rem; text-align: center;
  padding: 2.2rem 1rem; border: 2px dashed #cdd2e1; border-radius: var(--radius);
  background: #fafbff; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #f3f4ff; }
.dropzone.has-file { border-style: solid; border-color: var(--low); background: #f2fbf5; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: .3rem;
  background: var(--brand-soft); color: var(--brand); transition: transform .2s;
}
.dz-icon svg { width: 24px; height: 24px; }
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { transform: translateY(-3px); }
.dz-file { font-weight: 600; color: var(--low); }

.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: #374151; }
.check input { margin-top: .25rem; accent-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .92rem; padding: .62rem 1.1rem; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: background .15s, box-shadow .15s, transform .08s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: #f8f9fc; border-color: #d6d9e4; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .6), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.big { padding: .95rem 1.4rem; font-size: 1.02rem; border-radius: 13px; }
.btn.small { padding: .3rem .7rem; font-size: .82rem; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--high); }
.btn.danger:hover { background: #fef2f2; }

/* --- stats / lists --- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat { padding: 1.25rem 1.3rem; position: relative; overflow: hidden; }
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--grad); opacity: .07;
}
.stat-value { font: 800 2rem var(--font-head); letter-spacing: -.03em; }
.stat-value.ok { color: var(--low); }
.stat-value.off { color: var(--muted); }
.stat-label { color: var(--muted); font-size: .85rem; }

.report-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.report-list a { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; padding: .6rem; border-radius: 10px; color: var(--ink); }
.report-list a:hover { background: #f6f7fb; }
.report-list .pill { grid-row: span 2; align-self: center; }
.rl-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; min-width: 3.2rem; text-align: center; padding: .3rem .5rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.pill.low { background: #dcfce7; color: var(--low); }
.pill.mid { background: #fef3c7; color: var(--mid); }
.pill.high { background: #fee2e2; color: var(--high); }

.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #f8f9fc; }
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #fafbff; }

/* --- report --- */
.report-layout { max-width: 1400px; margin: 1.5rem auto; padding: 0 1.5rem; }
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.report-head h1 { margin: 0; }
.actions { display: flex; gap: .5rem; }
.report-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }

.paper {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 3rem 3.5rem; min-height: 70vh;
}
.doc {
  white-space: pre-wrap; word-wrap: break-word;
  font: 17px/1.85 "Source Serif 4", Georgia, serif; color: #1f2937;
  max-width: 78ch; margin: 0 auto;
}
.doc mark {
  color: inherit; border-radius: 2px; padding: 1px 0;
  background: var(--cs);
  transition: opacity .2s, background .2s;
}
.doc mark sup {
  font: 700 .62rem var(--font-body); color: #fff; background: var(--c);
  border-radius: 4px; padding: 0 .25rem; margin-left: 2px; vertical-align: super;
}
.doc mark.para { background: color-mix(in srgb, var(--cs) 60%, transparent); border-bottom: 2px dashed var(--c); }
.doc mark.dim { opacity: .18; }
.doc[data-focus] mark:not(.dim) { background: color-mix(in srgb, var(--c) 28%, var(--cs)); }
.ex { color: #9ca3af; }

.side { position: sticky; top: 76px; display: grid; gap: 1rem; max-height: calc(100vh - 92px); overflow-y: auto; padding-bottom: .5rem; }
.score-card { display: grid; justify-items: center; gap: 1.2rem; }
.ring {
  --c: var(--low);
  width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef0f5 0);
  display: grid; place-items: center;
}
.ring.mid { --c: var(--mid); }
.ring.high { --c: var(--high); }
.ring-inner { width: 120px; height: 120px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.ring-value { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; color: var(--c); line-height: 1; }
.ring-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }
.kv { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.kv div { background: #f7f8fc; border-radius: 10px; padding: .55rem .7rem; display: grid; }
.kv span { color: var(--muted); font-size: .75rem; }
.kv b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }

.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.src { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .6rem; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.src:hover { background: #f7f8fc; }
.src.active { background: #f3f4ff; border-color: #dcdffb; }
.src-main { min-width: 0; display: grid; gap: .25rem; }
.src-title { font-weight: 500; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; background: var(--c); }
.bar { height: 5px; background: #eef0f5; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }

.legend { display: grid; gap: .45rem; font-size: .85rem; color: var(--muted); }
.legend mark { color: var(--ink); padding: 0 .2rem; border-radius: 3px; background: var(--cs); }
.legend mark.para { background: color-mix(in srgb, var(--cs) 60%, transparent); border-bottom: 2px dashed var(--c); }

/* colour classes: --c strong (badges, bars), --cs soft (highlights, type pills) */
.c1, .c5, .c9  { --c: var(--s1); --cs: var(--l1); }
.c2, .c6, .c10 { --c: var(--s2); --cs: var(--l2); }
.c3, .c7, .c11 { --c: var(--s3); --cs: var(--l3); }
.c4, .c8, .c12 { --c: var(--s4); --cs: var(--l4); }

/* --- toasts & overlay --- */
.toasts { position: fixed; top: 72px; right: 1.5rem; z-index: 30; display: grid; gap: .5rem; }
.toast { background: #111827; color: #fff; padding: .75rem 1rem; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; font-size: .9rem; transition: opacity .4s, transform .4s; }
.toast.hide { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.overlay { position: fixed; inset: 0; z-index: 50; display: none; place-content: center; justify-items: center; gap: 1rem; background: rgba(244, 246, 251, .85); backdrop-filter: blur(4px); font-weight: 600; }
.overlay.show { display: grid; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #dfe2f5; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- accounts / navigation --- */
.userbox { display: flex; align-items: center; gap: .6rem; }
.user-meta { display: grid; line-height: 1.2; font-size: .85rem; }
.user-meta small { color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #c7d2fe, #e9d5ff); color: var(--brand-dark); font-weight: 700;
}
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; vertical-align: middle; }
form.inline { display: inline; margin: 0; }

.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 430px; padding: 2.2rem; }
.auth-card h1 { text-align: center; }
.auth-card > p { text-align: center; }
.auth-brand { display: grid; place-items: center; margin-bottom: 1rem; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.3rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.notice { background: #eef0ff; color: #3730a3; border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; }

.segmented { display: flex; gap: .5rem; }
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: block; text-align: center; padding: .6rem; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; font-weight: 500; transition: all .15s;
}
.segmented input:checked + span { border-color: var(--brand); background: #eef0ff; color: var(--brand); }

/* --- page structure --- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.stack { display: grid; gap: 1.5rem; align-content: start; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head h2 a { color: var(--ink); }
.card-head .tabs { margin: 0; }
.card > p:last-child { margin-bottom: 0; }
.prose { white-space: pre-wrap; color: #374151; }

.row-form { display: flex; gap: .5rem; margin-top: 1rem; }
.row-form input { flex: 1; }
.page-head .row-form { margin: 0; }
.options { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.check .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-top: .45rem; }
.check.on .dot { background: var(--low); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.list a, .list-row { display: flex; align-items: center; gap: .75rem; padding: .6rem; border-radius: 10px; color: var(--ink); }
.list a:hover { background: #f6f7fb; }
.list.compact .list-row { padding: .4rem .2rem; }
.list-main { flex: 1; min-width: 0; display: grid; }
.list-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; font-weight: 700;
}
.list-icon.soft { background: #eef0ff; color: var(--brand); }

.code-box { display: grid; justify-items: end; gap: .2rem; }
.big-code {
  font: 700 1.4rem ui-monospace, Consolas, monospace; letter-spacing: .15em; padding: .4rem .9rem;
  background: #fff; border: 1px dashed var(--brand); color: var(--brand); border-radius: 10px; cursor: pointer;
}

.tag {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
  background: #f1f2f7; color: var(--muted); white-space: nowrap;
}
.tag.web { background: #e0f2fe; color: #0369a1; }
.tag.repo { background: #ede9fe; color: #6d28d9; }
.tag.sub { background: #fce7f3; color: #be185d; }
.tag.ok { background: #dcfce7; color: var(--low); }
.late { color: var(--high); font-weight: 600; font-size: .78rem; margin-left: .3rem; }

tr.clickable { cursor: pointer; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

details.card > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "▾"; color: var(--muted); }
details[open].card > summary::after { content: "▴"; }
details.card > summary h2 { margin: 0; }

.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { font-size: 2.4rem; margin-bottom: .5rem; }

.sub-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.big-score .pill { font-size: 1.3rem; padding: .6rem .9rem; }

/* comparison */
.overlap { display: flex; align-items: center; gap: .7rem; min-width: 200px; }
.bar.wide { flex: 1; height: 8px; }
.bar i.lvl-low { background: var(--low); }
.bar i.lvl-mid { background: var(--mid); }
.bar i.lvl-high { background: var(--high); }

/* report extras */
.kind-split { width: 100%; display: grid; gap: .4rem; }
.kind-split div { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.src-meta { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.src-meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-layout.narrow { max-width: 980px; }

/* settings */
.tag.pub { background: #fef3c7; color: #b45309; }
.stat-inline { display: grid; justify-items: end; }
.stat-inline b { font-size: 1.9rem; line-height: 1; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.provider {
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: grid; gap: .6rem; align-content: start;
  background: #fff; transition: border-color .15s;
}
.provider.ready { border-color: #bbf7d0; background: linear-gradient(#f6fef9, #fff 60%); }
.provider:target { box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.provider-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.provider-head b { display: block; margin-bottom: .2rem; }
.provider p { margin: 0; }
.provider-actions { display: flex; justify-content: space-between; align-items: center; margin-top: .2rem; }
.status { font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: #f1f2f7; color: var(--muted); }
.status.ready { background: #dcfce7; color: var(--low); }
.status.needs_key { background: #fef3c7; color: var(--mid); }
.status.not_installed { background: #fee2e2; color: var(--high); }
.field.small-field { font-size: .82rem; gap: .25rem; }
.field.small-field input { padding: .5rem .7rem; }
.field em.small { font-weight: 400; }
.limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.settings-form { margin-top: 0; gap: 1.5rem; }
.save-bar {
  position: sticky; bottom: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem;
}
.switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; transition: background .15s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s;
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ================= public landing page ================= */
.landing { display: block; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font: 700 .78rem var(--font-head); letter-spacing: .02em;
  border: 1px solid #dfe2ff;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* hero */
.hero-wrap { position: relative; overflow: hidden; padding: 4.5rem 1.5rem 4rem; scroll-margin-top: 70px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  mask-image: linear-gradient(#000 75%, transparent);
  -webkit-mask-image: linear-gradient(#000 75%, transparent);
  background:
    radial-gradient(600px 380px at 15% 20%, rgba(124, 58, 237, .16), transparent 70%),
    radial-gradient(700px 420px at 85% 30%, rgba(79, 70, 229, .18), transparent 70%),
    radial-gradient(500px 300px at 50% 100%, rgba(6, 182, 212, .10), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(15, 23, 42, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero-copy h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.07; letter-spacing: -.04em; margin: 1.1rem 0 1rem;
}
.lead { font-size: 1.13rem; color: #475569; max-width: 560px; margin: 0; }
.hero-checks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .55rem; }
.hero-checks li { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: #334155; }
.hero-checks .ico, .tick-list .ico {
  width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #dcfce7; color: var(--low); stroke-width: 3;
}
.hero-trust { display: flex; gap: 2.2rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid rgba(15, 23, 42, .08); }
.hero-trust div { display: grid; }
.hero-trust b { font: 800 1.7rem var(--font-head); letter-spacing: -.03em; }
.hero-trust span { color: var(--muted); font-size: .85rem; }

.hero-card { padding: 1.8rem; box-shadow: var(--shadow-lg); border-color: rgba(230, 232, 240, .9); position: relative; }
.hero-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: linear-gradient(135deg, rgba(79, 70, 229, .5), rgba(124, 58, 237, .15), rgba(6, 182, 212, .4));
}
.hero-card-head { display: flex; justify-content: space-between; align-items: center; }
.hero-card-head h2 { margin: 0; font-size: 1.2rem; }
.hero-card form { margin-top: 1.1rem; }
.hero-card .btn.big { width: 100%; }
.privacy-note { margin: 0; display: flex; gap: .4rem; justify-content: center; align-items: center; flex-wrap: wrap; }

/* sources strip */
.strip { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.strip-items { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.strip-items span {
  padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-weight: 600; font-size: .82rem; color: #475569; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* sections */
.section { max-width: 1180px; margin: 0 auto; padding: 5rem 1.5rem 0; scroll-margin-top: 50px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.6rem; }
.section-head h2, .preview-grid h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; line-height: 1.2; margin: .9rem 0 0; }
.section h3 { font-size: 1.08rem; margin: .9rem 0 .4rem; letter-spacing: -.01em; }
.section p { margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem; box-shadow: var(--shadow); }
.step p { color: var(--muted); }
.step-num {
  position: absolute; top: 1.4rem; right: 1.5rem; font: 800 2.6rem var(--font-head); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px #dfe2ff;
}
.step-ico, .feature > .ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7);
}
.step-ico .ico { width: 24px; height: 24px; }

.preview-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: center; }
.preview-grid > div > p { margin-top: 1rem; font-size: 1.05rem; }
.tick-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .6rem; }
.tick-list li { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.mock { padding: 1.6rem; box-shadow: var(--shadow-lg); transform: rotate(-1deg); position: relative; }
.mock-label {
  position: absolute; top: -10px; right: 18px; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 700;
  padding: .15rem .55rem; border-radius: 6px; letter-spacing: .04em; text-transform: uppercase;
}
.mock-head { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.mock-head > div:nth-child(2) { flex: 1; }
.mock-ring {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--mid) 23%, #eef0f5 0);
}
.mock-ring span { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 .85rem var(--font-head); color: var(--mid); }
.mock-text { font: 16px/1.85 "Source Serif 4", Georgia, serif; color: #1f2937; margin: 1rem 0 !important; }
.mock-text mark { color: inherit; border-radius: 2px; background: var(--cs); }
.mock-text mark.para { background: color-mix(in srgb, var(--cs) 60%, transparent); border-bottom: 2px dashed var(--c); }
.mock-sources { display: grid; gap: .45rem; }
.mock-sources div { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; font-size: .9rem; padding: .45rem .55rem; background: #f8f9fc; border-radius: 10px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dcdffb; }
.feature > .ico { padding: 12px; width: 48px; height: 48px; }
.feature p { color: var(--muted); font-size: .94rem; }

.audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.audience { display: grid; gap: .7rem; align-content: start; padding: 1.8rem; border-radius: 20px; }
.audience h3 { margin: 0; }
.audience .btn { justify-self: start; margin-top: .3rem; }
.audience.highlight { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); }
.audience.highlight p { color: rgba(255, 255, 255, .85); }

.faq { max-width: 820px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 1.3rem; margin-bottom: .7rem;
  transition: box-shadow .2s;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 0; font: 700 1rem var(--font-head);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.2rem; color: #475569; }

.cta {
  max-width: 1180px; margin: 5rem auto 0; padding: 3.5rem 1.5rem; text-align: center; border-radius: 28px;
  background:
    radial-gradient(500px 200px at 20% 0%, rgba(255, 255, 255, .18), transparent 70%),
    var(--grad);
  color: #fff; box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .4rem; letter-spacing: -.03em; }
.cta p { margin: 0 0 1.6rem; color: rgba(255, 255, 255, .85); }
.btn.light { background: #fff; color: var(--brand); border-color: #fff; }
.btn.light:hover { background: #f5f5ff; }
@media (max-width: 1240px) { .cta { margin-left: 1.5rem; margin-right: 1.5rem; } }
.footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, .6); margin-top: 3rem; color: var(--muted); font-size: .88rem; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.5rem 1.5rem; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr) 1.3fr; gap: 2rem; }
.footer-contact a { overflow-wrap: anywhere; }
.footer-contact i { width: 1.1em; color: var(--brand); }
.footer-inner p { margin: .7rem 0 0; max-width: 300px; }
.footer h4 { margin: 0 0 .7rem; font: 700 .8rem var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--brand); }
.footer-bottom { max-width: 1180px; margin: 0 auto; padding: 1rem 1.5rem 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: .8rem; }
.stats.five { grid-template-columns: repeat(5, 1fr); }
.public-settings { display: grid; gap: .9rem; }
.public-settings .check { align-items: center; }
.limit-field { max-width: 320px; }

/* report: integrity flags, tools, match groups, all sources */
.flags-card { border-color: #fecaca; background: linear-gradient(#fff5f5, #fff 70%); }
.flags-card h2 { color: var(--high); }
.flags-card p { margin: .3rem 0; font-size: .9rem; }
.tools-card { display: grid; gap: .3rem; padding: .7rem; }
.tool { display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; border-radius: 12px; color: var(--ink); transition: background .15s; }
.tool:hover { background: #f6f7fb; }
.tool > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.tool > span:nth-child(2) { flex: 1; display: grid; line-height: 1.3; }
.tool small { color: var(--muted); font-size: .78rem; }
.groups-card { display: grid; gap: .25rem; }
.group-row { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #f1f2f6; }
.group-row:last-child { border-bottom: 0; }
.g-label, .g-val { display: grid; line-height: 1.3; }
.g-label b { font-size: .88rem; }
.g-label small, .g-val small { color: var(--muted); font-size: .74rem; }
.g-val { text-align: right; }
.g-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; flex: none; }
.g-red { background: #f86371; color: #fff; } .g-orange { background: #f68e4a; color: #fff; }
.g-yellow { background: #f4e4aa; color: var(--ink); } .g-mint { background: #c1ecdf; color: var(--ink); }
.kind-row { display: grid !important; grid-template-columns: 3rem 1.4rem 1fr; align-items: center; justify-content: start !important; font-size: .88rem; }
.kind-row b { font-variant-numeric: tabular-nums; }
.kind-row i { color: var(--ink); font-size: .85rem; }
.src-tabs { margin-bottom: .9rem; }
.all-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.all-sources li { display: grid; grid-template-columns: 1fr auto; gap: .7rem; align-items: center; padding: .55rem .4rem; border-bottom: 1px solid #f1f2f6; }

/* AI & grammar reports */
.ai-caveat { margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; }
.ai-mark { color: inherit; background: rgba(6, 182, 212, .18); border-bottom: 2px solid #06b6d4; border-radius: 3px; }
.gm { border-bottom: 2px wavy #f59e0b; text-decoration: none; cursor: help; }
.gm.active { background: rgba(245, 158, 11, .25); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.cat-list li { display: flex; justify-content: space-between; font-size: .9rem; }
.issue-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; font-size: .88rem; max-height: 60vh; overflow-y: auto; }
.issue-list li { cursor: pointer; padding: .3rem .4rem; border-radius: 8px; }
.issue-list li:hover, .issue-list li.active { background: #fff7ed; }
.issue-list .fix { color: var(--low); }

/* QuickMarks, comments, rubric */
.qm-hl { background: rgba(250, 204, 21, .35); border-bottom: 2px solid #eab308; border-radius: 2px; }
.qm-hl.flash { background: rgba(250, 204, 21, .8); }
.qm-badge {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; margin-right: 2px;
  border-radius: 50%; background: #eab308; color: #fff; font: 700 10px var(--font-body); font-style: normal;
  vertical-align: super;
}
.qm-pop {
  position: absolute; z-index: 60; width: 340px; max-width: calc(100vw - 24px); margin: 0; padding: .8rem; display: grid; gap: .6rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.qm-pop[hidden] { display: none; }   /* only while text is selected – never over the score card */
.qm-stats { display: grid; gap: .25rem; padding: .55rem .7rem; border-radius: 10px; background: #f8fafc;
  border: 1px solid #e2e8f0; font-size: .8rem; }
.qm-stats:empty { display: none; }
.qm-stats-row { display: flex; justify-content: space-between; gap: .8rem; }
.qm-stats-row span { color: var(--muted); }
.qm-stats-row.muted b { font-weight: 500; color: var(--muted); }
.qm-stats-total b { font: 700 1.05rem var(--font-head); }
.qm-stats-src { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; }
.qm-src { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }
.qm-src mark { padding: 0 .4rem; border-radius: 999px; font-size: .72rem; }
.qm-title { font: 700 .8rem var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.qm-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.qm { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: 999px; padding: .25rem .65rem; font: 600 .78rem var(--font-body); cursor: pointer; }
.qm:hover { background: #fef3c7; }
.qm-custom { display: flex; gap: .4rem; }
.qm-custom input { padding: .45rem .6rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.comment-list li[data-c] { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; padding: .5rem; border-radius: 10px; cursor: pointer; }
.comment-list li[data-c]:hover { background: #fffbeb; }
.c-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #eab308; color: #fff; font-weight: 700; font-size: .75rem; }
.c-quote { font: italic .82rem "Source Serif 4", serif; color: var(--muted); }
.c-text { font-weight: 600; font-size: .9rem; }
.rubric { display: grid; gap: .35rem; margin-bottom: .4rem; }
.rubric-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .88rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.rubric-score { white-space: nowrap; color: var(--muted); }
.rubric-score input { width: 4.2rem; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

.src-link { color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; }
.src-link i { font-size: .7em; margin-left: .15rem; }

/* background check progress */
.job-card { width: 100%; max-width: 520px; text-align: center; padding: 2.4rem 2rem; }
.job-spinner {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.5rem; position: relative;
}
.job-spinner::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--brand); animation: spin 1s linear infinite;
}
.job-step { font-weight: 600; min-height: 1.6em; margin: .4rem 0 1rem; }
.job-bar { height: 8px; background: #eef0f5; border-radius: 99px; overflow: hidden; margin-bottom: .8rem; }
.job-bar i { display: block; height: 100%; width: 8%; background: var(--grad); border-radius: 99px; transition: width .6s; }
.job-error { margin-top: 1rem; text-align: left; }

/* login: Student / Instructor switch */
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 1rem 0 .3rem; background: #f1f2f7; border-radius: 12px; }
.role-switch a { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem; border-radius: 9px; font-weight: 600; color: var(--muted); transition: all .15s; }
.role-switch a:hover { color: var(--ink); }
.role-switch a.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* institution / class context */
.institution { font-weight: 600; color: var(--brand); font-size: .9rem; margin-bottom: .2rem; }
.report-context { color: #475569; font-size: .9rem; margin: .15rem 0 .25rem; }
.report-context i { color: var(--muted); margin-right: .25rem; }
.new-class { display: grid; gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.row-form.tight-top { margin-top: 0; }

/* tables: delete / bulk select */
.nowrap { white-space: nowrap; }
.title-cell { min-width: 220px; word-break: break-word; }
.bulk-bar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .6rem; }
.bulk-bar .check { align-items: center; }
th.cb, td.cb { width: 36px; text-align: center; }
td.cb input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* icons, busy buttons, password eye */
.btn i, .topbar nav a i { font-size: .9em; }
.topbar nav a i { margin-right: .3rem; opacity: .85; }
.field > span i { color: var(--muted); margin-right: .25rem; width: 1em; }
.btn.is-busy { cursor: progress; opacity: .85; pointer-events: none; }
.btn:disabled { cursor: progress; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 2.8rem; }
.pw-eye {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 1rem;
}
.pw-eye:hover { background: var(--brand-soft); color: var(--brand); }

/* repository choice (Turnitin "Submit papers to") */
.repo-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.repo-option { position: relative; cursor: pointer; }
.repo-option input { position: absolute; opacity: 0; }
.repo-option > span {
  display: grid; gap: .15rem; height: 100%; padding: .7rem .85rem .7rem 2.2rem; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; position: relative;
}
.repo-option > span::before {
  content: ""; position: absolute; left: .8rem; top: .9rem; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #c5c9d6; background: #fff; transition: all .15s;
}
.repo-option b { font-size: .88rem; }
.repo-option small { color: var(--muted); font-size: .76rem; font-weight: 400; line-height: 1.35; }
.repo-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.repo-option input:checked + span::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.repo-option input:focus-visible + span { box-shadow: 0 0 0 3px rgba(79, 70, 229, .3); }
@media (max-width: 520px) { .repo-options { grid-template-columns: 1fr; } }

/* report filters */
.filters { display: grid; gap: .7rem; margin: 0; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; }
.filters-head h2 { margin: 0; }
.filter-group { display: grid; gap: .4rem; }
.inline-num { align-items: center; flex-wrap: wrap; }
.inline-num input { width: 4.5rem; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-block; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: .8rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .15s;
}
.chip input:checked + span { background: #eef0ff; border-color: #c7cbf7; color: var(--brand); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.kind-split .off { opacity: .35; }
.src-side { display: grid; justify-items: end; gap: .3rem; }
.x-btn {
  border: 0; background: #f1f2f7; color: var(--muted); width: 22px; height: 22px; border-radius: 6px;
  cursor: pointer; font-size: .7rem; line-height: 1;
}
.x-btn:hover { background: #fee2e2; color: var(--high); }
.stop-btn { width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; }
.excluded-head { margin: 1rem 0 .3rem; padding-top: .8rem; border-top: 1px dashed var(--line);
  font-size: .85rem; font-weight: 600; color: var(--muted); }
.excluded-sources .src { cursor: default; }
.excluded-sources .src:hover { background: transparent; }
.excluded-sources .src-title { color: var(--muted); text-decoration: line-through; }
.off-badge { background: #f1f2f7; color: var(--muted); }
.add-back { white-space: nowrap; }
.preview-bar { margin-bottom: 1rem; }

/* accounts */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-bottom: .8rem; }
.row-form.tight { margin: 0; gap: .3rem; }
.row-form.tight input { padding: .35rem .55rem; font-size: .85rem; min-width: 120px; }
.tag.role-admin { background: #ede9fe; color: #6d28d9; }
.add-student { margin-top: 1rem; }
.add-student > summary { list-style: none; display: inline-flex; }
.add-student > summary::-webkit-details-marker { display: none; }
.add-student form { margin-top: .8rem; padding: 1rem; background: #f8f9fc; border-radius: 12px; }
.link-card { display: grid; gap: .25rem; color: var(--ink); transition: border-color .15s; }
.link-card:hover { border-color: var(--brand); }

/* similarity grade bands (DrillBit style) */
.band {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .35rem; border-radius: 7px;
  font-weight: 800; font-size: .8rem; color: #fff; vertical-align: middle;
}
.band.big { display: inline-flex; gap: .5rem; height: auto; padding: .35rem .8rem; font-size: 1rem; border-radius: 999px; }
.band.big small { font-weight: 600; font-size: .78rem; opacity: .95; }
.band-A { background: var(--low); }
.band-B { background: #65a30d; }
.band-C { background: var(--mid); }
.band-D { background: var(--high); }

/* side-by-side source comparison */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.split-pane { padding: 1.5rem 1.8rem; max-height: calc(100vh - 190px); overflow-y: auto; position: sticky; top: 76px; }
.split-pane .doc { font-size: 15.5px; max-width: none; }
.pane-head { display: grid; gap: .1rem; padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.snippet { margin: 0 0 .8rem; padding: .7rem .9rem; background: #fafbff; border-left: 3px solid var(--line); border-radius: 6px; font: 15px/1.7 "Source Serif 4", Georgia, serif; }
.snippet mark { color: inherit; background: var(--cs); }
.badge { border-radius: 999px !important; }
.tag.num-tag { background: var(--cs); color: var(--ink); }
.badge.inline { display: inline-grid; width: 20px; height: 20px; font-size: .7rem; vertical-align: middle; }
.compare-link { white-space: nowrap; }

/* grading */
.grading form { margin-top: .4rem; gap: .7rem; }
.grade-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.feedback-box { display: grid; gap: .8rem; background: #f7f8fc; border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }

/* receipt */
.narrow-page { max-width: 820px; }
.receipt-actions { justify-content: space-between; }
.receipt { padding: 2.2rem 2.5rem; display: grid; gap: 1.6rem; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 1rem; }
.receipt-head h1 { margin: 0; text-align: right; }
.receipt-head p { margin: 0; text-align: right; }
.receipt-score { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.receipt-table { width: 100%; }
.receipt-table th { width: 34%; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--muted); }
.receipt-table td { font-weight: 500; }
.hash { word-break: break-all; font-size: .75rem; }
.band-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.band-row { display: grid; justify-items: center; gap: .2rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; }
.band-row.current { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.receipt-foot code { word-break: break-all; }

/* --- responsive --- */
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .split-pane { position: static; max-height: none; }
  .stats.five { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .report-body { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .paper { padding: 1.5rem; }
}
/* grid/flex children may shrink below their content width (prevents sideways scrolling) */
.hero-grid > *, .preview-grid > *, .grid-2 > *, .report-body > *, .split > *, .steps > *, .features > *,
.audiences > *, .footer-inner > *, .stats > * { min-width: 0; }
html, body { overflow-x: clip; }

@media (max-width: 1000px) {
  .stats.four { grid-template-columns: 1fr 1fr; }
  .hero-grid, .preview-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-wrap { padding-top: 2.5rem; }
  .steps, .features, .audiences { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .mock { transform: none; }
}
@media (max-width: 640px) {
  .steps, .features, .audiences { grid-template-columns: minmax(0, 1fr); }
  .hero-wrap { padding: 2rem 1rem 2.5rem; }
  .hero-trust { gap: 1.4rem; }
  .hero-card { padding: 1.3rem; }
  .section { padding: 3.5rem 1rem 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .topbar { padding: .6rem 1rem; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; }
  .userbox .btn.ghost:not([type]) { display: none; }
}
@media (max-width: 700px) {
  .topbar { padding: .7rem 1rem; flex-wrap: wrap; gap: .5rem; }
  .user-meta { display: none; }
  .container, .report-layout { padding: 0 1rem; }
  .stats, .stats.four, .stats.five { grid-template-columns: 1fr 1fr; }
  .code-box { justify-items: start; }
}

/* --- print / PDF --- */
.print-only { display: none; }

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff !important; font-size: 12px; }
  .topbar, .no-print, .toasts, .overlay, .footer, .filters, .actions, .crumbs { display: none !important; }
  .print-only { display: block; }

  .print-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--ink);
  }
  .print-head .brand-mark { box-shadow: none; }
  .print-head-meta { display: grid; justify-items: end; font-size: 11px; color: var(--muted); }
  .print-head-meta b { font: 800 15px var(--font-head); color: var(--ink); }

  .container, .report-layout { margin: 0; padding: 0; max-width: none; }
  .report-head { margin-bottom: 12px; }
  .report-head h1 { font-size: 22px; }
  .card, .paper { box-shadow: none; border: 1px solid #e3e5ec; break-inside: avoid; }

  /* summary first (full width), then sources, then the document */
  .report-body { display: flex; flex-direction: column; gap: 12px; }
  .report-body > .side { order: -1; position: static; max-height: none; overflow: visible; display: grid; gap: 12px; }
  .score-card {
    display: grid; grid-template-columns: 150px 1fr 1.25fr; column-gap: 22px; row-gap: 8px;
    grid-template-areas: "ring kinds kv" "band kinds kv" "note kinds kv"; align-items: center; justify-items: stretch;
  }
  .score-card > .ring { grid-area: ring; justify-self: center; width: 120px; height: 120px; }
  .score-card > .ring .ring-inner { width: 96px; height: 96px; }
  .score-card > .ring .ring-value { font-size: 1.8rem; }
  .score-card > .band { grid-area: band; justify-self: center; }
  .score-card > p { grid-area: note; margin: 0; }
  .score-card > .kind-split { grid-area: kinds; }
  .score-card > .kv { grid-area: kv; grid-template-columns: repeat(3, 1fr); }
  .sources { gap: 2px; }
  .src { padding: 6px 4px; border-bottom: 1px solid #f0f1f5; border-radius: 0; break-inside: avoid; }
  .src-title { white-space: normal; }
  .legend { display: flex !important; gap: 18px; flex-wrap: wrap; padding: 10px 14px; }

  .paper { padding: 18px 22px; min-height: 0; break-before: page; border: 0; }
  .paper-title { font-size: 14px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #e3e5ec; }
  .doc { font-size: 11.5pt; line-height: 1.7; max-width: none; }
  .doc mark sup { font-size: 7px; }

  .split { grid-template-columns: 1fr 1fr; }
  .split-pane { max-height: none; overflow: visible; position: static; }
  .receipt { border: 0; box-shadow: none; padding: 0; }
  .receipt-actions { display: none !important; }
}

/* --- optional extra checks ------------------------------------------------ */
.more-checks { border: 1px dashed var(--line); border-radius: 12px; padding: .6rem .8rem; }
.more-checks summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.more-checks p { margin: .4rem 0 .5rem; }
.extras-options { display: grid; gap: .45rem; }
.extras-options small { font-size: .8rem; }
.extras-section { margin-top: 1.5rem; }
.extras-title { font-family: var(--font-head); font-size: 1.15rem; margin: 0 0 .8rem; }
.extras-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.extra-card h3 { margin: 0 0 .6rem; font-size: 1rem; font-family: var(--font-head); }
.extra-card.wide { grid-column: 1 / -1; }
.extra-card p { font-size: .9rem; margin: .35rem 0; }
.tag.warn { background: #fef3c7; color: #b45309; }
.tag.bad { background: #fee2e2; color: var(--high); }
.ref-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.ref-list, .fix-list, .pair-list { margin: .5rem 0 0; padding-left: 1.4rem; font-size: .86rem; }
.ref-list li { display: flex; gap: .55rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.ref-list { list-style: none; padding-left: 0; }
.ref-icon { font-weight: 700; width: 1.1rem; flex: none; text-align: center; }
.ref-found .ref-icon, .ref-link_ok .ref-icon, .ok-text { color: var(--low); }
.ref-mismatch .ref-icon { color: var(--mid); }
.ref-not_found .ref-icon, .ref-link_broken .ref-icon { color: var(--high); }
.ref-not_found .ref-text, .ref-link_broken .ref-text { color: var(--high); }
.ref-text { overflow-wrap: anywhere; }
.plain-list { margin: .3rem 0 .6rem; padding-left: 1.2rem; font-size: .86rem; overflow-wrap: anywhere; }
.fix-tips { margin: .3rem 0 .7rem; padding-left: 1.2rem; font-size: .88rem; }
.fix-list li { display: flex; gap: .5rem; align-items: flex-start; margin: .35rem 0; }
.fix-list { list-style: none; padding-left: 0; }
.cite-text { flex: 1; white-space: normal; overflow-wrap: anywhere; font-size: .82rem; background: var(--bg);
  padding: .35rem .5rem; border-radius: 8px; }
.progress-banner { background: var(--brand-soft); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin-bottom: .6rem; }
.progress-banner.good { background: #dcfce7; }
.style-score { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .5rem; }
.style-score b { font-size: 1.6rem; font-family: var(--font-head); }
.style-score.consistent b { color: var(--low); }
.style-score.some_differences b { color: var(--mid); }
.style-score.very_different b { color: var(--high); }
.mini-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.mini-table th, .mini-table td { padding: .25rem .3rem; border-bottom: 1px solid var(--line); text-align: left; }
.pair-list li { margin: .5rem 0; }
.qm-ignore { width: 100%; margin-top: .4rem; justify-content: center; }
.ignored-list { list-style: none; padding: 0; margin: 0; }
.ignored-list li { display: flex; justify-content: space-between; gap: .8rem; align-items: center;
  padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; overflow-wrap: anywhere; }

/* --- report verification & download formats ---------------------------------- */
.verify-form { display: flex; gap: .7rem; align-items: flex-end; margin: 1rem 0; flex-wrap: wrap; }
.verify-form .field { flex: 1; min-width: 220px; margin: 0; }
.verify-form input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.verify-result { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; margin: .5rem 0 1rem; }
.verify-result i { font-size: 1.6rem; margin-top: .1rem; }
.verify-result b { display: block; font-size: 1rem; }
.verify-result span { font-size: .88rem; }
.verify-result.ok { background: #dcfce7; color: #14532d; }
.verify-result.bad { background: #fee2e2; color: #7f1d1d; }
.dl-menu { position: relative; display: inline-block; }
.dl-menu > summary { list-style: none; cursor: pointer; }
.dl-menu > summary::-webkit-details-marker { display: none; }
.dl-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: .4rem; min-width: 260px; }
.dl-list a { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.dl-list a:hover { background: var(--brand-soft); }
.dl-list a i { width: 1.2rem; text-align: center; color: var(--brand); }
.dl-list b { display: block; font-size: .9rem; }
.dl-list small { color: var(--muted); font-size: .78rem; }
.dl-logo { display: grid; gap: .4rem; margin-top: .3rem; padding: .55rem .7rem; border-top: 1px solid var(--line); }
.dl-logo > label:first-of-type { display: flex; gap: .7rem; align-items: center; }
.dl-logo > label:first-of-type i { width: 1.2rem; text-align: center; color: var(--brand); }
.dl-logo input[type=file] { font-size: .78rem; max-width: 240px; }

/* --- data storage page ---------------------------------------------------------- */
.storage-link { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); margin-bottom: 1rem; }
.storage-link > i:first-child { font-size: 1.4rem; color: var(--brand); }
.storage-link span { flex: 1; display: grid; }
.storage-kv code { overflow-wrap: anywhere; }
.storage-form .repo-options { grid-template-columns: 1fr; }
.notice.ok { background: #dcfce7; color: #14532d; margin-bottom: 1rem; }
.notice.error { background: #fee2e2; color: #7f1d1d; margin-bottom: 1rem; }
.storage-progress { margin-bottom: 1rem; display: grid; gap: .2rem; }

/* --- MongoDB accounts ---------------------------------------------------------- */
.accounts-table td { vertical-align: top; }
.uri-cell { display: flex; gap: .3rem; align-items: center; min-width: 0; }
.uri-cell .uri { overflow-wrap: anywhere; font-size: .78rem; max-width: 380px; }
.usage-cell { min-width: 150px; }
.usage-cell .bar { margin-bottom: .2rem; }
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; }
.inline-upload { display: inline; }
.account-form { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.account-form h3 { margin: 0 0 .6rem; font-size: .95rem; }
.account-grid { display: grid; grid-template-columns: 1fr 2.4fr 1fr .8fr; gap: .7rem; }
@media (max-width: 800px) { .account-grid { grid-template-columns: 1fr; } }

/* --- API checks table ------------------------------------------------------------ */
.issue-list { margin: 0; padding-left: 1rem; color: #b91c1c; }
.dl-cell { display: flex; flex-wrap: wrap; gap: .25rem; }
.api-checks td { vertical-align: top; }

/* --- sign-up gate on the home page ------------------------------------------------ */
.signup-gate { text-align: center; display: grid; gap: .7rem; justify-items: center; padding: 1rem 0; }
.signup-gate > i { font-size: 2.2rem; color: var(--brand); }
.signup-gate h3 { margin: 0; font-family: var(--font-head); }
.signup-gate p { margin: 0 0 .4rem; }
.signup-gate .btn { width: 100%; justify-content: center; }

/* --- dashboard charts ------------------------------------------------------------ */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.chart-card h2 { font-size: 1rem; margin: 0 0 .15rem; }
.chart-card .chart-sub { color: var(--muted); font-size: .8rem; margin: 0 0 .7rem; }
.chart { position: relative; width: 100%; min-height: 40px; }
.chart svg { display: block; overflow: visible; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.chart svg rect[tabindex]:focus { outline: none; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: #0b0b0b; color: #fff; border-radius: 8px;
  padding: .35rem .55rem; font-size: .76rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.chart-tip b { display: block; font-size: .85rem; }
.chart-tip span { color: #c3c2b7; }
.chart-table { margin-top: .5rem; font-size: .82rem; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: .78rem; }
.chart-table table { width: 100%; margin-top: .3rem; }
.chart-table td { padding: .2rem .3rem; border-bottom: 1px solid var(--line); }
.chart-empty { padding: 1.5rem 0; text-align: center; }
.stat-value.big-num { font-variant-numeric: normal; }
.mini-stats { margin-bottom: 1.2rem; }
.mini-stats .stat-value { font-size: 1.4rem; }

/* --- landing: numbers, grouped features, verify band ------------------------------- */
.numbers-band { max-width: 1100px; margin: 1.5rem auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 0 1rem; }
.numbers-band > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.numbers-band b { display: block; font: 800 2rem var(--font-head); letter-spacing: -.03em; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers-band span { color: var(--muted); font-size: .88rem; }
.steps.four-steps { grid-template-columns: repeat(4, 1fr); }
.step-ico i { font-size: 1.25rem; }
.feature-group { margin-bottom: 2.4rem; }
.group-title { display: flex; align-items: center; gap: .6rem; font: 700 1.15rem var(--font-head); margin: 0 0 1rem; }
.group-title i { color: var(--brand); }
.fa-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7); font-size: 1.2rem; margin-bottom: .2rem; }
.features { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.feature h3 { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.feat-tag { font: 600 .66rem var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: .12rem .5rem; }
.verify-band-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 2rem 2.2rem; }
.verify-band-inner h2 { margin: .6rem 0 .3rem; font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: -.02em; }
.verify-band-inner .verify-form { margin: 0; }
.verify-band-inner .verify-form input { flex: 1; min-width: 200px; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
@media (max-width: 900px) {
  .numbers-band, .steps.four-steps { grid-template-columns: 1fr 1fr; }
  .verify-band-inner { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .numbers-band, .steps.four-steps { grid-template-columns: 1fr; } }

/* --- information pages: pricing, about, support, legal ------------------------------- */
.info-hero { text-align: center; max-width: 760px; margin: 1rem auto 2.2rem; }
.info-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.03em; line-height: 1.15; margin: .8rem 0 .6rem; }
.info-section { margin: 2.4rem 0; }
.info-section > h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 0 0 1rem; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { position: relative; padding: 1.8rem; display: flex; flex-direction: column; gap: .7rem; }
.plan h2 { margin: 0; font-size: 1.3rem; }
.plan-for { color: var(--muted); margin: 0; font-size: .9rem; }
.plan-price { display: flex; align-items: baseline; gap: .4rem; margin: .4rem 0; }
.plan-price b { font: 800 2.1rem var(--font-head); letter-spacing: -.03em; }
.plan-price span { color: var(--muted); font-size: .9rem; }
.plan .btn { justify-content: center; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px; }
.plan-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; font-size: .92rem; }
.plan-list i { color: var(--low); margin-right: .45rem; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.info-card h2 { font-size: 1.1rem; margin: .8rem 0 .4rem; }
.info-card p { color: var(--muted); font-size: .94rem; }
.how-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.how-list > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.how-list p { color: var(--muted); margin: .3rem 0 0; font-size: .92rem; }
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.who-grid .card { display: grid; gap: .3rem; }
.who-grid i { font-size: 1.4rem; color: var(--brand); }
.support-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; align-items: start; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.support-form select { width: 100%; }
.help-links { display: grid; gap: .3rem; }
.help-links a { display: flex; gap: .8rem; align-items: center; padding: .6rem .5rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.help-links a:hover { background: var(--brand-soft); }
.help-links i { color: var(--brand); width: 1.2rem; text-align: center; }
.help-links span { display: grid; }
.help-links small { color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.4rem; align-items: start; margin-top: 1rem; }
.legal-nav { position: sticky; top: 90px; display: grid; gap: .2rem; padding: 1rem; }
.legal-nav b { margin-bottom: .4rem; }
.legal-nav a { padding: .45rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.legal-nav a.active, .legal-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.legal { padding: 2rem 2.4rem; line-height: 1.7; }
.legal h1 { margin: 0 0 .2rem; }
.legal h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .3rem 0; }
.agree { margin: .4rem 0 .8rem; font-size: .88rem; }
.message.is-new { border-left: 4px solid var(--brand); }
.message-text { white-space: pre-wrap; margin: .8rem 0 0; }
@media (max-width: 900px) {
  .plans, .about-grid, .support-grid, .legal-layout { grid-template-columns: 1fr; }
  .who-grid, .how-list { grid-template-columns: 1fr 1fr; }
  .legal-nav { position: static; }
  .form-2 { grid-template-columns: 1fr; }
}
.upload-account { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem .3rem; margin: .8rem 0; background: #fbfbff; }
.upload-account legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.upload-account legend small { font-weight: 400; color: var(--muted); }
.upload-account .agree { margin: .2rem 0 .3rem; }
.upload-account p { margin: .2rem 0 .4rem; }


/* ---------- spam protection: hidden bot trap ---------- */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- home: sample reports ---------- */
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-bottom: 1.2rem; }
.sample-card { display: grid; gap: .6rem; align-content: start; padding: 1.4rem; border-radius: 20px; }
.sample-card h3 { margin: .2rem 0 0; }
.sample-card p { margin: 0; font-size: .94rem; }
.sample-card .btn { justify-self: start; }
.sample-pages { position: relative; height: 330px; margin-bottom: .6rem; }
.sample-page { position: absolute; width: 62%; border-radius: 8px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); transition: transform .25s; }
.sample-page img { display: block; width: 100%; height: auto; }
.sample-page.back { right: 4%; top: 22px; transform: rotate(4deg); }
.sample-page.front { left: 4%; top: 0; transform: rotate(-3deg); }
.sample-card:hover .sample-page.back { transform: rotate(6deg) translate(8px, -4px); }
.sample-card:hover .sample-page.front { transform: rotate(-5deg) translate(-8px, -4px); }

/* ---------- home: why it is different ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem; }
.why-card h3 { font-size: 1rem; margin: .7rem 0 .35rem; }
.why-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.why-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 1.1rem; }
.compare { padding: 0; overflow: hidden; max-width: 860px; margin: 0 auto; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table caption { font: 700 1.05rem var(--font-head); text-align: left; padding: 1.1rem 1.3rem .6rem; }
.compare-table th, .compare-table td { padding: .7rem 1.3rem; border-top: 1px solid var(--line); text-align: center; }
.compare-table th[scope="row"] { text-align: left; font-weight: 500; text-transform: none; letter-spacing: 0;
  font-size: .95rem; color: var(--ink); background: none; }
.compare-table thead th { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.compare-table .us { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.compare-table .yes { color: var(--low); }
.compare-table .no { color: #94a3b8; }

/* ---------- people & usage ---------- */
.slot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.slot-card { display: grid; gap: .45rem; align-content: start; }
.slot-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.slot-num b { font: 700 1.8rem var(--font-head); }
.slot-num span { color: var(--muted); }
.slot-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.slot-trio b { display: block; font: 700 1.4rem var(--font-head); }
.slot-trio small { color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: #eef0f5; overflow: hidden; min-width: 90px; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.near span { background: var(--mid); }
.meter.over span { background: var(--high); }
.meter-text { font-size: .75rem; color: var(--muted); }
.meter-text.near { color: #b45309; }
.meter-text.over { color: var(--high); font-weight: 600; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem 1rem; margin-bottom: 1.2rem; }
.filter-bar select, .filter-bar input { width: auto; }
.search-field { position: relative; flex: 1 1 240px; display: flex; align-items: center; }
.search-field i { position: absolute; left: .8rem; color: var(--muted); }
.search-field input { width: 100%; padding-left: 2.2rem; }
.date-field { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.people-table td { vertical-align: top; }
.people-table .num, table .num { text-align: right; font-variant-numeric: tabular-nums; }
.allow-cell { min-width: 160px; }
.allow-cell .meter { margin: .3rem 0 .1rem; }
.allow-cell small { display: block; }
.filter-bar select { padding: .7rem .85rem; }
.filter-bar .search-field input { padding-left: 2.2rem; }
.date-field input { width: auto; padding: .55rem .6rem; }
.move-form select { margin-top: .3rem; font-size: .8rem; padding: .2rem .4rem; width: auto; }
.manage { position: relative; }
.manage > summary { list-style: none; cursor: pointer; }
.manage > summary::-webkit-details-marker { display: none; }
.manage-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; display: grid; gap: .8rem; padding: 1rem; box-shadow: var(--shadow-lg); }
.limit-form { display: grid; gap: .5rem; }
.limit-form label { display: grid; gap: .2rem; font-size: .8rem; color: var(--muted); }
.limit-form .fixed { padding: .45rem 0; }
.create-person > summary { list-style: none; cursor: pointer; }
.create-person > summary::-webkit-details-marker { display: none; }
.create-person > summary h2 { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
.create-person[open] > summary { margin-bottom: 1rem; }
.tag.role-manager { background: #e0f2fe; color: #0369a1; }
.tag.role-instructor { background: #ecfdf5; color: #047857; }
.tag.role-student { background: #f1f5f9; color: #475569; }
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.pager a, .pager b { padding: .3rem .65rem; border-radius: 8px; border: 1px solid var(--line); }
.pager b { background: var(--brand); color: #fff; border-color: var(--brand); }
.sec-events { margin-top: 1rem; }
.sec-events summary { cursor: pointer; font-weight: 600; }
.nowrap { white-space: nowrap; }

@media (max-width: 900px) {
  .sample-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .manage-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; }
}
@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; }
  .sample-pages { height: 280px; }
  .compare-table th, .compare-table td { padding: .6rem .7rem; font-size: .88rem; }
}

/* ---------- report: view switch, file preview, find ---------- */
.paper-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between;
  position: sticky; top: 64px; z-index: 5; background: inherit; padding: .2rem 0 .8rem; margin-bottom: .6rem;
  border-bottom: 1px solid var(--line); }
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-switch button { border: 0; background: transparent; padding: .45rem .8rem; font: 600 .85rem var(--font-body);
  color: var(--muted); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.view-switch button.active { background: var(--brand); color: #fff; }
.view-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.preview-format { width: auto; font-size: .85rem; padding: .35rem .5rem; }
.find-box { display: flex; align-items: center; gap: .3rem; border: 1px solid var(--line); border-radius: 10px;
  padding: .15rem .3rem .15rem .7rem; background: #fff; flex: 0 1 340px; }
.find-box i.fa-magnifying-glass { color: var(--muted); }
.find-box input { border: 0; outline: 0; box-shadow: none; padding: .35rem .2rem; min-width: 0; flex: 1; background: transparent; }
.find-count { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.find-hit { background: #fde68a; border-radius: 2px; box-shadow: 0 0 0 1px #f59e0b; }
.find-hit.current { background: #f59e0b; color: #111; }
.file-preview { display: grid; gap: .5rem; }
.file-preview[hidden], .doc[hidden] { display: none; }
.file-preview iframe { width: 100%; height: calc(100vh - 190px); min-height: 520px; border: 1px solid var(--line);
  border-radius: 10px; background: #525659; }
.preview-note { margin: 0; }
@media (max-width: 700px) {
  .paper-bar { position: static; }
  .find-box { flex: 1 1 100%; }
  .file-preview iframe { height: 75vh; min-height: 0; }
}

/* ---------- home: hero sample strip, CTA contact ---------- */
.hero-sample { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.8rem; padding: .9rem 1.1rem .9rem .9rem;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--line); border-radius: 16px; color: var(--ink);
  box-shadow: var(--shadow); max-width: 520px; transition: transform .2s, box-shadow .2s; }
.hero-sample:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.hero-sample-pages { position: relative; width: 112px; height: 74px; flex: none; }
.hero-sample-pages img { position: absolute; top: 0; width: 52px; height: auto; border-radius: 4px; border: 1px solid var(--line);
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .25); background: #fff; }
.hero-sample-pages img:nth-child(1) { left: 0; transform: rotate(-8deg); }
.hero-sample-pages img:nth-child(2) { left: 30px; z-index: 1; top: -4px; }
.hero-sample-pages img:nth-child(3) { left: 60px; transform: rotate(8deg); }
.hero-sample-text { display: grid; gap: .1rem; flex: 1; }
.hero-sample-text small { color: var(--muted); font-size: .82rem; }
.hero-sample > i { color: var(--brand); }
.hero-checks li { align-items: flex-start; }
.cta .cta-contact { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem;
  font-size: .92rem; color: rgba(255, 255, 255, .85); }
.cta-contact a { color: #fff; font-weight: 600; }
.cta-contact i { margin-right: .3rem; opacity: .85; }
@media (max-width: 560px) { .hero-sample-pages { width: 96px; } .hero-sample-pages img { width: 46px; } }

/* ---------- upload: account window after "Check similarity" ---------- */
.account-dialog { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 1.5rem;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .45); color: var(--ink); background: #fff; }
.account-dialog[open] { display: grid; gap: .9rem; animation: dialog-in .18s ease-out; }
.account-dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .account-dialog[open] { animation: none; } }
.account-dialog-head { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start; }
.account-dialog-head h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.account-dialog-head p { margin: 0; }
.account-dialog-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 1.1rem; }
.dialog-x { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: .2rem .4rem;
  border-radius: 8px; }
.dialog-x:hover { background: #f1f2f7; color: var(--ink); }
.account-dialog .field { margin: 0; }
.account-dialog input.invalid { border-color: var(--high); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.dialog-error { margin: 0; min-height: 1.2em; color: var(--high); font-size: .88rem; font-weight: 500; }
.dialog-error:empty { min-height: 0; display: none; }
.account-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.account-dialog-actions .btn.primary { flex: 1; justify-content: center; }
.account-dialog .center { margin: 0; }
.content-missing { margin: 0 0 .6rem; color: var(--high); font-size: .9rem; font-weight: 500; }

/* ---------- support chat: bubble + window ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-size: .92rem; }
.chat-bubble { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: var(--grad); box-shadow: 0 10px 30px -8px rgba(79, 70, 229, .65); font-size: 1.4rem; display: grid; place-items: center;
  transition: transform .2s; }
.chat-bubble:hover { transform: scale(1.06); }
.chat-bubble:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--brand); }
.chat-close-ico, .chat-widget.is-open .chat-open-ico { display: none; }
.chat-widget.is-open .chat-close-ico { display: inline; }
.chat-unread { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--high); color: #fff; font: 700 .72rem/22px var(--font-body); border: 2px solid #fff; }
.chat-panel { position: absolute; right: 0; bottom: 72px; width: 370px; max-height: min(600px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .45); border: 1px solid var(--line); animation: dialog-in .18s ease-out; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; background: var(--grad); color: #fff; }
.chat-head .brand-mark { background: rgba(255, 255, 255, .2); box-shadow: none; }
.chat-head div { flex: 1; display: grid; }
.chat-head small { opacity: .9; font-size: .78rem; display: flex; align-items: center; gap: .35rem; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.chat-x { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; }
.chat-x:hover { background: rgba(255, 255, 255, .28); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: .55rem; align-content: start; background: #f8f9fc; }
.chat-thread { display: grid; gap: .55rem; }
.chat-msg { max-width: 85%; padding: .55rem .8rem; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg p { margin: 0; }
.chat-msg p + p { margin-top: .35rem; }
.chat-msg.bot, .chat-msg.admin { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; justify-self: start; }
.chat-msg.admin { border-color: #c7d2fe; background: #eef2ff; }
.chat-msg.user { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; justify-self: end; }
.chat-meta { display: block; margin-top: .25rem; font-size: .7rem; opacity: .7; }
.chat-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-quick button { border: 1px solid #c7d2fe; background: #fff; color: var(--brand-dark); border-radius: 999px;
  padding: .35rem .75rem; font: 500 .8rem var(--font-body); cursor: pointer; text-align: left; }
.chat-quick button:hover { background: var(--brand-soft); }
.chat-form { border-top: 1px solid var(--line); padding: .7rem .8rem .5rem; display: grid; gap: .45rem; background: #fff; }
.chat-who { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.chat-who[hidden] { display: none; }
.chat-who input { padding: .5rem .65rem; font-size: .85rem; }
.chat-compose { display: flex; gap: .4rem; align-items: flex-end; }
.chat-compose textarea { min-height: 42px; max-height: 120px; resize: none; padding: .6rem .75rem; font-size: .9rem; line-height: 1.4; }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; }
.chat-send:disabled { opacity: .6; cursor: progress; }
.chat-error { margin: 0; color: var(--high); font-size: .8rem; }
.chat-error:empty { display: none; }
.chat-foot { margin: 0; text-align: center; font-size: .72rem; color: var(--muted); }
@media (max-width: 560px) {
  .chat-widget { right: 14px; bottom: 14px; }
  .chat-panel { position: fixed; inset: auto 8px 84px 8px; width: auto; max-height: calc(100vh - 100px); }
}
@media print { .chat-widget { display: none; } }

/* ---------- support chat: admin inbox ---------- */
.nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--high); color: #fff;
  font: 700 .7rem/20px var(--font-body); text-align: center; margin-left: .2rem; }
.nav-badge[hidden] { display: none; }
.chat-admin { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1rem; align-items: start; }
.chat-list { padding: .8rem; display: grid; gap: .6rem; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: hidden; grid-template-rows: auto 1fr; }
.chat-list-filter { display: grid; gap: .5rem; }
.small-seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.small-seg a { flex: 1; text-align: center; padding: .35rem; font-size: .82rem; color: var(--muted); }
.small-seg a.active { background: var(--brand); color: #fff; }
.chat-rows { overflow-y: auto; display: grid; gap: .2rem; align-content: start; }
.chat-row { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .6rem; border-radius: 12px; color: var(--ink); }
.chat-row:hover { background: #f5f6fb; text-decoration: none; }
.chat-row.active { background: var(--brand-soft); }
.chat-row-main { display: grid; min-width: 0; }
.chat-row-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row.unread .chat-row-main small { color: var(--ink); font-weight: 600; }
.chat-row-side { display: grid; justify-items: end; gap: .2rem; }
.chat-empty { padding: 1rem; text-align: center; }
.chat-view { display: grid; grid-template-rows: auto 1fr auto; min-height: 560px; padding: 0; overflow: hidden; }
.chat-view-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-view-head h2 { margin: 0 0 .2rem; font-size: 1.1rem; display: flex; gap: .5rem; align-items: center; }
.chat-view-head p { margin: 0; }
.chat-view-actions { display: flex; gap: .4rem; align-items: start; }
.chat-log { padding: 1.2rem; overflow-y: auto; max-height: 60vh; display: grid; gap: .6rem; align-content: start; background: #f8f9fc; }
.chat-log .chat-msg.wide { max-width: 75%; }
.chat-log .chat-msg.user { justify-self: start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; border-bottom-left-radius: 4px; }
.chat-log .chat-msg.admin { justify-self: end; background: var(--brand); color: #fff; border: 0; border-radius: 14px; border-bottom-right-radius: 4px; }
.chat-log .chat-msg.bot { justify-self: end; background: #f1f5f9; border-style: dashed; }
.chat-reply { display: flex; gap: .6rem; padding: .9rem 1.2rem; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-reply textarea { min-height: 52px; resize: vertical; }
.chat-placeholder { display: grid; place-items: center; align-content: center; gap: .5rem; color: var(--muted); min-height: 400px; grid-row: 1 / -1; }
.chat-placeholder i { font-size: 2.4rem; opacity: .5; }
@media (max-width: 900px) {
  .chat-admin { grid-template-columns: 1fr; }
  .chat-list { position: static; max-height: 360px; }
}

/* ---------- home: comparison with Turnitin / DrillBit ---------- */
.compare { max-width: 980px; }
.compare-table td { font-size: 1.05rem; }
.compare-table .partial { display: inline-block; font-size: .75rem; font-weight: 600; color: #92400e; background: #fef3c7;
  border-radius: 999px; padding: .1rem .55rem; }
.compare-table .unlisted, .compare-note .unlisted { font-size: .75rem; color: var(--muted); }
.compare-note .partial { font-size: .75rem; font-weight: 600; color: #92400e; background: #fef3c7; border-radius: 999px; padding: .05rem .45rem; }
.compare-note { margin: 0; padding: .9rem 1.3rem 1.1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); line-height: 1.6; }
.compare-note .yes { color: var(--low); }
.compare-note .no { color: #94a3b8; }
@media (max-width: 560px) { .compare { overflow-x: auto; } .compare-table { min-width: 520px; } }
/* ---------- support chat: AI assistant ---------- */
.chat-msg.ai { background: #fff; border: 1px solid #ddd6fe; border-bottom-left-radius: 4px; justify-self: start; }
.chat-msg.ai .chat-meta::before { content: "\2728  "; }
.chat-typing { display: flex; gap: 4px; padding: .7rem .9rem; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: #a5b4fc; animation: chat-dot 1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none; } }
.chat-log .chat-msg.ai { justify-self: end; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 14px; border-bottom-right-radius: 4px; }
.chat-view { grid-template-rows: auto 1fr auto auto; }
.chat-reply-buttons { display: flex; flex-direction: column; gap: .4rem; }
.chat-draft-error { margin: 0; padding: 0 1.2rem .8rem; color: var(--high); }
.chat-draft-error:empty { display: none; }
.tag.warn-tag { background: #fef3c7; color: #92400e; }
.ai-test { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; flex-wrap: wrap; }
.ai-test input { flex: 1; min-width: 220px; }
/* ---------- support chat: tabs, pictures, tickets, moved bubble ---------- */
.chat-head { display: block; padding: .9rem 1rem 0; }
.chat-head .chat-head-top { display: flex; align-items: center; gap: .5rem; }
.chat-head .chat-head-top > div { flex: 1; display: grid; min-width: 0; }
.chat-head a.chat-x { display: grid; place-items: center; font-size: 1.05rem; text-decoration: none; }
.chat-tabs { display: flex; gap: .2rem; margin-top: .6rem; }
.chat-tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: rgba(255, 255, 255, .75);
  font: 600 .84rem var(--font-body); padding: .55rem 0; cursor: pointer; }
.chat-tab.on { color: #fff; border-bottom-color: #fff; }
.chat-pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.chat-pane.on { display: flex; }
.chat-pane[data-pane=chat] .chat-body { min-height: 200px; }
.chat-attach { flex: none; width: 38px; height: 42px; display: grid; place-items: center; color: var(--muted); cursor: pointer; border-radius: 12px; }
.chat-attach:hover { background: #f1f2f7; color: var(--ink); }
.chat-preview { position: relative; justify-self: start; }
.chat-preview[hidden] { display: none; }
.chat-preview img { height: 56px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.chat-preview button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: var(--ink); color: #fff; cursor: pointer; line-height: 1; }
.chat-img { display: block; margin-bottom: .3rem; }
.chat-img img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; }
.chat-tickets, .chat-ticket-form, .chat-ticket-view { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: .6rem;
  align-content: start; background: #f8f9fc; }
.chat-tickets[hidden], .chat-ticket-form[hidden], .chat-ticket-view[hidden] { display: none; }
.chat-ticket-form select, .chat-ticket-form input, .chat-ticket-form textarea { font-size: .88rem; }
.chat-new-ticket { justify-content: center; }
.chat-empty-tickets { text-align: center; color: var(--muted); padding: 1.2rem .5rem; font-size: .86rem; }
.chat-empty-tickets b { color: var(--ink); display: block; }
.chat-empty-tickets p { margin: .3rem 0 0; }
.chat-ticket { display: grid; gap: .15rem; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem .85rem; cursor: pointer; font: inherit; color: inherit; }
.chat-ticket:hover { border-color: #c7d2fe; }
.chat-ticket small { color: var(--muted); font-size: .75rem; }
.chat-ticket-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.chat-ticket-top small { color: var(--muted); font-size: .75rem; }
.chat-ticket-view h3 { margin: 0; font-size: 1rem; }
.tstat { font-size: .68rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; }
.tstat-progress { background: #fef3c7; color: #92400e; }
.tstat-waiting { background: #fae8ff; color: #86198f; }
.tstat-done { background: #dcfce7; color: #166534; }
.chat-reply-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; font-size: .86rem;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-reply-box.admin { background: #eef2ff; border-color: #c7d2fe; }
.chat-back { justify-self: start; background: none; border: 0; color: var(--muted); font: 600 .82rem var(--font-body); cursor: pointer; padding: 0; }
.chat-back:hover { color: var(--ink); }
.chat-ticket-reply { display: grid; grid-template-columns: 1fr auto; gap: .4rem; align-items: end; }
.chat-ticket-reply textarea { min-height: 42px; resize: vertical; font-size: .86rem; }
.chat-ticket-reply .chat-error { grid-column: 1 / -1; }
.chat-bubble { touch-action: none; }
.chat-widget.on-left .chat-panel { right: auto; left: 0; }
.chat-widget.on-top .chat-panel { bottom: auto; top: 72px; }
@media (max-width: 560px) { .chat-widget.on-left .chat-panel, .chat-widget.on-top .chat-panel { inset: auto 8px 84px 8px; } }
.chat-account-plan { margin: .3rem 0 0; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.chat-log .chat-img img { max-height: 320px; }
.chat-reply-file { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); cursor: pointer; }
.chat-reply-file input { max-width: 180px; font-size: .75rem; }

/* ---------- plans: pricing, checkout, my plan ---------- */
.plan-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .8rem;
  font-weight: 600; background: #f1f2f7; color: var(--muted); white-space: nowrap; }
.plan-pill:hover { text-decoration: none; background: var(--brand-soft); color: var(--brand); }
.plan-pill.has-plan { background: #fef3c7; color: #92400e; }
.plan-pill.has-plan i { color: #d97706; }
.plan-tabs { display: flex; justify-content: center; gap: .4rem; margin: 0 auto 1.6rem; flex-wrap: wrap; }
.plan-tabs a { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; font-size: .9rem; }
.plan-tabs a:hover { text-decoration: none; border-color: #c7cbf7; }
.plan-tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }
.plan-group[hidden] { display: none; }
.plan-facts { display: flex; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 .2rem; }
.plan-facts span { font-size: .78rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px;
  padding: .15rem .6rem; }
.plan-note { text-align: center; max-width: 720px; margin: 1.2rem auto 0; }
.plan.off { opacity: .55; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
.checkout-side { position: sticky; top: 84px; display: grid; gap: 1rem; }
.checkout-side .plan { padding: 1.4rem; }
.checkout-who { display: grid; gap: .8rem; }
.checkout-who .form-row { margin: 0; }
.pay-methods { display: grid; gap: .6rem; }
.pay-method { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pay-method > summary, .pay-method > form > button, .pay-method > a { list-style: none; display: flex; align-items: center; gap: .9rem;
  width: 100%; padding: .9rem 1rem; background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.pay-method > summary::-webkit-details-marker { display: none; }
.pay-method > a:hover { text-decoration: none; }
.pay-method:hover { border-color: #c7cbf7; }
.pay-method[open] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.pay-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--brand-soft); color: var(--brand); }
.pay-ico.paypal { background: #e8f1fe; color: #003087; }
.pay-ico.crypto { background: #fff4e5; color: #f7931a; }
.pay-ico.chat { background: #e7f9ee; color: #128c4b; }
.pay-name { flex: 1; display: grid; }
.pay-name small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.pay-go { color: var(--muted); }
.pay-body { padding: 0 1rem 1rem; display: grid; gap: .8rem; }
.pay-steps { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.pay-qr { width: 170px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: .4rem; }
.pay-id { display: flex; align-items: center; gap: .4rem; background: #f8f9fc; border: 1px dashed #c7cbf7; border-radius: 10px;
  padding: .5rem .7rem; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.pay-id span { flex: 1; }
.pay-amount { font: 800 1.5rem var(--font-head); letter-spacing: -.02em; }
.pay-instructions { white-space: pre-wrap; margin: 0; font-size: .88rem; color: #374151; }
.pay-pending { display: grid; gap: .4rem; }
.pay-pending div { display: flex; justify-content: space-between; gap: .6rem; font-size: .85rem; flex-wrap: wrap; }
.sandbox-tag { font-size: .7rem; font-weight: 700; background: #fef3c7; color: #92400e; border-radius: 999px; padding: .05rem .5rem; margin-left: .3rem; }
.plan-meter { height: 10px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.plan-meter span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.plan-now { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.plan-now h2 { margin: 0; }
.plan-now .big { font: 800 2.4rem var(--font-head); letter-spacing: -.03em; line-height: 1; }
@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; }
  .checkout-side { position: static; order: -1; }
  .pay-steps { grid-template-columns: 1fr; }
}

/* ---------- admin: payments ---------- */
.pay-admin-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.pay-admin-nav a { font-size: .82rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.pay-admin-nav a:hover { text-decoration: none; border-color: #c7cbf7; }
.review-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.review-card:first-of-type { border-top: 0; }
.review-card .proof img { width: 150px; max-height: 220px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); }
.review-card h3 { margin: 0 0 .2rem; font-size: 1rem; }
.review-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; margin-top: .6rem; }
.review-actions .row-form { margin: 0; }
.plan-edit { width: 100%; border-collapse: collapse; }
.plan-edit td, .plan-edit th { padding: .35rem .3rem; vertical-align: middle; }
.plan-edit input[type=text], .plan-edit input[type=number] { padding: .4rem .5rem; font-size: .85rem; width: 100%; }
.plan-edit .n { width: 92px; }
.plan-edit .group th { text-align: left; padding-top: 1rem; font-size: .9rem; }
.method-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.method-row { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.method-row .pay-name { min-width: 180px; }
.method-row img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); }
.secret-hint { font-size: .78rem; color: var(--muted); }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.rules-grid > div { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; display: grid; gap: .6rem; }
@media (max-width: 800px) { .rules-grid { grid-template-columns: 1fr; } .review-card { grid-template-columns: 1fr; } }
.ticket-replies { display: grid; gap: .5rem; margin: .6rem 0; }
.ticket-replies .chat-reply-box { font-size: .9rem; }
.ticket-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.ticket-answer textarea { min-height: 60px; }
.ticket-answer .actions { flex-direction: column; }

/* ---------- header v2: one line, Admin menu, user menu, ☰ on small screens ---------- */
.topbar { flex-wrap: nowrap; gap: .8rem; padding: .6rem 1.4rem; }
.topbar .brand { flex: none; }
.topbar nav { flex: 1; min-width: 0; justify-content: center; align-items: center; flex-wrap: nowrap; }
.topbar nav > a, .nav-menu > summary { white-space: nowrap; padding: .45rem .75rem; font-size: .9rem; }
.nav-toggle { display: none; position: relative; border: 1px solid var(--line); background: #fff; color: var(--ink);
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer; font-size: 1.05rem; flex: none; }
.nav-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--high); }
.nav-menu, .user-menu { position: relative; }
.nav-menu > summary, .user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem;
  border-radius: 9px; color: var(--muted); font-weight: 500; }
.nav-menu > summary::-webkit-details-marker, .user-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover, .nav-menu[open] > summary { background: rgba(15, 23, 42, .04); color: var(--ink); }
.nav-menu.active > summary { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-caret { font-size: .65rem !important; opacity: .6; transition: transform .15s; }
details[open] > summary .nav-caret { transform: rotate(180deg); }
.nav-menu-list { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: .4rem; display: grid; gap: 1px; z-index: 40; }
.nav-menu-list.right { left: auto; right: 0; }
.nav-menu-list a, .nav-menu-list button { display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem; border-radius: 9px;
  color: var(--ink); font: 500 .88rem var(--font-body); white-space: nowrap; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.nav-menu-list a:hover, .nav-menu-list button:hover { background: #f5f6fb; text-decoration: none; }
.nav-menu-list a.active { background: var(--brand-soft); color: var(--brand); }
.nav-menu-list i { width: 1.1em; text-align: center; color: var(--muted); }
.nav-menu-list a.active i { color: var(--brand); }
.nav-menu-list .nav-badge { margin-left: auto; }
.nav-menu-list form { margin: 0; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }
.nav-group { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; padding: .55rem .7rem .2rem;
  overflow: hidden; text-overflow: ellipsis; }
.userbox { flex: none; gap: .5rem; }
.user-menu > summary { padding: .25rem .45rem .25rem .25rem; }
.user-menu > summary:hover, .user-menu[open] > summary { background: rgba(15, 23, 42, .04); }
.user-meta b { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
@media (max-width: 1380px) { .topbar nav > a i, .nav-menu > summary > i:first-child { display: none; } .user-meta { display: none; } }
@media (max-width: 1080px) {
  .topbar { flex-wrap: wrap; padding: .6rem 1rem; }
  .nav-toggle { display: inline-grid; place-items: center; order: 3; }
  .topbar .brand { order: 1; margin-right: auto; }
  .userbox { order: 2; }
  .topbar nav { order: 4; display: none; width: 100%; flex: 1 0 100%; flex-direction: column; align-items: stretch;
    padding: .4rem 0 .2rem; border-top: 1px solid var(--line); margin-top: .2rem; max-height: calc(100vh - 80px); overflow-y: auto; }
  .topbar.nav-open nav { display: flex; }
  .topbar nav > a, .nav-menu > summary { font-size: .95rem; padding: .65rem .8rem; }
  .topbar nav > a i, .nav-menu > summary > i:first-child { display: inline; }
  .nav-menu-list { position: static; box-shadow: none; border: 0; padding: 0 0 0 .8rem; min-width: 0; }
  .nav-menu { width: 100%; }
}
@media (max-width: 560px) {
  .hide-xs { display: none !important; }
  .plan-pill { padding: .3rem .55rem; font-size: .75rem; }
  .topbar .brand-text small { display: none; }
  .topbar .brand { font-size: 1.02rem; }
}

/* ---------- admin: live checkout pop-ups ---------- */
.live-pops { position: fixed; left: 18px; bottom: 18px; z-index: 70; display: grid; gap: .5rem; max-width: min(360px, calc(100vw - 36px)); }
.live-pop { display: flex; gap: .7rem; align-items: flex-start; background: #0f172a; color: #fff; border-radius: 14px; padding: .75rem .9rem;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .55); font-size: .85rem; line-height: 1.4; animation: dialog-in .2s ease-out;
  transition: opacity .4s, transform .4s; }
.live-pop:hover { text-decoration: none; color: #fff; }
.live-pop.hide { opacity: 0; transform: translateY(8px); }
.live-pop i { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.live-pop.paypal i, .live-pop.crypto i, .live-pop.screenshot i { background: #16a34a; }
.live-pop.details i { background: #d97706; }
.live-pop small { display: block; opacity: .65; font-size: .72rem; margin-top: .15rem; }
.live-pop b { word-break: break-all; }

/* ---------- small screens: forms, tables and cards never overflow ---------- */
img, video, canvas { max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .row-form { flex-wrap: wrap; }
  .row-form input, .row-form select { min-width: 0; flex: 1 1 160px; }
  .page-head { align-items: flex-start; }
  .chat-admin { grid-template-columns: minmax(0, 1fr); }
  .chat-list { position: static; max-height: 320px; }
  .charts-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-tabs a { padding: .45rem .8rem; font-size: .85rem; }
  .ai-key-head { flex-direction: column; }
  .live-pops { left: 10px; right: 10px; bottom: 86px; max-width: none; }
}
@media (max-width: 420px) { .stats, .stats.four, .stats.five { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Admin > AI ---------- */
.ai-settings { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.ai-key { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; margin-bottom: .7rem; display: grid; gap: .6rem; }
.ai-key.off { opacity: .6; }
.ai-key-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; }
.ai-key-head .actions { flex-wrap: wrap; }
.ai-models { display: grid; gap: .5rem; justify-items: start; }
.ai-answer { white-space: pre-wrap; background: #f8f9fc; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; font: .88rem/1.5 var(--font-body); }

/* ---------- checking page: email notice ---------- */
.job-notify { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--brand-soft);
  color: var(--brand-dark); border-radius: 12px; padding: .7rem .9rem; font-size: .86rem; margin-top: .8rem; text-align: left; }
.job-notify > i { font-size: 1.1rem; }
.job-notify span { flex: 1; min-width: 200px; }
.otp-input { font: 700 1.6rem/1 ui-monospace, Consolas, monospace; letter-spacing: .4em; text-align: center; }
.auth-card .center { text-align: center; }
.invite-box { display: grid; gap: .5rem; margin: 1rem 0 .8rem; padding: .9rem; border: 1px dashed #c7cbf7; border-radius: 12px; background: #fafaff; }
.invite-box .btn { justify-self: start; }
.home-pricing .plan-who { text-align: center; margin: -.4rem 0 1.2rem; }
.home-pricing .plan h3 { margin: 0; font-size: 1.25rem; }
.pay-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.4rem; margin-top: 1.6rem; color: var(--muted); font-size: .9rem; }
.pay-strip span i { color: var(--brand); margin-right: .3rem; }
.pay-strip a { font-weight: 600; }
.checkout-email { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: end; }
.checkout-email .btn { white-space: nowrap; }
@media (max-width: 640px) { .checkout-email { grid-template-columns: minmax(0, 1fr); } }

/* ---------- sign-in pages: brand panel + form (like TurnPro AI) ---------- */
.auth-wrap { padding: 2rem 1.2rem; }
.auth-split { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  background: #fff; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-split .auth-card { max-width: none; border: 0; border-radius: 0; box-shadow: none; padding: 2.4rem 2.4rem 2rem; align-self: center; }
.auth-side { position: relative; overflow: hidden; color: #fff; padding: 2.6rem 2.6rem;
  background: radial-gradient(600px 400px at 110% -10%, rgba(255, 255, 255, .22), transparent 60%),
              radial-gradient(500px 360px at -20% 120%, rgba(255, 255, 255, .16), transparent 60%),
              linear-gradient(140deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%); }
.auth-side-inner { position: relative; display: flex; flex-direction: column; gap: 1.6rem; height: 100%; }
.auth-side-brand { display: flex; align-items: center; gap: .7rem; }
.auth-side-brand .brand-mark { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); box-shadow: none; }
.auth-side-brand b { display: block; font: 800 1.1rem var(--font-head); }
.auth-side-brand small { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.auth-side h2 { margin: auto 0 0; font: 700 1.9rem/1.2 var(--font-head); letter-spacing: -.02em; max-width: 420px; }
.auth-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.auth-side li { display: flex; gap: .8rem; align-items: flex-start; font-size: .88rem; opacity: .95; }
.auth-side li i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .15); }
.auth-side li b { display: block; font-size: .95rem; }
.auth-side-stats { display: flex; gap: 1.6rem; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.auth-side-stats b { display: block; font: 800 1.35rem var(--font-head); }
.auth-side-stats span { font-size: .75rem; opacity: .8; }
.auth-split .auth-brand { display: none; }
.role-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.role-switch a { padding: .6rem .3rem; font-size: .84rem; gap: .35rem; white-space: nowrap; }
.auth-or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; margin: 1rem 0 .6rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-code-login > summary { list-style: none; width: 100%; justify-content: center; cursor: pointer; }
.auth-code-login > summary::-webkit-details-marker { display: none; }
.auth-code-login[open] > summary { display: none; }
.auth-code-login form { display: grid; gap: .7rem; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .auth-side { display: none; }
  .auth-split .auth-brand { display: block; }
  .auth-split .auth-card { padding: 1.8rem 1.4rem; }
}
@media (max-width: 420px) { .role-switch a i { display: none; } .auth-wrap { padding: 1rem .6rem; } }
.userbox .btn.login-btn { display: inline-flex !important; }
@media (max-width: 900px) { .auth-wrap { place-items: start center; padding-top: 1.2rem; } }

/* ---------- logo (Isolated Study badge) ---------- */
.brand-logo { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(146, 108, 22, .28)); }
.brand-logo.big { width: 76px; height: 76px; }
.auth-brand .brand-logo.big { display: block; margin: 0 auto .4rem; }
.chat-head .brand-logo { width: 36px; height: 36px; background: #fff; border-radius: 50%; padding: 1px; filter: none; }
.auth-side-brand .brand-logo { width: 46px; height: 46px; background: rgba(255, 255, 255, .92); border-radius: 50%; padding: 2px; filter: none; }
.footer .brand-logo { width: 44px; height: 44px; }
@media (max-width: 560px) { .topbar .brand-logo { width: 34px; height: 34px; } }

/* ---------- sign-in brand panel v2 ---------- */
.auth-side { padding: 2.4rem 2.5rem; }
.auth-side::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%); mask-image: linear-gradient(180deg, #000 0%, transparent 70%); }
.auth-side-inner { gap: 1.4rem; }
.auth-side-brand .brand-logo { width: 52px; height: 52px; padding: 0; background: none; border-radius: 50%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); }
.auth-side-head { margin-top: auto; display: grid; gap: .8rem; }
.auth-side-pill { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 600;
  padding: .3rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.auth-side-pill i { color: #86efac; }
.auth-side h2 { margin: 0; font-size: 2rem; }
.auth-side h2 em { font-style: normal; background: linear-gradient(90deg, #fde68a, #fbcfe8); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.auth-side-feats { gap: .55rem !important; }
.auth-side-feats li { padding: .65rem .75rem; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(4px); transition: background .2s; }
.auth-side-feats li:hover { background: rgba(255, 255, 255, .13); }
.auth-side-feats li i { background: rgba(255, 255, 255, .18); }
.auth-side-langs { display: flex; flex-wrap: wrap; gap: .35rem; }
.auth-side-langs span { font-size: .74rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.auth-side-langs .more { background: #fff; color: #4338ca; font-weight: 700; }
.auth-side-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.auth-side-stats b { font-size: 1.3rem; }
.auth-brand .brand-logo.big { width: 84px; height: 84px; }

/* long file names never widen the upload card */
.hero-grid > *, .hero-card, .hero-card form, .tab-panel, .dropzone, .field { min-width: 0; }
.dropzone { max-width: 100%; overflow: hidden; }
.dz-file { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.hero-card input, .hero-card select, .hero-card textarea { max-width: 100%; }

/* ---------- vouchers ---------- */
.voucher-code { font-weight: 700; letter-spacing: .06em; background: #f5f3ff; color: #4338ca; padding: .15rem .5rem; border-radius: 6px; }
.voucher-form { margin-top: 1rem; display: grid; gap: .6rem; }
.voucher-form h3 { margin: 0; }
.voucher-box summary { cursor: pointer; font-size: .86rem; color: var(--brand); font-weight: 600; margin-top: .4rem; }
.voucher-box form { margin-top: .5rem; }
.voucher-on { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: #ecfdf5; color: #166534;
  border: 1px dashed #86efac; border-radius: 10px; padding: .4rem .6rem; font-size: .85rem; margin-top: .4rem; }
.old-price { color: var(--muted); font-size: 1.1rem; margin-right: .3rem; }
.pay-free { display: grid; gap: .6rem; padding: 1rem; border: 1px dashed #86efac; background: #f0fdf4; border-radius: 14px; }
.pay-free p { margin: 0; }

/* ---------- announcement bar + theme editor ---------- */
.announce { text-align: center; font-size: .86rem; font-weight: 600; padding: .5rem 1rem; color: #fff; background: var(--grad); }
.announce.dark { background: #0f172a; }
.announce.gold { background: linear-gradient(90deg, #b45309, #d97706); }
.announce a { color: #fff; }
.announce a:hover { text-decoration: underline; }
.theme-form { display: grid; gap: 1rem; }
.theme-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.theme-preset { position: relative; display: flex; align-items: center; gap: .6rem; border: 1.5px solid var(--line); border-radius: 12px;
  padding: .55rem .7rem; cursor: pointer; font-size: .88rem; font-weight: 600; }
.theme-preset input { position: absolute; opacity: 0; }
.theme-preset:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.theme-preset .swatch { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.theme-form input[type=color] { height: 44px; padding: .2rem; cursor: pointer; }
.theme-sample { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1rem; border: 1px dashed var(--line); border-radius: 12px; margin-top: .8rem; }
.theme-sample .btn.primary { background: linear-gradient(135deg, var(--s1), var(--s2)); }
.theme-sample .grad-text { background: linear-gradient(135deg, var(--s1), var(--s2)); -webkit-background-clip: text; background-clip: text;
  color: transparent; font: 800 1.3rem var(--font-head); }
.theme-sample .tag { background: color-mix(in srgb, var(--s1) 12%, white); color: var(--s1); }
.form-row[hidden], .theme-form [hidden] { display: none !important; }

/* ---------- left sidebar for logged-in users (☰ shows / hides it, like TurnPro AI) ---------- */
:root { --sb-w: 260px; }
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w); z-index: 45; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--line); box-shadow: 4px 0 24px -16px rgba(15, 23, 42, .25);
  transform: translateX(-100%); transition: transform .22s ease; }
body.sb-open .sidebar { transform: none; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.sb-head .brand { font-size: 1.05rem; }
.sb-close { border: 0; background: #f1f2f7; color: var(--muted); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; flex: none; }
.sb-close:hover { color: var(--ink); background: #e8eaf2; }
.sb-nav { flex: 1; overflow-y: auto; padding: .4rem .7rem 1rem; display: grid; gap: 2px; align-content: start; }
.sb-nav .nav-group { padding: .9rem .7rem .3rem; }
.sb-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px; color: #334155;
  font-weight: 500; font-size: .92rem; transition: background .12s, color .12s; }
.sb-nav a i { width: 1.15em; text-align: center; color: #94a3b8; transition: color .12s; }
.sb-nav a span:first-of-type { flex: 1; }
.sb-nav a:hover { background: #f5f6fb; color: var(--ink); text-decoration: none; }
.sb-nav a:hover i { color: var(--brand); }
.sb-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.sb-nav a.active i { color: var(--brand); }
.sb-foot { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.sb-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; font-size: .85rem; }
.sb-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-who small { color: var(--muted); }
.sb-foot form { margin: 0; }
.sb-toggle { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 1.05rem; }
.sb-toggle:hover { border-color: #c7cbf7; color: var(--brand); }
.sb-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(15, 23, 42, .35); backdrop-filter: blur(2px); }
.with-sidebar .topbar { justify-content: flex-start; }
.with-sidebar .topbar .userbox { margin-left: auto; }
@media (min-width: 1101px) {
  body.with-sidebar { transition: padding-left .22s ease; }
  body.with-sidebar.sb-open { padding-left: var(--sb-w); }
  body.sb-open .topbar > .brand { display: none; }
  body.sb-open .live-pops { left: calc(var(--sb-w) + 18px); }
}
@media (max-width: 1100px) {
  .with-sidebar .topbar { flex-wrap: nowrap; }
  .with-sidebar .topbar > .brand { margin-right: 0; }
  .sidebar { width: min(var(--sb-w), 86vw); }
}
@media print { .sidebar, .sb-backdrop, .sb-toggle { display: none !important; } body.with-sidebar.sb-open { padding-left: 0; } }
@media (prefers-reduced-motion: reduce) { .sidebar, body.with-sidebar { transition: none; } }
.sb-nav { display: flex; flex-direction: column; }
.sb-nav > * { flex-shrink: 0; }
.sb-nav .nav-group { overflow: visible; }
.fmt-cell { white-space: nowrap; } .fmt-cell label { margin-right: .35rem; font-size: .8rem; }

/* ---------- API documentation ---------- */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.docs-nav { position: sticky; top: 84px; display: grid; gap: 2px; font-size: .88rem; }
.docs-nav b { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 .6rem .4rem; }
.docs-nav a { padding: .35rem .6rem; border-radius: 8px; color: #334155; }
.docs-nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.docs-main { display: grid; gap: 1rem; min-width: 0; }
.docs-sec { scroll-margin-top: 80px; }
.docs-sec h2 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.15rem; font-family: ui-monospace, Consolas, monospace; }
.docs-sec#start h2, .docs-sec#auth h2, .docs-sec#limits h2, .docs-sec#formats h2, .docs-sec#links h2, .docs-sec#errors h2,
.docs-sec#full h2 { font-family: var(--font-head); }
.verb { font: 700 .72rem var(--font-body); padding: .2rem .55rem; border-radius: 6px; color: #fff; letter-spacing: .04em; }
.verb.get { background: #16a34a; } .verb.post { background: #2563eb; } .verb.del { background: #dc2626; }
.docs pre { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: .9rem 1rem; overflow-x: auto; font: .82rem/1.55 ui-monospace, Consolas, monospace; margin: .6rem 0; }
.docs code { font-family: ui-monospace, Consolas, monospace; }
.docs p code, .docs li code, .docs td code { background: #f1f2f7; padding: .05rem .35rem; border-radius: 5px; font-size: .85em; }
.docs-params { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .5rem 0; }
.docs-params th, .docs-params td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-params th { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.docs-steps { padding-left: 1.2rem; display: grid; gap: .5rem; }
.code-tabs { border: 1px solid #1e293b; border-radius: 12px; overflow: hidden; margin-top: .6rem; }
.code-tabs pre { margin: 0; border-radius: 0; }
.code-tabs-bar { display: flex; gap: 2px; background: #1e293b; padding: .3rem; flex-wrap: wrap; }
.code-tabs-bar button { border: 0; background: none; color: #94a3b8; font: 600 .8rem var(--font-body); padding: .35rem .7rem; border-radius: 7px; cursor: pointer; }
.code-tabs-bar button.on { background: #334155; color: #fff; }
.code-tabs-bar .code-copy { margin-left: auto; }
@media (max-width: 900px) { .docs { grid-template-columns: minmax(0, 1fr); } .docs-nav { position: static; display: flex; flex-wrap: wrap; } }
.pay-sub { padding: .9rem 1rem; display: grid; gap: .7rem; } .pay-sub-head { display: flex; gap: .9rem; align-items: center; } #paypal-sub-button { max-width: 420px; }

/* ---------- festival themes ---------- */
.festival-form { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; margin: .6rem 0 1rem; }
.festival-list { display: grid; gap: .45rem; }
.festival-row { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 12px; }
.festival-row.live { border-color: #86efac; background: #f0fdf4; }
.festival-row form { margin: 0 0 0 auto; }
.festival-icon { font-size: 1.4rem; width: 2rem; text-align: center; }
.festival-name { display: grid; min-width: 0; }
.festival-name small { color: var(--muted); font-size: .78rem; }
.festival-row .swatch { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.theme-ai .ai-test input { flex: 1; }

/* ---------- storage usage ---------- */
.storage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.use-big { font-size: .95rem; color: var(--muted); margin: .2rem 0 .6rem; }
.use-big b { font: 800 1.7rem var(--font-head); color: var(--ink); margin-right: .2rem; }
.use-bar { height: 10px; border-radius: 999px; background: #eef0f6; overflow: hidden; flex: 1; }
.use-bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.use-bar.warn span { background: linear-gradient(90deg, #f59e0b, #d97706); }
.use-bar.full span { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.parts { display: grid; gap: .55rem; }
.part-row { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) 90px; gap: .8rem; align-items: center; font-size: .88rem; }
.part-row b { text-align: right; }
.storage-filter { flex-wrap: wrap; align-items: center; }
.storage-filter label { display: inline-flex; align-items: center; gap: .3rem; }
.range-delete { margin-top: 1rem; padding: .9rem 1rem; border: 1px dashed #fca5a5; background: #fef2f2; border-radius: 12px; }
.range-delete p { margin: 0 0 .5rem; font-size: .9rem; }
@media (max-width: 640px) { .part-row { grid-template-columns: minmax(0, 1fr) 80px; } .part-row .use-bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- admin chat composer (like TurnPro AI) ---------- */
.chat-reply { align-items: stretch; }
.composer { flex: 1; min-width: 0; display: grid; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.composer textarea { border: 0; box-shadow: none; background: transparent; min-height: 64px; resize: vertical; padding: .7rem .85rem; }
.composer textarea:focus { box-shadow: none; outline: none; }
.composer-bar { display: flex; align-items: center; gap: .3rem; padding: .3rem .45rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.composer-btn { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .6rem; border-radius: 9px; color: var(--muted);
  cursor: pointer; font-size: .82rem; font-weight: 600; list-style: none; }
.composer-btn::-webkit-details-marker { display: none; }
.composer-btn:hover, .composer-quick[open] > .composer-btn { background: #f1f2f7; color: var(--ink); }
.composer-hint { margin-left: auto; }
.composer-preview { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem 0; font-size: .8rem; color: var(--muted); }
.composer-preview[hidden] { display: none; }
.composer-preview img { height: 48px; border-radius: 8px; border: 1px solid var(--line); }
.composer-preview button { border: 0; background: #0f172a; color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }
.composer-quick { position: relative; }
.composer-quick-list { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; width: min(420px, 80vw); max-height: 320px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .35rem; display: grid; gap: 2px; }
.qr-row { display: flex; gap: .2rem; }
.qr-use { flex: 1; text-align: left; border: 0; background: none; padding: .5rem .6rem; border-radius: 8px; font: .84rem var(--font-body); color: var(--ink); cursor: pointer; }
.qr-use:hover { background: var(--brand-soft); }
.qr-del { border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; width: 26px; }
.qr-del:hover { background: #fee2e2; color: var(--high); }
.qr-save { border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: .55rem .6rem; color: var(--brand); font: 600 .82rem var(--font-body); cursor: pointer; }
.chat-reply-buttons { justify-content: flex-end; }

/* ---------- referrals ---------- */
.ref-hero { display: grid; gap: .7rem; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.ref-link { display: flex; gap: .5rem; }
.ref-link input { flex: 1; min-width: 0; font: 600 .95rem ui-monospace, Consolas, monospace; }
.ref-share { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ref-steps { display: grid; gap: .5rem; padding-left: 1.2rem; }

/* ---------- small screens: animated drop-down menu with centred buttons ---------- */
.nav-cta { display: none !important; }
@media (max-width: 1080px) {
  .topbar:not(.nav-open) nav#main-nav, .topbar nav#main-nav { display: flex; }
  .topbar nav#main-nav { flex-direction: column; align-items: stretch; gap: .4rem; max-height: 0; opacity: 0; overflow: hidden;
    padding: 0; margin: 0; border-top: 0; transform: translateY(-6px);
    transition: max-height .32s ease, opacity .22s ease, transform .22s ease, padding .22s ease, margin .22s ease; }
  .topbar.nav-open nav#main-nav { max-height: 460px; opacity: 1; transform: none; padding: .7rem 0 .5rem; margin-top: .3rem;
    border-top: 1px solid var(--line); }
  .topbar nav#main-nav a { justify-content: center; text-align: center; padding: .8rem 1rem; border-radius: 14px; font-size: 1rem;
    font-weight: 600; background: #f6f7fb; color: var(--ink); border: 1px solid var(--line);
    transition: background .15s, transform .15s, border-color .15s; }
  .topbar nav#main-nav a:active { transform: scale(.98); }
  .topbar nav#main-nav a.active { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
  .topbar nav#main-nav a i { display: inline; }
  .topbar nav#main-nav .nav-cta { display: flex !important; background: var(--grad); color: #fff; border: 0;
    box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .7); }
  .topbar.nav-open nav#main-nav a { animation: menu-in .3s ease both; }
  .topbar.nav-open nav#main-nav a:nth-child(2) { animation-delay: .03s; }
  .topbar.nav-open nav#main-nav a:nth-child(3) { animation-delay: .06s; }
  .topbar.nav-open nav#main-nav a:nth-child(4) { animation-delay: .09s; }
  .topbar.nav-open nav#main-nav a:nth-child(5) { animation-delay: .12s; }
  .nav-toggle i { transition: transform .25s ease; }
  .topbar.nav-open .nav-toggle i { transform: rotate(90deg); }
  .announce { font-size: .78rem; padding: .45rem .8rem; line-height: 1.35; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .topbar nav#main-nav, .topbar.nav-open nav#main-nav a, .nav-toggle i { transition: none; animation: none; }
}
.docs-main > *, .docs-sec, .code-tabs { min-width: 0; max-width: 100%; }
.docs-params { display: block; overflow-x: auto; }
@media (max-width: 640px) { .docs pre { font-size: .76rem; } .docs .page-head .btn { width: 100%; justify-content: center; } }

/* chat window fixes: one full-width optional email box; Chat / Tickets tabs side by side */
.chat-who { grid-template-columns: minmax(0, 1fr); }
.chat-who input { width: 100%; text-align: center; }
.chat-head .chat-tabs { display: flex; flex: none; }
.chat-head .chat-tabs .chat-tab { flex: 1; text-align: center; }

/* ---------- admin chat: auto-reply panel ---------- */
.auto-panel { margin-bottom: 1rem; }
.auto-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.auto-panel > summary::-webkit-details-marker { display: none; }
.auto-panel > summary h2 { margin: 0; }
.auto-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.auto-box { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: grid; gap: .6rem; align-content: start; margin-top: 1rem; }
.auto-grid .auto-box { margin-top: 0; }
.auto-box h3 { margin: 0; font-size: 1rem; }
.auto-answer { white-space: pre-wrap; background: #f8f9fc; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; font-size: .88rem; }
.kb-list { display: grid; gap: .35rem; }
.kb-item { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
.kb-item summary { cursor: pointer; display: flex; gap: .5rem; flex-wrap: wrap; }
.kb-item form, .kb-new { display: grid; gap: .45rem; margin-top: .5rem; }
.rule-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 10px; }
.rule-row.off { opacity: .55; }
.rule-row form { display: flex; gap: .3rem; margin: 0; }
.rule-keys code { background: var(--brand-soft); color: var(--brand); padding: .05rem .4rem; border-radius: 6px; font-size: .78rem; }
@media (max-width: 900px) { .auto-grid, .rule-row { grid-template-columns: minmax(0, 1fr); } }
.load-more-wrap { display: flex; justify-content: center; margin-top: .9rem; }
.load-more { min-width: 220px; justify-content: center; border-radius: 999px; }
tr[hidden] { display: none; }
.ticket-stack { display: grid; gap: 1rem; } .ticket-stack > [hidden] { display: none; }

/* ---------- error log ---------- */
.err-list { display: grid; gap: .5rem; }
.err-row { border: 1px solid var(--line); border-left: 4px solid #f59e0b; border-radius: 12px; background: #fff; }
.err-row.error, .err-row.critical { border-left-color: var(--high); }
.err-row.resolved { opacity: .6; }
.err-row > summary { list-style: none; cursor: pointer; display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .9rem; }
.err-row > summary::-webkit-details-marker { display: none; }
.err-level { font: 700 .68rem var(--font-body); padding: .15rem .5rem; border-radius: 6px; background: #fef3c7; color: #92400e; flex: none; margin-top: .15rem; }
.err-row.error .err-level, .err-row.critical .err-level { background: #fee2e2; color: #b91c1c; }
.err-main { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.err-main b { overflow-wrap: anywhere; font-size: .9rem; }
.err-main small { color: var(--muted); font-size: .78rem; }
.err-body { padding: 0 .9rem .9rem; display: grid; gap: .5rem; }
.err-body pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .8rem; overflow-x: auto; font-size: .76rem; max-height: 360px; margin: 0; }
.stat-value.bad-num { color: var(--high); }
.err-list > [hidden] { display: none; }

/* announcement bar: always centred (desktop and phone) */
.announce { display: flex; justify-content: center; align-items: center; text-align: center; width: 100%; }
.announce > a, .announce > span { display: inline-block; max-width: 1100px; margin: 0 auto; text-align: center; }
body.with-sidebar.sb-open .announce { padding-left: 1rem; }

/* ===== growth tools: newsletter, switchers, blog, deals, spin, inbox, visitors ===== */
.footer-news { max-width: 1200px; margin: 0 auto; padding: 1.2rem 1.5rem; display: flex; gap: 1.5rem; align-items: center;
  justify-content: space-between; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); }
.news-form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; flex: 1 1 420px; }
.news-form label { display: flex; flex-direction: column; gap: .1rem; }
.news-form label small { opacity: .7; font-size: .8rem; }
.news-row { display: flex; gap: .5rem; flex: 1 1 260px; max-width: 420px; }
.news-row input { flex: 1; min-width: 0; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--line); font: inherit; }
.footer-switch { display: flex; gap: .6rem; flex-wrap: wrap; }
.switch-sel { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2); }
.switch-sel select { background: transparent; color: inherit; border: 0; font: inherit; cursor: pointer; }
.switch-sel select option { color: #0f172a; }
.goog-te-banner-frame, .skiptranslate iframe, #goog-gt-tt { display: none !important; }
body { top: 0 !important; }
.local-price { color: var(--muted); font-size: .85rem; margin-top: -.2rem; }
.deal-tag { display: inline-flex; gap: .4rem; align-items: center; margin-top: .4rem; padding: .3rem .7rem; border-radius: 999px;
  background: #fff7ed; color: #c2410c; font-size: .85rem; font-weight: 600; }
.deal-card { max-width: 560px; margin: 2rem auto; text-align: center; padding: 2.2rem 1.5rem; }
.deal-price { font-size: 1.1rem; margin: .6rem 0; }
.deal-price b { font-size: 2.4rem; color: var(--brand); margin: 0 .3rem; }
.deal-ends { color: #c2410c; font-weight: 600; }
.copy-input { width: 100%; min-width: 220px; font-size: .78rem; padding: .25rem .4rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); margin-top: .25rem; }
.sub-details { margin-top: 1rem; }
.sub-details > summary { list-style: none; display: inline-flex; cursor: pointer; }
.sub-details > summary::-webkit-details-marker { display: none; }
.sub-details[open] > summary { margin-bottom: .8rem; }
.inline-h { display: inline; font-size: 1.15rem; }
#invoice-details summary { cursor: pointer; }
.ai-box { background: var(--brand-soft); border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; }
.ai-box .field { margin-bottom: .5rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip-list .chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .3rem .75rem; cursor: pointer;
  font: inherit; font-size: .85rem; text-align: left; }
.chip-list .chip:hover { border-color: var(--brand); color: var(--brand); }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.page-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.backup-card { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.backup-card p { margin: .2rem 0 0; }
.stat-value.small-val { font-size: 1.2rem; }
/* blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.blog-card { display: flex; flex-direction: column; gap: .4rem; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.1); }
.blog-card h2, .blog-card h3 { margin: .2rem 0; font-size: 1.15rem; line-height: 1.35; }
.blog-more { color: var(--brand); font-weight: 600; margin-top: auto; }
.blog-article { max-width: 820px; margin: 1rem auto; }
.blog-article h1 { margin: .6rem 0 .2rem; line-height: 1.25; }
.blog-cta { margin-top: 2rem; padding: 1.2rem; border-radius: 14px; background: var(--brand-soft); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.blog-cta b, .blog-cta p { flex-basis: 100%; margin: 0; }
/* spin the wheel */
.spin-card { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 2rem; align-items: center; }
.wheel-wrap { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; }
.wheel { width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.17,.67,.12,1); filter: drop-shadow(0 10px 25px rgba(79,70,229,.3)); }
.wheel-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid #0f172a; }
.spin-left { font-size: 1.1rem; }
.spin-result { font-weight: 600; min-height: 1.5em; margin-top: 1rem; }
.spin-history { padding-left: 1.1rem; }
@media (max-width: 760px) { .spin-card { grid-template-columns: 1fr; } }
/* inbox */
.inbox-row { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; }
.inbox-row > summary { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; cursor: pointer; list-style: none; }
.inbox-row.new { border-color: #fca5a5; }
.inbox-body { padding: 0 .9rem .9rem; }
.mail-text { white-space: pre-wrap; word-break: break-word; background: var(--bg); padding: .8rem; border-radius: 10px; font: inherit; font-size: .9rem; max-height: 320px; overflow: auto; }
.mail-text.reply { background: var(--brand-soft); }
/* dialogs */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(15,23,42,.35); }
dialog.modal::backdrop { background: rgba(15,23,42,.45); }
.modal-card { padding: 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.modal-card textarea { width: 100%; font: inherit; padding: .6rem; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 640px) {
  .footer-news { flex-direction: column; align-items: stretch; }
  .news-row { max-width: none; }
}

/* ===== IsolatedStudy vs Turnitin vs DrillBit ===== */
.compare-section { padding-top: 1rem; }
.compare-card { padding: 0; overflow: hidden; max-width: 980px; margin: 0 auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cmp-table th, .cmp-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp-table thead th { background: var(--bg); font-family: "Lexend Deca", sans-serif; font-size: .95rem; white-space: nowrap; }
.cmp-table tbody th { text-align: left; font-weight: 500; }
.cmp-table td { text-align: center; color: var(--muted); }
.cmp-table thead th:not(:first-child) { text-align: center; }
.cmp-table .cmp-us { background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.cmp-table thead .cmp-us { background: var(--brand); color: #fff; }
.cmp-table thead .cmp-us img { vertical-align: middle; border-radius: 6px; background: #fff; margin-right: .3rem; }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover th, .cmp-table tbody tr:hover td:not(.cmp-us) { background: rgba(79,70,229,.03); }
.cmp-yes { color: #16a34a; font-size: 1.15rem; }
.cmp-note { text-align: center; max-width: 760px; margin: .9rem auto 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .cmp-table { font-size: .82rem; }
  .cmp-table th, .cmp-table td { padding: .6rem .5rem; }
  .cmp-table tbody th { min-width: 150px; }
}


/* ===== smoother, livelier UI ===== */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--brand); color: #fff; }
a, .btn, .card, input, select, textarea { transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s; }
.btn { will-change: transform; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease; pointer-events: none; }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:hover { box-shadow: 0 10px 24px rgba(79,70,229,.32); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 4px var(--brand-soft); outline: none; }
.section .card:hover, .info-section .card:hover, .plan:hover { box-shadow: 0 18px 40px rgba(15,23,42,.09); }
.plan { transition: transform .25s, box-shadow .25s; }
.plan:hover { transform: translateY(-4px); }
/* reveal on scroll (only when JS is on, so nothing is ever hidden without it) */
html.js-rv .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
html.js-rv .rv.in { opacity: 1; transform: none; }
/* page enter */
main { animation: page-in .45s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* scroll progress bar */
.scroll-bar { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: var(--grad, linear-gradient(90deg, #4f46e5, #7c3aed)); z-index: 2000; pointer-events: none; }
/* header gets a shadow once you scroll */
.topbar { transition: box-shadow .25s, background-color .25s; }
body.scrolled .topbar { box-shadow: 0 6px 24px rgba(15,23,42,.08); }
/* back to top */
.to-top { position: fixed; left: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); box-shadow: 0 8px 20px rgba(15,23,42,.12); cursor: pointer; z-index: 900;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--brand); border-color: var(--brand); }
/* nicer scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c7cbe0 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7cbe0; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
/* tables: soft row hover */
.table-wrap tbody tr { transition: background-color .15s; }
.table-wrap tbody tr:hover { background: rgba(79,70,229,.035); }
/* toasts slide in */
.toast { animation: toast-in .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-rv .rv { opacity: 1; transform: none; transition: none; }
  main, .toast { animation: none; }
  .btn:hover, .plan:hover { transform: none; }
  .btn.primary::after { display: none; }
}

/* comparison: normal-case labels, fits phones */
.cmp-table th { text-transform: none; letter-spacing: 0; }
.cmp-table tbody th { color: var(--ink); font-size: .93rem; font-weight: 500; }
.cmp-table thead th { font-size: .95rem; color: var(--ink); }
.compare-section, .compare-card { max-width: 100%; min-width: 0; }
.compare-card .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .cmp-table { table-layout: fixed; min-width: 0; }
  .cmp-table thead th:first-child, .cmp-table tbody th { width: 38%; min-width: 0; }
  .cmp-table th, .cmp-table td { padding: .55rem .35rem; font-size: .76rem; overflow-wrap: anywhere; }
  .cmp-table tbody th { font-size: .8rem; }
  .cmp-table thead th { white-space: normal; font-size: .78rem; }
  .cmp-table thead .cmp-us img { display: none; }
  .cmp-yes { font-size: 1rem; }
}
@media (max-width: 640px) {
  .cmp-table th, .cmp-table td { overflow-wrap: normal; word-break: normal; hyphens: auto; }
  .cmp-table thead th:first-child, .cmp-table tbody th { width: 34%; }
  .cmp-table td { font-size: .72rem; padding: .55rem .25rem; }
}


/* ===== report add-ons ===== */
.plus-card h2 { font-size: 1.05rem; display: flex; gap: .5rem; align-items: center; }
.wq-grid, .wc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; margin: .6rem 0; }
.wq-tile { background: var(--bg); border-radius: 12px; padding: .7rem .6rem; text-align: center; display: flex; flex-direction: column; gap: .2rem; }
.wq-num { font-family: "Lexend Deca", sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.wq-link { text-decoration: none; }
.wq-tile small { color: var(--muted); font-size: .76rem; line-height: 1.3; }
.wq-tips { margin: .4rem 0; padding-left: 1.1rem; font-size: .9rem; }
.ref-tags { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin-left: .3rem; }
.ref-issues ol { margin-top: .6rem; }
.ref-issues li { margin-bottom: .5rem; }
.tag.warn, .warn-text { color: #b45309; }
.tag.warn { background: #fffbeb; }
.bad-text { color: #dc2626; }
.ok-text { color: #16a34a; }
.rw-chip { position: absolute; z-index: 1200; border: 0; border-radius: 999px; padding: .45rem .85rem; font: inherit; font-size: .85rem;
  font-weight: 600; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 10px 24px rgba(79,70,229,.35);
  cursor: pointer; animation: toast-in .2s ease both; }
.rw-passage { margin: .5rem 0; padding: .6rem .8rem; border-left: 3px solid var(--brand); background: var(--bg); border-radius: 0 10px 10px 0; font-size: .9rem; }
.rw-box { background: var(--brand-soft); border-radius: 12px; padding: .7rem .9rem; margin: .5rem 0; }
.rw-box p { margin: .3rem 0 .4rem; }
#rewrite-help.busy { opacity: .7; }
#rewrite-help.busy h2::after { content: ""; width: 14px; height: 14px; border: 2px solid var(--brand); border-right-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite; margin-left: .4rem; }
@keyframes spin { to { transform: rotate(360deg); } }
/* before / after */
.vs-hero { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; text-align: center; padding: 1.6rem; }
.vs-col { display: flex; flex-direction: column; gap: .2rem; }
.vs-score { font-family: "Lexend Deca", sans-serif; font-size: 2.6rem; font-weight: 700; }
.vs-arrow { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: 1.6rem; color: var(--muted); }
.vs-arrow b { font-size: 1rem; } .vs-arrow small { font-size: .78rem; }
.vs-arrow.down { color: #16a34a; } .vs-arrow.up { color: #dc2626; }
/* free tools */
.tool-nav { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 0 auto 1.2rem; max-width: 1000px; }
.tool-nav a { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; font-size: .88rem; }
.tool-nav a.active, .tool-nav a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; max-width: 1100px; margin: 0 auto 2rem; }
.tool-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .3rem; }
.tool-card > i { font-size: 1.6rem; color: var(--brand); }
.tool-card h2 { font-size: 1.1rem; margin: .3rem 0 0; }
.tool-card.highlight { background: linear-gradient(135deg, var(--brand-soft), #fff); border-color: var(--brand); }
.tool-box { max-width: 900px; margin: 0 auto 2rem; }
.tool-box textarea, .sample-box textarea, .sample-band-form textarea { width: 100%; padding: .8rem; border-radius: 12px; border: 1px solid var(--line);
  font: inherit; resize: vertical; margin-bottom: .7rem; background: var(--card); }
.cite-results { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.cite-row { display: grid; grid-template-columns: 80px 1fr auto; gap: .6rem; align-items: center; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; }
.cite-text { white-space: normal; word-break: break-word; font-size: .85rem; }
.ai-meter { height: 14px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 1rem 0 .4rem; }
.ai-meter span { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444); }
.big-num { font-size: 2rem; font-weight: 700; margin: .2rem 0; } .big-num small { font-size: 1rem; font-weight: 400; color: var(--muted); }
@media (max-width: 640px) { .cite-row { grid-template-columns: 1fr; } }
/* free sample */
.sample-band { padding: 1.5rem 1rem; }
.sample-band-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; align-items: center;
  background: linear-gradient(135deg, var(--brand-soft), var(--card)); }
.sample-band-text h2 { margin: .5rem 0 .3rem; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.sample-band-form { display: flex; flex-direction: column; align-items: flex-end; }
.sample-band-form textarea { margin-bottom: .5rem; }
@media (max-width: 820px) { .sample-band-inner { grid-template-columns: 1fr; } .sample-band-form { align-items: stretch; } }
.sample-box, .sample-wait, .sample-result { max-width: 900px; margin: 0 auto 1.5rem; }
.sample-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sample-wait { text-align: center; padding: 2.5rem 1rem; }
.sample-wait .spinner { margin: 0 auto 1rem; }
.sample-score { display: flex; gap: 1.5rem; align-items: center; }
.score-ring { --p: 0; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--ring, #4f46e5) calc(var(--p) * 1%), #e2e8f0 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.score-ring b { position: relative; font-size: 1.6rem; font-family: "Lexend Deca", sans-serif; }
.score-ring.low { --ring: #16a34a; } .score-ring.mid { --ring: #f59e0b; } .score-ring.high { --ring: #dc2626; }
.sample-doc { line-height: 1.8; max-height: 420px; overflow: auto; }
.blur-sources { padding-left: 1.2rem; }
.blur-sources li { display: flex; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.blurred { filter: blur(5px); user-select: none; flex: 1; min-width: 140px; }
.src-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: currentColor; }
.unlock { margin-top: 1rem; padding: 1rem; border-radius: 14px; background: var(--brand-soft); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.unlock p { flex-basis: 100%; margin: 0 0 .3rem; }
.center { text-align: center; }
@media (max-width: 560px) { .sample-score { flex-direction: column; text-align: center; } }
/* landing pages */
.landing-body { max-width: 900px; margin: 0 auto 1rem; display: grid; gap: 1rem; }
.landing-sec h2 { font-size: 1.2rem; margin-top: 0; }
.hero-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.lp-row { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .5rem; }
.lp-row summary { cursor: pointer; }
.lp-row.off { opacity: .6; }
.chip-list a.chip { text-decoration: none; color: inherit; }
/* integrations */
.int-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.int-card h2 { display: flex; gap: .5rem; align-items: center; }
.int-list { display: flex; flex-direction: column; gap: .4rem; }
.int-row { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; flex-wrap: wrap; }
.int-row b { flex: 1; min-width: 160px; }
a.int-row:hover { border-color: var(--brand); background: var(--brand-soft); }
/* marketing / affiliates */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .8rem; }
.chip-row .chip { display: inline-flex; gap: .35rem; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; font-size: .85rem; }
.wa-queue { display: flex; flex-direction: column; gap: .4rem; }
.wa-row { display: flex; gap: .8rem; justify-content: space-between; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.wa-row.done { opacity: .45; }
.tiny-input { width: 80px; padding: .25rem .4rem; border-radius: 6px; border: 1px solid var(--line); font: inherit; font-size: .8rem; }
.google-btn { width: 100%; justify-content: center; gap: .6rem; background: #fff; border: 1px solid #dadce0; color: #1f1f1f; font-weight: 600; margin-bottom: .8rem; }
.google-btn:hover { background: #f8f9fa; }
.fraud-box { border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0; font-size: .88rem; }
.fraud-box ul { margin: .3rem 0; padding-left: 1.1rem; }
.fraud-box.risk-low { background: #f0fdf4; color: #166534; }
.fraud-box.risk-mid { background: #fffbeb; color: #92400e; }
.fraud-box.risk-high { background: #fef2f2; color: #991b1b; }
/* exit pop-up + push ask */
.exit-card { text-align: center; align-items: center; position: relative; padding: 2rem 1.5rem 1.4rem; }
.exit-x { position: absolute; top: .4rem; right: .6rem; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.exit-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 12px 30px rgba(239,68,68,.35); animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
.exit-card h3 { margin: .5rem 0 0; font-size: 1.4rem; }
.exit-code { display: inline-flex; gap: .4rem; align-items: center; padding: .4rem .5rem .4rem .9rem; border: 2px dashed var(--brand); border-radius: 12px; }
.exit-code code { font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.exit-modal[open] { animation: toast-in .3s ease both; }
.push-ask { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 950; display: flex; gap: .7rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .7rem .9rem; box-shadow: 0 18px 40px rgba(15,23,42,.18);
  width: min(560px, calc(100vw - 32px)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.push-ask.show { transform: translate(-50%, 0); }
.push-ask > i { font-size: 1.3rem; color: var(--brand); }
.push-ask span { flex: 1; display: flex; flex-direction: column; } .push-ask small { color: var(--muted); font-size: .8rem; }
@media (max-width: 560px) { .push-ask { flex-wrap: wrap; } .push-ask span { flex-basis: calc(100% - 2rem); } }
/* status page */
.status-card { max-width: 900px; margin: 0 auto 1rem; }
.st-row { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.st-row:last-of-type { border-bottom: 0; }
.st-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.st-head b { flex: 0 0 auto; } .st-pct { margin-left: auto; font-weight: 600; }
.st-dot { width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px rgba(148,163,184,.2); }
.st-dot.ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.st-dot.bad { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.18); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); } }
.st-bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 30px; }
.st-bars i { border-radius: 2px; background: #e2e8f0; }
.st-bars i.ok { background: #22c55e; } .st-bars i.mid { background: #f59e0b; } .st-bars i.bad { background: #ef4444; }
.st-legend { display: flex; justify-content: space-between; margin-top: .4rem; }
.status-card, .sample-box, .sample-wait, .sample-result, .tool-box, .landing-body { width: 100%; box-sizing: border-box; }


/* =====================================================================================================
   Design layer v2 – one polished look for every page (public + app), plus phone / browser compatibility
   ===================================================================================================== */
:root {
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --sh-2: 0 4px 6px -2px rgba(15,23,42,.05), 0 12px 24px -6px rgba(15,23,42,.08);
  --sh-3: 0 24px 48px -12px rgba(15,23,42,.18);
  --ring: rgba(79,70,229,.22);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* --- type ---------------------------------------------------------------------------------- */
body { font-size: 15.5px; line-height: 1.6; }
h1 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 1.2; }
p { overflow-wrap: break-word; }
a { text-underline-offset: 3px; }
code { overflow-wrap: anywhere; }
td code, .table-wrap code { white-space: nowrap; overflow-wrap: normal; }

/* --- page header: icon chip + softer subtitle ------------------------------------------------ */
.page-head { align-items: center; padding-bottom: .2rem; }
.page-head h1 { display: flex; align-items: center; gap: .7rem; }
.page-head h1 > i:first-child { width: 44px; height: 44px; flex: none; border-radius: 13px; display: inline-grid; place-items: center;
  font-size: 1.15rem; color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(79,70,229,.08); }
.page-head > div > p.muted { max-width: 760px; font-size: .95rem; }
.page-head > .actions, .page-head > div.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --- cards: crisper edges, icon chips on headings -------------------------------------------- */
.card { border-radius: var(--r-lg); box-shadow: var(--sh-1); border-color: #e8eaf2; }
.container > .card:hover, .container > section.card:hover { box-shadow: var(--sh-2); }
.card > h2, .card-head > h2 { display: flex; align-items: center; gap: .55rem; }
.card > h2 > i:first-child, .card-head > h2 > i:first-child {
  width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-grid; place-items: center; font-size: .9rem;
  color: var(--brand); background: var(--brand-soft); }

/* --- stat tiles: gradient accent instead of the clipped circle ------------------------------- */
.stat { border-radius: var(--r-md); transition: transform .2s, box-shadow .2s; }
.stat::after { right: auto; top: 0; left: 0; width: 100%; height: 3px; border-radius: 0; opacity: .9; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat-value { font-variant-numeric: tabular-nums; line-height: 1.15; margin-bottom: .2rem; }
.stats { gap: .9rem; }

/* --- buttons ----------------------------------------------------------------------------------- */
.btn { border-radius: 11px; font-weight: 600; min-height: 38px; gap: .45rem; }
.btn.small { min-height: 32px; border-radius: 9px; }
.btn.big { min-height: 48px; border-radius: 13px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* --- forms: consistent fields, custom select arrow, nicer checks ----------------------------- */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"],
input[type="url"], input[type="date"], input:not([type]), select, textarea {
  border-radius: var(--r-sm); border: 1px solid #dfe3ec; background-color: #fff; transition: border-color .15s, box-shadow .15s; }
input:hover:not(:focus):not([disabled]), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #c7cde0; }
input::placeholder, textarea::placeholder { color: #9aa3b5; }
select { -webkit-appearance: none; appearance: none; padding-right: 2.1rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 12px; }
.switch-sel select { background-image: none; padding-right: .2rem !important; border: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; }
input[disabled], select[disabled], textarea[disabled] { background-color: #f4f5f9; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-md); }

/* --- tables: rounded frame, calmer header, no awkward wraps --------------------------------- */
.table-wrap { border: 1px solid #edf0f6; border-radius: var(--r-md); background: #fff;
  background-image: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)), linear-gradient(to left, #fff 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(15,23,42,.08), rgba(15,23,42,0)), linear-gradient(to left, rgba(15,23,42,.08), rgba(15,23,42,0));
  background-position: left center, right center, left center, right center; background-repeat: no-repeat;
  background-size: 30px 100%, 30px 100%, 12px 100%, 12px 100%; background-attachment: local, local, scroll, scroll; }
.table-wrap table { margin: 0; }
th { background: #f8f9fc; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
td { font-size: .92rem; }

/* --- tags, pills, notices --------------------------------------------------------------------- */
.tag { border-radius: 999px; font-weight: 600; }
.notice { border-radius: var(--r-md); border: 1px solid rgba(79,70,229,.15); padding: .8rem 1rem; display: block; }
.notice.bad, .notice.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.notice.ok { border-color: #bbf7d0; }

/* --- toasts: below the header, never over the account menu ----------------------------------- */
.toasts { top: auto; bottom: calc(1.2rem + var(--safe-b)); right: auto; left: 50%; transform: translateX(-50%); z-index: 1300;
  width: min(460px, calc(100vw - 32px)); }
.toast { display: flex; gap: .6rem; align-items: center; border-radius: 14px; padding: .85rem 1.1rem; max-width: none;
  background: #0f172a; box-shadow: var(--sh-3); font-weight: 500; }
.toast::before { content: "\f05a"; font: var(--fa-font-solid, 900 1em "Font Awesome 6 Free"); color: #a5b4fc; }

/* --- empty states ------------------------------------------------------------------------------ */
.empty-state { text-align: center; padding: 2.2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.empty-state .es-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem;
  color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), #fff); box-shadow: inset 0 0 0 1px rgba(79,70,229,.12); }
.empty-state b { font-size: 1.05rem; font-family: var(--font-head); }
.empty-state p { margin: 0 0 .4rem; max-width: 420px; }
.empty-state.small { padding: 1.2rem; }
.empty-state.small .es-ico { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 14px; }

/* --- app top bar: page title + quick action ----------------------------------------------- */
.tb-title { font: 700 1rem var(--font-head); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1 1 auto; letter-spacing: -.01em; }
body.with-sidebar .topbar { -webkit-backdrop-filter: saturate(1.6) blur(10px); backdrop-filter: saturate(1.6) blur(10px);
  background: rgba(255,255,255,.82); }
.tb-new { white-space: nowrap; }

/* --- compact footer on app pages --------------------------------------------------------------- */
.footer.footer-app { margin-top: 1.5rem; background: transparent; }
.footer.footer-app .footer-bottom { border-top: 0; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; }
.footer-mini { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.footer-mini a { color: var(--muted); font-size: .85rem; }

/* --- footer newsletter + switchers on the light footer ------------------------------------------ */
.footer-news { border-top: 1px solid var(--line); }
.news-form label b { color: var(--ink); }
.switch-sel { border-color: var(--line); background: #fff; color: var(--ink); }
.switch-sel:hover { border-color: var(--brand); }

/* --- sidebar polish ----------------------------------------------------------------------------- */
.sb-nav a { border-radius: 11px; transition: background-color .15s, color .15s, transform .15s; }
.sb-nav a:hover { transform: translateX(2px); }

/* --- section rhythm on public pages -------------------------------------------------------------- */
.section-head .eyebrow, .info-hero .eyebrow { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.info-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); letter-spacing: -.035em; }
.cta { border-radius: var(--r-lg); }

/* --- dialogs: fallback when <dialog> is not supported (older Safari) ---------------------------- */
dialog:not([open]) { display: none; }
dialog.modal[open] { display: block; }

/* --- older browsers: no color-mix() / :focus-visible ---------------------------------------------- */
@supports not (outline-color: color-mix(in srgb, red 50%, blue)) {
  :focus-visible { outline: 3px solid var(--ring); }
}

/* --- phones and tablets -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .stats.four, .stats.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { align-items: flex-start; }
  .tb-new span { display: none; }
  .tb-new { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { margin: 1.1rem auto; padding: 0 1rem; gap: 1rem; }
  .card { padding: 1.15rem; border-radius: var(--r-md); }
  .page-head h1 > i:first-child { width: 38px; height: 38px; border-radius: 11px; font-size: 1rem; }
  .stat { padding: 1rem; } .stat-value { font-size: 1.55rem; }
  .form-row { grid-template-columns: 1fr !important; }
  .btn { min-height: 42px; } .btn.small { min-height: 36px; }
  /* 16px stops iPhone from zooming into a field */
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"],
  input[type="url"], input[type="date"], input:not([type]), select, textarea { font-size: 16px; }
  .announce { font-size: .78rem; padding: .4rem .8rem; }
  .tb-title { font-size: .92rem; }
  .pay-admin-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: .3rem; }
  .pay-admin-nav::-webkit-scrollbar { display: none; }
  .pay-admin-nav a { flex: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 380px) { .stats.four, .stats.five, .stats { grid-template-columns: 1fr; } }
/* fixed buttons clear the iPhone home bar */
.chat-widget, .to-top { margin-bottom: var(--safe-b); }
.push-ask { bottom: calc(18px + var(--safe-b)); }
/* touch screens: no hover-lift jumps */
@media (hover: none) {
  .btn:hover, .plan:hover, .stat:hover, .blog-card:hover, .sb-nav a:hover { transform: none; }
}
@media print {
  .toasts, .push-ask, .to-top, .scroll-bar, .rw-chip, .tb-new, .exit-modal { display: none !important; }
  .card { box-shadow: none; }
}

@media (max-width: 640px) {
  body.with-sidebar .topbar .brand-text { display: none; }
  body.with-sidebar .topbar { gap: .5rem; padding-left: .8rem; padding-right: .8rem; }
  .plan-pill { font-size: 0 !important; gap: 0 !important; padding: .45rem .55rem !important; }
  .plan-pill i { font-size: .95rem; }
  .toasts { bottom: calc(92px + var(--safe-b)); }
}

.sample-band-row { display: flex; gap: .5rem; width: 100%; flex-wrap: wrap; justify-content: flex-end; margin-bottom: .4rem; }
.sample-band-row input { flex: 1 1 220px; padding: .6rem .8rem; }
.sample-tabs { display: flex; gap: .4rem; margin: .4rem 0 .7rem; }
.sample-drop { display: flex; gap: .9rem; align-items: center; padding: 1.4rem; border: 2px dashed #d5daea; border-radius: 14px; cursor: pointer;
  margin-bottom: .7rem; background: var(--bg); transition: border-color .15s, background-color .15s; }
.sample-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.sample-drop > i { font-size: 1.8rem; color: var(--brand); }
.sample-drop span { display: flex; flex-direction: column; } .sample-drop small { color: var(--muted); }
.sample-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sample-blocked { max-width: 760px; margin: 0 auto 1.5rem; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.sample-blocked .es-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; color: #b45309; background: #fffbeb; }
.sample-blocked .unlock { justify-content: center; width: 100%; }

/* currency picker above the price list */
.cur-switch { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 0 auto 1rem; }
.cur-pills { display: inline-flex; gap: .3rem; padding: .25rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--sh-1, 0 1px 3px rgba(15,23,42,.06)); align-items: center; }
.cur-pill { border: 0; background: transparent; padding: .38rem .8rem; border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.cur-pill b { color: inherit; margin-right: .1rem; }
.cur-pill:hover { color: var(--ink); background: var(--bg); }
.cur-pill.on { color: #fff; background: var(--grad, linear-gradient(135deg, #4f46e5, #7c3aed)); box-shadow: 0 6px 14px rgba(79,70,229,.28); }
.cur-more { border: 0 !important; background-color: transparent !important; font-size: .84rem !important; color: var(--muted); padding: .3rem 1.8rem .3rem .5rem !important;
  min-height: 0; cursor: pointer; }

/* official brand logos */
.brand-logos { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.brand-logos .bl { height: 30px; min-width: 46px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid #e6e8f0;
  display: inline-grid; place-items: center; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.brand-logos .bl img { height: 18px; width: auto; max-width: 64px; display: block; }
.brand-logos .bl-paypal img { height: 16px; }
.brand-logos .bl-bitcoin img, .brand-logos .bl-tether img { height: 20px; }
.brand-logos .bl-visa i { font-size: 1.55rem; color: #1a1f71; line-height: 1; }
.brand-logos.big .bl { height: 40px; min-width: 58px; padding: 6px 10px; }
.brand-logos.big .bl img { height: 24px; max-width: 84px; } .brand-logos.big .bl-visa i { font-size: 2rem; }
.brand-logos.small { display: flex; margin-top: .35rem; gap: .3rem; }
.brand-logos.small .bl { height: 24px; min-width: 38px; padding: 3px 6px; border-radius: 6px; }
.brand-logos.small .bl img { height: 14px; } .brand-logos.small .bl-visa i { font-size: 1.25rem; }
.info-card .brand-logos { margin-bottom: .6rem; }
.pay-strip .brand-logos { gap: .35rem; }
.pay-ico.logo-ico { background: #fff !important; border: 1px solid #e6e8f0; }
.pay-ico.logo-ico img { width: 30px; height: auto; }
.cmp-logo { height: 22px; width: auto; max-width: 120px; display: inline-block; vertical-align: middle; }
.cmp-table thead th img.cmp-logo[alt="DrillBit"] { height: 26px; }
@media (max-width: 640px) { .cmp-logo { max-width: 70px; height: auto; } }

/* busy buttons (links too) */
.btn.is-busy, a.btn.is-busy, button.is-busy { cursor: progress; opacity: .85; pointer-events: none; }
button[aria-busy="true"] .fa-spinner, a[aria-busy="true"] .fa-spinner { margin-right: .15rem; }
