/* Nesta: warm sand, deep teal, a coral heart. Mobile first. */
:root {
  --sand: #FFF8F1; --sand-2: #F7ECDF; --card: #FFFFFF; --line: #EADFD2;
  --ink: #102A2E; --muted: #5B6F70; --soft: #8A9A9A;
  --teal: #0F766E; --teal-d: #0B5A54; --mint: #D9F5EE; --mint-2: #B8EBDF;
  --coral: #FF6B57; --coral-d: #E5533F; --peach: #FFE3DC;
  --amber: #F5A524; --ok: #15803D; --bad: #B42318;
  --r: 22px; --r-s: 14px;
  --shadow: 0 1px 2px rgba(16, 42, 46, .06), 0 10px 30px -12px rgba(16, 42, 46, .18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 16px/1.6 var(--font); overflow-x: hidden; }
main { overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-d); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

/* ---- header and footer ---- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 241, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { background: var(--sand-2); }
.nav .owners, .nav .find { display: none; }
@media (min-width: 560px) { .nav .find { display: inline-block; } }
@media (min-width: 720px) { .nav .owners { display: inline-block; } }
.foot { margin-top: 80px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* ---- buttons, chips, forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: 700 1rem var(--font); cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px -8px var(--coral); }
.btn.primary:hover { background: var(--coral-d); color: #fff; }
.btn.teal { background: var(--teal); color: #fff; }
.btn.teal:hover { background: var(--teal-d); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--teal); }
.btn.block { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--mint); color: var(--teal-d); font-weight: 600; font-size: .86rem; }
.chip.coral { background: var(--peach); color: var(--coral-d); }
.chip.plain { background: var(--sand-2); color: var(--ink); }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--mint); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.grid2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: auto; margin-top: 5px; accent-color: var(--teal); }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.alert { border-radius: var(--r-s); padding: 14px 16px; margin-bottom: 18px; font-weight: 600; }
.alert.bad { background: #FDECEA; color: var(--bad); }
.alert.ok { background: var(--mint); color: var(--teal-d); }

/* ---- home ---- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--mint-2), transparent 62%); z-index: -1; }
.hero::after { content: ""; position: absolute; left: -160px; bottom: -220px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, var(--peach), transparent 65%); z-index: -1; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.search { margin-top: 26px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; }
@media (min-width: 820px) { .search { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } }
.search label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.why { display: grid; gap: 16px; margin: 48px 0 8px; }
@media (min-width: 820px) { .why { grid-template-columns: repeat(3, 1fr); } }
.why div { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.why b { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--peach); color: var(--coral-d); font-size: 1.2rem; margin-bottom: 10px; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 44px 0 16px; }
.cards { display: grid; gap: 20px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); color: var(--ink); box-shadow: 0 1px 2px rgba(16,42,46,.06), 0 22px 40px -18px rgba(16,42,46,.3); }
.card .pic { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--mint), var(--peach)); position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .badge { position: absolute; left: 12px; top: 12px; }
.card .body { padding: 16px 18px 18px; display: grid; gap: 8px; }
.card .price { font-weight: 800; font-size: 1.1rem; }
.card .price span { font-weight: 500; color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 48px 20px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- residence ---- */
.gallery { display: grid; gap: 8px; margin: 20px 0 24px; border-radius: var(--r); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; cursor: zoom-in; }
@media (min-width: 820px) { .gallery.many { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .gallery.many img:first-child { grid-row: 1 / 3; aspect-ratio: auto; } .gallery.many img:nth-child(n+4) { display: none; } }
.layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.layout > *, .rooms > *, .cards > *, .stay > * { min-width: 0; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.panel { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.side { position: sticky; top: 86px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.facts div { background: var(--sand); border-radius: var(--r-s); padding: 12px; }
.facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: 800; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ticks li::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: 8px; }

/* ---- the bed map ---- */
.stay { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.stay .btn { grid-column: 1 / -1; }
@media (min-width: 640px) { .stay { grid-template-columns: 1fr 1fr auto; } .stay .btn { grid-column: auto; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--muted); margin: 14px 0 4px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.rooms { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 640px) { .rooms { grid-template-columns: repeat(2, 1fr); } }
.room { border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 14px; background: #fff; }
.room header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; align-items: baseline; margin-bottom: 10px; }
.room header b { font-size: 1.02rem; }
.room .rent { font-weight: 800; color: var(--teal-d); white-space: nowrap; }
.beds { display: flex; flex-wrap: wrap; gap: 10px; }
.bed { position: relative; width: 76px; height: 58px; border-radius: 12px; display: grid; place-items: end center; padding-bottom: 6px; font-weight: 700; font-size: .8rem; text-decoration: none; }
.bed::before { content: ""; position: absolute; left: 10px; right: 10px; top: 8px; height: 14px; border-radius: 6px; background: currentColor; opacity: .25; }
.bed.free { background: var(--mint); color: var(--teal-d); border: 2px solid var(--teal); }
.bed.free:hover, .bed.free:focus-visible { background: var(--teal); color: #fff; transform: translateY(-2px); }
.bed.taken { background: repeating-linear-gradient(135deg, #F1ECE6 0 6px, #E7E1D9 6px 12px); color: var(--soft); border: 2px solid transparent; cursor: not-allowed; }
.bed.chosen { background: var(--coral); color: #fff; border: 2px solid var(--coral-d); }
.bed .match { position: absolute; right: -8px; top: -10px; background: var(--coral); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: .72rem; box-shadow: 0 4px 10px -4px var(--coral); }
.quiz { margin-top: 12px; border: 1.5px dashed var(--mint-2); border-radius: var(--r-s); padding: 14px; background: #FBFFFE; }
.quiz summary { cursor: pointer; font-weight: 700; color: var(--teal-d); }
.q { margin: 14px 0; }
.q .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.q input[type=range] { padding: 0; border: 0; accent-color: var(--coral); }

/* ---- apply and track ---- */
.steps { display: flex; gap: 8px; margin: 8px 0 22px; list-style: none; padding: 0; flex-wrap: wrap; }
.steps li { padding: 6px 12px; border-radius: 999px; background: var(--sand-2); font-weight: 600; font-size: .86rem; }
.steps li.on { background: var(--teal); color: #fff; }
.summary { display: grid; gap: 6px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; color: var(--soft); }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line); background: #fff; }
.timeline li::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { border-color: var(--teal); background: var(--teal); }
.timeline li.now { color: var(--ink); font-weight: 700; }
.timeline li.now::before { border-color: var(--coral); background: var(--coral); box-shadow: 0 0 0 6px var(--peach); }
.ref { font: 800 clamp(1.6rem, 6vw, 2.4rem)/1 var(--font); letter-spacing: .06em; color: var(--teal-d); background: var(--mint); display: inline-block; padding: 14px 20px; border-radius: var(--r-s); }

/* ---- mobile apply bar ---- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
@media (min-width: 1000px) { .bar { display: none; } }
.has-bar { padding-bottom: 84px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(16, 42, 46, .92); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-height: 88vh; border-radius: var(--r-s); }
/* ---- the student portal ---- */
.portal { padding-top: 28px; }
.portal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.tabs a { flex: none; text-decoration: none; color: var(--ink); font-weight: 600; padding: 9px 16px; border-radius: 999px; background: var(--sand-2); }
.tabs a.on { background: var(--teal); color: #fff; }
.tiles { display: grid; gap: 14px; margin-bottom: 20px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; text-decoration: none; color: var(--ink); display: grid; gap: 2px; }
.tile:hover { color: var(--ink); transform: translateY(-2px); }
.tile span { color: var(--muted); font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; }
.tile b { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.tile b.bad { color: var(--bad); }
.tile small { color: var(--muted); }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.todo li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-s); background: var(--sand); border-left: 4px solid var(--coral); }
.todo li.done { border-left-color: var(--teal); }
.todo li.done a::before { content: "✓ "; color: var(--teal); font-weight: 800; }
.todo li.off { opacity: .55; border-left-color: var(--line); }
.todo a { font-weight: 700; text-decoration: none; }
.todo form { margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.row-between h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: .94rem; }
.ledger th, .ledger td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ledger .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.total { text-align: right; font-size: 1.1rem; margin: 14px 0 0; }
.total b { font-size: 1.4rem; }
.doc { white-space: pre-wrap; font: 15px/1.7 var(--font); background: var(--sand); border-radius: var(--r-s); padding: 18px; margin: 0; max-height: 60vh; overflow-y: auto; }
.photos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.photos figure { margin: 0; background: var(--sand); border-radius: var(--r-s); overflow: hidden; }
.photos img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photos figcaption { padding: 8px 10px; font-size: .86rem; }

/* ---- living there: repairs, visitors, bookings, notices ---- */
.repair { border-top: 1px solid var(--line); padding: 16px 0; }
.repair:first-of-type { border-top: 0; padding-top: 4px; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; padding: 0; margin: 0; }
.track li { position: relative; padding-top: 18px; font-size: .8rem; color: var(--soft); text-align: center; }
.track li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 6px; border-radius: 999px; background: var(--line); }
.track li.done { color: var(--teal-d); font-weight: 700; }
.track li.done::before { background: var(--teal); }
.updates { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.pass-made { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pass-made img { border-radius: 12px; background: #fff; padding: 6px; }
.days a { font-size: .88rem; padding: 7px 12px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots form { margin: 0; }
.slot { display: inline-grid; place-items: center; min-width: 104px; padding: 9px 12px; border-radius: 12px; font: 600 .88rem var(--font); border: 2px solid transparent; }
.slot small { font-weight: 500; font-size: .72rem; }
.slot.free { background: var(--mint); color: var(--teal-d); border-color: var(--teal); cursor: pointer; }
.slot.free:hover { background: var(--teal); color: #fff; }
.slot.mine { background: var(--coral); color: #fff; border-color: var(--coral-d); cursor: pointer; }
.slot.taken { background: repeating-linear-gradient(135deg, #F1ECE6 0 6px, #E7E1D9 6px 12px); color: var(--soft); }
.slot.past { background: var(--sand); color: var(--soft); text-decoration: line-through; }
.notice { padding: 12px 14px; border-radius: var(--r-s); background: var(--sand); margin-bottom: 10px; }
.notice.pinned { background: var(--peach); }
.notice h3 { margin-bottom: 4px; }
.notice p { margin: 0 0 6px; }
.gate.valid { border-top: 6px solid var(--teal); }
.gate.invalid { border-top: 6px solid var(--bad); }

/* ---- pay ---- */
.pay-options { display: grid; gap: 12px; }
@media (min-width: 720px) { .pay-options { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.pay-option { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: var(--r-s); background: var(--sand); }
.pay-option span { color: var(--muted); font-size: .9rem; }
.pay-option b { font-size: 1.6rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
