/* ============================================================
   Dwelling Docs — design system
   Palette
     Deed Navy        #10263B  primary ink, headers
     Ledger Teal      #12A88A  brand action, "verified"
     Mint Fold        #BFE9DE  soft teal surfaces
     Porchlight Amber #F4A62A  attention, "due soon"
     Brick            #D9573B  overdue, destructive
     Blueprint Paper  #F7F4EE  page background
     Slate            #5B6B7A  secondary text
   Type: Bricolage Grotesque (display) + Inter (UI)
   ============================================================ */

:root {
  --navy: #10263B;
  --navy-2: #1B3A55;
  --teal: #12A88A;
  --teal-dark: #0C8670;
  --mint: #BFE9DE;
  --mint-soft: #E6F6F1;
  --amber: #F4A62A;
  --amber-soft: #FDF1DC;
  --brick: #D9573B;
  --brick-soft: #FBE7E2;
  --paper: #F7F4EE;
  --white: #FFFFFF;
  --slate: #5B6B7A;
  --line: #E3DDD2;
  --line-strong: #CFC7B8;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 38, 59, .06), 0 6px 20px rgba(16, 38, 59, .07);
  --shadow-lg: 0 20px 50px rgba(16, 38, 59, .16);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .95rem/1 var(--font-ui);
  padding: .8em 1.25em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(18, 168, 138, .35); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-danger { background: transparent; color: var(--brick); border-color: var(--brick-soft); }
.btn-danger:hover { background: var(--brick-soft); }
.btn-sm { padding: .55em .9em; font-size: .85rem; }
.btn-lg { padding: 1em 1.6em; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .875rem; }
.field .hint { font-size: .8rem; color: var(--slate); }
input, select, textarea {
  font: inherit; color: var(--navy);
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: .7em .85em; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--mint-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: .85em; top: 50%; transform: translateY(-50%); color: var(--slate); }
.input-prefix input { padding-left: 1.8em; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.form-error { background: var(--brick-soft); color: #8E2F1B; padding: .7em 1em; border-radius: 10px; margin-bottom: 14px; font-size: .9rem; }

/* Cards & chips */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
  padding: .3em .7em; border-radius: 999px; background: var(--mint-soft); color: var(--teal-dark);
}
.chip-navy { background: #E4EAF0; color: var(--navy); }
.chip-amber { background: var(--amber-soft); color: #8A5A0B; }
.chip-brick { background: var(--brick-soft); color: #8E2F1B; }
.chip-gray { background: #EEEAE3; color: var(--slate); }

/* Brand lockup */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 36px; height: 36px; }
.brand b { font: 800 1.3rem/1 var(--font-display); letter-spacing: -.03em; }
.brand b span { color: var(--teal); }
.on-dark .brand, .on-dark .brand b { color: #fff; }
