/* Texas One Holdings — resident site. Zero dependencies; one stylesheet for
   the public pages and the portal. Brand: the TOH monoline mark (charcoal on
   warm paper), Montserrat for the wordmark/headings, system UI for body text. */

:root {
  --ink: #2b2b28;
  --ink-2: #55534d;
  --ink-3: #7a776f;
  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e4e0d6;
  --line-2: #d3cec2;
  --pine: #1f4d3f;
  --pine-2: #173b30;
  --pine-tint: #e7efeb;
  --red: #b42318;
  --red-tint: #fdf0ee;
  --amber: #a15c07;
  --amber-tint: #fdf4e3;
  --blue: #2e5a87;
  --blue-tint: #eaf1f8;
  --green: #1d6b3a;
  --green-tint: #e8f4ec;
  --radius: 10px;
  --display: "Montserrat", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(43, 43, 40, .06), 0 2px 8px rgba(43, 43, 40, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--pine); }
a:hover { color: var(--pine-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid #7fb3a1; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 30px; width: auto; }
.wordmark { font-family: var(--display); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.wordmark b { font-weight: 700; }
.wordmark span { font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { background: #efece5; color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

/* ---------- public home ---------- */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; margin-bottom: 16px; }
.hero .lede { font-size: 18px; color: var(--ink-2); max-width: 32em; margin-bottom: 28px; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.hero-mark { justify-self: center; width: 100%; max-width: 280px; opacity: .85; }

.alert-emergency {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--red-tint); border: 1px solid #f1c6c0; border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 16px 18px;
}
.alert-emergency > svg { flex: none; color: var(--red); margin-top: 2px; }
.alert-emergency h2, .alert-emergency h3 { font-size: 16px; color: var(--red); margin-bottom: 4px; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.alert-emergency p { font-size: 15px; color: #5c1d16; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 40px 0 56px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 40px; height: 40px; border-radius: 8px; background: var(--pine-tint); color: var(--pine); display: grid; place-items: center; margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 15px; }

.band { border-top: 1px solid var(--line); padding: 36px 0; }
.band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band h2 { font-size: 18px; margin-bottom: 4px; }
.band p { color: var(--ink-2); }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-3); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ---------- portal ---------- */
.portal-head { background: var(--ink); color: #fff; }
.portal-head .wrap-narrow { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.portal-head .brand { color: #fff; }
.portal-head .brand img { height: 26px; }
.portal-head .wordmark { font-size: 13px; }
.portal-head .who { font-size: 14px; color: #d8d5cd; text-decoration: none; }
.portal-head .who:hover { color: #fff; }

.home-id { padding: 24px 0 8px; }
.home-id .hi { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.home-id .addr { color: var(--ink-2); }

.stack > * + * { margin-top: 16px; }
main.portal { padding-bottom: 56px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card h2 { font-size: 17px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px 0; }
.card-head a { font-size: 14px; }

.manager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.manager .label { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.manager .name { font-weight: 600; }
.manager .org { font-size: 14px; color: var(--ink-2); }

.call {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--red); color: #fff; text-decoration: none; border-radius: 8px;
  min-height: 52px; font-weight: 700; font-size: 17px; margin-top: 14px;
}
.call:hover { background: #962018; color: #fff; }
.alert-emergency .call { margin-top: 12px; }

.req-list { list-style: none; margin: 0; padding: 6px 0; }
.req-list li + li { border-top: 1px solid var(--line); }
.req-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.req-row:hover { background: #faf9f6; color: var(--ink); }
.req-row .t { font-weight: 600; }
.req-row .m { grid-column: 1; font-size: 14px; color: var(--ink-3); }
.req-row .pill { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.empty { padding: 18px; color: var(--ink-3); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.received  { background: var(--blue-tint);  color: var(--blue); }
.pill.scheduled { background: var(--amber-tint); color: var(--amber); }
.pill.completed { background: var(--green-tint); color: var(--green); }
.pill.emergency { background: var(--red-tint);   color: var(--red); }

.rent dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 15px; }
.rent dt { color: var(--ink-3); }
.rent dd { margin: 0; }
.muted { color: var(--ink-3); font-size: 14px; }

/* ---------- request form ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 20px 0 8px; font-size: 15px; text-decoration: none; }
.page-title { font-size: 24px; margin-bottom: 6px; }
.page-sub { color: var(--ink-2); margin-bottom: 20px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* One card per question, numbered in order; the number turns into a check
   once answered, and the bar pinned to the bottom counts what's left. */
.qform { display: grid; gap: 12px; }
.q { scroll-margin-top: 12px; }
.q.card { padding: 18px; transition: border-color .2s, box-shadow .2s; }
.q-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 17px; line-height: 1.3; cursor: default; }
legend.q-head { float: left; }
legend.q-head + * { clear: both; }
.q-title { flex: 1; min-width: 0; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--pine); color: var(--pine); display: grid; place-items: center; font: 700 14px/1 var(--body); }
.num .tick { display: none; }
.q.answered .num { background: var(--green); border-color: var(--green); color: #fff; }
.q.answered .num .n { display: none; }
.q.answered .num .tick { display: block; }
.tag { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; }
.tag.req { background: var(--amber-tint); color: var(--amber); }
.tag.opt { background: #efece5; color: var(--ink-3); }
.q.answered .tag.req { background: var(--green-tint); color: var(--green); }
.q .hint { font-size: 14px; color: var(--ink-3); margin: -4px 0 10px; }
.q.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }
.q.invalid .num { border-color: var(--red); color: var(--red); }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices.one-col { grid-template-columns: 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block; height: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 15px; line-height: 1.3;
}
.choice span small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.choice input:checked + span { border-color: var(--pine); background: var(--pine-tint); box-shadow: inset 0 0 0 1px var(--pine); }
.choice input:focus-visible + span { outline: 3px solid #7fb3a1; outline-offset: 2px; }
.choice.danger input:checked + span { border-color: var(--red); background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red); }

input[type=text], input[type=tel], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(31, 77, 63, .18); }

.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photos figure { position: relative; margin: 0; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 15px; line-height: 24px; padding: 0; }
.upload { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--line-2); border-radius: 8px; min-height: 52px; cursor: pointer; color: var(--pine); font-weight: 600; background: #fff; }
.upload:hover { background: #faf9f6; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.field-error { color: var(--red); font-size: 14px; margin-top: 8px; display: none; }
.q.invalid .field-error { display: block; }
.q.invalid .choice span, .q.invalid textarea { border-color: var(--red); }

.submit-bar {
  position: sticky; bottom: 0; z-index: 5;
  margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(43, 43, 40, .07);
}
.submit-bar .muted { margin-top: 8px; text-align: center; }
.progress { display: grid; gap: 6px; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.progress .bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--pine); border-radius: 999px; transition: width .25s; }
.qform.complete .progress { color: var(--green); }
.qform.complete .progress .bar span { background: var(--green); }
@media (prefers-reduced-motion: reduce) { .progress .bar span, .q.card { transition: none; } }

/* ---------- request detail / confirmation ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ticket { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; margin: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.desc { white-space: pre-wrap; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--pine); }
.timeline .when { font-size: 13px; color: var(--ink-3); }
.timeline .note { font-size: 15px; color: var(--ink-2); margin-top: 2px; }

.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; margin: 8px 0 14px; }

.demo-flag { background: #fff6d6; color: #6b5200; text-align: center; font-size: 13px; padding: 6px 12px; border-bottom: 1px solid #ecdca0; }

/* ---------- policy pages (privacy, terms) ---------- */
.doc { max-width: 680px; margin: 0 auto; padding: 40px 20px 64px; }
.doc .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.doc h1 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 8px; text-wrap: balance; }
.doc .meta { color: var(--ink-3); font-size: 15px; margin-bottom: 24px; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.doc .toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--ink); background: #fff; }
.doc .toc a:hover { border-color: var(--pine); color: var(--pine); }
.doc section { padding-top: 8px; scroll-margin-top: 16px; }
.doc section + section { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 32px; }
.doc h2 { font-size: 22px; margin-bottom: 6px; text-wrap: balance; }
.doc h2 + .meta { margin-bottom: 16px; }
.doc h3 { font: 700 16px/1.4 var(--body); margin: 22px 0 6px; letter-spacing: 0; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 8px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); }
.doc .callout { margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { padding: 36px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-mark { display: none; }
  .features { grid-template-columns: 1fr; padding: 28px 0 40px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .wordmark { font-size: 13px; }
  .site-head .wordmark { display: none; }
  .choices { grid-template-columns: 1fr; }
  .hero .btn-lg { width: 100%; }
}
