/* =====================================================================
   Writing platform: public website + client account
   Visual idea: a student's exercise book. Ruled paper, red margin,
   ink-navy text and one highlighter yellow for the thing that matters
   most on each screen (the price, the next action).
   ===================================================================== */

:root {
  --ink: #16213E;          /* text, footer */
  --ink-soft: #4A5875;     /* secondary text */
  --paper: #F6F8FC;        /* page background */
  --sheet: #FFFFFF;        /* cards / notebook */
  --rule: #D5E1F3;         /* ruled lines, borders */
  --rule-strong: #B9CBE6;
  --margin: #E0505F;       /* red margin line, errors */
  --pen: #2F5BD3;          /* links, primary buttons (Website Settings) */
  --pen-dark: #2347AE;
  --hl: #FFE066;           /* highlighter (Website Settings) */
  --bar: #1D2B64;          /* menu bar (Website Settings) */
  --ok: #23885F;
  --warn: #B7791F;
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --shadow-sheet: 0 1px 0 var(--rule), 0 22px 44px -28px rgba(22, 33, 62, .45);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
a { color: var(--pen); text-underline-offset: 3px; }
a:hover { color: var(--pen-dark); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--hl); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(2.35rem, 4.6vw, 3.9rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The highlighter: a yellow swipe behind text. Re-plays when JS adds .swipe */
.hl {
  background-image: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 90%, transparent 90%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 .12em;
}
.hl.swipe { animation: swipe .45s ease-out; }
@keyframes swipe { from { background-size: 0 100%; } to { background-size: 100% 100%; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 1rem/1 var(--font-body); padding: .95em 1.4em; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--pen); color: #fff; }
.btn-primary:hover { background: var(--pen-dark); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #24345C; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: transparent; border-color: #F2B8BF; color: var(--margin); }
.btn-danger:hover { border-color: var(--margin); color: var(--margin); }
.btn-block { width: 100%; }
.btn-sm { padding: .6em .9em; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--pen); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Header ---------------- */
/* Coloured menu bar (Website Settings > Menu bar colour). White text, highlighter for the current page. */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bar); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px -18px rgba(10, 18, 45, .8); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.brand:hover { color: #fff; }
.brand img { max-height: 44px; width: auto; background: #fff; border-radius: 8px; padding: 3px 8px; }
.nav { display: flex; gap: 6px; margin-right: auto; }
.nav a { color: #E4EAFB; text-decoration: none; font-weight: 700; font-size: .98rem; padding: 8px 12px; border-radius: 8px; position: relative; transition: background .15s, color .15s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a.is-active { color: #fff; }
.nav a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--hl); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .btn { white-space: nowrap; }
.brand { min-width: 0; }
.brand span, .brand { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-total { display: none; }
.header-actions .signin { color: #fff; font-weight: 700; text-decoration: none; padding: 8px 4px; }
.header-actions .signin:hover { color: var(--hl); }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255, 255, 255, .35); border-radius: var(--radius-sm); padding: 8px 10px; font: 700 .9rem var(--font-body); color: #fff; cursor: pointer; }
.btn-hl { background: var(--hl); color: var(--ink); }
.btn-hl:hover { background: #fff; color: var(--ink); }

.promo-bar { background: var(--ink); color: #fff; font-size: .95rem; text-align: center; padding: 8px 16px; }
.promo-bar strong { background: var(--hl); color: var(--ink); padding: 0 .3em; border-radius: 3px; }

/* ---------------- Hero ---------------- */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.hero h1 { max-width: 12em; }
.hero .lead { margin-bottom: 1.6em; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; font-weight: 700; }
.checks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 10px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.pay-with { color: var(--ink-soft); font-size: .95rem; }
.pay-with b { color: var(--ink); }

/* ---------------- The notebook (calculator, order summary) ---------------- */
.notebook {
  position: relative;
  background-color: var(--sheet);
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, var(--rule) 33px 34px);
  background-position: 0 58px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sheet);
  padding: 22px 26px 26px 66px;
}
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: 46px; width: 2px; background: var(--margin); opacity: .75; }
.notebook::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 40px; width: 12px; background: radial-gradient(circle, var(--paper) 5px, transparent 6px) 0 0 / 12px 64px repeat-y; }
.notebook h2, .notebook h3 { font-size: 1.35rem; margin-bottom: 16px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.calc-grid .full { grid-column: 1 / -1; }
.calc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 14px; padding-top: 14px; border-top: 2px solid var(--ink); }
.calc-total .price { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-meta { font-size: .92rem; color: var(--ink-soft); margin-bottom: 16px; }

/* ---------------- Forms ---------------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--ink-soft); }
.field .error { font-size: .88rem; color: var(--margin); font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; font: 1rem/1.4 var(--font-body); color: var(--ink); background: #fff;
  border: 2px solid var(--rule-strong); border-radius: var(--radius-sm); padding: .7em .8em;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px rgba(47, 91, 211, .18); }
.is-invalid { border-color: var(--margin) !important; }
.stepper { display: flex; align-items: stretch; }
.stepper button { width: 44px; border: 2px solid var(--rule-strong); background: #fff; font: 800 1.2rem var(--font-body); color: var(--ink); cursor: pointer; }
.stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; }
.stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.stepper input { border-radius: 0; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.segmented { display: inline-flex; border: 2px solid var(--rule-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented label { padding: .6em 1em; cursor: pointer; font-weight: 700; }
.segmented input { position: absolute; opacity: 0; }
.segmented input:checked + span { background: var(--ink); color: #fff; }
.segmented span { display: block; padding: .55em 1em; margin: -.6em -1em; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; }
.checkbox input { margin-top: .3em; width: 18px; height: 18px; accent-color: var(--pen); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.honeypot { position: absolute; left: -9999px; }

/* ---------------- Alerts ---------------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 18px; font-weight: 700; border-left: 5px solid; background: #fff; }
.alert-ok { border-color: var(--ok); }
.alert-error { border-color: var(--margin); }
.alert-warn { border-color: var(--warn); }
.alert ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }

/* ---------------- Sections ---------------- */
.band { padding: 84px 0; }
.band-white { background: var(--sheet); border-block: 1px solid var(--rule); }
.band-ink { background: var(--ink); color: #DCE4F5; }
.band-ink h2, .band-ink h3 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.band-ink .section-head p { color: #AFC0E0; }

/* How it works: a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 70px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--ink); background: linear-gradient(transparent 55%, var(--hl) 55%); padding: 0 .1em; }
.steps h3 { margin-bottom: 8px; }

/* Margin notes: guarantees written beside a red margin */
.margin-notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.margin-notes li { display: grid; grid-template-columns: 250px 1fr; gap: 0 36px; padding: 22px 0; border-bottom: 1px solid var(--rule-strong); position: relative; }
.margin-notes li::before { content: ""; position: absolute; left: 230px; top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .55; }
.margin-notes h3 { font-size: 1.12rem; margin: 0; }
.margin-notes p { margin: 0; color: var(--ink-soft); }
.band-ink .margin-notes { border-color: #33466F; }
.band-ink .margin-notes li { border-color: #33466F; }
.band-ink .margin-notes p { color: #B9C7E4; }

/* Free extras: a receipt-like list */
.receipt { background: var(--sheet); border-radius: var(--radius-sm); box-shadow: var(--shadow-sheet); padding: 26px 28px; }
.receipt ul { list-style: none; margin: 0; padding: 0; }
.receipt li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--rule-strong); }
.receipt li span:last-child { font-weight: 700; white-space: nowrap; }
.receipt .free { color: var(--ok); }
.receipt .total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; font-weight: 800; }

/* Two column helpers */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split-wide { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }

/* Services list: plain index, not cards */
.index-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 56px; }
.index-list li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.index-list a { display: block; padding: 16px 0; text-decoration: none; color: var(--ink); }
.index-list a strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.index-list a span { color: var(--ink-soft); font-size: .95rem; }
.index-list a:hover strong { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 5px; text-underline-offset: 2px; }

/* Writers: a roster table */
.roster { width: 100%; border-collapse: collapse; background: var(--sheet); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sheet); }
.roster th { text-align: left; font-size: .85rem; color: var(--ink-soft); font-weight: 700; padding: 14px 18px; border-bottom: 2px solid var(--ink); }
.roster td { padding: 16px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.roster tr:last-child td { border-bottom: 0; }
.writer-id { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.stars { color: var(--pen); letter-spacing: 1px; white-space: nowrap; }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule-strong); }
.review { padding: 26px 28px 26px 0; border-bottom: 1px solid var(--rule-strong); }
.review + .review { padding-left: 28px; border-left: 1px solid var(--rule-strong); }
.review:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.review blockquote { margin: 10px 0 14px; font-size: 1.05rem; }
.review footer { font-size: .9rem; color: var(--ink-soft); }
.rating-summary { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.rating-summary .big { font-family: var(--font-display); font-size: 3.2rem; font-weight: 800; line-height: 1; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; font-weight: 400; color: var(--pen); }
.faq details[open] summary::after { content: "\2212"; }
.faq details div { padding: 0 0 18px; color: var(--ink-soft); max-width: 65ch; }
.faq h3 { margin-top: 32px; }

/* Stats strip: only rendered when the numbers are real and meaningful */
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); }
.facts div { font-size: .95rem; color: var(--ink-soft); }
.facts b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }

/* Price table */
.price-table { width: 100%; border-collapse: collapse; background: var(--sheet); box-shadow: var(--shadow-sheet); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 13px 16px; border-bottom: 1px solid var(--rule); text-align: right; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table thead th { border-bottom: 2px solid var(--ink); font-size: .9rem; }
.price-table td a { color: var(--ink); text-decoration: none; display: block; }
.price-table td a:hover { background: var(--hl); }
.table-scroll { overflow-x: auto; }

/* Article / content pages */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.7rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 4px solid var(--hl); color: var(--ink-soft); }
.page-head { padding: 54px 0 34px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.page-head p { color: var(--ink-soft); font-size: 1.12rem; max-width: 42em; margin: 0; }
.crumbs { font-size: .9rem; margin-bottom: 12px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.posts h3 { margin-bottom: 6px; }
.posts h3 a { color: var(--ink); text-decoration: none; }
.posts h3 a:hover { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 5px; }
.meta { font-size: .9rem; color: var(--ink-soft); }
.sidebar-box { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li { padding: 6px 0; }
.sticky { position: sticky; top: 92px; }

/* ---------------- Order form ---------------- */
.order-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: start; padding: 40px 0 80px; }
.order-section { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 22px; }
.order-section h2 { font-size: 1.35rem; display: flex; gap: 12px; align-items: baseline; }
.order-section h2 .n { font-family: var(--font-display); font-weight: 800; color: var(--pen); }
.extras { display: grid; gap: 10px; }
.extra { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; }
.extra:has(input:checked) { border-color: var(--pen); background: #F3F6FE; }
.extra input { margin-top: .25em; width: 18px; height: 18px; accent-color: var(--pen); }
.extra .price-tag { margin-left: auto; font-weight: 800; white-space: nowrap; }
.dropzone { border: 2px dashed var(--rule-strong); border-radius: var(--radius-sm); padding: 22px; text-align: center; background: var(--paper); cursor: pointer; }
.dropzone.is-over { border-color: var(--pen); background: #EEF3FE; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: .92rem; }
.file-list li { padding: 4px 0; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .97rem; }
.summary-line span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- Writer application / contact ---------------- */
.form-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 30px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: #B9C7E4; padding: 64px 0 32px; font-size: .97rem; }
.site-footer a { color: #DCE4F5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 { color: #fff; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-note { margin-top: 44px; padding-top: 22px; border-top: 1px solid #33466F; font-size: .88rem; color: #8FA2C8; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-note p { max-width: 70ch; margin: 0; }

/* ---------------- Chat widget ---------------- */
.chat-launch { position: fixed; right: 20px; bottom: 20px; z-index: 60; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 14px 20px; font: 700 1rem var(--font-body); cursor: pointer; box-shadow: 0 12px 30px -12px rgba(22, 33, 62, .6); }
.chat-launch .icon { display: none; }
.chat-launch .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; margin-right: 8px; }
.chat-panel { position: fixed; right: 20px; bottom: 84px; z-index: 60; width: min(360px, calc(100vw - 32px)); background: var(--sheet); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(22, 33, 62, .55); border: 1px solid var(--rule); display: none; flex-direction: column; max-height: min(560px, calc(100vh - 120px)); }
.chat-panel.is-open { display: flex; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; }
.chat-head strong { font-family: var(--font-display); font-size: 1.1rem; }
.chat-body { padding: 14px 18px; overflow-y: auto; flex: 1; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: .95rem; white-space: pre-wrap; }
.bubble.visitor { margin-left: auto; background: var(--pen); color: #fff; border-bottom-right-radius: 3px; }
.bubble.agent { background: var(--paper); border: 1px solid var(--rule); border-bottom-left-radius: 3px; }
.bubble time { display: block; font-size: .75rem; opacity: .7; }
.chat-form { padding: 12px 14px; border-top: 1px solid var(--rule); display: grid; gap: 8px; }
.chat-form textarea { min-height: 64px; }

/* ---------------- Client account ---------------- */
.account { display: grid; grid-template-columns: 230px 1fr; gap: 36px; padding: 36px 0 80px; align-items: start; }
.account-nav { position: sticky; top: 92px; }
.account-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.account-nav a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 700; }
.account-nav a:hover { background: var(--sheet); }
.account-nav a.is-active { background: var(--sheet); box-shadow: inset 4px 0 0 var(--pen); }
.account-nav .count { background: var(--margin); color: #fff; border-radius: 999px; font-size: .78rem; padding: 1px 8px; }
.account-nav .new-order { margin-top: 18px; justify-content: center; color: #fff; }
.account-nav .new-order:hover { background: var(--pen-dark); }
.account h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 22px; }
.panel h2 { font-size: 1.3rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th { text-align: left; font-size: .85rem; color: var(--ink-soft); padding: 10px 12px; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num { text-align: right; white-space: nowrap; }
.ledger a.row-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.ledger a.row-link:hover { text-decoration: underline; }
.status { display: inline-block; font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule-strong); white-space: nowrap; }
.status-action { background: var(--hl); border-color: #E8C840; }
.status-ok { background: #E3F4EC; border-color: #A9DCC4; color: #17603F; }
.status-bad { background: #FDECEE; border-color: #F2B8BF; color: #A82C3A; }
.action-list { list-style: none; margin: 0; padding: 0; }
.action-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.action-list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 700; }
.timeline { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); counter-reset: t; }
.timeline li { counter-increment: t; position: relative; padding-top: 34px; font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.timeline li::before { content: counter(t); position: absolute; top: 0; left: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule-strong); background: #fff; display: grid; place-items: center; font-size: .8rem; z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 12px; left: 26px; right: 0; height: 2px; background: var(--rule-strong); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { content: "\2713"; background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline li.done::after { background: var(--ok); }
.timeline li.current { color: var(--ink); }
.timeline li.current::before { background: var(--hl); border-color: var(--ink); color: var(--ink); }
.thread { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.msg.mine { margin-left: auto; background: #EEF3FE; border-color: #CCDAF7; }
.msg .who { font-size: .8rem; color: var(--ink-soft); margin-bottom: 2px; }
.msg p { margin: 0; white-space: pre-wrap; }
.next-step { border-left: 6px solid var(--hl); }
.pay-options { display: grid; gap: 14px; }
.pay-option { border: 2px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; background: var(--sheet); }
.pay-option[open] { border-color: var(--pen); }
.pay-option summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; }
.pay-option summary::-webkit-details-marker { display: none; }
.pay-option .body { padding-top: 14px; }
.copy-code { display: flex; gap: 8px; }
.copy-code input { font-weight: 700; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-bottom: 20px; }
.stat-row div { font-size: .92rem; color: var(--ink-soft); }
.stat-row b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.empty { text-align: left; padding: 10px 0; color: var(--ink-soft); }
.empty .btn { margin-top: 10px; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 24px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: block; padding: 7px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: #fff; }
.pagination .is-current span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .is-disabled span { color: var(--rule-strong); }

/* ---------------- Content pages (prices, writers, reviews, samples, FAQ, services) ---------------- */
/* Page heads: a sheet of ruled paper with the red margin, same as the notebook */
.page-head { position: relative; padding: 58px 0 46px; border-bottom: 1px solid var(--rule); background-color: var(--sheet);
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, rgba(213, 225, 243, .55) 35px 36px); overflow: hidden; }
.page-head .wrap { position: relative; }
.page-head .wrap::before { content: ""; position: absolute; left: -26px; top: -58px; bottom: -46px; width: 2px; background: var(--margin); opacity: .55; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { color: var(--ink-soft); font-size: 1.18rem; max-width: 40em; margin: 0; }
.head-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: end; }
.head-aside { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sheet); }
.head-aside h2 { font-size: 1.05rem; margin-bottom: 10px; }
.head-facts { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 24px; }
.head-facts div { font-size: .92rem; color: var(--ink-soft); }
.head-facts b { display: block; font-family: var(--font-display); font-size: 1.45rem; color: var(--ink); line-height: 1.2; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a { font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 14px; }
.jump a:hover { border-color: var(--ink); background: #fff; }
.jump a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Explanations: short titled paragraphs, marked with a stroke of highlighter */
.explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; }
.explain.two { grid-template-columns: repeat(2, 1fr); }
.explain h3 { font-size: 1.15rem; margin-bottom: 8px; padding-top: 16px; position: relative; }
.explain h3::before { content: ""; position: absolute; top: 0; left: 0; width: 38px; height: 5px; border-radius: 3px; background: var(--hl); }
.explain p { color: var(--ink-soft); margin: 0; }
.band-ink .explain p { color: #B9C7E4; }

/* A real sequence (vetting, process) */
.ladder { list-style: none; margin: 0; padding: 0; counter-reset: l; display: grid; gap: 0; }
.ladder li { counter-increment: l; position: relative; padding: 0 0 26px 62px; }
.ladder li::before { content: counter(l); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 1.05rem var(--font-display); }
.ladder li::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--rule-strong); }
.ladder li:last-child { padding-bottom: 0; }
.ladder li:last-child::after { display: none; }
.ladder h3 { font-size: 1.12rem; margin-bottom: 4px; }
.ladder p { margin: 0; color: var(--ink-soft); }
.band-ink .ladder li::before { background: var(--hl); color: var(--ink); }
.band-ink .ladder li::after { background: #33466F; }
.band-ink .ladder p { color: #B9C7E4; }

/* Price formula: shows how the total is built */
.formula { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 8px 0 18px; }
.formula .term { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 120px; }
.formula .term b { display: block; font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.formula .term span { font-size: .85rem; color: var(--ink-soft); }
.formula .op { align-self: center; font: 800 1.4rem var(--font-display); color: var(--ink-soft); }
.formula .term.total { background: var(--ink); border-color: var(--ink); color: #fff; }
.formula .term.total span { color: #AFC0E0; }
.formula .term.total b { color: var(--hl); }

/* Callout and comparison */
.callout { background: var(--sheet); border: 1px solid var(--rule); border-left: 6px solid var(--pen); border-radius: var(--radius-sm); padding: 18px 22px; }
.callout p:last-child { margin-bottom: 0; }
.compare { width: 100%; border-collapse: collapse; background: var(--sheet); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sheet); }
.compare th, .compare td { padding: 13px 18px; border-bottom: 1px solid var(--rule); text-align: left; }
.compare thead th { border-bottom: 2px solid var(--ink); font-size: .92rem; }
.compare.vs thead th:nth-child(2) { background: var(--hl); }
.compare.vs td:nth-child(2) { font-weight: 700; background: rgba(255, 224, 102, .14); }
.compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--ok); font-weight: 800; }
.no { color: var(--ink-soft); }

/* Tags (subjects, paper types) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li, .tag { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 5px 13px; font-size: .92rem; }
.tags a { color: var(--ink); text-decoration: none; }
.tags a:hover { text-decoration: underline; }
.tag-group h3 { font-size: 1rem; margin: 22px 0 10px; color: var(--ink-soft); }

/* Payment method chips */
.pay-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.pay-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: #fff; border: 1px solid var(--rule-strong); font: 800 .8rem/1 var(--font-body); color: var(--ink); letter-spacing: .01em; white-space: nowrap; }
.pay-chip svg { margin-right: 6px; flex: none; }
.chip-mpesa { color: #1E7A35; }
.chip-visa, .chip-mc { color: #1D2B64; }
.chip-pp { color: #1F4E9E; }
.chip-bank { color: var(--ink-soft); }
.site-footer .pay-chip { background: rgba(255, 255, 255, .06); border-color: #33466F; color: #DCE4F5; }
.pay-option summary { align-items: center; gap: 12px; }
.pay-option summary > .muted { font: 400 .92rem var(--font-body); }
.calc-total .price { white-space: nowrap; }
.pay-options + .notebook .calc-total .price { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }

/* Rating breakdown bars */
.bars { display: grid; gap: 8px; margin: 0; }
.bars div { display: grid; grid-template-columns: 34px 1fr 40px; gap: 10px; align-items: center; font-size: .92rem; }
.bars .track { height: 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--pen); border-radius: 999px; }
.bars .n { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Review cards on the reviews page */
.review-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 24px; }
.review-card blockquote { margin: 10px 0 14px; font-size: 1.04rem; }
.review-card footer { font-size: .88rem; color: var(--ink-soft); }
.verified { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--ok); background: #E3F4EC; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 26px; }
.filter-row .field { min-width: 180px; }
.filter-row select { padding: .55em .7em; }

/* Samples: each one looks like a page from a paper */
.paper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.paper-card { position: relative; display: flex; flex-direction: column; background-color: var(--sheet);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(213, 225, 243, .7) 27px 28px); background-position: 0 70px;
  border: 1px solid var(--rule); border-radius: 4px 18px 4px 4px; padding: 22px 22px 20px 34px; text-decoration: none; color: var(--ink); min-height: 240px; transition: transform .15s, box-shadow .15s; }
.paper-card::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .5; }
.paper-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sheet); color: var(--ink); }
.paper-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.paper-card p { font-size: .94rem; color: var(--ink-soft); margin: 0 0 14px; }
.paper-card .tags { margin-top: auto; }
.paper-card .tag { font-size: .78rem; padding: 3px 9px; }

/* Services overview */
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; list-style: none; margin: 0; padding: 0; }
.service-list li { border-bottom: 1px solid var(--rule); }
.service-list a { display: grid; grid-template-columns: 1fr; gap: 4px 18px; padding: 20px 0; text-decoration: none; color: var(--ink); }
.service-list strong { font-family: var(--font-display); font-size: 1.2rem; }
.service-list .from { font-weight: 800; white-space: nowrap; align-self: start; }
.service-list .from small { display: block; font-weight: 400; color: var(--ink-soft); text-align: right; }
.service-list span.desc { grid-column: 1 / -1; color: var(--ink-soft); font-size: .96rem; }
.service-list a:hover strong { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 5px; text-underline-offset: 2px; }

/* FAQ search */
.faq-search { position: relative; margin: 26px 0 6px; }
.faq-search input { padding-left: 44px; font-size: 1.05rem; }
.faq-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.faq-empty { display: none; }
.faq [hidden] { display: none; }
.contact-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-strip > * { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); text-decoration: none; }
.contact-strip strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.contact-strip span { color: var(--ink-soft); font-size: .94rem; }
.contact-strip button { text-align: left; font: inherit; cursor: pointer; }
.contact-strip a:hover, .contact-strip button:hover { border-color: var(--pen); }
.faq-empty.is-shown { display: block; }

/* Shared closing call to action: a sheet of highlighter, so it never merges with the dark sections around it */
.band.cta-band { background: var(--hl); color: var(--ink); padding: 64px 0; }
.band.cta-band h2 { color: var(--ink); }
.band.cta-band p { color: var(--ink); opacity: .8; }
.cta-band .btn-hl { background: var(--ink); color: #fff; }
.cta-band .btn-hl:hover { background: var(--bar); color: #fff; }
.band.cta-band .actions a:not(.btn) { color: var(--ink); }
.cta-band .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.cta-band p { color: #B9C7E4; margin: 0; font-size: 1.08rem; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-end; }
.cta-band .actions a:not(.btn) { color: #fff; font-weight: 700; }

/* ---------------- Writer cards and profiles ---------------- */
.writer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.writer-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.writer-top { display: flex; gap: 14px; align-items: center; }
.writer-name h3 { font-size: 1.15rem; margin: 0; }
.writer-name h3 a { color: var(--ink); text-decoration: none; }
.writer-name h3 a:hover { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 4px; }
.writer-name p { margin: 2px 0 0; }
.writer-headline { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.avatar { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--bar); color: #fff; display: grid; place-items: center; font: 800 1.15rem var(--font-display); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.is-online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-lg.is-online::after { width: 18px; height: 18px; right: 4px; bottom: 4px; }
.online { color: #15803D; font-weight: 700; }
.writer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 12px 0; border-block: 1px dashed var(--rule-strong); }
.writer-stats dt { font-size: .78rem; color: var(--ink-soft); }
.writer-stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.writer-stats small { font-weight: 400; color: var(--ink-soft); }
.star { color: #F2B705; }
.writer-card .tags li { font-size: .82rem; padding: 3px 10px; }
.writer-actions { display: flex; gap: 8px; margin-top: auto; }
.profile-id { display: flex; gap: 20px; align-items: center; }
.profile-id h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.hire-note { display: flex; gap: 14px; align-items: center; }
.writer-reply { margin-top: 12px; padding: 12px 14px; background: var(--paper); border-left: 4px solid var(--pen); border-radius: 4px; font-size: .95rem; }
.writer-reply p { margin: 4px 0 0; }
@media (max-width: 1000px) { .writer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .writer-grid { grid-template-columns: 1fr; } .profile-id { gap: 14px; } .avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; } }

/* ---------------- Writer portal ---------------- */
.nav-id { display: flex; gap: 12px; align-items: center; padding: 4px 4px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.nav-id .avatar { width: 46px; height: 46px; font-size: 1rem; }
.board-card h2 { font-size: 1.2rem; margin: 0 0 4px; }
.board-card h2 a { color: var(--ink); text-decoration: none; }
.board-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 4px; }
.board-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.board-pay { text-align: right; white-space: nowrap; }
.board-pay b { display: block; font: 800 1.5rem var(--font-display); font-variant-numeric: tabular-nums; }
.board-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bid-box { flex: 0 1 auto; }
.bid-box[open] { flex-basis: 100%; order: 3; }
.bid-box > summary { list-style: none; display: inline-flex; }
.bid-box > summary::-webkit-details-marker { display: none; }
.bid-box[open] { padding: 12px 0 0; }
.tag-hl { background: var(--hl) !important; border-color: #E8C840 !important; font-weight: 700; }
.board-mini { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.board-mini:last-child { border-bottom: 0; }
.board-mini .row-link { color: var(--ink); font-weight: 700; text-decoration: none; margin-right: 8px; }
.due { font-weight: 700; white-space: nowrap; }
.due.is-soon { color: var(--warn); }
.due.is-late { color: var(--margin); }
.deadline-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--sheet); border: 1px solid var(--rule); border-left: 6px solid var(--pen); border-radius: var(--radius-sm); padding: 12px 16px; margin: 16px 0 20px; }
.deadline-bar.is-late { border-left-color: var(--margin); }
.msg-tabs { display: flex; gap: 6px; margin: 4px 0 12px; border-bottom: 2px solid var(--rule); }
.msg-tabs a { padding: 8px 14px; font-weight: 700; color: var(--ink-soft); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.msg-tabs a.is-active { color: var(--ink); border-bottom-color: var(--pen); }
.profile-photo { display: flex; gap: 18px; align-items: center; }
.check-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.check-tags label { cursor: pointer; }
.check-tags input { position: absolute; opacity: 0; }
.check-tags span { display: inline-block; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 5px 12px; font-size: .9rem; background: #fff; }
.check-tags input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-tags input:focus-visible + span { outline: 3px solid var(--pen); }

/* ---------------- Star ratings (client review form, writer profiles) ---------------- */
.rating-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-bottom: 16px; }
.star-field { border: 0; padding: 0; margin: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-top: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.9rem; line-height: 1; color: var(--rule-strong); cursor: pointer; padding: 0 2px; transition: color .1s; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #F2B705; }
.star-input input:focus-visible + label { outline: 3px solid var(--pen); border-radius: 4px; }
.aspect-bars { display: grid; gap: 8px; }
.aspect-bars div { display: grid; grid-template-columns: 150px 1fr 36px; gap: 10px; align-items: center; font-size: .92rem; }
@media (max-width: 560px) { .rating-grid { grid-template-columns: 1fr; } .aspect-bars div { grid-template-columns: 110px 1fr 32px; } }

/* ---------------- Staff sign-in (/login) and error pages ---------------- */
.auth-body { background: var(--paper); }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr); }
.auth-side { position: relative; overflow: hidden; background-color: var(--bar); color: #DCE4F5; padding: 44px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; gap: 40px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(255, 255, 255, .07) 39px 40px); }
.auth-side::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(14px, 2.6vw, 40px); width: 2px; background: var(--margin); opacity: .7; }
.auth-brand { position: relative; color: #fff; text-decoration: none; font: 800 1.5rem var(--font-display); letter-spacing: -.02em; align-self: flex-start; }
.auth-brand img { max-height: 54px; background: #fff; border-radius: 10px; padding: 4px 10px; }
.auth-pitch { position: relative; margin-top: auto; max-width: 30rem; }
.auth-pitch h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 3rem); margin-bottom: .5em; }
.auth-pitch p { color: #B9C7E4; font-size: 1.1rem; margin: 0; }
.auth-foot { position: relative; margin: 0; font-size: .95rem; }
.auth-foot a { color: var(--hl); font-weight: 700; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 24px 28px; gap: 22px; }
.auth-sheet { width: min(100%, 460px); padding: 30px 32px 32px 70px; }
.auth-sheet h2 { font-size: 1.9rem; margin-bottom: .2em; }
.auth-sheet > p.muted { margin-bottom: 22px; }
.auth-sheet .alert { font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.password-wrap .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--paper); color: var(--ink); font: 700 .85rem var(--font-body); padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.auth-legal { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.auth-legal a { color: var(--ink-soft); }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.error-page .notebook { width: min(100%, 560px); padding: 34px 36px 36px 74px; }
.error-page .code { font: 800 clamp(4rem, 12vw, 6.5rem)/1 var(--font-display); letter-spacing: -.04em; margin: 0 0 12px; }
.error-page .code span { background-image: linear-gradient(transparent 55%, var(--hl) 55%, var(--hl) 92%, transparent 92%); padding: 0 .06em; }
.error-page .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 26px 22px 30px 40px; gap: 18px; }
  .auth-pitch { margin-top: 0; }
  .auth-pitch h1 { font-size: 1.7rem; }
  .auth-pitch p { font-size: 1rem; }
  .auth-main { justify-content: flex-start; padding-top: 28px; }
}
@media (max-width: 560px) { .auth-sheet { padding: 22px 18px 24px 46px; } .error-page .notebook { padding: 26px 20px 28px 48px; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1000px) {
  .hero .wrap, .split, .split-wide, .order-layout { grid-template-columns: 1fr; gap: 36px; }
  .reviews { grid-template-columns: 1fr; }
  .review, .review + .review { padding: 22px 0; border-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
  .head-grid, .cta-band .wrap { grid-template-columns: 1fr; gap: 26px; }
  .cta-band .actions { justify-content: flex-start; }
  .explain { grid-template-columns: 1fr 1fr; }
  .paper-grid { grid-template-columns: 1fr 1fr; }
  .contact-strip { grid-template-columns: 1fr; }
  .mobile-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; bottom: 0; z-index: 30; margin: 24px -16px 0; padding: 12px 16px; background: #fff; border-top: 1px solid var(--rule); box-shadow: 0 -10px 24px -18px rgba(22, 33, 62, .5); }
  .mobile-total strong { font-family: var(--font-display); font-size: 1.35rem; }
  body:has(.mobile-total) .chat-launch { bottom: 86px; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--bar); flex-direction: column; gap: 0; padding: 8px 16px 18px; box-shadow: 0 20px 30px -20px rgba(10, 18, 45, .8); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .nav a.is-active::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 4px; height: auto; margin-left: -12px; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .header-actions .signin { display: none; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .margin-notes li { grid-template-columns: 1fr; gap: 6px; padding-left: 18px; }
  .margin-notes li::before { left: 0; }
  .index-list { columns: 1; }
  .account { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .account-nav { position: static; }
  .account-nav ul { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
  .account-nav a { white-space: nowrap; }
  .account-nav .new-order { display: none; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .service-list, .review-list { grid-template-columns: 1fr; }
  .page-head .wrap::before { left: -10px; }
  .timeline li:nth-child(3)::after { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .band { padding: 60px 0; }
  .hero { padding: 36px 0 48px; }
  .notebook { padding: 18px 16px 20px 44px; }
  .notebook::before { left: 30px; }
  .notebook::after { display: none; }
  .calc-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .btn { padding: .7em 1em; font-size: .92rem; }
  .site-header .wrap { gap: 12px; }
  .brand { font-size: 1.15rem; }
  .chat-launch { padding: 14px; }
  .chat-launch { position: fixed; display: grid; place-items: center; }
  .chat-launch .icon { display: block; }
  .chat-launch .dot { position: absolute; top: 9px; right: 9px; margin: 0; border: 2px solid var(--ink); }
  .chat-launch .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ledger .hide-sm { display: none; }
  .explain, .explain.two, .paper-grid { grid-template-columns: 1fr; }
  .page-head { padding: 38px 0 30px; }
  .page-head .wrap::before { display: none; }
  .formula .term { min-width: 0; flex: 1 1 40%; }
  .order-section, .panel { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .chat-launch, .chat-panel, .account-nav, .no-print { display: none !important; }
  .account { display: block; }
  body { background: #fff; }
}
