/* Ratably — layout that belongs to one app page. The components (card, stat, row list, empty
   state, notice, sub-nav, page head) are defined once in components.css; nothing here restyles them. */

/* /app: Start a check and Your credits side by side from 900 px */
.cards-2 { display: grid; gap: 20px; margin-bottom: 20px }
.cards-2 .card { margin-bottom: 0 }
@media (min-width: 900px) { .cards-2 { grid-template-columns: 1fr 1fr } }

/* /app/upload: the dropzone, the picked file, and the storage form inside its card */
.app-main .dropzone { border: 2px dashed var(--rule); background: var(--sheet); padding: clamp(28px, 5vw, 40px); border-radius: 4px; text-align: center }
.app-main .dropzone label.linkish { display: inline }
.app-main .dropzone.staged { border-style: solid; border-color: var(--green); background: var(--green-soft) }
.app-main .dropzone .drop-chosen::before { content: "\2713"; display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 10px;
  border-radius: 50%; background: var(--green); color: #fff; font: 700 1.3rem/1 var(--body) }
.app-main .dropzone .drop-chosen[hidden], .app-main .dropzone [hidden] { display: none }
.app-main .dropzone .drop-next { margin-top: 12px; font-weight: 600; color: var(--ink) }
.app-main .dropzone .drop-change { display: inline-block; margin-top: 4px; font-size: .92rem }
/* Step 2 lands just under the staged step 1, so the chosen file stays in view. */
#keepCard { scroll-margin-top: 370px }
#btnUploadLease.is-ready { box-shadow: 0 0 0 3px var(--green-soft), 0 0 0 5px var(--green) }
@media (prefers-reduced-motion: no-preference) { #btnUploadLease { transition: box-shadow .2s } }
.app-main .upload-picked { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 4px; background: var(--green-soft); font: 500 .85rem var(--mono) }
.card .storage-card { margin: 0; padding: 0; border: 0; border-radius: 0; background: none }
.card-step { display: flex; align-items: baseline; gap: 8px }

/* /app/billing: the credits card, then the price grid in a card of its own */
.card .tiers { margin: 0 }
.billing-credits .stat { margin-bottom: 4px }

/* /app/account: the statistics switch as a clickwrap row, and the closing form */
.stats-row { font-weight: 400; padding: 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper) }
.stats-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px }
.close-account summary { cursor: pointer; font-weight: 600; padding-block: 4px }
.close-form { max-width: none }
.close-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem }
.close-form input { width: 100%; font-weight: 400 }
.card-danger .btn { justify-self: start; border-color: var(--red); color: var(--red) }
.card-danger .btn:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff }

/* The "reading your lease" overlay: modal, light, no percentage (the wait has no known length). */
html.proc-open { overflow: hidden }
.proc-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(16, 32, 47, .55) }
.proc-overlay[hidden] { display: none }
.proc-card { width: min(460px, 100%); background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--green);
  padding: clamp(22px, 5vw, 32px); text-align: center; outline: none }
.proc-card h2 { font-size: 1.35rem; margin-bottom: 8px }
.proc-file { font: 500 .85rem var(--mono); color: var(--ink2); overflow-wrap: anywhere; margin-bottom: 20px }
.proc-bar { height: 8px; background: var(--green-soft); overflow: hidden; position: relative; margin-bottom: 16px }
.proc-bar span { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--green); animation: proc-slide 1.4s ease-in-out infinite }
@keyframes proc-slide { 0% { left: -35% } 100% { left: 100% } }
@media (prefers-reduced-motion: reduce) { .proc-bar span { animation: none; width: 100%; opacity: .55 } }
.proc-stage { font-weight: 600; min-height: 1.5em; margin-bottom: 8px }
.proc-patience { color: var(--ink2); font-size: .9rem; margin-bottom: 0 }
.proc-error { border: 1px solid var(--red); background: rgba(198, 54, 44, .07); color: var(--red); padding: 10px 12px; font-size: .92rem; text-align: left; margin-bottom: 12px }
.proc-card[aria-busy="true"] .proc-actions { display: none }
.proc-card[aria-busy="false"] .proc-patience { display: none }
.proc-actions { display: grid; gap: 12px; justify-items: center; margin-top: 16px }
.proc-actions .btn { width: 100% }

/* upload page at zero checks: the way on is one button */
.buy-card { border-left: 3px solid var(--green) }
.buy-card p { margin: 0 0 16px; color: var(--ink2); max-width: 60ch }
.buy-card-actions { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap }

/* the check page's last step */
.done-step { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule) }
.done-step p { margin: 0 0 12px; color: var(--ink2); font-size: .95rem }
.done-step .btn { text-decoration: none }

/* the line My checks shows on arriving from Done */
#checksDoneKept, #checksDoneNothing { margin: 16px 0 }

/* "A statement I received" or "A statement I prepared" (landlord_mode_spec.md 2.4). The second
   has no five-year figure, no risk rating, no draft letter and no letter reminder. */
.mode-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 18px; border: 1.5px solid var(--rule); border-radius: 99px; background: var(--sheet); flex-wrap: wrap }
.mode-switch button { font: 500 .9rem var(--body); padding: .5em 1em; min-height: 44px; border: 0; border-radius: 99px; background: none; color: var(--ink2); cursor: pointer }
.mode-switch button[aria-pressed="true"] { background: var(--green-soft); color: var(--green) }
@media (max-width: 480px) {
  .mode-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 12px }
  .mode-switch button { border-radius: 9px; padding: .5em .4em; font-size: .86rem }
}
#calc[data-mode="presend"] .calc-sub, #calc[data-mode="presend"] #riskBadge,
#calc[data-mode="presend"] #btnGenerateLetter, #calc[data-mode="presend"] #btnShare,
#calc[data-mode="presend"] #doneStep > p, #calc[data-mode="presend"] .page-head .lede,
#calc[data-mode="presend"] .calc-out > .calc-note:last-child { display: none }
/* which statement year: the upload form's field, the picker dialog's list, the locked box */
.year-field { display: grid; gap: 6px; margin-top: 18px; max-width: 420px }
.year-field-label, .year-pick-label { font: 600 .82rem var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink2) }
.year-field select, .year-pick select { width: 100%; font-family: var(--mono) }
.year-pick { display: grid; gap: 6px; margin: 4px 0 18px; text-align: left }
#yearNoCredits { margin: 0 0 16px }
#auditYear[readonly] { background: var(--green-soft); color: var(--ink2); cursor: not-allowed }
#auditYearNote { margin: -4px 0 0 }
