/* RoomProrate: paper, deep teal, orange and mint. Same-origin only, no external assets. */
:root{
 --paper:#fbf7ef;--card:#fffdf8;--ink:#1d2b2a;--muted:#5a6866;--teal:#0f4c4a;--teal-2:#176d69;
 --orange:#e2672c;--orange-soft:#fde3d2;--mint:#7fd1b9;--mint-soft:#dcf4ec;--line:#e4dccd;--danger:#b3261e;
 --radius:14px;--shadow:0 1px 2px rgba(15,76,74,.08),0 6px 18px rgba(15,76,74,.07);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;word-break:keep-all;overflow-wrap:anywhere}
a{color:var(--teal-2)}
a:hover{color:var(--orange)}
:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:4px}
.wrap{max-width:1080px;margin:0 auto;padding:0 20px}
.skip{position:absolute;left:-999px;top:0;background:var(--teal);color:#fff;padding:8px 12px;z-index:9}
.skip:focus{left:8px}
.site-head{background:var(--card);border-bottom:1px solid var(--line)}
.site-head .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.15rem;color:var(--teal);text-decoration:none}
.site-head nav{display:flex;gap:18px}
.site-head nav a{text-decoration:none;color:var(--ink);font-weight:500}
.site-head nav a[aria-current="page"]{color:var(--orange)}
main{padding:28px 20px 56px}
h1{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.2;color:var(--teal);margin:.2em 0 .4em}
h2{font-size:1.45rem;line-height:1.3;color:var(--teal);margin:1.6em 0 .5em}
h3{font-size:1.12rem;margin:1.2em 0 .4em}
.lede{font-size:1.12rem;color:var(--muted);max-width:44em}

