:root {
  color-scheme: light;
  --bg: #f5f7f5;
  --white: #fff;
  --ink: #14201c;
  --muted: #5c6c64;
  --line: #d7e0d9;
  --green: #174238;
  --mint: #e7f2ec;
  --blue: #e7f0f6;
  --focus: #155e8c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.4; }
button, summary { font: inherit; }
button { cursor: pointer; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { width: min(760px, 100%); margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 2px; color: var(--green); font-size: .86rem; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 1.9rem; line-height: 1.15; }
h2 { margin: 0 0 14px; font-size: 1.34rem; line-height: 1.2; }
.icon-button { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: var(--white); }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:disabled { opacity: .5; }

.meta-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 12px; color: var(--muted); font-size: .91rem; }
.meta-line button { padding: 2px 0; border: 0; color: var(--green); background: none; font-weight: 700; }
.lead { padding: 22px; border-radius: 8px; color: var(--white); background: var(--green); }
.lead-top, .lead-metrics { display: flex; justify-content: space-between; gap: 12px; }
.lead-top { font-size: .96rem; font-weight: 700; }
.lead-value { margin: 14px 0 2px; font-size: clamp(2.5rem, 9vw, 4.2rem); line-height: 1.1; font-weight: 800; overflow-wrap: anywhere; }
.lead p { margin: 0; color: #dcebe4; font-size: .94rem; }
.lead-divider { height: 1px; margin: 19px 0 16px; background: rgba(255,255,255,.25); }
.lead-metrics > div { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.lead-metrics span { color: #dcebe4; font-size: .88rem; }
.lead-metrics strong { font-size: 1.5rem; white-space: nowrap; }

.section { margin-top: 25px; }
.limit { padding: 18px; border: 1px solid #bfd6c9; border-radius: 8px; background: var(--mint); }
.limit-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.limit-top strong { font-size: 1.05rem; }
.limit-top span { font-weight: 700; white-space: nowrap; }
.progress { height: 12px; margin: 14px 0 10px; border-radius: 6px; background: #cbded1; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: #278158; }
.limit p { margin: 0; color: #315347; font-size: .92rem; }
.rows { margin-top: 10px; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row > div { display: flex; flex-direction: column; min-width: 0; }
.row span { font-weight: 650; }
.row small { color: var(--muted); font-size: .83rem; }
.row > strong { flex: none; font-size: 1.13rem; text-align: right; }
.usage-head, .usage-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px; align-items: center; gap: 12px; }
.usage-head { padding: 0 0 7px; color: var(--muted); font-size: .82rem; }
.usage-head span:not(:first-child) { text-align: right; }
.usage-rows { border-top: 1px solid var(--line); }
.usage-row { min-height: 53px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.usage-name { min-width: 0; font-weight: 650; }
.usage-row > span:nth-child(2), .usage-row > strong { text-align: right; white-space: nowrap; }
.usage-row > strong { font-size: 1.02rem; }
.tier { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.tier > div { display: flex; flex-direction: column; }
.tier span { color: var(--muted); font-size: .88rem; }
.tier strong { font-size: 1.13rem; }
.fineprint { margin: 10px 0 0; color: var(--muted); font-size: .86rem; }
details { margin-top: 15px; color: var(--muted); }
summary { display: inline-block; cursor: pointer; color: var(--green); font-weight: 700; }
details p { margin: 9px 0; font-size: .9rem; }
a { color: #0d5c82; }

.temp-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.temp-feature > div { display: flex; flex-direction: column; min-width: 0; padding: 18px; border-radius: 8px; background: var(--blue); }
.temp-feature > div:first-child { background: var(--mint); }
.temp-feature span { color: var(--muted); font-weight: 700; }
.temp-feature strong { margin-top: 8px; font-size: clamp(1.7rem, 6vw, 2.4rem); white-space: nowrap; }
.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.login { margin-top: 38px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.login p { margin: 0 0 20px; color: var(--muted); }
.login .error { margin: 15px 0 0; color: #a52828; }

@media (max-width: 480px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .lead { padding: 19px; }
  .lead-metrics strong { font-size: 1.25rem; }
  .limit-top { flex-wrap: wrap; }
  .row > strong { font-size: 1rem; }
  .usage-head { display: none; }
  .usage-row { grid-template-columns: 1fr 1fr; gap: 4px 10px; padding: 11px 0; }
  .usage-name { grid-column: 1 / -1; }
  .usage-row > span:nth-child(2) { text-align: left; color: var(--muted); font-size: .92rem; }
}
