/* In2Com enquiry portal: brand primary #6ABEEC with the logo's deep blue #005C96 for anything carrying text */
:root {
  --ink: #12304A;          /* text, and the running-total panel */
  --paper: #F7F9FB;
  --white: #FFFFFF;
  --brand: #6ABEEC;        /* In2Com primary, rgb(106,190,236): stripes, selected choices, current step, the meter figure */
  --fibre: #005C96;        /* deep blue from the logo: buttons, links, focus (white text on it = 7.1:1) */
  --fibre-dark: #00456F;
  --fibre-tint: #E8F5FC;   /* light wash of the primary */
  --mist: #E3E9EF;
  --slate: #5B6B7F;
  --amber: #8A5A00;
  --amber-bg: #FFF3D6;
  --error: #B42318;
  --error-bg: #FDECEA;
  --radius: 10px;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--font);
  padding-bottom: 7rem;                      /* room for the running total (adjusted to its real height by the script) */
}
a { color: var(--fibre-dark); }
:focus-visible { outline: 3px solid var(--fibre); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; }
.skip:focus { left: 1rem; z-index: 10; }

/* ---------- header / footer ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem clamp(1rem, 4vw, 2.5rem); background: var(--white); border-bottom: 4px solid var(--brand);
}
.brand img { display: block; width: 300px; height: 100px; }      /* same 3:1 as the main site */
.top-help { margin: 0; font-size: .95rem; color: var(--slate); }
.top-help a { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.staff-banner {
  background: var(--ink); color: #fff; padding: .55rem clamp(1rem, 4vw, 2.5rem); font-size: .95rem;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.staff-banner button { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: .15rem .6rem; font: inherit; cursor: pointer; }
.foot { padding: 2rem clamp(1rem, 4vw, 2.5rem) 1rem; color: var(--slate); font-size: .9rem; }
.foot p { margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--slate); text-decoration: underline; cursor: pointer; }
.noscript { padding: 2rem; }

/* ---------- layout ---------- */
.layout {
  display: grid; grid-template-columns: 15rem minmax(0, 42rem); gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2.25rem clamp(1rem, 4vw, 2.5rem) 0; max-width: 72rem;
}
main:focus { outline: none; }
.steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; position: sticky; top: 1.5rem; }
.steps li { counter-increment: step; display: flex; gap: .75rem; align-items: baseline; padding: .4rem 0; color: var(--slate); }
.steps li::before {
  content: counter(step); flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  border: 2px solid var(--mist); background: var(--white); color: var(--slate);
}
.steps li.done::before { content: "✓"; background: var(--fibre-tint); border-color: var(--fibre-tint); color: var(--fibre-dark); }
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current::before { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.steps button { all: unset; cursor: pointer; }
.steps button:focus-visible { outline: 3px solid var(--fibre); outline-offset: 2px; }
.step-count { display: none; margin: 0 0 .25rem; color: var(--slate); font-size: .95rem; }

/* ---------- typography ---------- */
h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); line-height: 1.15; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.lede { margin: 0 0 1.75rem; color: var(--slate); max-width: 36rem; }
.hint { display: block; color: var(--slate); font-size: .92rem; margin-top: .2rem; font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- form controls ---------- */
.field { margin: 0 0 1.15rem; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: .35rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }   /* boxes line up even if one label has a hint */
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea, dialog input {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #C7D2DD; border-radius: 8px; padding: .6rem .75rem; min-height: 2.9rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--fibre); outline: none; box-shadow: 0 0 0 3px var(--fibre-tint); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--error); }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }

.choices { display: grid; gap: .5rem; }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.choice {
  display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; cursor: pointer;
  background: var(--white); border: 2px solid var(--mist); border-radius: var(--radius);
}
.choice:hover { border-color: #B9C6D3; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--fibre-tint); }
.choice input { margin: .3rem 0 0; width: 1.15rem; height: 1.15rem; accent-color: var(--fibre); flex: none; }
.choice .text { flex: 1; }
.choice .price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; accent-color: var(--fibre); flex: none; }

.badge { display: inline-block; font-size: .82rem; padding: .05rem .5rem; border-radius: 999px; background: var(--mist); color: var(--ink); margin-left: .3rem; vertical-align: 1px; }
.badge.good { background: var(--fibre-tint); color: var(--fibre-dark); }
.badge.muted { background: var(--amber-bg); color: var(--amber); }
.choice.unavailable { cursor: default; background: var(--paper); border-style: dashed; margin: .5rem 0 .75rem; }
.choice.unavailable:hover { border-color: var(--mist); }
.choice.unavailable b { color: var(--slate); }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 8px; padding: .7rem 1.4rem; min-height: 2.9rem;
  border: 2px solid var(--fibre); background: var(--fibre); color: #fff;
}
.btn:hover { background: var(--fibre-dark); border-color: var(--fibre-dark); }
.btn.ghost { background: var(--white); color: var(--fibre-dark); }
.btn.ghost:hover { background: var(--fibre-tint); }
.btn.small { padding: .35rem .8rem; min-height: 0; font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.link { border: 0; background: none; color: var(--fibre-dark); padding: .35rem 0; text-decoration: underline; min-height: 0; font-weight: 400; }
.nav-buttons { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--mist); }
.row-buttons { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; }
.inline-form .field { flex: 1; margin: 0; }

/* ---------- repeating rows (users, SIMs, ports) ---------- */
.item {
  background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius);
  padding: 1rem 1rem .25rem; margin: 0 0 .75rem;
}
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.item-head h3 { margin: 0; }
.item.collapsed { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; }
.collapsed-text { min-width: 0; }
.collapsed-text .hint { margin: .1rem 0 0; }
.collapsed-actions { display: flex; gap: .5rem; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.ivr-row { display: grid; grid-template-columns: 7rem 1fr auto; gap: 0 .75rem; align-items: end; }

/* ---------- messages ---------- */
.contract-note { display: inline-block; margin: -.75rem 0 1.5rem; padding: .35rem .8rem; border-radius: 999px;
  background: var(--fibre-tint); color: var(--fibre-dark); font-weight: 700; font-size: .95rem; }
.notice { padding: .8rem 1rem; border-radius: var(--radius); margin: 0 0 1.25rem; background: var(--fibre-tint); }
.notice.warn { background: var(--amber-bg); color: var(--amber); }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.err { color: var(--error); margin: .4rem 0 0; }

/* ---------- Basic / Advanced switch ---------- */
.mode-row { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin: 0 0 1.5rem;
  padding: .7rem 1rem; background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); }
