/* BraunAI Showing Tour Planner. Base styles match /realtor-short-sale-guide/ and /realtor-message-templates/. */
:root {
  --navy: #0b1f3a;
  --navy-2: #122a4a;
  --gold: #c9a227;
  --cream: #f7f3e8;
  --ink: #1b1b1b;
  --muted: #3d3d3d;
  --line: #c8c4b8;
  --warn-bg: #fff3cd;
  --ok-bg: #e8f2e8;
  --card: #ffffff;
  --focus: #0b1f3a;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  background: var(--cream);
  color: var(--ink);
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--navy);
  padding: 0.65rem 1rem;
  z-index: 20;
  font-weight: 700;
  min-height: 44px;
}
.skip:focus { left: 1rem; top: 1rem; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy-2); }
.sources a { display: inline-block; padding: 6px 0; min-height: 44px; line-height: 1.35; }
header {
  background: var(--navy);
  color: #fff;
  padding: 16px 20px;
}
header .brand { margin: 0; font-size: 1.05rem; }
header b { color: var(--gold); font-weight: 700; }
.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid #c9a227;
  border-radius: 999px;
  color: #c9a227;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
main { max-width: 760px; margin: 0 auto; padding: 20px; }
h1 { font-size: 1.65rem; line-height: 1.25; margin: 0 0 0.75rem; color: var(--navy); }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; color: var(--navy); }
h3 { font-size: 1.05rem; margin: 1.15rem 0 0.4rem; color: var(--navy); }
.lead { margin: 0 0 0.75rem; }
.note { font-size: 0.95rem; color: var(--muted); }
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 1rem;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  margin: 0 0 1rem;
  padding: 12px 14px 16px;
}
legend { font-weight: 700; color: var(--navy); padding: 0 0.35rem; }
label, .field-label {
  display: block;
  font-weight: 600;
  margin-top: 12px;
  color: var(--ink);
}
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; margin: 0.15rem 0 0.35rem; }
input, textarea, select, button, pre {
  font: inherit;
}
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
textarea { min-height: 88px; resize: vertical; }
select { min-height: 44px; }
input:focus, textarea:focus, select:focus, button:focus, a:focus, pre:focus, .skip:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
header a:focus, header .skip:focus {
  outline-color: var(--gold);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
button {
  margin: 0;
  background: var(--gold);
  color: var(--navy);
  border: 0;
  padding: 11px 18px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}
button.secondary {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}
button:hover { filter: brightness(0.97); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
#form-status, #copy-status, #check-status { margin: 0.6rem 0 0; }
#form-status[data-kind="warn"], #check-status[data-kind="warn"], .flag-box {
  background: var(--warn-bg);
  border-radius: 6px;
  padding: 8px 10px;
}
#form-status[data-kind="ok"] { background: var(--ok-bg); border-radius: 6px; padding: 8px 10px; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin: 0.4rem 0 0.6rem;
  color: var(--ink);
  line-height: 1.55;
}
.flag {
  background: var(--warn-bg);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}
h3.with-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.pending {
  display: inline-block;
  margin-left: 0;
  padding: 0.15rem 0.45rem;
  background: transparent;
  color: #0b1f3a;
  border: 1.5px solid #c9a227;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}
.sources { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.sources li { margin: 0.25rem 0; }
#checked-copy { margin-top: 0.75rem; }
footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 24px 20px 32px;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 400px) {
  main { padding: 16px; }
  header { padding: 14px 16px; }
  h1 { font-size: 1.4rem; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}


/* Showing Tour Planner additions */
footer p { margin: 0.4rem 0; }
.disclaimer { font-size: 0.95rem; }
.disclaimer p { margin: 0 0 0.5rem; }
.disclaimer p:last-child { margin-bottom: 0; }
.caution {
  background: var(--warn-bg);
  border-left: 4px solid #8a6d12;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0.6rem 0;
}
.caution p { margin: 0; }
.js-only[hidden] { display: none !important; }
.toc { margin: 0 0 1rem; padding-left: 1.2rem; }
.toc a { display: inline-block; padding: 6px 0; min-height: 44px; line-height: 1.35; }
.time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 12px;
}
.time-row > div { min-width: 0; }
fieldset { min-width: 0; }
input[type="time"], input[type="date"] {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
input[type="time"]::-webkit-date-and-time-value, input[type="date"]::-webkit-date-and-time-value { text-align: left; }
::placeholder { color: #767676; opacity: 1; }
.fine-print { font-size: 0.875rem; color: var(--ink); margin: 0.75rem 0 0; }
input[type="number"] { max-width: 10rem; }
fieldset.stop { border-left: 4px solid var(--navy); }
fieldset.stop legend { font-size: 1.05rem; }
.stop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stop-actions button { padding: 8px 14px; font-weight: 600; }
button.danger {
  background: #fff;
  color: #7a1f1f;
  border: 2px solid #7a1f1f;
}
ul.flags {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
ul.flags li {
  background: var(--warn-bg);
  border-left: 4px solid #8a6d12;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 6px 0 0;
  font-size: 0.95rem;
}
ul.flags li.info {
  background: #f3f0e6;
  border-left-color: var(--line);
}
details.feedback {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf6;
  padding: 0 12px 4px;
}
details.feedback summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 11px 0;
  min-height: 44px;
}
details.feedback summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.fh-note { font-size: 0.9rem; margin: 0 0 4px; }
#save-status { margin: 0.6rem 0 0; }
#save-status[data-kind="warn"] { background: var(--warn-bg); border-radius: 6px; padding: 8px 10px; }
.sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 14px 12px;
  margin: 0.4rem 0 0.6rem;
}
.sheet h3 { margin-top: 0.9rem; }
.sheet ol { margin: 0; padding-left: 1.4rem; }
.sheet li { margin: 0.6rem 0; }
.sheet dl { margin: 0.2rem 0 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: 2px 8px; }
.sheet dt { font-weight: 600; color: var(--muted); }
.sheet dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sheet .addr { font-weight: 700; overflow-wrap: anywhere; }
.sheet .sheet-flag { color: #6b5410; font-weight: 600; }
.empty { color: var(--muted); font-style: italic; }
.print-brand { display: none; }
@media (max-width: 480px) {
  .time-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .stop-actions button { flex: 1 1 auto; }
  .sheet dl { grid-template-columns: 1fr; }
  .sheet dt { margin-top: 4px; }
}
@media print {
  .skip, header, .actions, .toc, #privacy-note, #tour-form, #itinerary, #save-status, #copy-status, button, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { max-width: none; padding: 0; }
  main > h1, main > .lead, main > .disclaimer, main > .caution, main > p { display: none; }
  .sheet, .callout, .caution, pre { background: #fff; border-color: #000; }
  .sheet li { break-inside: avoid; }
  .sheet .sheet-flag { color: #000; }
  a { color: #000; text-decoration: none; }
  footer { text-align: left; padding: 12px 0 0; max-width: none; }
  footer .links { display: none; }
  #sheet-heading, #feedback-heading { display: none; }
  body.print-feedback #sheet-section { display: none !important; }
  body:not(.print-feedback) #feedback-section { display: none !important; }
  .print-brand {
    display: block !important;
    margin: 0 0 12px;
    font-size: 11pt;
    font-weight: 700;
    color: #000;
  }
}
.copy-scratch { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
