:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #12212f;
  --muted: #627181;
  --border: #dce4ea;
  --primary: #df3713;
  --primary-strong: #b92b0d;
  --primary-soft: #fff1e5;
  --accent: #f4c928;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --success: #067647;
  --success-soft: #ecfdf3;
  --shadow: 0 18px 50px rgba(18, 33, 47, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(85, 145, 205, .12), transparent 32rem),
    radial-gradient(circle at 5% 22%, rgba(148, 175, 205, .08), transparent 24rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 92px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-logo-frame {
  position: relative;
  display: block;
  width: 170px;
  height: 122px;
  overflow: hidden;
  flex: 0 0 170px;
}

.brand-logo {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 170px;
  max-width: none;
  height: auto;
  object-fit: contain;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 52px;
  display: block;
  flex: 0 0 48px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  display: block;
  transform-origin: bottom center;
}

.brand-mark::before {
  left: 11px;
  bottom: 2px;
  width: 26px;
  height: 48px;
  background: #f4cf1e;
  clip-path: polygon(50% 0, 100% 48%, 70% 100%, 0 82%, 38% 52%);
}

.brand-mark::after {
  left: 0;
  bottom: 3px;
  width: 43px;
  height: 34px;
  background: linear-gradient(145deg, #f47a08 0 48%, #d92f17 49% 100%);
  clip-path: polygon(0 16%, 100% 58%, 64% 100%, 19% 80%, 0 58%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #101010;
  font-size: 24px;
  line-height: .88;
  letter-spacing: -0.08em;
  font-weight: 900;
}

.brand strong span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.brand small {
  margin-top: 5px;
  color: #111;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .22em;
}

.header-points-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.header-points-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.main-content {
  padding: 26px 0 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: 28px 4px 34px;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero h1 {
  margin: 12px 0 14px;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: .98;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

.hero-card {
  display: none;
  border: 1px solid rgba(15,118,110,.16);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(145deg, #fff5d6, var(--primary-soft));
}

.hero-card-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-card strong {
  display: block;
  margin-top: 5px;
  color: var(--primary);
  font-size: 40px;
  letter-spacing: -0.04em;
}

.hero-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.workspace {
  margin-bottom: 28px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
}

.tab {
  border: 0;
  padding: 11px 18px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab.is-active {
  color: #fff;
  background: var(--primary);
}

.panel-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(117, 59, 22, .1);
  overflow: hidden;
}

.panel {
  padding: clamp(24px, 5vw, 46px);
}

.hidden {
  display: none !important;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 32px;
}

.panel-heading h2,
.lookup-copy h2 {
  margin: 7px 0 7px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.panel-heading p,
.lookup-copy > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.required {
  color: var(--danger);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0 14px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input::placeholder {
  color: #9aa8b5;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15,118,110,.1);
}

.field select {
  accent-color: var(--primary);
}

.field input[type="date"] {
  accent-color: var(--primary);
  color-scheme: light;
}

.date-picker {
  position: relative;
}

.date-trigger {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: #9aa8b5;
  background: var(--surface);
  text-align: left;
}

.date-trigger:focus,
.date-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(223, 55, 19, .1);
}

.calendar-icon {
  color: var(--primary);
  font-size: 20px;
}

.date-calendar {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, 100%);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(18, 33, 47, .16);
}

.date-calendar-header,
.date-weekdays,
.date-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  align-items: center;
  text-align: center;
}

.date-calendar-header {
  grid-template-columns: 36px 1fr 36px;
  margin-bottom: 12px;
}

.date-calendar-header button,
.date-calendar-grid button {
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.date-calendar-header button {
  height: 32px;
  color: var(--primary);
  font-size: 25px;
}

.date-calendar-header button:hover,
.date-calendar-grid button:hover {
  background: var(--primary-soft);
}

.date-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.date-calendar-grid button {
  height: 32px;
  color: var(--text);
  font-size: 13px;
}

.date-calendar-grid button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.field input.is-invalid,
.field select.is-invalid,
.date-trigger.is-invalid {
  border-color: var(--danger);
  background: #fffafa;
}

.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.form-note {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px dashed var(--border);
}

.form-note strong {
  font-size: 13px;
}

.form-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.alert {
  grid-column: 1 / -1;
  display: none;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.alert.is-visible {
  display: block;
}

.alert.is-success {
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #abefc6;
}

.alert.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #fecdca;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.confirmation-screen {
  padding: 28px clamp(10px, 4vw, 48px) 10px;
  text-align: center;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(223, 55, 19, .22);
  font-size: 34px;
  font-weight: 800;
}

.confirmation-screen h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.confirmation-screen p {
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--muted);
  line-height: 1.6;
}

.button {
  min-height: 50px;
  border-radius: 13px;
  border: 0;
  padding: 0 20px;
  font-weight: 800;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.button-primary {
  min-width: 190px;
  color: #fff;
  background: linear-gradient(135deg, #e54a19, var(--primary));
  box-shadow: 0 10px 22px rgba(223, 55, 19, .2);
}

.button-primary:hover {
  background: var(--primary-strong);
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.button.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lookup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(28px, 6vw, 68px);
  align-items: center;
}

.lookup-form {
  max-width: 520px;
  margin-top: 26px;
}

.lookup-form .alert {
  margin: 14px 0;
}

.lookup-form .button {
  margin-top: 16px;
}

.points-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 10rem),
    linear-gradient(145deg, #0f766e, #124d4b);
  box-shadow: 0 20px 45px rgba(15,118,110,.22);
}

.points-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  color: #ffd76b;
  font-size: 22px;
}

.points-label {
  margin: 0;
  color: rgba(255,255,255,.74);
  font-size: 13px;
  font-weight: 700;
}

#points-value {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(54px, 9vw, 86px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.points-name {
  margin: 7px 0 0;
  color: rgba(255,255,255,.82);
  line-height: 1.5;
}

.site-footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    min-height: 132px;
    padding-top: 24px;
  }

  .main-content {
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 2px 24px;
  }

  .hero-card {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 16px;
  }

  .hero-card strong {
    font-size: 26px;
    margin: 0;
  }

  .hero-card-label,
  .hero-card p {
    font-size: 12px;
  }

  .form-grid,
  .lookup-layout {
    grid-template-columns: 1fr;
  }

  .form-actions .button,
  .lookup-form .button {
    width: 100%;
  }

  .lookup-layout {
    gap: 32px;
  }

  .points-card {
    min-height: 260px;
  }

  .site-footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 24px 0;
  }
}

@media (max-width: 520px) {
  .panel {
    padding: 22px 16px 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-card-label {
    display: none;
  }

  .brand strong {
    font-size: 21px;
  }

  .brand-logo-frame {
    width: 160px;
    height: 112px;
    flex-basis: 160px;
  }

  .brand-logo {
    top: 0;
    width: 160px;
    height: auto;
  }

  .brand strong span {
    font-size: 15px;
  }

  .brand small {
    font-size: 10px;
  }

  .brand-mark {
    transform: scale(.9);
    transform-origin: left center;
    margin-right: -4px;
  }

  .hero h1 {
    max-width: 360px;
    line-height: 1.02;
  }

  .form-note {
    padding: 14px;
  }

  .form-actions {
    margin-top: 2px;
  }
}
