/* Measured from the original's screenshots (reference/original-form.png, reference/v3-*.png). */
:root {
  --red: #d71920;
  --red-dark: #b5141a;
  --red-tint: #fff7f7;
  --btn-disabled: #ebd1d2;
  --ink: #292929;
  --muted: #6c6c6c;
  --muted-2: #777777;
  --line: #dddddd;
  --page: #f4f4f4;
  --panel: #f5f5f5;
  --input: #f0f0f0;
  --input-line: #e5e5e5;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner {
  max-width: 1264px; margin: 0 auto; height: 74px; padding: 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 34px; }
.brand__link { display: block; flex: none; }
.brand__logo { display: block; width: 110px; height: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.2px; }
.brand__sub { font-size: 10px; color: var(--muted-2); line-height: 1.3; }
.site-header__aside { font-size: 14px; color: var(--muted-2); }

/* Card */
.page { padding: 56px 16px 56px; }
.card {
  max-width: 966px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-top: 7px solid var(--red); border-radius: 24px;
  padding: 56px 56px 56px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
.card__title { margin: 0; font-size: 44px; font-weight: 600; line-height: 1.2; letter-spacing: -.6px; }
.card__lead { margin: 18px 0 0; font-size: 16px; color: var(--muted); }

/* 3G shutdown notice (front page) */
.notice {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 19px 20px;
  background: #fff3f3; border: 1px solid #f1c5c7; border-radius: 14px; color: #9f161c;
}
.notice svg { flex: none; margin-top: 3px; }
.notice p { margin: 0; font-size: 15px; font-weight: 700; line-height: 28px; }

/* Option cards: the selected card opens and holds its input */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-top: 38px; }
.option {
  position: relative; display: flex; flex-direction: column;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
  transition: border-color .15s, background .15s;
}
.option__head { display: flex; flex-direction: column; cursor: pointer; }
.option__head input { position: absolute; opacity: 0; pointer-events: none; }
.option__icon { color: #767676; margin-bottom: 20px; }
.option__title { font-size: 16px; font-weight: 700; }
.option__text { margin-top: 10px; font-size: 14px; color: var(--muted-2); }
.option:hover { border-color: #c8c8c8; }
.option:has(input[type="radio"]:checked) { border: 2px solid var(--red); background: var(--red-tint); padding: 21px 23px; cursor: default; }
.option:has(input[type="radio"]:checked) .option__head { cursor: default; }
.option:has(input[type="radio"]:checked) .option__icon { color: var(--red); }
.option:has(input[type="radio"]:focus-visible) { outline: 3px solid rgba(215, 25, 32, .25); outline-offset: 2px; }
.option__body { margin-top: 30px; }
.option:not(:has(input[type="radio"]:checked)) .option__body { display: none; }

/* Fields */
.field__label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.field__input {
  width: 100%; height: 56px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--input); border: 1px solid var(--input-line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field__input::placeholder { color: #737373; }
.field__input:focus { outline: none; background: #fff; border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 25, 32, .12); }
.field.has-error .field__input { border-color: var(--red); }
.field__error { margin: 8px 0 0; font-size: 14px; color: var(--red); }
.field__error:empty { display: none; }
.field__help { margin: 14px 0 0; font-size: 13.5px; line-height: 1.75; color: #5f5f5f; }
.field__help strong { color: var(--ink); }

/* SIM card picture showing where the serial number (ICCID) is printed */
.sim-figure { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e6e6e6; }
.sim-figure img { display: block; width: 100%; height: auto; }

.privacy { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; font-size: 14px; color: #686868; }
.privacy svg { flex: none; color: var(--red); }

.alert { margin-top: 24px; padding: 10px 14px; border-radius: 10px; background: #fdecec; color: var(--red-dark); font-size: 14px; }
.alert[hidden] { display: none; }
.debug {
  margin: 16px 0 0; padding: 12px 14px; max-height: 320px; overflow: auto; border-radius: 10px;
  background: #292929; color: #f0f0f0; font: 12px/1.5 Consolas, Menlo, monospace; white-space: pre-wrap; word-break: break-all;
}
.debug[hidden] { display: none; }

/* Button */
.btn {
  margin-top: 32px; height: 56px; padding: 0 37px; border: 0; border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff; background: var(--red);
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; transition: background .15s;
}
.btn:hover:not(:disabled) { background: var(--red-dark); }
.btn:disabled { background: var(--btn-disabled); cursor: not-allowed; }
.btn.is-loading { background: var(--red); cursor: progress; }
.btn__spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result view: replaces the form inside the same card (measured from reference/result-*.png) */
.view-result:empty { display: none; }
.card.has-result .view-form { display: none; }

.result__head { display: flex; align-items: center; gap: 15px; }
.result__icon {
  flex: none; width: 55px; height: 55px; border-radius: 50%; display: none; place-items: center;
}
.result__icon--ok { background: #eaf8ee; color: #19833a; }
.result__icon--warn { background: #fff3f3; color: #9f161c; }
[data-status="compatible"] .result__icon--ok,
[data-status="swap_required"] .result__icon--warn,
[data-status="not_found"] .result__icon--warn { display: grid; }
.result__eyebrow {
  margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: #19833a;
}
[data-status="swap_required"] .result__eyebrow,
[data-status="not_found"] .result__eyebrow { color: var(--red); }
.result__title { margin: 0; font-size: 34px; font-weight: 500; line-height: 1.2; letter-spacing: -.3px; }

.result__table { margin-top: 42px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.result__thead {
  display: flex; justify-content: space-between; align-items: center; height: 47px; padding: 0 24px;
  background: var(--panel); border-bottom: 1px solid var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-2);
}
.result__body { padding: 28px 24px 28px; }
.result__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result__number { font-size: 18px; font-weight: 700; word-break: break-all; }

.pill {
  flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 700;
}
/* Pill colour follows the technology, message colour the status */
.pill { background: #e7e7e7; color: var(--ink); }
[data-technology="4G"] .pill { background: #333333; color: #fff; }
[data-technology="5G"] .pill { background: var(--red); color: #fff; }

.message { margin-top: 24px; padding: 20px 19px 19px; border: 1px solid; border-radius: 14px; }
.message__title { margin: 0; font-size: 15px; font-weight: 700; }
.message__text { margin: 6px 0 0; font-size: 15px; line-height: 28px; color: #5f5f5f; }
.message__title:empty { display: none; }
.message__title:empty + .message__text { margin-top: 0; }
[data-status="compatible"] .message { background: #f6f6f6; border-color: #d7d7d7; padding: 23px 19px; }
[data-status="swap_required"] .message,
[data-status="not_found"] .message { background: #fff3f3; border-color: #f1c5c7; }
[data-status="swap_required"] .message__title,
[data-status="not_found"] .message__title { color: #9f161c; }

.btn-secondary {
  margin-top: 32px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 15px;
  border: 1px solid #e5e5e5; border-radius: 12px; background: #f7f7f7;
  font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; transition: background .15s;
}
.btn-secondary:hover { background: #efefef; }

.page-note { margin: 58px 0 0; text-align: center; font-size: 14px; color: #888888; }

/* Footer (matches emtel.com: grey bar, Currimjee Company logo left, legal links right) */
.site-footer { background: #d3d9db; color: #1e1e1e; }
.site-footer__inner {
  max-width: 1264px; margin: 0 auto; min-height: 100px; padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.site-footer__brand { display: block; flex: none; }
.site-footer__logo { display: block; width: 205px; height: auto; }
.site-footer__links { display: flex; align-items: center; flex-wrap: wrap; font-size: 16px; }
.site-footer__links a { color: inherit; text-decoration: none; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { text-decoration: underline; }
/* "|" before each link after the first, so it wraps with its link: orange, then blue */
.site-footer__links a + a::before { content: "|"; display: inline-block; margin: 0 6px; color: #e8891c; text-decoration: none; }
.site-footer__links a + a + a::before { color: #1f8fd6; }

/* Smaller screens */
@media (max-width: 1300px) {
  .site-header__inner { padding: 0 24px; }
  .site-footer__inner { padding: 18px 24px; }
}
@media (max-width: 720px) {
  .page { padding: 24px 16px; }
  .card { padding: 32px 22px; border-radius: 20px; }
  .card__title { font-size: 30px; }
  .options { grid-template-columns: 1fr; margin-top: 28px; }
  .option { padding: 18px; }
  .option:has(input[type="radio"]:checked) { padding: 17px; }
  .option__body { margin-top: 22px; }
  .btn { width: 100%; justify-content: center; }
  .site-header__aside { display: none; }
  .brand { gap: 18px; }
  .brand__logo { width: 90px; }
  .notice { padding: 14px 16px; gap: 10px; }
  .result__title { font-size: 26px; }
  .result__body { padding: 20px 16px; }
  .result__thead { padding: 0 16px; }
  .page-note { margin-top: 32px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; padding: 22px 16px; gap: 14px; }
  .site-footer__logo { width: 180px; }
  .site-footer__links { font-size: 15px; row-gap: 6px; }
  .site-footer__links a + a + a { flex-basis: 100%; }  /* own line on phones, without its "|" */
  .site-footer__links a + a + a::before { display: none; }
}
.nowrap { white-space: nowrap; }
