:root {
  /* Matched to the Fax Counter logo: bright blue + deep navy */
  --ink: #1e2a3b;
  --muted: #5a6677;
  --line: #e1e6ed;
  --bg: #f4f7fb;
  --card: #ffffff;
  --brand: #2470d8;
  --brand-dark: #1a56ab;
  --brand-soft: #eaf2fd;
  --navy: #1e2a3b;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,42,59,.05), 0 8px 24px rgba(30,42,59,.07);
  --wide: 1040px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand); }
main { max-width: 720px; margin: 0 auto; padding: 32px 16px 56px; }

/* Header: full-width white bar, content aligned to the page width */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px max(16px, calc((100% - var(--wide)) / 2));
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; }
.top nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.top nav a:hover { color: var(--brand); }
.account-nav { display: inline-flex; gap: 18px; }
.account-nav a { margin-left: 0; }
.account-nav a:last-child { color: var(--brand); }
@media (max-width: 560px) {
  .brand img { height: 36px; }
  .top nav > a[href^="#"] { display: none; }
}

/* Home: headline beside the send form on wide screens */
.home-grid { display: grid; gap: 28px; }
@media (min-width: 920px) {
  main:has(.home-grid) { max-width: var(--wide); }
  .home-grid { grid-template-columns: 1fr 1.05fr; align-items: start; gap: 48px; }
  .home-grid .hero { position: sticky; top: 100px; padding-top: 12px; }
  main:has(.home-grid) > .section { max-width: 720px; margin-left: auto; margin-right: auto; }
}
.hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
.hero h1 { font-size: 2.4rem; line-height: 1.12; margin: 0 0 14px; color: var(--navy); letter-spacing: -.02em; }
.hero h1 .accent { color: var(--brand); }
.hero p { color: var(--muted); margin: 0 0 20px; font-size: 1.08rem; }
.trust { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trust li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 40px; position: relative; }
.trust li::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.trust strong { display: block; font-size: .95rem; color: var(--navy); }
.trust span { display: block; font-size: .85rem; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-weight: 650; font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.optional { color: var(--muted); font-weight: 400; }

input[type=tel], input[type=email], input:not([type]), textarea, select {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iPhone zooming in */
  padding: 12px; border: 1px solid #c5ccd5; border-radius: 8px; background: #fff;
}
input:disabled { background: var(--bg); cursor: not-allowed; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
label { display: block; font-size: .92rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.grid .wide { grid-column: 1 / -1; }
.grid label input, .grid label textarea, .grid label select { margin-top: 4px; color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 1rem; }
.check input { width: 20px; height: 20px; }
.check.agree { align-items: flex-start; margin: 16px 0; line-height: 1.5; }
.check.agree input { flex: none; margin-top: 2px; }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } .hero h1 { font-size: 1.85rem; } .trust { gap: 8px; margin-top: 16px; } .trust li { padding: 10px 10px 10px 34px; } .trust li::before { left: 11px; top: 13px; } .trust strong { font-size: .86rem; } .trust span { font-size: .78rem; } }

.btn { display: inline-block; font: inherit; font-weight: 600; border-radius: 8px; padding: 12px 18px; cursor: pointer; text-align: center; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--brand); color: #fff; width: 100%; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.primary:disabled { background: #9db3d6; cursor: not-allowed; }
.btn.big { font-size: 1.1rem; padding: 15px 18px; }
.btn { transition: background-color .15s, border-color .15s, box-shadow .15s; }
.btn.primary { box-shadow: 0 2px 6px rgba(36,112,216,.25); }
.btn.secondary { background: var(--brand-soft); color: var(--brand); border-color: #cfe0f8; }
.btn.secondary:hover { background: #dde9fb; }
.btn.link { background: none; color: var(--brand); padding: 6px 8px; font-weight: 500; }
.file-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.file-buttons .btn { flex: 1 1 160px; }

.file-list { list-style: none; padding: 0; margin: 10px 0 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: .95rem; word-break: break-all; }
.page-info { font-weight: 600; margin: 8px 0 0; }
.hint, .muted, .fine { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.fine { font-size: .82rem; margin-top: 12px; }
.error { color: var(--bad); background: #fdecea; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.turnstile { margin: 4px 0 14px; min-height: 65px; }

.section { margin-top: 56px; }
.section h2 { font-size: 1.5rem; color: var(--navy); letter-spacing: -.01em; margin-bottom: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 56px; position: relative; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.prices { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prices td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prices td:last-child { text-align: right; font-weight: 700; }
.prices td { font-size: 1.02rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }

.resume-actions { display: flex; flex-direction: column; gap: 6px; }
.status-card h1, .card-title { font-size: 1.5rem; margin-top: 0; color: var(--navy); }
#profile-panel h2 { margin-top: 0; }
#code-form label { max-width: 220px; }
.sms-consent { font-size: .8rem; color: var(--muted); line-height: 1.45; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; }
#p-code { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.progress { list-style: none; padding: 0; margin: 18px 0; }
.progress li { padding: 8px 0 8px 32px; position: relative; color: var(--muted); }
.progress li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c5ccd5; }
.progress li.active { color: var(--ink); font-weight: 600; }
.progress li.active::before { border-color: var(--brand); animation: pulse 1.2s infinite; }
.progress li.done { color: var(--ok); }
.progress li.done::before { background: var(--ok); border-color: var(--ok); }
.progress li.failed { color: var(--bad); }
.progress li.failed::before { background: var(--bad); border-color: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }

.legal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 32px; margin-bottom: 40px; padding: 28px 28px 32px; }
.legal h1 { font-size: 1.8rem; color: var(--navy); margin-top: 0; }
.legal h2 { font-size: 1.15rem; margin-top: 28px; color: var(--navy); }
.legal-notice { border-left: 4px solid var(--navy); background: #f5f7fb; padding: 12px 16px; border-radius: 6px; }
@media (max-width: 560px) { .legal { padding: 20px 18px 24px; margin-top: 16px; } }
.foot { text-align: center; padding: 32px 16px 44px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); background: #fff; margin-top: 24px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--brand); }
.foot-logo { height: 34px; width: auto; opacity: .9; }
[hidden] { display: none !important; }

/* Accounts */
.fax-history { list-style: none; padding: 0; margin: 16px 0; }
.fax-history li { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.fax-history a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.fax-history a:hover { background: var(--bg); }
#signin-panel h2 { margin-top: 0; }

/* Searchable state / province picker (profile page) */
.combo-field label { display: block; font-size: .92rem; color: var(--muted); }
.combo { position: relative; margin-top: 4px; }
.combo input { padding-right: 36px; color: var(--ink); }
.combo-caret { position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 264px; overflow-y: auto;
  margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.combo-list li[role=option] { padding: 9px 12px; cursor: pointer; color: var(--ink); font-size: .95rem; }
.combo-list li[role=option] strong { display: inline-block; min-width: 2.2em; color: var(--brand); }
.combo-list li[role=option]:hover, .combo-list li.active { background: var(--brand-soft); }
.combo-empty { padding: 10px 12px; color: var(--muted); font-size: .9rem; }

/* My faxes: delete button, credits and refund-request conversations */
.fax-row { display: flex; align-items: flex-start; }
.fax-row a { flex: 1 1 auto; min-width: 0; }
.delete-btn { flex: 0 0 auto; margin: 6px 6px 0 0; color: var(--muted); }
.delete-btn:hover { color: var(--bad); }
.fax-history li > .credit-box { border-top: 1px solid var(--line); }
.credit-box { padding: 10px 12px; background: var(--brand-soft); border-radius: 0 0 8px 8px; }
.credit-status { margin: 0 0 4px; font-size: .95rem; }
.credits { margin: 16px 0; }
.credits h2 { font-size: 1.1rem; margin: 0 0 8px; color: var(--navy); }
.credit-list { list-style: none; padding: 0; margin: 0; }
.credit-list > li { border: 1px solid #cfe0f8; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.credit-list > li .credit-box { margin: 8px -12px -10px; }
.thread { margin-top: 8px; }
.thread-title { font-weight: 600; margin: 4px 0; }
.messages { list-style: none; padding: 0; margin: 6px 0; }
.msg { border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: #fff; border: 1px solid var(--line); }
.msg.from-admin { border-left: 3px solid var(--brand); }
.msg-who { display: block; font-size: .8rem; color: var(--muted); }
.msg-text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-form { margin: 8px 0; }
.thread-form label { display: block; font-size: .9rem; }
.thread-form textarea { display: block; width: 100%; margin: 4px 0 8px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* Admin desk */
.wide-card { max-width: 100%; }
.tabs { display: flex; gap: 8px; margin: 12px 0; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-request { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.req-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.req-fact { margin: 2px 0; }
.badge { font-size: .8rem; font-weight: 600; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; }
.admin-request .resume-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-request .resume-actions .btn { width: auto; }
#credit-btn { width: 100%; margin-top: 8px; }

/* Profile: pending change, phone confirmation, history; /admin profile change table */
.notice { background: var(--brand-soft); border: 1px solid #cfe0f8; border-radius: 8px; padding: 12px 14px; margin: 16px 0; }
.notice p { margin: 4px 0; }
.profile-history, .profile-email { margin-top: 24px; }
.profile-history h2, .profile-email h2 { font-size: 1.1rem; }
.profile-email { border-top: 1px solid var(--line); padding-top: 16px; }
.profile-email p { overflow-wrap: anywhere; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.change-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .95rem; }
.change-table th, .change-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.change-table tr.changed td { background: var(--brand-soft); font-weight: 600; }
.req-fact.warn { color: var(--bad); font-weight: 600; }
.badge.good { background: #e6f4ec; color: var(--ok); }
.badge.bad { background: #fdecea; color: var(--bad); }
.checks-run { width: auto; align-self: center; }
.check-item .req-fact a { font-weight: 400; }
.check-log { background: #f5f7fb; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; }
