/* MMP Real Estate Network: matches the Madison Marie Photography email look */
:root {
  --ink: #17161A;
  --charcoal: #3B3A3F;
  --slate: #6E6D72;
  --mist: #C7C4BC;
  --line: #E4E1D8;
  --cream: #F3EFE6;
  --ivory: #FBFAF6;
  --white: #FFFFFF;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--charcoal); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--ivory); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.loading { padding: 120px 24px; text-align: center; color: var(--slate); }

/* top bar */
.topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 20px; padding: 10px 24px; border-bottom: 1px solid var(--line);
}
.topbar.is-admin { background: var(--ink); border-bottom-color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.is-admin .brand img { filter: invert(1); }
.brand span { font-size: 12px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--slate); }
.is-admin .brand span { color: var(--mist); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.navlink {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font-size: 14px; font-weight: 400; color: var(--charcoal); text-decoration: none;
  background: none; border: none; cursor: pointer;
}
.navlink.is-active { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.is-admin .navlink { color: var(--mist); }
.is-admin .navlink.is-active { color: var(--ivory); }

/* layout */
main { outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 40px 24px 64px; }
.narrow { max-width: 560px; }
.center { text-align: center; }
.kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--slate); }
.display { margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(30px, 5vw, 44px); line-height: 1.2; }
.lead { margin: 12px auto 0; max-width: 560px; font-size: 16px; color: var(--charcoal); }
.helper { margin: 16px 0 0; font-size: 13px; color: var(--slate); }
.helper a { color: var(--charcoal); }
.fine { font-size: 12px; font-style: italic; color: var(--slate); }
.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }
strong { font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 32px; border-radius: 2px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.5px; text-decoration: none;
  cursor: pointer; border: 1px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: var(--charcoal); color: var(--ivory); }
.btn-outline { background: var(--white); color: var(--ink); }
.btn-outline:hover { background: var(--ivory); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 13.5px; }
.btn-quiet { min-height: 44px; padding: 0 14px; font-size: 13px; background: var(--white); border-color: var(--mist); color: var(--ink); }
.btn-dark { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.stack-btns { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 28px; }
.stack-btns .btn { width: 100%; max-width: 300px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linkbtn { background: none; border: none; padding: 0; min-height: 44px; font-size: 13px; color: var(--slate); text-decoration: underline; cursor: pointer; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 11px 14px; border: 1px solid var(--mist); border-radius: 2px;
  font-size: 15px; font-weight: 300; background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { line-height: 1.6; resize: vertical; }
.field .hint { font-size: 12px; font-weight: 300; color: var(--slate); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--charcoal); font-weight: 300; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px 16px; margin: 0; }
legend { padding: 0 6px; font-size: 13px; font-weight: 500; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }

/* alerts */
.alert { margin-top: 18px; padding: 14px 18px; border: 1.5px solid var(--ink); border-radius: 4px; font-size: 14.5px; text-align: left; color: var(--charcoal); }
.alert strong { color: var(--ink); }
.alert.soft { border: 1px solid var(--line); background: var(--cream); }

/* nudge */
.nudge {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  margin-top: 28px; padding: 18px 22px; background: var(--cream); border: 1px solid var(--line); border-radius: 4px;
}
.nudge p { margin: 0; flex: 1 1 320px; font-size: 14.5px; color: var(--charcoal); }

/* filters */
.filters { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 2px; border: 1px solid var(--mist); background: var(--white); font-size: 14px; letter-spacing: 0.3px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ivory); font-weight: 500; }
.resultbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.resultbar p { margin: 0; font-size: 14px; color: var(--slate); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 22px 22px 20px; }
.card-head { display: flex; gap: 14px; align-items: center; }
.monogram { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.meta { margin: 2px 0 0; font-size: 13.5px; color: var(--slate); }
.company { margin: 0; font-size: 13px; font-weight: 500; color: var(--charcoal); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border: 1px solid var(--mist); border-radius: 2px; font-size: 12px; font-weight: 400; color: var(--charcoal); }
.tag.is-match { background: var(--ink); border-color: var(--ink); color: var(--ivory); font-weight: 500; }
.tagrow { display: flex; flex-direction: column; gap: 6px; }
.taglabel { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--slate); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
fieldset .hint { font-size: 12px; font-weight: 300; color: var(--slate); }
.bio { margin: 0; font-size: 14px; color: var(--charcoal); flex-grow: 1; white-space: pre-line; overflow-wrap: anywhere; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.empty { margin-top: 32px; padding: 40px 24px; text-align: center; border: 1px dashed var(--mist); border-radius: 4px; }
.empty p:first-child { margin: 0; font-family: var(--serif); font-style: italic; font-size: 22px; }

/* panel (message / report / edit / confirm) */
.panel { margin-top: 24px; border: 1.5px solid var(--ink); border-radius: 4px; padding: 24px 26px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel h2 { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1.25; }

/* messages */
.msg { border-top: 1px solid var(--line); padding: 18px 0; }
.msg:last-child { border-bottom: 1px solid var(--line); }
.msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.msg-head p { margin: 0; }
.msg-body { margin: 10px 0 0; font-size: 15px; color: var(--charcoal); white-space: pre-line; overflow-wrap: anywhere; }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-top: 28px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--white); padding: 18px 20px; }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-size: 13px; color: var(--slate); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.tablebox { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; min-width: 1060px; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 16px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--slate); border-bottom: 1px solid var(--line); background: var(--ivory); text-align: left; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td p { margin: 0; }
td .sub { font-size: 12.5px; color: var(--slate); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 2px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--mist); }
.pill.dashed { border-style: dashed; border-color: var(--slate); color: var(--charcoal); }
.pill.dark { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.pill.black { background: var(--ink); border-color: var(--ink); color: var(--ivory); letter-spacing: 1px; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* footer */
.footer { padding: 24px; text-align: center; font-size: 12px; line-height: 1.8; color: var(--slate); border-top: 1px solid var(--line); }
.footer a { color: var(--slate); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .wrap { padding: 32px 18px 56px; }
  .panel { padding: 20px 18px; }
}
