/* MDrepairs partner portal (partners.mdrepairs.com). Mobile first: partners read it on phones. The navy and blue of the
   price sheet email; light and dark follow the device. Everything sits on the page or on a card's own surface, set apart
   by spacing and thin lines. No web fonts, no images. */
:root { --bg:#f3f5f8; --surface:#ffffff; --ink:#0f172a; --muted:#4f5d72; --line:#dbe1ea; --accent:#1d4ed8; --keep:#047857;
  --warn:#a1360f; --navy:#0b1e3f; --primary:#0b1e3f; --primaryink:#ffffff; --focus:#2563eb; --shade:rgba(15,23,42,.16); --hover:#f1f4f9; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#0d1420; --surface:#151e2d; --ink:#e8edf4; --muted:#a3b1c4; --line:#2b3749; --accent:#93c5fd; --keep:#6ee7b7;
    --warn:#f0936d; --navy:#132a4d; --primary:#2b6cb0; --primaryink:#ffffff; --focus:#93c5fd; --shade:rgba(0,0,0,.55); --hover:#1b2638; }
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
a { color:var(--accent); text-underline-offset:2px; }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
h1:focus, h2:focus { outline:none; }
.wrap { width:100%; max-width:1120px; margin:0 auto; padding-left:16px; padding-right:16px; }
main { flex:1 0 auto; padding-top:20px; padding-bottom:32px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* the name bar across the top */
.bar { background:var(--navy); color:#fff; }
.barin { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; min-height:60px; padding-top:8px; padding-bottom:8px; }
.brand { display:flex; align-items:baseline; flex-wrap:wrap; gap:0 10px; color:#fff; text-decoration:none; min-height:44px; align-content:center; }
.brandname { font-size:20px; font-weight:700; letter-spacing:.01em; }
.brandsub { font-size:15px; color:#c9d6ea; }
.brand:focus-visible { outline-color:#fff; }
.who { display:flex; align-items:center; gap:12px; min-width:0; flex:0 1 auto; }
.whoname { font-size:14px; color:#dbe5f3; min-width:0; overflow-wrap:anywhere; }

/* buttons and boxes */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:9px 18px; border-radius:10px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; font-size:16px; line-height:1.25; text-align:center;
  text-decoration:none; cursor:pointer; }
.btn.primary { background:var(--primary); border-color:var(--primary); color:var(--primaryink); font-weight:600; }
.btn.quiet { border-color:transparent; background:transparent; color:var(--accent); }
.btn.wide { width:100%; }
.btn:disabled { opacity:.6; cursor:default; }
.btn.onbar { background:transparent; color:#fff; border-color:rgba(255,255,255,.45); font-size:15px; padding:8px 14px; white-space:nowrap; }
.btn.onbar:focus-visible { outline-color:#fff; }
@media (hover:hover) and (pointer:fine) {
  .btn:not(:disabled):not(.primary):not(.onbar):hover { background:var(--hover); }
  .btn.primary:not(:disabled):hover { filter:brightness(1.15); }
  .btn.onbar:hover { background:rgba(255,255,255,.1); }
}
.field { display:block; margin:0 0 6px; font-size:14px; font-weight:600; }
.input { display:block; width:100%; min-height:48px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface);
  color:var(--ink); font:inherit; font-size:16px; }
.input::placeholder { color:var(--muted); opacity:.8; }
.input.code { font-size:22px; letter-spacing:.12em; font-weight:600; text-transform:uppercase; }
.input.code::placeholder { font-weight:400; }
.msg { min-height:0; margin:8px 0; font-size:15px; }
.msg:empty { display:none; }
.msg.bad { color:var(--warn); }
.small { font-size:14px; color:var(--muted); }
.lead { margin:0 0 16px; }
.note { margin:0 0 14px; padding:0 0 12px; border-bottom:1px solid var(--line); font-weight:600; }
.note:empty { display:none; }
.loading { margin:40px 0; text-align:center; color:var(--muted); }

/* the cards of the sign-in screens */
.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:20px 18px; }
.narrow { max-width:460px; margin:12px auto 0; }
.narrow h1 { font-size:24px; line-height:1.25; margin:0 0 8px; }
.narrow form .btn.primary { margin-top:16px; }
.narrow .hint { margin:6px 0 0; }
.after { margin:20px 0 0; padding-top:16px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:10px; }
.after .btn { flex:1 1 auto; }
#vSignIn .small { margin:16px 0 0; }
#vLink .btn + .btn, #vStop .btn + .btn, #vStop .btn + a.btn { margin-top:10px; }
#vError .btn, #vMissing .btn, #vLink .btn, #vStop .btn { margin-top:4px; }

/* the sheet */
.sheethead { margin:4px 0 16px; }
.sheethead h1 { font-size:24px; line-height:1.25; margin:0 0 8px; overflow-wrap:anywhere; }
.banner { margin:0 0 8px; font-size:16px; max-width:80ch; }
.meta { margin:0; font-size:14px; color:var(--muted); }
.meta .sep { color:var(--line); }
.tools { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:0 0 10px; }
.searchbox { flex:1 1 100%; min-width:0; }
.jump { position:relative; flex:1 1 200px; min-width:0; }
.btn.picker { width:100%; justify-content:space-between; font-weight:600; padding-right:14px; min-height:48px; }
.btn.picker::after { content:""; flex:0 0 auto; width:9px; height:9px; margin:0 4px 4px 8px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); }
.btn.picker[aria-expanded="true"]::after { transform:rotate(-135deg); margin-bottom:-4px; }
.jumppanel { position:absolute; z-index:20; left:0; right:0; top:calc(100% + 6px); min-width:260px; padding:10px; background:var(--surface);
  border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px var(--shade); }
.jumplist { list-style:none; margin:8px 0 0; padding:0; max-height:min(60vh, 420px); overflow:auto; }
.jumplist li + li { border-top:1px solid var(--line); }
.jumpopt { display:block; width:100%; min-height:44px; padding:10px 8px; background:none; border:0; color:var(--ink); font:inherit; font-size:15px;
  text-align:left; cursor:pointer; border-radius:6px; }
.jumpopt:focus-visible { outline-offset:-2px; }
@media (hover:hover) and (pointer:fine) { .jumpopt:hover { background:var(--hover); } }
.jumpnone { padding:10px 8px; color:var(--muted); font-size:15px; }
.btn.pdf { flex:1 1 160px; min-height:48px; }
.legend { margin:4px 0 16px; max-width:90ch; }
.legend strong { color:var(--ink); font-weight:600; }
.nomatch { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin:8px 0 16px; }
.nomatch p { margin:0; font-weight:600; overflow-wrap:anywhere; }

.sec { padding:0; margin:0 0 16px; overflow:hidden; }
.sech { margin:0; padding:16px 16px 10px; font-size:17px; line-height:1.3; letter-spacing:.02em; color:var(--ink); scroll-margin-top:12px; }
.card:not(.sec) > .sech:first-child { padding-left:0; padding-right:0; padding-top:0; }
.sec > .sech { padding:16px 16px 6px; }
.secnote { margin:0; padding:10px 16px 14px; border-top:1px solid var(--line); font-size:14px; font-style:italic; color:var(--muted); }

/* a phone: each price is two rows, the service and issue, then its three amounts by name */
table.lines { width:100%; border-collapse:collapse; }
table.lines thead { display:none; }
table.lines, table.lines tbody { display:block; }
table.lines tr.ln { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:2px 12px; padding:12px 16px; border-top:1px solid var(--line); }
table.lines tr.ln > td { display:block; padding:0; min-width:0; overflow-wrap:break-word; }
table.lines td.svc { grid-column:1 / -1; font-weight:700; font-size:16px; }
table.lines td.iss { grid-column:1 / -1; color:var(--muted); font-size:15px; margin:0 0 6px; }
table.lines td.iss:empty { display:none; }
table.lines td.num { font-weight:600; font-size:16px; }
table.lines td.num::before { content:attr(data-l); display:block; font-size:13px; font-weight:400; color:var(--muted); }
table.lines td.keep { color:var(--keep); font-weight:700; }
table.lines tr.haswhy { padding-bottom:4px; }
table.lines tr.why { display:block; padding:0 16px 12px; }
table.lines tr.why > td { display:block; padding:0; font-size:13px; line-height:1.4; color:var(--muted); }
table.lines td.muted { display:block; padding:12px 16px; color:var(--muted); border-top:1px solid var(--line); }

/* from tablet width up: one real table of five columns, the same widths in every section so the amounts line up */
@media (min-width:700px) {
  .wrap { padding-left:24px; padding-right:24px; }
  .sheethead h1 { font-size:28px; }
  .searchbox { flex:2 1 300px; }
  .jump { flex:1 1 220px; }
  .btn.pdf { flex:0 0 auto; }
  table.lines { display:table; table-layout:fixed; }
  table.lines thead { display:table-header-group; }
  table.lines tbody { display:table-row-group; }
  table.lines tr.ln, table.lines tr.why { display:table-row; padding:0; }
  table.lines tr.ln > td, table.lines tr.why > td, table.lines td.muted { display:table-cell; }
  table.lines th, table.lines tr.ln > td, table.lines tr.why > td, table.lines td.muted { padding:11px 12px; text-align:left; vertical-align:top; border-top:1px solid var(--line); }
  table.lines th { font-size:13px; font-weight:600; color:var(--muted); padding-top:8px; padding-bottom:8px; }
  table.lines th:nth-child(1) { width:20%; } table.lines th:nth-child(2) { width:26%; }
  table.lines th:nth-child(3), table.lines th:nth-child(4), table.lines th:nth-child(5) { width:18%; }
  table.lines th:first-child, table.lines tr > td:first-child { padding-left:16px; }
  table.lines th:last-child, table.lines tr > td:last-child { padding-right:16px; }
  table.lines th.num, table.lines tr.ln > td.num { text-align:right; }
  table.lines td.num::before { display:none; }
  table.lines td.svc { font-size:16px; }
  table.lines td.iss { margin:0; font-size:15px; }
  table.lines tr.haswhy > td { padding-bottom:4px; }
  table.lines tr.why > td { border-top:0; padding:0 16px 11px; }
  @media (hover:hover) and (pointer:fine) { table.lines tr.ln:hover > td, table.lines tr.ln:hover + tr.why > td { background:var(--hover); } }
}

/* How it works, Terms, the footer line */
#extras .card { margin:0 0 16px; }
.steps, .terms { margin:10px 0 0; padding-left:24px; max-width:90ch; }
.steps li, .terms li { margin:0 0 6px; }
.terms li.star { list-style-type:"\2605  "; }
.sheetfoot { margin:4px 0 20px; font-size:14px; color:var(--muted); font-style:italic; }
.settings { margin:0 0 8px; }
.settings h2 { font-size:17px; margin:0 0 6px; }
.settings .small { margin:4px 0 0; }
.switch { display:flex; align-items:center; gap:12px; min-height:44px; font-weight:600; cursor:pointer; }
.switch input { -webkit-appearance:none; appearance:none; flex:0 0 auto; position:relative; width:46px; height:28px; margin:0; border-radius:14px;
  background:var(--line); border:1px solid var(--line); cursor:pointer; transition:background .15s; }
.switch input::after { content:""; position:absolute; top:2px; left:2px; width:22px; height:22px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3); transition:transform .15s; }
.switch input:checked { background:var(--primary); border-color:var(--primary); }
.switch input:checked::after { transform:translateX(18px); }
.switch input:disabled { opacity:.6; }
.switch input:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }

/* "Prices were just updated." for a few seconds, over the bottom of the page */
.toast { position:fixed; z-index:30; left:50%; bottom:max(16px, env(safe-area-inset-bottom)); transform:translateX(-50%); width:max-content;
  max-width:calc(100vw - 32px); margin:0; padding:12px 18px; background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:12px; box-shadow:0 10px 30px var(--shade); font-weight:600; }

.foot { padding-top:4px; padding-bottom:28px; color:var(--muted); font-size:14px; }
.foot p { margin:0; padding-top:14px; border-top:1px solid var(--line); }
.prose, .banner { overflow-wrap:anywhere; }

/* a link inside a sentence is a full 44 px to tap on a touch screen, without moving the words around it */
@media (pointer:coarse) {
  .prose a, .small a { display:inline-block; position:relative; z-index:1; padding:12px 0; margin:-12px 0; }
}
@media (max-width:420px) {
  .whoname { font-size:13px; }
  .who { flex:1 1 100%; justify-content:space-between; }
}