.switch { display: inline-flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .2rem 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.switch-track { width: 2.9rem; height: 1.6rem; border-radius: 999px; background: #C7D2DD; position: relative; transition: background .2s; flex: none; }
.switch-thumb { position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(18, 48, 74, .3); transition: transform .2s; }
.switch[aria-checked=true] .switch-track { background: var(--fibre); }
.switch[aria-checked=true] .switch-thumb { transform: translateX(1.3rem); }
.mode-row .hint { margin: 0; }

/* ---------- "What does this mean?" panels ---------- */
details.explain { margin: 0 0 1.25rem; background: var(--fibre-tint); border-radius: var(--radius); padding: .1rem 1rem; }
details.explain summary { cursor: pointer; font-weight: 700; color: var(--fibre); padding: .6rem 0; }
details.explain[open] summary { border-bottom: 1px solid rgba(0, 92, 150, .15); margin-bottom: .5rem; }
details.explain p { margin: 0 0 .75rem; }

/* ---------- staff / reseller notes ---------- */
.section-note { margin-top: 1.75rem; padding: .9rem 1rem .4rem; border-left: 4px solid var(--brand); background: var(--white); border-radius: 0; }

/* ---------- "working" indicator: light travelling along a fibre ---------- */
.working { margin: .75rem 0 1.25rem; }
.working.compact { margin: .5rem 0 .75rem; }
.working-bar {
  position: relative; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--fibre-tint); box-shadow: inset 0 0 0 1px rgba(106, 190, 236, .35);
}
.working-bar span {
  position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: inherit;
  background: linear-gradient(90deg, rgba(106, 190, 236, 0) 0%, var(--brand) 45%, var(--fibre) 100%);
  animation: fibre-sweep 1.4s cubic-bezier(.45, 0, .25, 1) infinite;
}
.working-text { margin: .55rem 0 0; color: var(--slate); font-size: .95rem; }
.working.compact .working-text { font-size: .9rem; margin-top: .4rem; }
@keyframes fibre-sweep { from { transform: translateX(-105%); } to { transform: translateX(280%); } }
@keyframes fibre-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .working-bar span { width: 100%; animation: fibre-pulse 2s ease-in-out infinite; background: var(--brand); }
}
.loading { color: var(--slate); }
/* ---------- address dropdown (label sits in the border) ---------- */
.addr-select { position: relative; margin: 1.4rem 0 .25rem; }
.addr-select label {
  position: absolute; top: -.7rem; left: .8rem; z-index: 1; padding: 0 .4rem;
  background: var(--paper); color: var(--fibre); font-size: .9rem; font-weight: 700; line-height: 1.4;
}
.addr-select select {
  width: 100%; min-height: 3.6rem; padding: .9rem 3rem .9rem 1rem; font-size: 1.05rem;
  border: 2px solid var(--brand); border-radius: 12px; background-color: var(--white); color: var(--ink);
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23005C96' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.1rem;
}
.addr-select select:focus { border-color: var(--fibre); box-shadow: 0 0 0 3px var(--fibre-tint); outline: none; }
.addr-select .hint { margin: .4rem 0 0; }
.picked { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .8rem 1rem; border: 2px solid var(--brand); background: var(--fibre-tint); border-radius: var(--radius); margin-bottom: 1rem; }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .4rem; margin: .5rem 0 1rem; }
.numbers .choice { padding: .5rem .7rem; font-variant-numeric: tabular-nums; }
.phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; margin: .25rem 0 1rem; }
.phone { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); padding: .7rem; font-size: .95rem; }
.phone img { width: 100%; height: 5.5rem; object-fit: contain; display: block; margin-bottom: .4rem; }
.phone .ph-img { height: 5.5rem; display: grid; place-items: center; background: var(--paper); border-radius: 6px; color: var(--slate); margin-bottom: .4rem; font-size: .85rem; }

