/* Micacor app styles, on top of brand.css */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.reasons { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.reasons .card h3 { font-size: 20px; }
.reasons .card p { margin: 0; color: var(--ink-soft); }
.price-line { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: baseline; margin-top: 22px; }
.price-line .price { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.price-line span { color: var(--ink-soft); }

/* App frame */
#app { padding: 36px 0 20px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.app-head h2 { margin: 0; }
.save-pill { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--leaf); opacity: 0; transition: opacity .2s ease; }
.save-pill.show { opacity: 1; }
.save-pill.err { background: #fbe6e4; color: var(--danger); }
#app-root { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 240px; }
@media (max-width: 600px) { #app-root { padding: 14px; } }

.screen { display: grid; gap: 18px; }
.screen-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.screen-head h3 { margin: 0; }
.stack { display: grid; gap: 16px; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.tight { gap: 6px; }
.empty { color: var(--ink-soft); padding: 14px 0; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 0 0 8px; }
.back { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--leaf); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

h4 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.card.form, .card { padding: 18px; }
.prop-list { display: grid; gap: 12px; }
.prop-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.prop-card h4 { margin-bottom: 2px; }
.prop-card .addr { margin: 0 0 6px; white-space: pre-line; }
.prop-card .hint { margin: 0; }

/* Fields */
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field label, .check { font-weight: 600; font-size: 14px; }
input[type="text"], input[type="date"], textarea, select {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--field-border); border-radius: 9px; padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; min-height: 44px; }
select { appearance: auto; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, .pick:focus-within, .thumb:focus-visible, canvas:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--sun-deep); outline-offset: 2px;
}
.check { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.check input { width: 20px; height: 20px; }
.alarm { padding: 10px 0; }
.alarm + .alarm { border-top: 1px dashed var(--line); }
.meter { display: grid; gap: 8px; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 8px; }
@media (max-width: 480px) { .meter { grid-template-columns: 1fr; } }
.keys { display: grid; gap: 8px; margin-bottom: 10px; }
.key-row { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.tiny { padding: 6px 10px; font-size: 13px; background: #fff; color: var(--ink); border: 1.5px solid var(--field-border); border-radius: 999px; }
.btn.tiny:hover { background: var(--panel); }
.pick { position: relative; }
.pick input { position: absolute; inset: 0; opacity: 0; width: 1px; height: 1px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: inherit; font-weight: 700; font-size: 15px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.tab.on { border-bottom-color: var(--sun); }
.tab:hover { background: var(--panel); }

/* Rooms and items */
.rooms { display: grid; gap: 10px; }
.room { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.room summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; list-style: none; position: relative; }
.room summary::-webkit-details-marker { display: none; }
.room summary::after { content: "+"; font-size: 22px; line-height: 1; font-weight: 400; position: absolute; right: 16px; top: 14px; }
.room[open] summary::after { content: "\2212"; }
.room summary .hint { margin: 0; font-weight: 500; }
.room-title { font-family: var(--serif); font-size: 19px; }
.room-body { padding: 0 16px 16px; display: grid; gap: 12px; }
.room-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.room-tools .field { flex: 1 1 200px; margin: 0; }
.room-tools .row { padding-bottom: 2px; }
.items { display: grid; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--paper); }
.item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-name { flex: 1 1 160px; font-weight: 700; }
.item-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.item .field { margin-bottom: 8px; }
.verdict { font-size: 13px; font-weight: 700; color: var(--leaf); }
.verdict.worse { color: var(--danger); }
.checkin-ref { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--panel); font-size: 14px; }
.checkin-ref .photos { margin-top: 6px; }

/* Photos */
.photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thumb { padding: 0; border: 2px solid var(--line); border-radius: 8px; background: #fff; width: 76px; height: 76px; overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.photos.ro .thumb { width: 56px; height: 56px; }
.pickers { display: flex; gap: 8px; }
.pickers.busy { opacity: .5; pointer-events: none; }
.photo-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(94vw, 720px); max-width: none; background: var(--card); color: var(--ink); }
.photo-dialog::backdrop { background: rgba(8, 30, 23, .78); }
.photo-dialog-img { background: #08201a; display: grid; place-items: center; }
.photo-dialog-img img { max-height: 60vh; width: auto; max-width: 100%; }
.photo-dialog-body { padding: 16px; display: grid; gap: 8px; }
.photo-dialog-body label { font-weight: 600; font-size: 14px; }

/* Signatures */
canvas.sig { width: 100%; height: 160px; border: 1.5px dashed var(--field-border); border-radius: 9px; background: #fff; touch-action: none; display: block; }

/* Changes */
.changes { padding-left: 20px; margin: 0; }
.changes li { margin-bottom: 8px; }

/* Progress */
progress { width: 100%; height: 10px; accent-color: var(--sun-deep); margin: 8px 0; }

/* Page sections: no rules between sections; spacing does the work */
.section + .section { border-top: 0; padding-top: 24px; }
.faq { max-width: 70ch; }
.faq details { border-top: 0; padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-family: var(--serif); font-size: 19px; }
.cta-mid { margin-top: 28px; }
