/* Member portal — phone-first, one screen, one next thing. No tank graphic. */
.portal {
  background: var(--cream);
  color: var(--ink);
}
.portal-frame {
  width: min(26.5rem, calc(100% - 2rem));
  margin: 0 auto;
  min-height: calc(100svh - 3.75rem);
  min-height: calc(100dvh - 3.75rem);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 0 0;
}
.portal-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.sample-flag {
  display: inline-block;
  margin: 0;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.member-name {
  margin: 0;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.03em;
  color: var(--mute);
}
.portal-panel {
  flex: 1 1 auto;
  padding: 0.4rem 0 2.4rem;
}
.portal-panel[hidden] { display: none; }
.portal .kicker {
  margin-bottom: 0.85rem;
}
.pct {
  margin: 0 0 0.85rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(4.8rem, 26vw, 6.4rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
  color: var(--ink);
}
.pct span {
  color: var(--yellow);
  font-weight: 500;
}
.portal-line {
  margin: 0;
  max-width: 16em;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 4.6vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.portal-quiet {
  max-width: 18em;
  margin: 1.15rem 0 0;
  color: var(--mute);
  font-size: 1.02rem;
  line-height: 1.5;
}
.next-thing {
  display: block;
  width: 100%;
  margin: 1.45rem 0 0;
  padding: 1.25rem 1.25rem 1.3rem;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(30, 31, 43, 0.03);
  cursor: pointer;
  min-height: 48px;
}
.next-thing:hover { border-color: rgba(30, 31, 43, 0.22); }
.next-thing:focus-visible {
  outline: 3px solid rgba(245, 196, 0, 0.55);
  outline-offset: 2px;
}
.next-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.next-main {
  display: block;
  margin-top: 0.35rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 2.05rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}
.next-sub {
  display: block;
  margin-top: 0.45rem;
  color: var(--mute);
  font-size: 0.95rem;
  line-height: 1.4;
  letter-spacing: -0.011em;
}
.when {
  margin: 0.2rem 0 0.35rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(4.2rem, 18vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--ink);
}
.when-sub {
  margin: 0 0 1.75rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--mute);
}
.posted {
  margin: 0.15rem 0 0.85rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(3.3rem, 12vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.posted span {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--mute);
  font-weight: 500;
}
.acct {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}
.acct li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.acct li:first-child { border-top: 0; padding-top: 0.2rem; }
.acct small {
  display: block;
  margin-top: 0.25rem;
  color: var(--mute);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.acct strong {
  font-weight: 500;
  white-space: nowrap;
}
.off { color: var(--mute); font-weight: 500; }

.portal-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 1.25rem;
  order: 8;
  padding: 0.35rem 0 0.45rem;
  border-top: 1px solid var(--line);
  position: static;
  background: transparent;
}
.portal-tabs button {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  min-height: 48px;
  padding: 0.7rem 0.15rem;
  color: var(--mute);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-radius: 0;
}
.portal-tabs button.is-on {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

/* Laptop / desktop: same member portal, wide — not a phone floating on cream. */
@media (min-width: 760px) {
  .portal {
    background: #fff;
  }
  .portal-frame {
    width: min(68rem, calc(100% - 4.5rem));
    min-height: calc(100svh - 4.15rem);
    padding: 2rem 0 0.5rem;
  }
  .portal-id {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .member-name {
    font-size: 1.15rem;
    color: var(--ink);
  }
  .portal-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: 3rem;
    align-items: start;
    padding-bottom: 1.5rem;
  }
  .portal-panel > .kicker { grid-column: 1 / -1; }
  .portal-panel > .pct,
  .portal-panel > .when,
  .portal-panel > .when-sub,
  .portal-panel > .posted,
  .portal-panel > .portal-line,
  .portal-panel > .portal-quiet,
  .portal-panel > .next-thing,
  .portal-panel > .acct {
    grid-column: 1;
  }
  .portal-panel > .usage,
  .portal-panel > .bill-card {
    grid-column: 2;
    grid-row: 2 / span 8;
    margin-top: 0;
  }
  .portal-panel[data-panel="delivery"] > .portal-line,
  .portal-panel[data-panel="delivery"] > .portal-quiet,
  .portal-panel[data-panel="price"] > .portal-quiet {
    max-width: 28em;
  }
  .pct { font-size: 6.4rem; }
  .when { font-size: 5.2rem; }
  .posted { font-size: 4.2rem; }
  .usage-chart { height: 14rem; gap: 0.65rem; }
  .usage-val { font-size: 0.82rem; }
  .usage-day { font-size: 0.72rem; }
  .portal-tabs {
    position: static;
    width: min(36rem, 100%);
    margin: 1.5rem 0 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--cream);
    padding: 0.2rem;
  }
  .portal-tabs button { border-radius: 10px; }
  .portal-tabs button.is-on {
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--yellow);
  }
  .portal-sample {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid var(--line);
  }
  .portal-sample .portal-quiet { margin: 0; max-width: none; }
}

.usage {
  margin-top: 1.7rem;
}
.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.usage-head .kicker { margin: 0; }
.sample-pill {
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.usage-range {
  margin: 0 0 0.85rem;
  color: var(--mute);
  font-size: 0.92rem;
  letter-spacing: -0.011em;
}
.unit-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  margin: 0 0 0.85rem;
  padding: 0.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.unit-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 40px;
  border-radius: 999px;
  color: var(--mute);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.unit-toggle button.is-on {
  background: var(--ink);
  color: #fff;
}
.unit-toggle button:focus-visible {
  outline: 3px solid rgba(245, 196, 0, 0.55);
  outline-offset: 2px;
}
.usage-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  height: 9.25rem;
  margin: 0;
  padding: 0.15rem 0 0;
}
.usage-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.usage-val {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.usage-track {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 0;
  margin: 0.28rem 0 0.35rem;
}
.usage-bar {
  display: block;
  width: 100%;
  height: var(--h);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: var(--yellow);
}
.usage-day {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: center;
  line-height: 1.15;
}
.usage-day small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.68rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}
.usage-total {
  margin: 0.95rem 0 0;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.usage-total span {
  display: block;
  margin-top: 0.25rem;
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: -0.011em;
  color: var(--mute);
}
.usage .portal-quiet { margin-top: 0.7rem; }

.bill-card {
  margin-top: 1.6rem;
  padding: 1.15rem 1.15rem 1.05rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.bill-title {
  margin: 0.4rem 0 0.15rem;
  font-family: Onest, Inter, sans-serif;
  font-weight: 500;
  font-size: clamp(1.45rem, 5vw, 1.7rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}
.bill-when {
  margin: 0;
  color: var(--mute);
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.bill-rows {
  margin: 0.85rem 0 0.15rem;
}
.bill-rows div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}
.bill-rows dt {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}
.bill-rows dd {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bill-card .portal-quiet { margin-top: 0.75rem; }

.portal-sample {
  order: 9;
  margin: 0.25rem 0 0;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
}
.portal-sample .sample-flag { margin-bottom: 0.55rem; }
.portal-sample .portal-quiet { margin-top: 0; }

body.embed .site-header,
body.embed .site-footer,
body.embed .skip { display: none; }

/* Embedded on the homepage phone: quiet the sample badges */
body.embed .sample-flag,
body.embed .sample-pill {
  background: transparent;
  color: var(--mute);
  border: 1px solid rgba(30, 31, 43, 0.16);
  font-weight: 500;
  letter-spacing: 0.1em;
}
body.embed { background: var(--cream); }