/* ---------- review ---------- */
.summary { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: .9rem; }
.summary-head { display: flex; justify-content: space-between; align-items: baseline; }
.summary dl { display: grid; grid-template-columns: 11rem 1fr; gap: .25rem 1rem; margin: .5rem 0 0; }
.summary dt { color: var(--slate); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
table.prices { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); overflow: hidden; }
.prices th, .prices td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--mist); }
.prices th { font-size: .9rem; color: var(--slate); background: var(--paper); }
.prices td.r, .prices th.r { text-align: right; white-space: nowrap; }
.prices tfoot td { font-weight: 700; border-bottom: 0; }
.done-ref { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; margin: .25rem 0 1.25rem; }

/* ---------- the running total ---------- */
.meter {
  position: fixed; right: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem); width: 18.5rem;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 18px 40px -18px rgba(18, 48, 74, .55); z-index: 5; border-top: 4px solid var(--brand);
}
.meter-figs { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; align-items: baseline; }
.meter-big { font-size: 2.3rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--brand); }
.meter-label { color: #A9B6C6; font-size: .9rem; }
.meter-small { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter-row { display: flex; justify-content: space-between; align-items: center; margin-top: .85rem; gap: .5rem; }
.vat-switch { display: inline-flex; border: 1px solid #3A4C66; border-radius: 999px; padding: 2px; }
.vat-switch button { font: inherit; font-size: .85rem; border: 0; border-radius: 999px; padding: .2rem .7rem; background: none; color: #C9D3DF; cursor: pointer; }
.vat-switch button[aria-pressed=true] { background: #fff; color: var(--ink); font-weight: 700; }
.meter-note { color: #A9B6C6; font-size: .82rem; margin: .7rem 0 0; line-height: 1.4; }
.meter.updating .meter-big { opacity: .55; }
.meter-toggle { display: none; }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 14px; padding: 1.5rem; width: min(24rem, 92vw); box-shadow: 0 20px 60px rgba(20,35,59,.35); }
dialog::backdrop { background: rgba(18, 48, 74, .45); }
dialog h2 { margin-top: 0; }
dialog label { display: block; font-weight: 700; margin-bottom: .9rem; }

/* ---------- small screens ---------- */
@media (max-width: 1280px) {
  /* Tablets (including iPad landscape): the running total becomes a bar along the bottom. */
  .meter { left: 0; right: 0; bottom: 0; width: auto; border-radius: 14px 14px 0 0; padding: .7rem clamp(1rem, 4vw, 2.5rem);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; }
  .meter-figs { grid-template-columns: auto auto auto auto; gap: .1rem .6rem; }
  .meter-big { font-size: 1.6rem; }
  .meter-row { margin-top: 0; }
  .meter-note { flex-basis: 100%; margin-top: .25rem; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 1.5rem; }
  .steps { display: none; }
  .step-count { display: block; }
  .grid2 { grid-template-columns: 1fr; }
  .summary dl { grid-template-columns: 1fr; }
  .summary dt { margin-top: .4rem; }
  .meter { display: block; padding: .7rem 1rem; }
  .meter-figs { grid-template-columns: auto 1fr; }
  .meter-row { margin-top: .5rem; }
  .meter-big { font-size: 1.5rem; }
  .brand img { width: 180px; height: 60px; }
  .meter-detail { display: none; }
  .meter.open .meter-detail { display: block; }
  .meter-toggle { display: inline-block; background: none; border: 1px solid #3A4C66; color: #fff; border-radius: 6px; font: inherit; font-size: .85rem; padding: .15rem .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .meter-big { transition: opacity .2s; }
}
@media print {
  .meter, .top, .foot, .steps, .nav-buttons { display: none !important; }
}
