:root {
  color-scheme: light;
  --canvas: #f1f5f2;
  --ink: #172e28;
  --muted: #465c54;
  --brand: #153b32;
  --primary: #155a48;
  --tint: #edf4ef;
  --line: #d3dfd8;
  --white: #fff;
  --danger: #872e24;
  font: 16px/1.5 "Atkinson Hyperlegible Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.14rem; }
.shell { width: min(1100px, calc(100% - 48px)); margin: 0 auto; }
.masthead { background: var(--brand); color: var(--white); }
.bar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.06rem; font-weight: 700; line-height: 1.22; }
.brand small { display: block; margin-top: 3px; color: #c5e2d3; font-size: .875rem; font-weight: 450; }
.mark { display: grid; width: 37px; height: 37px; place-items: center; color: var(--brand); background: #c9e7d8; border-radius: 8px; font-size: 1.33rem; }
.account { display: flex; align-items: center; gap: 13px; min-width: 0; }
.account span { overflow-wrap: anywhere; font-size: .875rem; }
main { padding-block: 40px 55px; }
.page-heading, .report-top, .dialog-heading, .quota-heading {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
}
.page-heading { flex-wrap: wrap; margin-bottom: 22px; }
nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav button[aria-pressed="true"] { background: var(--tint); border-color: #82a698; color: #124835; }
.panel {
  min-width: 0; border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3.3vw, 34px);
  background: var(--white); box-shadow: 0 3px 12px #19382c08;
}
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 8vw, 110px); align-items: center; padding: clamp(16px, 7vh, 80px) 0; }
.login-intro h1 { margin-top: 12px; font-size: clamp(2.4rem, 5.7vw, 4.85rem); letter-spacing: -.07em; }
.login-intro p:last-child { max-width: 32ch; margin-top: 20px; color: var(--muted); }
.login-card { display: grid; gap: 6px; }
.login-card h2 { margin-bottom: 14px; }
.login-card label:not(:first-of-type) { margin-top: 8px; }
.login-card button { margin-top: 14px; }
.eyebrow { color: var(--primary); font-size: .875rem; font-weight: 720; }
.muted, .hint { color: var(--muted); }
.hint, .message { font-size: .9rem; }
.message:not(:empty) { padding: 11px 14px; margin-bottom: 16px; background: var(--tint); border-radius: 8px; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message[data-error="true"] { color: var(--danger); background: #fff1eb; }
.login-card .message:not(:empty) { margin: 8px 0 0; }
.empty p, .publish > p { margin-top: 9px; color: var(--muted); }
.report-layout { display: grid; gap: 16px; }
.report { border-top: 4px solid var(--primary); }
.report-top { align-items: end; }
.report-top h2 { margin-block: 5px; font-size: clamp(1.55rem, 4vw, 2.45rem); }
.month-select { flex: 0 1 240px; }
.report-actions {
  display: flex; align-items: flex-start; flex-direction: column; gap: 15px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.billing-field { width: min(100%, 245px); }
.billing-field .hint, .lookup .hint { margin-top: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0;
  gap: 10px;
}
.metrics div { background: var(--tint); border-radius: 9px; padding: 12px 14px; }
.metrics dt { font-size: .875rem; color: var(--muted); }
.metrics dd { margin: 3px 0 0; font-size: 1.16rem; line-height: 1.3; font-weight: 730; overflow-wrap: anywhere; }
.lookup-fields, .publish-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; margin-top: 20px; }
.quota-heading { margin-top: 20px; flex-wrap: wrap; }
.pill { color: #184e3c; background: var(--tint); border-radius: 99px; font-size: .875rem; font-weight: 700; padding: 4px 11px; }
.quota-metrics { margin: 15px 0; }
.components { margin: 8px 0 2px; display: grid; gap: 5px; }
.components div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.components dd { margin: 0; font-weight: 650; }
details { padding: 8px 0 12px; margin: 0 0 9px; }
summary { cursor: pointer; font-weight: 620; }
.publish > .message:not(:empty) { margin: 14px 0 0; }
.preview { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.notice { margin-bottom: 14px; padding: 11px 13px; background: #fff5da; border-radius: 9px; }
.notice label { display: flex; align-items: center; gap: 9px; margin: 0; }
dialog { color: var(--ink); width: min(400px, calc(100% - 28px)); padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
dialog::backdrop { background: #102a22a8; }
.dialog-heading { margin-bottom: 14px; }
.dialog-heading h2 { font-size: 1.28rem; }
.picker-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.picker-months button { padding-inline: 4px; }
.picker-months button[aria-pressed="true"] { background: var(--primary); color: var(--white); }

button, input, select { font: inherit; }
label { display: block; font-size: .9rem; font-weight: 650; margin-bottom: 5px; }
button { cursor: pointer; padding: 8px 14px; font-weight: 650; }
button, input, select { border: 1px solid #aebfb6; border-radius: 8px; min-height: 42px; color: var(--ink); background: var(--white); }
button:hover:not(:disabled) { background: var(--tint); }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--primary); border-color: var(--primary); color: var(--white); }
.primary:hover:not(:disabled) { background: #114437; }
.on-dark { background: transparent; color: var(--white); border-color: #92b1a4; }
.on-dark:hover:not(:disabled) { background: #285548; }
input, select { width: 100%; min-width: 0; padding: 7px 10px; }
input[type="checkbox"] { min-height: 0; width: auto; accent-color: var(--primary); }
input[type="file"] { padding: 6px 8px; font-size: .9rem; }
input::file-selector-button { font: inherit; border: 0; border-radius: 5px; padding: 4px 8px; background: var(--tint); color: var(--ink); cursor: pointer; margin-right: 8px; }
select { appearance: none; padding-right: 31px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 15px center/5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center/5px 5px no-repeat, var(--white); }
.month-button { width: 100%; text-align: left; }
:focus-visible { outline: 3px solid #248369; outline-offset: 3px; }

@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  main { padding-top: 26px; }
  .login-layout { grid-template-columns: 1fr; gap: 24px; padding: 16px 0; }
  .login-intro h1 br { display: none; }
  .report-top { display: grid; align-items: start; }
  .report-top > * { min-width: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lookup-fields, .publish-fields { grid-template-columns: 1fr; }
}

@media (max-width: 355px) {
  .metrics { grid-template-columns: 1fr; }
  .picker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
