:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #657069;
  --paper: #f7f5ef;
  --card: #fffefa;
  --line: #deddd5;
  --green: #176b45;
  --green-dark: #0e4d31;
  --lime: #d8f36a;
  --warning: #9a5b12;
  --danger: #a33b32;
  --shadow: 0 18px 60px rgb(26 47 35 / 9%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgb(216 243 106 / 35%), transparent 30rem),
    var(--paper);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px;
}

.brand {
  color: var(--green-dark);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account form {
  margin: 0;
}

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

.flash {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.flash--notice {
  border-color: #8ac9a9;
  color: var(--green-dark);
}

.flash--alert {
  border-color: #e0a49e;
  color: var(--danger);
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(480px, 1.2fr);
  gap: 54px;
  align-items: center;
  padding: 60px 0 66px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 0;
  font-size: 2rem;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.hero p,
.login-card > p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.watch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgb(255 254 250 / 86%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.watch-form .button {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: white;
  color: var(--ink);
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(23 107 69 / 12%);
}

.money-input {
  position: relative;
}

.money-input input {
  padding-right: 42px;
}

.money-input span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.button--primary {
  min-height: 50px;
  background: var(--green);
  color: white;
}

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

.button--secondary {
  background: var(--lime);
  color: var(--green-dark);
}

.button--quiet {
  min-height: 34px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.button--google {
  width: 100%;
  min-height: 52px;
  background: var(--ink);
  color: white;
}

.button--google span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: #4285f4;
  font-weight: 900;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.count {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.subscription-list {
  display: grid;
  gap: 22px;
}

.product-card,
.empty-state,
.login-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.product-card {
  padding: 25px;
}

.product-card__header {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.offer-count,
.ean {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.offer-count {
  background: var(--lime);
  color: var(--green-dark);
}

.ean {
  background: #ecede8;
  color: var(--muted);
}

.ean--pending {
  font-weight: 650;
}

.product-offers {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.product-offer {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.product-offer__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.offer-price {
  display: grid;
  min-width: 170px;
  justify-items: end;
}

.offer-price strong {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.offer-management {
  margin-top: 16px;
}

.offer-management > summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 750;
}

.offer-management[open] > summary {
  margin-bottom: 18px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.store,
.status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.store {
  background: var(--ink);
  color: white;
}

.status {
  background: #ecede8;
  color: var(--muted);
}

.status--ok {
  background: #daf1e3;
  color: var(--green-dark);
}

.status--failed {
  background: #f8e3dc;
  color: var(--danger);
}

.status--checking {
  background: #fff0c7;
  color: var(--warning);
}

.store-link {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.current-price {
  display: grid;
  min-width: 180px;
  align-content: start;
  justify-items: end;
}

.current-price span,
.current-price small,
.offer-price span,
.offer-price small,
.last-check,
.chart-panel__heading small {
  color: var(--muted);
  font-size: 0.76rem;
}

.current-price strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.product-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.6fr);
  gap: 24px;
  margin-top: 0;
}

.chart-panel,
.settings-panel {
  padding: 18px;
  border-radius: 15px;
  background: #f5f4ee;
}

.chart-panel__heading {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
}

.price-chart {
  display: block;
  width: 100%;
  height: 180px;
  margin-top: 10px;
  overflow: visible;
}

.price-chart polyline {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  font-weight: 700;
}

.toggle input {
  accent-color: var(--green);
}

.last-check {
  margin: 14px 0;
}

.danger-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-warning,
.promo-note {
  margin-top: 18px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.inline-warning {
  background: #f8e3dc;
  color: var(--danger);
}

.promo-note {
  background: #eef6cc;
  color: var(--green-dark);
}

.history-details {
  margin-top: 18px;
  font-size: 0.86rem;
}

.history-details summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 750;
}

.history-details table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
}

.history-details th,
.history-details td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.history-details th {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.empty-state {
  padding: 54px 26px;
  text-align: center;
}

.empty-state p,
.muted {
  color: var(--muted);
}

.login-card {
  width: min(520px, 100%);
  margin: 10vh auto 0;
  padding: clamp(28px, 6vw, 54px);
}

.login-card h1 {
  font-size: clamp(2.5rem, 8vw, 4.3rem);
}

.login-card .muted {
  margin: 16px 0 0;
  font-size: 0.78rem;
  text-align: center;
}

.channel-settings {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content max-content minmax(220px, 1fr);
  align-items: end;
  gap: 14px 22px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.channel-settings legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.channel-settings .toggle {
  min-height: 48px;
}

.settings-form .channel-settings {
  grid-template-columns: 1fr 1fr;
}

.settings-form .field--phone {
  grid-column: 1 / -1;
}

.phone-verification-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr);
  gap: 22px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.phone-verification-panel h2 {
  margin: 4px 0 8px;
}

.phone-verification-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.phone-verification-form .field {
  flex: 1;
}

.pending-verifications {
  grid-column: 2;
  display: grid;
  gap: 12px;
}

.verified-numbers {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.phone-status {
  color: var(--muted);
}

@media (max-width: 820px) {
  .phone-verification-panel {
    grid-template-columns: 1fr;
  }

  .pending-verifications,
  .verified-numbers {
    grid-column: 1;
  }

  .phone-verification-form {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .hero,
  .product-card__body {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 36px;
  }

  .product-card__header {
    gap: 16px;
    flex-direction: column;
  }

  .current-price,
  .offer-price {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 16px;
  }

  .account > span {
    display: none;
  }

  .page-shell {
    width: min(100% - 20px, 1124px);
  }

  .watch-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .channel-settings,
  .settings-form .channel-settings {
    grid-template-columns: 1fr;
  }

  .product-offer__header {
    align-items: stretch;
    flex-direction: column;
  }

  .product-card {
    padding: 18px;
  }

  h1 {
    font-size: 2.7rem;
  }
}
