:root {
  color-scheme: light;
  --paper: #f7faf8;
  --ink: #102619;
  --sub: #466052;
  --line: #dce9e0;
  --lime: #34c759;
  --green: #17673b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #218a49; outline-offset: 3px; }
.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.nav { display: flex; height: 80px; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; border-radius: 13px; }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 14px; font-weight: 690; }
.nav nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; text-decoration: none; }
.nav nav a:hover { color: var(--green); }
.nav-account { border: 1px solid var(--line); padding: 8px 15px; border-radius: 100px; background: white; }

.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 15px; margin-top: 10px; }
.intro {
  display: flex;
  min-width: 0;
  min-height: 345px;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: clamp(22px, 4.3vw, 51px);
  border: 1px solid #d8eee0;
  border-radius: 28px;
  background: radial-gradient(ellipse at 95% 0%, #c6f3d2, transparent 59%), linear-gradient(141deg, #e4f8e9, #effaf1);
}
.intro h1, .policy h1 {
  margin: 0 0 20px;
  font-weight: 810;
  font-size: clamp(42px, 5.4vw, 76px);
  letter-spacing: -.078em;
  line-height: .99;
}
.intro h1 span { display: block; color: var(--green); }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 5px 5px 12px;
  border: 1px solid #c6e4cf;
  border-radius: 15px;
  background: white;
}
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid #219a4e; outline-offset: 2px; }
.search .icon { font-size: 22px; color: var(--green); }
.browse-link { margin-top: 9px; }
.hero-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; min-width: 0; }
.feature {
  appearance: none;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: box-shadow .2s ease, transform .2s ease;
  animation: rise .38s ease both;
}
.feature:hover { box-shadow: 0 12px 30px #172e2220; transform: translateY(-3px); }
.feature-photo { display: grid; place-items: center; min-height: 242px; overflow: hidden; }
.feature-console .feature-photo { background: radial-gradient(ellipse at 32% 26%, #fff9, transparent 65%), #dce9ff; }
.feature-phone .feature-photo { background: radial-gradient(ellipse at 32% 24%, #fff8, transparent 70%), #e9def6; }
.feature-photo img { display: block; width: 96%; height: 228px; object-fit: contain; mix-blend-mode: multiply; }
.feature-phone .feature-photo img { width: 110%; height: 216px; transform: rotate(-5deg); }
.feature-label { display: block; padding: 13px 15px 15px; border-top: 1px solid var(--line); }
.feature-label strong, .feature-label small { display: block; }
.feature-label strong { font-size: clamp(14px, 2vw, 19px); letter-spacing: -.045em; }
.feature-label small { margin-top: 2px; color: var(--sub); font-size: 12px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 740;
  white-space: nowrap;
}
.lime { background: var(--lime); }
.lime:hover { background: #30ba54; }
.outline { background: white; border-color: var(--line); }
.outline:hover { background: #eef8f0; }
.text-button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.popular { margin-top: 27px; }
.popular h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.035em; }
.store-rail {
  display: grid;
  grid-auto-columns: minmax(136px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  padding: 3px 3px 8px;
  margin: -3px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.store-rail .store-card { min-height: 62px; }
.directory { margin-top: 39px; padding: 0 0 36px; scroll-margin-top: 18px; }
.directory-top { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 13px; }
.directory h2, .account h2, .policy h2 { margin: 0; font-size: 36px; line-height: 1.1; letter-spacing: -.064em; }
.store-count { margin: 4px 0 0; color: var(--sub); font-size: 13px; }
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 450px);
  padding: 4px;
  border-radius: 14px;
  background: #e8f1eb;
}
.filters button {
  min-height: 39px;
  padding: 4px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sub);
  font-size: 13px;
  font-weight: 660;
}
.filters [aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 5px #183c241b; }
.store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.store-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--ink);
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.store-rail .store-card { height: 62px; }
.store-card:hover { border-color: #95c5a7; background: #f3fbf5; }
.store-card strong { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.store-info { min-width: 0; }
.store-info small { display: block; color: var(--sub); font-size: 12px; white-space: nowrap; }
.store-info .offer-count { color: var(--green); font-weight: 710; }
.store-icon { width: 38px; height: 38px; flex: none; padding: 5px; border-radius: 10px; background: #f0f7f2; object-fit: contain; }
.directory > .button { margin-top: 13px; }
.store-grid > p { grid-column: 1 / -1; margin: 6px 0; color: var(--sub); }

.store-details {
  position: fixed;
  width: min(100% - 28px, 520px);
  max-height: min(76vh, 650px);
  padding: 19px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 72px #1438244a;
}
.store-details[open] { animation: rise .22s ease both; }
.store-details::backdrop { background: #10261976; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
#detail-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.detail-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.055em; overflow-wrap: anywhere; }
.close {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eaf6ed;
  color: var(--green);
}
.close::before, .close::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
.close::after { transform: rotate(-45deg); }
.detail-visit { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-note { margin: 9px 0 0; color: var(--sub); font-size: 13px; }
.offer-list { display: grid; gap: 7px; padding: 0; margin: 13px 0 0; list-style: none; }
.offer-list li { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #f8fcf9; }
.offer-list p { margin: 0; font-size: 14px; }
.offer-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.offer-actions .button { min-height: 35px; white-space: normal; overflow-wrap: anywhere; }

.account-area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 12px; margin: 9px 0 37px; scroll-margin-top: 20px; }
.account, .history { min-width: 0; border: 1px solid var(--line); border-radius: 22px; padding: 21px; background: #fff; }
.account:has(+ .history[hidden]) { max-width: 600px; grid-column: 1 / -1; }
.account h2 { margin-top: 9px; font-size: 29px; }
.account-spark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #e7f6ec; color: var(--green); }
.account p, .history p { margin: 6px 0 11px; color: var(--sub); font-size: 14px; overflow-wrap: anywhere; }
.providers { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.account label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 730; }
.email-row { display: flex; gap: 6px; }
.email-row input { flex: 1; min-width: 0; width: 100%; min-height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.new-code { display: block; margin-top: 7px; }
.status:empty, .history-status:empty { display: none; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.history h2 { margin: 0; font-size: 26px; letter-spacing: -.06em; line-height: 1.1; }
.history-list { list-style: none; padding: 0; margin: 12px 0 0; }
.history-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 9px; align-items: center; border-top: 1px solid var(--line); padding: 9px 0; }
.history-row strong, .history-row small { display: block; }
.history-row small { color: var(--sub); font-size: 12px; }
.history-saved strong { color: var(--green); }

.footer { display: flex; justify-content: space-between; gap: 10px; padding: 17px 0 27px; border-top: 1px solid var(--line); color: var(--sub); font-size: 13px; }
.footer-settings { display: flex; align-items: center; gap: 11px; }
.footer-settings input { accent-color: #219b4a; }
.policy { max-width: 740px; padding: 25px 0 65px; line-height: 1.6; }
.policy h1 span { color: var(--green); }
.policy h2 { font-size: 24px; margin-top: 21px; }
.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  background: currentColor;
  mask: var(--icon-image) center / contain no-repeat;
}
.icon-account { --icon-image: url('/icons/account.png'); }
.icon-stores { --icon-image: url('/icons/stores.png'); }
.icon-search { --icon-image: url('/icons/search.png'); }
.icon-ticket { --icon-image: url('/icons/ticket.png'); }
.account-spark .icon { width: 23px; height: 23px; }
@keyframes rise { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 870px) {
  .shell { width: calc(100% - 34px); }
  .intro { min-height: 280px; padding: 20px; }
  .feature-photo { min-height: 184px; }
  .feature-photo img, .feature-phone .feature-photo img { height: 175px; }
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 26px); }
  .nav { height: 64px; }
  .brand img { width: 42px; height: 42px; }
  .hero, .account-area { grid-template-columns: 1fr; }
  .hero { margin-top: 1px; gap: 8px; }
  .intro { min-height: 0; padding: 20px; border-radius: 21px; }
  .intro h1 { font-size: clamp(38px, 10vw, 53px); margin-bottom: 14px; }
  .feature { border-radius: 17px; }
  .feature-photo { min-height: 126px; }
  .feature-photo img, .feature-phone .feature-photo img { height: 130px; }
  .feature-label { padding: 7px 9px; }
  .directory { margin-top: 26px; }
  .directory-top { align-items: stretch; flex-direction: column; gap: 7px; }
  .directory h2 { font-size: 30px; }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-card { height: 71px; padding: 7px; gap: 7px; }
  .store-card strong { font-size: 13px; }
  .store-icon { width: 34px; height: 34px; }
  .history-row { grid-template-columns: 1fr 1fr; }
  .history-row > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 340px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