/* hero */
.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:32px;align-items:center;margin-bottom:12px}
.hero-art{margin:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.hero-art svg{display:block;width:100%;height:auto}
.hero-art figcaption{font-size:.85rem;color:var(--muted);margin-top:8px}
.pill-row{display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:14px 0 0;list-style:none}
.pill{display:inline-flex;align-items:center;gap:6px;background:var(--mint-soft);color:var(--teal);border-radius:999px;padding:4px 12px;font-size:.88rem;font-weight:600}
.pill.orange{background:var(--orange-soft);color:#8a3510}
.pill svg{width:16px;height:16px}

/* how it works */
.stages ol{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.stage{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;position:relative}
.stage-ico{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--mint-soft);color:var(--teal)}
.stage:nth-child(even) .stage-ico{background:var(--orange-soft);color:#8a3510}
.stage-no{display:block;font-size:.8rem;font-weight:700;color:var(--muted);margin-top:8px;text-transform:uppercase;letter-spacing:.04em}
.stage h3{margin:.2em 0}
.stage p{margin:0;color:var(--muted);font-size:.95rem}

/* tool */
.tool{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:24px;margin:28px 0}
.tool>h2{margin-top:0}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;padding-bottom:14px;border-bottom:1px dashed var(--line)}
.toolbar .field{margin:0}
.step{margin-top:22px}
.step h2{display:flex;align-items:center;gap:8px;font-size:1.25rem;margin:0 0 .3em}
.icon{flex:none;vertical-align:-3px}
.rows{list-style:none;padding:0;margin:12px 0}
.resident-row{display:grid;grid-template-columns:34px 1.3fr 1fr 1fr auto;gap:12px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:12px;margin-bottom:10px;background:#fff}
.row-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--mint-soft);color:var(--teal);margin-top:26px}
.resident-row:nth-child(even) .row-icon{background:var(--orange-soft);color:#8a3510}
.field{display:flex;flex-direction:column;gap:4px;min-width:0}
label{font-weight:600;font-size:.92rem}
input[type=text],input[type=date],select{font:inherit;padding:9px 11px;border:1.5px solid #cfc5b3;border-radius:10px;background:#fff;color:var(--ink);width:100%;min-height:44px}
input[type=text]:focus,input[type=date]:focus,select:focus{border-color:var(--teal-2)}
.hint{color:var(--muted);font-size:.86rem;margin:2px 0 0}
.hint.inline{display:block;font-weight:400}
button{font:inherit;font-weight:600;border-radius:10px;border:1.5px solid var(--teal);background:#fff;color:var(--teal);padding:9px 16px;min-height:44px;cursor:pointer}
button:hover{background:var(--mint-soft)}
button:disabled{opacity:.55;cursor:not-allowed;background:#f3efe6}
button.primary{background:var(--orange);border-color:var(--orange);color:#fff}
button.primary:hover{background:#c8551e}
button.danger{border-color:var(--danger);color:var(--danger)}
button.danger:hover{background:#fbe9e7}
button.quiet{border-color:transparent;color:var(--muted);background:transparent;margin-top:22px}
button.quiet:hover{color:var(--danger);background:#fbe9e7}
.bills{display:grid;gap:14px;margin:12px 0}
.bill{border:1px solid var(--line);border-left:5px solid var(--orange);border-radius:12px;background:#fff;padding:14px 16px}
.bill-head{display:flex;align-items:center;gap:8px;color:var(--teal)}
.bill-head h3{margin:0;flex:1}
.bill-head button.quiet{margin-top:0}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:10px 0}
fieldset{border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:10px 0}
legend{font-weight:700;color:var(--teal);padding:0 4px}
.check-row{display:flex;gap:10px;align-items:flex-start;padding:5px 0}
.check-row input{width:20px;height:20px;margin-top:3px;flex:none;accent-color:var(--teal)}
.check{font-weight:500}
.check-row.confirm{border-top:1px dashed var(--line);margin-top:6px;padding-top:10px}
.check-row.confirm .check{font-weight:700}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.row-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.status{min-height:1.5em;font-weight:600;color:var(--teal-2)}
.error-summary{border:2px solid var(--danger);background:#fdf1ef;border-radius:12px;padding:12px 16px;margin:14px 0}
.error-summary h3{margin:0 0 6px;color:var(--danger)}
.error-summary a{color:var(--danger)}
.confirm-panel{border:2px solid var(--orange);background:var(--orange-soft);border-radius:12px;padding:12px 16px;margin:14px 0}
.result{margin-top:22px;border-top:3px solid var(--mint);padding-top:8px}
.result h2{margin-top:.4em}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:10px;margin:10px 0;background:#fff}
table{border-collapse:collapse;width:100%}
.bill-result table{min-width:460px}
caption{text-align:left;font-weight:700;padding:10px 12px;color:var(--teal)}
th,td{padding:8px 12px;border-top:1px solid var(--line);text-align:left;white-space:nowrap}
thead th{background:#f6f1e6;font-size:.88rem}
.num{text-align:right;font-variant-numeric:tabular-nums}
td.strong{font-weight:700}
tr.unassigned th,tr.unassigned td{background:#fbf3e2;color:#7a5a12;font-style:italic}
.reconcile{background:var(--mint-soft);border-radius:10px;padding:10px 12px;font-variant-numeric:tabular-nums}
.bill-result{margin-top:18px}
.bill-result h4{margin:0 0 6px;font-size:1.05rem}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0}
.facts div{background:#f6f1e6;border-radius:8px;padding:6px 10px}
.facts dt{font-size:.8rem;color:var(--muted)}
.facts dd{margin:0;font-weight:700}

/* content */
.article{max-width:46em}
.article p,.article li{max-width:44em}
.crumbs{margin:0;font-size:.9rem}
.callout{background:var(--mint-soft);border-left:5px solid var(--teal-2);border-radius:10px;padding:12px 16px}
.callout.warm{background:var(--orange-soft);border-left-color:var(--orange)}
.example{width:100%;min-width:0}
.example th,.example td{white-space:normal}
.guide-list{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.guide-list li{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px}
.guide-list a{font-weight:700;font-size:1.05rem}
.guide-list p{margin:.3em 0 0;color:var(--muted)}
.guide-art{display:block;width:100%;max-width:560px;height:auto;margin:10px 0 4px}
.faq details{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:8px 0}
.faq summary{cursor:pointer;font-weight:700;color:var(--teal)}
.notfound{font-size:1.1rem}
.site-foot{border-top:1px solid var(--line);background:var(--card);padding:22px 0;font-size:.9rem;color:var(--muted)}
.site-foot nav{display:flex;flex-wrap:wrap;gap:8px 18px;margin-bottom:8px}
.site-foot a{color:var(--teal)}

@media (max-width:860px){
 .hero{grid-template-columns:1fr}
 .stages ol{grid-template-columns:repeat(2,1fr)}
 .resident-row{grid-template-columns:34px 1fr 1fr}
 .resident-row .field:nth-of-type(1){grid-column:2 / 4}
 .resident-row button.quiet{grid-column:1 / 4;justify-self:end;margin-top:0}
}
@media (max-width:520px){
 main{padding:20px 14px 44px}
 .wrap{padding:0 14px}
 .tool{padding:16px 12px}
 .stages ol,.guide-list{grid-template-columns:1fr}
 .resident-row{grid-template-columns:1fr}
 .resident-row .field:nth-of-type(1),.resident-row button.quiet{grid-column:auto}
 .row-icon{display:none}
 .toolbar>*{flex:1 1 100%}
 th,td{padding:8px 9px}
 caption{padding:10px 9px}
 .site-head nav{gap:14px}
}
@media print{
 .site-head,.site-foot,.toolbar,.step,.no-print,.stages,.hero,.faq,.skip,.lede,#tool-h,.status{display:none!important}
 body{background:#fff}
 .tool{border:0;box-shadow:none;padding:0;margin:0}
 .result{border:0}
 .table-scroll{overflow:visible;border:0}
 table{min-width:0}
 th,td{white-space:normal}
}
