/* TELUS My TELUS design tokens — sourced from telus.com/telus-login-v2 */
@font-face {
  font-display: swap;
  font-family: "TELUS-Web";
  font-style: normal;
  font-weight: 400;
  src: url("https://cdn.telus.digital/uds/HNforTELUSSARegular_normal_normal2-v5_17_0.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "TELUS-Web";
  font-style: normal;
  font-weight: 500;
  src: url("https://cdn.telus.digital/uds/HNforTELUSSAMedium_normal_normal2-v5_17_0.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "TELUS-Web";
  font-style: normal;
  font-weight: 700;
  src: url("https://cdn.telus.digital/uds/HNforTELUSSABold_normal_normal2-v5_17_0.woff2") format("woff2");
}

:root {
  --telus-purple: #4b286d;
  --telus-green: #2b8000;
  --telus-green-hover: #236a00;
  --telus-green-light: #57a708;
  --telus-link: #2c2e30;
  --telus-text: #414547;
  --telus-text-muted: #676e73;
  --telus-border: #676e73;
  --telus-border-focus: #414547;
  --telus-bg: #ffffff;
  --telus-card-width: 520px;
  --telus-radius-pill: 36px;
  --telus-radius-input: 4px;
  --telus-font: "TELUS-Web", "Helvetica Neue", Arial, sans-serif;
  --telus-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --telus-info-bg: #f4f4f7;
  --telus-alert-bg: #f3eef8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--telus-font);
  color: var(--telus-text);
  -webkit-font-smoothing: antialiased;
}

body.background-image {
  background-color: #ffffff;
  background-image: url("../assets/leaves.webp");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: min(55vw, 640px) auto;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.login-card,
.diagnose-card {
  width: 100%;
  max-width: var(--telus-card-width);
  background: var(--telus-bg);
  padding: 40px 48px 36px;
  border-radius: 8px;
  box-shadow: var(--telus-shadow);
}

.diagnose-card {
  max-width: 640px;
}

@media (max-width: 900px) {
  body.background-image {
    background-size: 320px auto;
    background-position: right bottom;
    background-attachment: scroll;
  }

  .page-shell {
    justify-content: center;
    padding: 24px 16px;
  }
}

@media (max-width: 640px) {
  .login-card,
  .diagnose-card {
    padding: 28px 24px 24px;
  }

  body.background-image {
    background-image: none;
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.logo-link {
  display: inline-flex;
  text-decoration: none;
}

.logo-link img {
  height: 28px;
  width: 145px;
}

.lang-link {
  color: var(--telus-text);
  text-decoration: underline;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--telus-purple);
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--telus-text);
}

.alert-banner {
  background: var(--telus-alert-bg);
  border-left: 4px solid var(--telus-purple);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-banner strong {
  display: block;
  margin-bottom: 4px;
}

.crypto-callout {
  background: linear-gradient(135deg, #f0f7eb 0%, #f3eef8 100%);
  border: 1.5px solid var(--telus-green);
  border-left-width: 4px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.55;
  border-radius: 8px;
}

.crypto-callout strong {
  display: block;
  color: var(--telus-green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.priority-badge {
  display: inline-block;
  background: var(--telus-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}

.option-card--priority {
  border-color: #e8a09a;
  background: #fffafa;
}

.option-card--priority.selected {
  border-color: var(--telus-green);
  background: #fff5f4;
  box-shadow: 0 0 0 1px rgba(218, 41, 28, 0.2);
}

.option-card--compact {
  padding: 12px 14px;
}

.sub-options-panel--crypto .sub-options-inner {
  border-color: var(--telus-green);
  background: linear-gradient(180deg, #fff5f4 0%, #ffffff 100%);
}

.crypto-followup {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #f0e0de;
}

.crypto-followup-block {
  margin-bottom: 20px;
}

.crypto-followup-block:last-child {
  margin-bottom: 0;
}

.crypto-followup-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: var(--telus-text);
}

.crypto-followup-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--telus-text-muted);
  line-height: 1.5;
}

.results-crypto-alert {
  background: linear-gradient(135deg, #fff5f4 0%, #fff9f0 100%);
  border: 1.5px solid var(--telus-green);
  border-left-width: 4px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.results-crypto-alert strong {
  display: block;
  color: var(--telus-green);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.results-crypto-alert p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--telus-text);
}

.results-section--crypto h3 {
  color: var(--telus-green);
}

.risk-list--crypto li {
  border-left-color: var(--telus-green);
  background: #fff5f4;
  font-weight: 500;
}

.form-field {
  margin-bottom: 8px;
}

.field-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--telus-text);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  border: 0.8px solid var(--telus-border);
  border-radius: var(--telus-radius-input);
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap:focus-within {
  border-color: var(--telus-border-focus);
  box-shadow: 0 0 0 1px var(--telus-border-focus);
}

.input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--telus-text);
  background: transparent;
  padding: 11px 40px 11px 15px;
  height: 48px;
}

.input-wrap .info-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--telus-green);
  background: transparent;
  color: var(--telus-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.form-link {
  display: inline-block;
  margin: 8px 0 20px;
  color: var(--telus-link);
  text-decoration: underline;
  font-size: 16px;
}

.field-hint {
  margin: 8px 0 20px;
  font-size: 13px;
  color: var(--telus-green);
}

#case-number {
  letter-spacing: 0.25em;
  font-size: 20px;
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--telus-green);
  cursor: pointer;
}

.btn-continue {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--telus-radius-pill);
  background: var(--telus-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-continue:hover:not(:disabled) {
  background: var(--telus-green-hover);
}

.btn-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 24px 0;
}

.card-footer {
  font-size: 14px;
  margin: 0;
}

.card-footer a {
  color: var(--telus-link);
  text-decoration: underline;
}

/* Questionnaire */
.diagnose-card {
  max-width: 720px;
}

.progress-bar {
  height: 4px;
  background: #e8e8e8;
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--telus-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 13px;
  color: var(--telus-text-muted);
  margin-bottom: 24px;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.step-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 500;
  color: var(--telus-purple);
}

.step-panel .step-desc {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--telus-text-muted);
  line-height: 1.5;
}

.option-grid {
  display: grid;
  gap: 10px;
}

.option-group {
  display: flex;
  flex-direction: column;
}

.option-group .option-card {
  margin-bottom: 0;
}

.option-group:has(.option-card.selected) .option-card {
  border-color: var(--telus-green);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #fffafa;
}

.sub-options-panel {
  overflow: hidden;
  animation: subPanelIn 0.2s ease-out;
}

@keyframes subPanelIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sub-options-inner {
  margin: 0 0 10px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
  border: 1px solid var(--telus-green);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px rgba(218, 41, 28, 0.08);
}

.sub-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0e0de;
}

