/* OneLoyal website styles. Colours match the app (src/constants/theme.ts). */

:root {
  --text: #000000;
  --background: #ffffff;
  --background-element: #f0f0f3;
  --background-selected: #e0e1e6;
  --text-secondary: #60646c;
  --brand: #1e3a8a;
  --on-brand: #ffffff;
  --draft-bg: #fff4c2;
  --draft-text: #5c4400;
  --ready: #16a34a;
  --on-ready: #ffffff;
  --good: #166534;
  --look: #92400e;
  --max-width: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --background: #000000;
    --background-element: #212225;
    --background-selected: #2e3135;
    --text-secondary: #b0b4ba;
    --brand: #6e8ef5;
    --on-brand: #000000;
    --draft-bg: #3d3200;
    --draft-text: #ffe680;
    --good: #4ade80;
    --look: #fbbf24;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--brand);
}

img {
  max-width: 100%;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--background-selected);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

/* The logo mark: a stamp circle with a tick-like dot, drawn in CSS. */
.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

/* Hero */

.hero {
  padding: 56px 0 40px;
}

.hero h1 {
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero p.lead {
  font-size: clamp(18px, 2.6vw, 21px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 0 28px;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 12px;
}

/* Buttons and the App Store badge */

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 12px;
}

.button.secondary {
  background: var(--background-element);
  color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Placeholder until the app is on the App Store. Swap for Apple's official badge then. */
.app-store-soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 12px;
  border: 2px dashed var(--background-selected);
  color: var(--text-secondary);
  line-height: 1.2;
}

.app-store-soon small {
  font-size: 12px;
}

.app-store-soon strong {
  font-size: 18px;
  color: var(--text);
}

/* Sections and cards */

section {
  padding: 36px 0;
}

section h2 {
  font-size: clamp(26px, 4.5vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--background-element);
  border-radius: 18px;
  padding: 22px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.card .icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 66px;
  background: var(--background-element);
  border-radius: 18px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps strong {
  display: block;
}

.steps span {
  color: var(--text-secondary);
}

/* The sample loyalty card on the home page */

.ticket {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 20px;
  padding: 20px;
  max-width: 360px;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
}

.ticket-top small {
  display: block;
  font-weight: 400;
  opacity: 0.8;
}

.ticket hr {
  border: none;
  border-top: 2px dashed currentColor;
  opacity: 0.4;
  margin: 16px 0;
}

.ticket-note {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 10px;
}

.stamps {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.stamps span {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.6;
}

.stamps span.on {
  background: currentColor;
  opacity: 1;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 760px) {
  .split {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* "Coming soon" box */

.callout {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 22px;
  padding: 32px 26px;
}

.callout h2 {
  margin-bottom: 10px;
}

.callout p {
  margin: 0 0 20px;
  opacity: 0.9;
}

.callout .button {
  background: var(--on-brand);
  color: var(--brand);
}

/* Legal pages and long text */

.prose {
  max-width: 720px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.prose h1 {
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.prose h2 {
  font-size: 22px;
  margin: 36px 0 10px;
}

.prose h3 {
  font-size: 18px;
  margin: 24px 0 6px;
}

.prose .updated {
  color: var(--text-secondary);
  margin-top: 0;
}

.prose li {
  margin-bottom: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--background-selected);
}

.table-scroll {
  overflow-x: auto;
}

.draft-banner {
  background: var(--draft-bg);
  color: var(--draft-text);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0 24px;
  font-size: 15px;
}

/* Details still to be filled in (company name, email, etc.). Remove once all are filled. */
.todo {
  background: var(--draft-bg);
  color: var(--draft-text);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

.faq details {
  background: var(--background-element);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--background-selected);
  margin-top: 24px;
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer p {
  margin: 4px 0;
}

/* The gift page (oneloyal.app/gift) */

.gift-page [hidden] {
  display: none !important;
}

.gift-page {
  max-width: 560px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.gift-card {
  border: 2px solid #e0a100;
  border-radius: 22px;
  padding: 24px 20px;
  margin-bottom: 24px;
}

.gift-card h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.gift-card h2 {
  font-size: 20px;
  margin: 28px 0 12px;
}

.gift-logo {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.gift-note {
  color: var(--text-secondary);
  margin: 4px 0;
}

.gift-message {
  font-style: italic;
  font-size: 19px;
  margin: 12px 0;
}

.gift-steps .app-store-soon {
  margin-top: 10px;
}

.steps span.gift-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.steps span.gift-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: all;
  -webkit-user-select: all;
}

.gift-page button.button {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.gift-about {
  text-align: center;
}

/* The pricing page */

/* Everything on the pricing page sits in one centred column. */
.pricing-page {
  max-width: 680px;
  text-align: center;
}

.pricing-page .hero p.lead {
  margin-left: auto;
  margin-right: auto;
}

.pricing-page .actions {
  justify-content: center;
}

.pricing-page .faq {
  text-align: left;
}

.pricing-page .callout {
  text-align: center;
}

.pricing-hero {
  padding-bottom: 8px;
}

.price-card {
  border: 2px solid var(--brand);
  border-radius: 22px;
  padding: 28px 20px;
  margin: 0 auto;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 48px;
}

.price {
  margin: 0;
  font-size: 18px;
}

.price strong {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.price-note {
  margin: 0;
  color: var(--text-secondary);
}

.calculator {
  margin: 24px 0;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--background-element);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.stepper button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}

.stepper output {
  min-width: 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.calculator-total {
  margin: 0;
  width: 100%;
}

.calculator-total span {
  font-size: 22px;
  font-weight: 700;
}

.included {
  list-style: none;
  padding: 0;
  margin: 0 auto 24px;
  display: inline-grid;
  gap: 8px;
  text-align: left;
}

.included li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 700;
  margin-right: 10px;
}

/* Shop sign-up (oneloyal.app/start) */

.signup {
  max-width: 640px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.signup h1 {
  margin: 0 0 4px;
}

.signup-lead {
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.signup [hidden] {
  display: none !important;
}

.progress {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  counter-reset: progress;
}

.progress li {
  counter-increment: progress;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 4px solid var(--background-selected);
  padding-top: 6px;
}

.progress li::before {
  content: counter(progress) ". ";
}

.progress li.done,
.progress li.current {
  border-top-color: var(--brand);
}

.progress li.current {
  color: var(--text);
}

.signup-message {
  background: #dc2626;
  color: #ffffff;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 16px;
}

.signup-step h2 {
  margin-top: 0;
}

.signup-form {
  display: grid;
  gap: 16px;
}

.signup-form fieldset {
  min-width: 0;
  border: 1px solid var(--background-selected);
  border-radius: 16px;
  padding: 16px;
  margin: 0;
  display: grid;
  gap: 14px;
}

.signup-form legend {
  font-weight: 700;
  padding: 0 6px;
}

.signup-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
}

.signup-form input:not([type="checkbox"]):not([type="radio"]),
.signup-form select {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--background-element);
  border: 1px solid var(--background-selected);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.signup-form button.button,
.signup button.button {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
}

.signup button.button:disabled {
  opacity: 0.5;
  cursor: default;
}

.signup-map {
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
}

.hours {
  display: grid;
  gap: 8px;
}

.hours-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
}

.signup-form .hours-row input[type="time"] {
  width: auto;
  min-width: 0;
  padding: 8px 6px;
  font-size: 15px;
}

.hours-row.closed input[type="time"],
.hours-row.closed .hours-to {
  opacity: 0.35;
}

.signup-form .hours-day {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.shop-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 8px;
}

.shop-list li {
  background: var(--background-element);
  border-radius: 12px;
  padding: 12px 14px;
}

.signup .price-card {
  text-align: center;
  margin-bottom: 20px;
}

/* Business account (oneloyal.app/business) */

.account-section {
  margin-top: 32px;
}

.device-block {
  border: 1px solid var(--background-selected);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.device-block h3 {
  margin: 0 0 10px;
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
}

.code-box {
  margin-top: 14px;
}

.device-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 6px 0 12px;
  user-select: all;
  -webkit-user-select: all;
}

.account-section .price-card {
  text-align: left;
  margin: 0;
}

/* Business account: overview and shop pages */

.signup .account-bar {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 15px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.period-switch {
  display: inline-flex;
  background: var(--background-element);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.period-switch button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.period-switch button.selected {
  background: var(--background);
  color: var(--text);
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-tile {
  background: var(--background-element);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 2px;
}

.stat-tile strong {
  font-size: 28px;
  line-height: 1.1;
}

.stat-tile span {
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-tile .stat-up {
  color: #2e9e5b;
  font-weight: 600;
}

.stat-tile .stat-down {
  color: #d9534f;
  font-weight: 600;
}

.shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.shop-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--background-selected);
  color: var(--text);
  text-decoration: none;
}

.shop-card:hover {
  border-color: var(--brand);
}

.shop-card-open {
  color: var(--brand);
  font-weight: 600;
  margin-top: 6px;
}

.back-link {
  text-decoration: none;
  font-weight: 600;
}

.chart-card {
  margin: 20px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--background-selected);
}

.coming-back h3 {
  margin: 0 0 8px;
}

.coming-back p {
  margin: 4px 0 0;
}

.chart {
  position: relative;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-bar {
  fill: var(--brand);
}

.chart-axis {
  stroke: var(--background-selected);
  stroke-width: 1;
}

.chart-label {
  fill: var(--text-secondary);
  font-size: 12px;
}

.chart-target {
  fill: transparent;
  cursor: pointer;
}

.chart-target:hover {
  fill: var(--background-element);
  fill-opacity: 0.5;
}

.chart-tooltip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--background);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
}

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

.activity li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--background-selected);
}

.coming-next {
  opacity: 0.75;
}

@media (max-width: 420px) {
  .stat-tile strong {
    font-size: 22px;
  }
}

/* Shop details (business account) */

.shop-fields {
  display: grid;
  gap: 16px;
}

.details-list {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 10px 16px;
  margin: 0;
}

.details-list dt {
  color: var(--text-secondary);
  font-size: 15px;
}

.details-list dd {
  margin: 0;
}

/* The shop's cover photo, the shape it has in the app's Explore list. */
.cover-field {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.cover-field-label {
  font-weight: 600;
}
.cover-preview {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
}
.cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-move input {
  width: 100%;
  max-width: 420px;
}
.cover-field .link-button {
  justify-self: start;
}

.details-cover-photo {
  display: block;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.details-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.details-hours div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 260px;
}

.confirm-box {
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 16px;
}

.confirm-box h3 {
  margin-top: 0;
}

.change-list {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.saved-note {
  color: #16a34a;
  font-weight: 700;
}

.reauth-label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 12px;
}

.reauth-label input {
  font: inherit;
  color: var(--text);
  background: var(--background-element);
  border: 1px solid var(--background-selected);
  border-radius: 10px;
  padding: 10px 12px;
  max-width: 200px;
}

@media (max-width: 420px) {
  .details-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .details-list dd {
    margin-bottom: 10px;
  }
}

/* Close this shop (business account) */

.close-choices {
  display: grid;
  gap: 8px;
}

.close-choice {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.signup .button.danger {
  background: #dc2626;
  color: #ffffff;
}

/* Business account: the shop page's section menu (stays at the top while scrolling) */

.section-menu {
  position: sticky;
  top: 0;
  z-index: 500; /* above the map */
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  margin: 0 -20px 8px;
  padding-left: 20px;
  padding-right: 20px;
  background: var(--background);
  border-bottom: 1px solid var(--background-selected);
  scrollbar-width: none;
}

.section-menu::-webkit-scrollbar {
  display: none;
}

.section-menu button {
  flex: none;
  border: 0;
  background: var(--background-element);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.section-menu button.current {
  background: var(--brand);
  color: var(--on-brand);
}

#view-shop .account-section {
  scroll-margin-top: 70px; /* so a section isn't hidden under the menu */
}

.help-line {
  margin-top: 32px;
}

/* A link-style button (e.g. "Close this shop…"), the same colour as other links */
.link-quiet {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 18px;
  font: inherit;
  font-size: 14px;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}

.account-buttons {
  margin-bottom: 8px;
}

.account-buttons .button {
  padding: 8px 16px;
  font-size: 15px;
}

/* "For all kinds of local shops": the kinds of shop, as a row of rounded tags */
.shop-types {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-types li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--background-selected);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

/* Business account: "Payment needed", "Your shops are paused", "Your trial ends soon" */
.billing-banner {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 20px;
  background: var(--draft-bg);
  color: var(--draft-text);
}
.billing-banner.urgent {
  background: #fde8e8;
  color: #8a1c1c;
}
.billing-banner a {
  color: inherit;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .billing-banner.urgent {
    background: #4a1414;
    color: #ffd2d2;
  }
}

/* "Have a promo code?" (sign-up's Your plan, and Plan & billing) */
.promo-box {
  margin: 16px 0;
}
.promo-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.promo-row {
  display: flex;
  gap: 8px;
}
.promo-row input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}
.promo-good {
  color: #1a7f37;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .promo-good {
    color: #57d37a;
  }
}

/* A link-style button in the brand colour (e.g. "Change" next to the login email) */
.link-button.plain {
  color: var(--brand);
}

/* The "get your card" page (oneloyal.app/card) */

/* card.html marks the device as it starts: iPhones get Apple Wallet, Android phones
   Google Wallet, others the card here. */
html[data-device="apple"] .card-page .for-other,
html[data-device="apple"] .card-page .for-android,
html[data-device="android"] .card-page .for-apple,
html[data-device="android"] .card-page .for-other:not(.shown),
html[data-device="other"] .card-page .for-apple,
html[data-device="other"] .card-page .for-android,
html[data-device="android"] .card-page .hide-on-android {
  display: none;
}

.card-page [hidden] {
  display: none !important;
}

.card-page {
  max-width: 560px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.join-card {
  border: 2px solid var(--brand);
  border-radius: 22px;
  padding: 24px 20px;
  margin-bottom: 24px;
}

.join-card h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.join-card h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.join-app {
  border-color: var(--background-element);
}

.join-app .app-store-soon {
  margin-top: 12px;
}

/* Apple's black "Add to Apple Wallet" button shape (two lines, white text). */
.wallet-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  min-height: 56px;
  margin: 20px 0 8px;
  padding: 8px 18px;
  border: 1px solid #a6a6a6;
  border-radius: 12px;
  background: #000000;
  color: #ffffff;
  font: inherit;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}

.wallet-button-small {
  font-size: 13px;
  line-height: 1.2;
}

.wallet-button-big {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

/* Google's own badges (Add to Google Wallet, Get it on Google Play), unchanged as
   Google's rules ask: at least 48px tall, with clear space around them. */
.google-badge {
  display: inline-block;
  margin: 20px 0 8px;
  padding: 8px 0;
}

.google-badge img {
  display: block;
  width: auto;
  height: 52px;
}

.google-badge[aria-busy="true"] {
  opacity: 0.6;
}

/* Google Play's badge has its own clear space built in. */
.play-badge {
  margin: 4px 0 0;
  padding: 0;
}

.play-badge img {
  height: 80px;
  margin-left: -10px;
}

.join-problem {
  color: #dc2626;
  margin: 8px 0;
}

.join-steps {
  margin-top: 20px;
}

/* The card shown on the page (not iPhone, until Google Wallet). */
.web-card {
  background: #6e8ef5;
  color: #000000;
  border-radius: 20px;
  padding: 18px;
  margin: 20px 0 12px;
  text-align: center;
}

.web-card-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin: 0 0 14px;
}

/* The ring-and-dot logo in black on the card, as on the Wallet card. */
.web-card-brand .logo-mark {
  width: 22px;
  height: 22px;
  border-color: #000000;
}

.web-card-brand .logo-mark::after {
  width: 8px;
  height: 8px;
  background: #000000;
}

.web-card-qr {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  width: 220px;
  max-width: 100%;
  margin: 0 auto;
}

.web-card-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.web-card-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 12px 0 4px;
}

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

/* Shop dashboard insights (like the app's tiles): pick one to see it underneath. */
.insight-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}

.insight-tile {
  display: grid;
  gap: 2px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--background-element);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}

.insight-tile.selected {
  border-color: var(--brand);
}

.insight-tile strong {
  font-size: 18px;
}

.insight-tile-title,
.insight-tile-detail {
  color: var(--text-secondary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-panel h3 {
  margin-top: 18px;
}

.insight-panel h3:first-child {
  margin-top: 0;
}

.period-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 8px 0;
}

.period-table th {
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.period-table td {
  text-align: center;
  padding: 6px 4px;
  border-top: 1px solid var(--background-selected);
}

.period-table td:first-child {
  text-align: left;
}

.period-table .stat-up {
  color: #2e9e5b;
  font-weight: 600;
}

.period-table .stat-down {
  color: #d9534f;
  font-weight: 600;
}

.bar-list {
  display: grid;
  grid-template-columns: max-content 1fr minmax(48px, max-content);
  gap: 6px 10px;
  align-items: center;
  font-size: 14px;
  margin: 8px 0;
}

.bar-track {
  height: 12px;
}

.bar {
  display: block;
  height: 12px;
  min-width: 2px;
  border-radius: 6px;
  background: var(--brand);
}

.bar.pale {
  opacity: 0.45;
}

.bar-value {
  text-align: right;
}

.busy-grid {
  display: grid;
  gap: 3px;
  align-items: center;
  font-size: 12px;
  margin: 10px 0;
}

.busy-hour {
  color: var(--text-secondary);
  text-align: center;
}

.busy-cell {
  height: 24px;
  border-radius: 4px;
  background: var(--brand);
}

/* Dashboard front page (simplified 11 Nov 2026, like the app). How am I doing: navy. */
.verdict-card {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 16px 0 12px;
  cursor: pointer;
}

.verdict-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  opacity: 0.85;
}

.verdict-sentence {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 6px 0 0;
}

.verdict-note {
  font-size: 14px;
  opacity: 0.85;
  margin: 0;
}

/* What should I do: solid green, as the reward pills in the app. */
.do-next {
  background: var(--ready);
  color: var(--on-ready);
  border-radius: 16px;
  padding: 14px 18px;
  margin: 0 0 12px;
}

.do-next-title {
  font-size: 14px;
  opacity: 0.9;
}

.do-next-tip {
  font-size: 18px;
  font-weight: 600;
  margin: 6px 0;
}

.do-next-tip + .do-next-tip {
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding-top: 8px;
}

.do-next-note {
  font-size: 14px;
  opacity: 0.9;
  margin: 8px 0 0;
}

.do-next-more {
  font: inherit;
  font-size: 14px;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin-top: 6px;
  cursor: pointer;
  text-decoration: underline;
}

/* This shop / All branches (shared loyalty cards, 0153). */
.scope-switch {
  margin-top: 12px;
}

/* Shared loyalty cards form (12 Nov 2026): tick boxes and choices with a line under each. */
.shared-card-form {
  margin-top: 16px;
}

.choice-list {
  display: grid;
  gap: 4px;
}

.signup-form label.choice-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  padding: 6px 0;
  cursor: pointer;
}

.choice-row input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.choice-row.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.choice-text {
  display: grid;
}

#shared-cards-list .shop-card {
  background: var(--background);
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

/* Recent activity (0146): the customer's code under each line; removed stamps crossed out. */
.activity-main {
  display: grid;
}

.activity-removed {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.removed-tag {
  background: #b91c1c;
  color: #ffffff;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

/* "Is it me or everyone?" inside the verdict card. */
.verdict-nearby {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 12px 0 0;
  font-size: 15px;
}

/* You and the area: a full-width banner with a navy edge (dashed while locked). */
.area-banner {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--background);
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 10px;
  cursor: pointer;
}

.area-banner.selected {
  background: var(--background-element);
}

.area-banner.locked {
  border-style: dashed;
  border-color: var(--text-secondary);
}

.area-banner-title {
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
}

.area-banner.locked .area-banner-title,
.area-banner-note {
  color: var(--text-secondary);
  font-size: 14px;
}

.area-banner-number {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.area-banner-number strong {
  font-size: 36px;
  line-height: 1.1;
  color: var(--brand);
}

.area-banner-number .tone-good {
  color: var(--good);
  font-weight: 700;
}

.area-banner-number .tone-look {
  color: var(--look);
  font-weight: 700;
}

.area-banner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.area-chip {
  background: var(--ready);
  color: var(--on-ready);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
}

/* Each part's one-sentence takeaway, on navy like the verdict card. */
.takeaway {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.takeaway-text {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.takeaway-detail {
  font-size: 15px;
  opacity: 0.85;
  margin: 6px 0 0;
}

/* Why: the tiles' one-line verdicts, and the links under them. */
.insight-tile-detail.tone-good {
  color: var(--good);
}

.insight-tile-detail.tone-look {
  color: var(--look);
}

#insight-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#insight-tiles .insight-tile-detail {
  white-space: normal;
}

@media (min-width: 700px) {
  #insight-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.insight-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 12px 0 4px;
}

.insight-links .link-button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: none;
}

.insight-links .link-button.selected {
  border-bottom-color: var(--brand);
}

@media (max-width: 600px) {
  .busy-hour {
    font-size: 10px;
  }
}

/* The card colour and pattern picker on a shop's page (4 Nov 2026). */
.card-look-preview {
  position: relative;
  overflow: hidden;
  max-width: 360px;
  border-radius: 18px;
  padding: 14px 16px 16px;
  margin-bottom: 10px;
}
.card-look-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.card-look-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.card-look-logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(255, 255, 255, 0.25);
  font-weight: 700;
  overflow: hidden;
}
.card-look-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-look-words {
  flex: 1;
  min-width: 0;
}
.card-look-name {
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-look-place {
  font-size: 13px;
  opacity: 0.85;
}
.card-look-count {
  font-weight: 700;
  font-size: 17px;
}
.card-look-line {
  position: relative;
  height: 1.5px;
  opacity: 0.35;
  margin: 16px 0 8px;
}
.card-look-note {
  position: relative;
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.card-look-dots {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.card-look-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.6;
}
.card-look-open {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  margin-bottom: 10px;
}
/* A sample of the card opened. */
.card-look-opened {
  position: relative;
  overflow: hidden;
  max-width: 360px;
  border-radius: 22px;
  margin-bottom: 12px;
}
.card-opened-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
}
.card-opened-line {
  margin: 0 24px;
}
.card-opened-panel {
  position: relative;
  margin: 12px 8px 8px;
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 8px;
  background: var(--background);
  color: var(--text);
}
.card-opened-box {
  border-radius: 14px;
  padding: 12px;
  background: var(--background-element);
  font-size: 14px;
  text-align: center;
}
.card-opened-box p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}
.card-opened-cups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.card-opened-cups span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px dashed var(--text-secondary);
  opacity: 0.6;
}
.card-opened-more {
  color: var(--text-secondary);
}
.card-look-heading {
  font-weight: 600;
  margin: 8px 0 6px;
}
.card-look-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-look-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
}
.card-look-swatch.is-on {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.card-look-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.card-look-tile-inner {
  position: relative;
  overflow: hidden;
  display: block;
  width: 56px;
  height: 40px;
  border-radius: 10px;
}
.card-look-tile.is-on .card-look-tile-inner {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.card-look-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.card-look-field {
  margin: 16px 0;
}
.card-look-title {
  font-weight: 600;
  margin-bottom: 8px;
}

/* The counter sign page (card.html, since 9 Nov 2026): the App Store and Google Play
   buttons under "Get the free OneLoyal app"; phones see their own, computers both. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
html[data-device="apple"] .card-page .store-android,
html[data-device="android"] .card-page .store-apple {
  display: none;
}
a.app-store-live {
  border-style: solid;
  text-decoration: none;
}
