:root {
  color-scheme: light;
  --app-bg: #f5f6f1;
  --app-panel: #ffffff;
  --app-soft: #edf1eb;
  --app-ink: #25352c;
  --app-muted: #68756c;
  --app-green: #315443;
  --app-green-hover: #234433;
  --app-line: #dbe2da;
  --app-accent: #a97855;
  --app-focus: #a36227;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--app-ink);
  background: var(--app-bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: auto; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #e9ede7; color: var(--app-ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--app-focus); outline-offset: 3px; }
.app-shell { width: min(100%, 760px); min-height: 100vh; margin-inline: auto; padding: 0 22px 18px; background: var(--app-bg); box-shadow: 0 0 36px rgb(37 53 44 / .07); }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 12px; padding: 12px 16px; transform: translateY(-160%); background: var(--app-panel); color: var(--app-ink); }
.skip-link:focus { transform: none; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 82px; border-bottom: 1px solid var(--app-line); }
.app-brand { display: inline-flex; min-width: 0; align-items: center; gap: 11px; text-decoration: none; }
.app-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; background: var(--app-green); color: white; font-size: 1.05rem; font-weight: 700; }
.app-brand > span:last-child { display: grid; gap: 3px; }
.app-brand strong { font-size: .76rem; letter-spacing: .09em; }
.app-brand small { color: var(--app-muted); font-size: .68rem; line-height: 1.35; }
.demo-badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #d1d9d0; color: var(--app-green); font-size: .62rem; font-weight: 700; letter-spacing: .06em; }
.app-view { padding-block: 25px 35px; }
.app-intro { margin-bottom: 22px; }
.app-kicker { margin: 0 0 8px; color: var(--app-accent); font-size: .68rem; font-weight: 750; letter-spacing: .12em; line-height: 1.4; }
h1, h2, p, dl { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 7vw, 2.35rem); font-weight: 680; letter-spacing: -.045em; line-height: 1.12; }
h2 { font-size: 1.18rem; font-weight: 680; letter-spacing: -.025em; line-height: 1.25; }
.app-lead { max-width: 52ch; margin-bottom: 0; color: var(--app-muted); font-size: .97rem; }
.app-note { margin: 11px 0 0; color: var(--app-muted); font-size: .75rem; }
.property-card, .recipient-card, .message-card, .upload-card { border: 1px solid var(--app-line); background: var(--app-panel); }
.property-card { padding: 18px; }
.property-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--app-line); }
.property-card__heading .app-kicker { margin-bottom: 5px; }
.property-card__heading h2 { margin: 0; font-size: 1.25rem; }
.property-badge { flex: 0 0 auto; padding: 5px 7px; background: var(--app-soft); color: var(--app-muted); font-size: .59rem; font-weight: 700; letter-spacing: .04em; }
.property-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 15px 0 0; }
.property-details > div, .compact-details > div { min-width: 0; }
.property-details dt, .compact-details dt { color: var(--app-muted); font-size: .71rem; }
.property-details dd, .compact-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .87rem; font-weight: 620; }
.property-details__address, .property-details__contract { grid-column: 1 / -1; }
.property-details__address dd, .property-details__contract dd { font-size: .9rem; }
.example-note { margin: 15px 0 0; padding-top: 11px; border-top: 1px solid var(--app-line); color: var(--app-muted); font-size: .69rem; }
.actions-section { margin-top: 29px; }
.section-heading { margin-bottom: 13px; }
.section-heading .app-kicker { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: 1.42rem; }
.action-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.action-card { display: flex; width: 100%; min-height: 82px; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--app-line); background: var(--app-panel); text-align: left; }
.action-card:hover { border-color: #aebcaf; background: #fcfdfb; }
.action-card__symbol { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; background: var(--app-soft); color: var(--app-green); font-size: 1.05rem; font-weight: 700; }
.action-card__copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.action-card__copy strong { font-size: .9rem; font-weight: 670; }
.action-card__copy small { color: var(--app-muted); font-size: .75rem; line-height: 1.4; }
.action-card__arrow { color: var(--app-green); font-size: 1.2rem; }
.app-view > .app-kicker { margin-top: 22px; }
.app-view > h2 { margin: 0 0 8px; font-size: clamp(1.8rem, 7vw, 2.35rem); font-weight: 680; letter-spacing: -.045em; line-height: 1.12; }
.back-button { display: inline-flex; min-height: 44px; align-items: center; margin: -8px 0 19px; padding: 4px 0; border: 0; background: none; color: var(--app-green); font-size: .83rem; font-weight: 630; text-decoration: underline; text-underline-offset: 3px; }
.app-view > h2 + .app-lead { margin-bottom: 19px; }
.recipient-card { margin-top: 18px; padding: 16px; }
.recipient-card h2 { margin-bottom: 12px; }
.compact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; }
.compact-details > div { padding-bottom: 9px; border-bottom: 1px solid #edf0ec; }
.compact-details dd { font-size: .86rem; }
.message-card { margin-top: 14px; padding: 16px; background: #fbfcfa; }
.message-card .app-kicker { margin-bottom: 10px; }
.message-subject { margin-bottom: 12px; font-size: .84rem; }
.message-subject strong { font-weight: 680; }
.message-body { margin: 0; color: #3b4940; font-size: .85rem; line-height: 1.7; white-space: pre-line; }
.primary-button, .secondary-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; padding: 12px 17px; border: 1px solid var(--app-green); font-size: .88rem; font-weight: 680; text-align: center; text-decoration: none; }
.primary-button { background: var(--app-green); color: #fff; }
.primary-button:hover { border-color: var(--app-green-hover); background: var(--app-green-hover); }
.secondary-button { background: var(--app-panel); color: var(--app-green); }
.secondary-button:hover { background: var(--app-soft); }
.app-view > .primary-button { width: 100%; margin-top: 15px; }
.primary-button--link { width: auto; margin: 0; }
.feedback { margin: 12px 0 0; padding: 12px 13px; border-left: 3px solid var(--app-green); background: var(--app-soft); color: var(--app-ink); font-size: .82rem; line-height: 1.5; }
.screen-footnote { margin: 14px 0 0; color: var(--app-muted); font-size: .72rem; line-height: 1.5; }
.recipient-card--compact > p { margin: 0; font-size: .84rem; }
.recipient-card--compact > p + p { margin-top: 4px; color: var(--app-muted); }
.recipient-card--compact > p:last-child { margin-top: 12px; font-size: .73rem; }
.generated-link { margin-top: 16px; padding: 16px; border: 1px solid var(--app-line); background: var(--app-panel); }
.generated-link h2 { margin-bottom: 10px; font-size: 1rem; }
.generated-link input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c9d3c9; border-radius: 2px; background: #f8faf7; font-size: .8rem; }
.link-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 10px; }
.link-actions .primary-button, .link-actions .secondary-button { width: 100%; }
.contract-card { margin-top: 20px; }
.contract-card h2 { margin-bottom: 15px; }
.countdown { display: flex; align-items: baseline; gap: 11px; margin-top: 19px; padding-block: 17px; border-block: 1px solid var(--app-line); }
.countdown strong { color: var(--app-green); font-size: clamp(2.45rem, 11vw, 3.8rem); font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.countdown span { color: var(--app-muted); font-size: .82rem; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--app-muted); font-size: .72rem; }
progress { display: block; width: 100%; height: 9px; margin-top: 8px; overflow: hidden; border: 0; border-radius: 99px; background: #e8ede7; accent-color: var(--app-green); }
progress::-webkit-progress-bar { border-radius: 99px; background: #e8ede7; }
progress::-webkit-progress-value { border-radius: 99px; background: var(--app-green); }
progress::-moz-progress-bar { border-radius: 99px; background: var(--app-green); }
.tenant-intro { padding-block: 28px 18px; }
.upload-card { padding: 18px; }
.upload-card__heading h2 { margin-bottom: 5px; }
.upload-card__heading p { margin: 0; color: var(--app-muted); font-size: .81rem; }
.upload-list { display: grid; gap: 12px; margin-top: 18px; }
.upload-item { padding: 13px; border: 1px solid var(--app-line); background: #fbfcfa; }
.upload-item label { display: block; margin-bottom: 8px; font-size: .86rem; font-weight: 680; }
.file-picker { position: relative; display: flex; min-height: 46px; align-items: center; gap: 9px; padding: 5px; border: 1px solid #cad4ca; background: white; }
.file-picker:focus-within { outline: 3px solid var(--app-focus); outline-offset: 2px; }
.file-picker__action { display: inline-flex; min-height: 34px; flex: 0 0 auto; align-items: center; padding: 5px 9px; border: 1px solid var(--app-green); background: var(--app-soft); color: var(--app-green); font-size: .72rem; font-weight: 650; }
.file-picker__name { min-width: 0; color: var(--app-muted); font-size: .68rem; overflow-wrap: anywhere; }
.file-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-card > .primary-button { width: 100%; margin-top: 16px; }
.privacy-note { margin: 13px 0 0; color: var(--app-muted); font-size: .72rem; line-height: 1.5; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; padding-block: 15px; border-top: 1px solid var(--app-line); color: var(--app-muted); font-size: .68rem; }
.app-footer span { letter-spacing: .07em; }
.app-footer a { color: var(--app-green); font-weight: 620; }
.noscript-note { max-width: 760px; margin: 12px auto; padding: 14px; background: #fff; color: #722; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (min-width: 560px) {
  .app-shell { padding-inline: 30px; }
  .app-view { padding-top: 30px; }
  .property-card, .recipient-card, .message-card, .upload-card { padding: 21px; }
  .action-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-card { min-height: 104px; align-items: flex-start; }
  .action-card__arrow { align-self: center; }
  .link-actions { grid-template-columns: auto 1fr; }
  .link-actions .secondary-button { width: auto; }
  .upload-list { grid-template-columns: 1fr; }
}
@media (min-width: 760px) {
  .app-shell { padding-inline: 38px; }
  .property-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .property-details__address { grid-column: span 2; }
  .property-details__contract { grid-column: auto; }
  .upload-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .app-shell { padding-inline: 18px; }
  .app-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; padding-block: 12px; }
  .app-brand { width: 100%; }
  .app-brand strong { white-space: nowrap; }
  .demo-badge { align-self: flex-start; }
}
@media (max-width: 360px) {
  .property-details { grid-template-columns: 1fr; gap: 12px; }
  .property-details__address, .property-details__contract { grid-column: auto; }
}
/* Extensions retain the original four views and mobile layout. */
button, input, textarea, select { font: inherit; }
input, textarea, select { max-width: 100%; color: var(--app-ink); }
.field { display: grid; gap: 6px; margin-block: 14px; min-width: 0; }
.field label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; }
.field input, .field textarea, .field select, .upload-item input:not([type=file]) { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b8c5b9; border-radius: 3px; background: white; font-size: 16px; }
textarea { resize: vertical; line-height: 1.6; }
.small-button { min-height: 44px; padding: 7px 10px; font-size: .74rem; }
.property-details dd { color: #25352c; opacity: 1; visibility: visible; }
.property-card__heading > div { min-width: 0; }
.property-card__heading h2 { overflow-wrap: anywhere; }
.message-editor > .primary-button { margin-top: 12px; width: 100%; }
.message-editor h3, .recipient-card h3 { margin-top: 0; font-size: 1.06rem; }
.app-dialog { width: min(94vw, 650px); max-height: 90dvh; overflow: auto; padding: 22px; border: 1px solid var(--app-line); color: var(--app-ink); background: var(--app-bg); }
.app-dialog::backdrop { background: rgb(15 30 20 / .5); }
.app-dialog .secondary-button { margin-top: 10px; }
.renewal-card { margin-top: 18px; padding: 18px; border: 1px solid #c9ac8b; background: #fff8ed; }
.renewal-card h2 { margin-bottom: 9px; }
.renewal-card p { font-size: .88rem; }
.renewal-card a { width: 100%; }
.recent-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--app-line); }
.recent-actions ul { padding-left: 20px; color: var(--app-muted); font-size: .82rem; }
.recent-actions li + li { margin-top: 8px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 12px; font-size: 1.1rem; font-weight: 650; }
.meter-options { display: grid; grid-template-columns: 1fr; gap: 5px; }
.meter-options label { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.meter-options input { width: 22px; height: 22px; accent-color: var(--app-green); }
summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 600; }
details > form { margin-top: 12px; }
[data-meter-config] > .primary-button { width: 100%; margin-top: 16px; }
[data-extra-meters] p { display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
[data-reading-history] { overflow-x: auto; }
.readings-table { border-collapse: collapse; width: 100%; font-size: .74rem; text-align: left; }
.readings-table td, .readings-table th { padding: 10px 5px; border-bottom: 1px solid var(--app-line); overflow-wrap: anywhere; }
.reading-warning { color: #874018; font-weight: 700; }
.photo-preview { display: block; width: 130px; height: 100px; object-fit: contain; margin-top: 10px; background: var(--app-soft); }
.upload-item input[type=file] { width: 100%; font-size: .76rem; }
.upload-item input[type=file]::file-selector-button { min-height: 44px; border: 1px solid var(--app-line); background: var(--app-soft); color: var(--app-green); }
.upload-item label { margin-top: 12px; }
.upload-item h3 { margin-top: 0; }
.upload-list { grid-template-columns: 1fr; }
.clipboard-fallback { position: fixed; left: -9999px; }
.countdown { flex-wrap: wrap; }
@media(min-width:560px) { .form-grid, .meter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; } }