.sub-options-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--telus-text);
  letter-spacing: -0.01em;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: #eef4fa;
  color: var(--telus-link);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px 6px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.help-btn:hover {
  background: #dceaf5;
}

.help-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--telus-link);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.help-btn-text {
  line-height: 1;
}

.sub-options-help {
  font-size: 13px;
  line-height: 1.55;
  color: var(--telus-text);
  background: #f0f6fb;
  border: 1px solid #d4e4f2;
  border-radius: 8px;
  padding: 12px 14px;
  margin: -4px 0 14px;
}

.sub-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-option-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid #e2e2e2;
  border-radius: 24px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.sub-option-card:hover {
  border-color: #c8c8c8;
  background: #fafafa;
}

.sub-option-card.selected {
  border-color: var(--telus-green);
  background: #fff5f4;
  box-shadow: 0 0 0 1px rgba(218, 41, 28, 0.15);
}

.sub-option-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sub-option-card.selected .sub-option-label::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background: var(--telus-green);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.sub-option-label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sub-other-field {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e8d8d6;
  animation: subPanelIn 0.2s ease-out;
}

.sub-other-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--telus-text);
  margin-bottom: 6px;
}

.sub-other-input {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #e2e2e2;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--telus-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sub-other-input::placeholder {
  color: #999;
}

.sub-other-input:focus {
  outline: none;
  border-color: var(--telus-green);
  box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.12);
}

@media (max-width: 520px) {
  .sub-options-inner {
    padding: 14px;
  }

  .sub-options-header {
    flex-wrap: wrap;
  }

  .help-btn-text {
    display: none;
  }

  .help-btn {
    padding: 6px;
  }
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.option-card:hover {
  border-color: var(--telus-border);
  background: #fafafa;
}

.option-card.selected {
  border-color: var(--telus-green);
  background: #fff5f4;
}

.option-card input {
  margin-top: 3px;
  accent-color: var(--telus-green);
  flex-shrink: 0;
}

.option-card .option-text {
  flex: 1;
}

.option-card .option-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.option-card .option-detail {
  font-size: 13px;
  color: var(--telus-text-muted);
  line-height: 1.4;
}

.text-area-field {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--telus-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  margin-top: 8px;
}

.text-area-field:focus {
  outline: none;
  border-color: var(--telus-border-focus);
  border-width: 2px;
  padding: 11px;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-secondary {
  flex: 1;
  height: 48px;
  border: 1.5px solid var(--telus-green);
  border-radius: var(--telus-radius-pill);
  background: #fff;
  color: var(--telus-green);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #f4f9f0;
}

.btn-row .btn-continue {
  flex: 2;
}

/* Results */
.severity-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.severity-critical {
  background: #fde8e6;
  color: #b71c1c;
}

.severity-high {
  background: #fff3e0;
  color: #e65100;
}

.severity-medium {
  background: #fff8e1;
  color: #f57f17;
}

.severity-low {
  background: #e8f5e9;
  color: #2e7d32;
}

.results-section {
  margin-bottom: 24px;
}

.results-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 650;
}

.risk-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk-list li {
  padding: 10px 14px;
  background: #f7f7f7;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  border-left: 3px solid var(--telus-green);
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: actions;
}

.action-list li {
  padding: 10px 0 10px 32px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid #eee;
}

.action-list li::before {
  counter-increment: actions;
  content: counter(actions);
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 22px;
  background: var(--telus-green);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}
