html {
  font-size: 14px;
}

.announcement-region { margin: 0 auto 1.5rem; max-width: 1440px; }
.announcement-banner { position: relative; height: clamp(240px, 34vw, 520px); overflow: hidden; background: #17212b; color: #fff; }
.announcement-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.announcement-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.08)); }
.announcement-overlay { position: absolute; z-index: 1; left: clamp(1.25rem, 6vw, 5rem); top: 50%; transform: translateY(-50%); max-width: 600px; padding: 1rem; }
.announcement-overlay h2 { color: #fff; font-size: clamp(1.75rem, 4vw, 3.25rem); }
.announcement-overlay p { font-size: 1.15rem; }
.announcement-admin-thumb { width: 100px; height: 58px; object-fit: cover; margin-right: .75rem; border-radius: .25rem; }
.announcement-preview { display: block; width: min(100%, 720px); max-height: 320px; object-fit: cover; }
.news-editor { min-height: 320px; background: #fff; }
.news-article-content img { max-width: 100%; height: auto; }
@media (max-width: 576px) { .announcement-banner { height: 300px; } .announcement-overlay { left: .5rem; } }

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --brand-blue: #114b7a;
  --brand-teal: #0f766e;
  --brand-gold: #f2b705;
  --ink: #172033;
  --muted: #5f6b7a;
  --surface: #f5f8fb;
  --line: #d8e1ea;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(15, 118, 110, 0.35);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 72px;
  color: var(--ink);
  background: #fff;
}

.navbar {
  min-height: 68px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
}

.brand-logo {
  width: 92px;
  height: 54px;
  object-fit: contain;
}

.btn-primary {
  --bs-btn-bg: var(--brand-teal);
  --bs-btn-border-color: var(--brand-teal);
  --bs-btn-hover-bg: #0b5f59;
  --bs-btn-hover-border-color: #0b5f59;
}

.hero-section {
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 30, 49, 0.92), rgba(17, 75, 122, 0.72)),
    url("data:image/svg+xml,%3Csvg width='1440' height='720' viewBox='0 0 1440 720' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1440' height='720' fill='%23114b7a'/%3E%3Cg stroke='%23f2b705' stroke-width='10' opacity='.75' fill='none'%3E%3Cpath d='M1050 98h130v120h-130zM1180 158h110M1115 218v180M965 398h300M1015 478h210M1070 558h100'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-width='5' opacity='.25'%3E%3Cpath d='M0 560c200-60 390-60 570 0s370 60 570 0 300-60 300-60' fill='none'/%3E%3Cpath d='M0 640c200-60 390-60 570 0s370 60 570 0 300-60 300-60' fill='none'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 860px;
}

.hero-content h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
  margin: 0 0 1rem;
}

.hero-copy {
  max-width: 680px;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.eyebrow {
  margin-bottom: .6rem;
  color: var(--brand-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-band,
.content-section {
  padding: 4rem 0;
}

.portal-band {
  padding: 4rem 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.portal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading p {
  color: var(--muted);
}

.service-grid,
.metric-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card,
.metric-tile,
.dashboard-panel,
.payment-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
}

.service-card h2,
.service-card h3,
.dashboard-panel h2,
.payment-panel h2 {
  font-size: 1.25rem;
}

.portfolio-section {
  background: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.portfolio-card,
.values-grid article,
.location-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.portfolio-card {
  min-height: 220px;
  padding: 1.4rem;
}

.portfolio-card.featured {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.portfolio-card span {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--brand-teal);
  font-weight: 700;
}

.portfolio-card.featured span {
  color: var(--brand-gold);
}

.portfolio-card p,
.values-grid p,
.story-letter p,
.location-list p {
  color: var(--muted);
}

.portfolio-card.featured p {
  color: rgba(255, 255, 255, .78);
}

.about-band,
.map-band {
  padding: 4rem 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-layout,
.story-layout,
.work-map-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: start;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.values-grid article {
  padding: 1.25rem;
}

.story-section {
  background:
    linear-gradient(180deg, rgba(17, 75, 122, .04), rgba(242, 183, 5, .08)),
    #fff;
}

.president-card {
  position: sticky;
  top: 90px;
  padding: 2rem;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--ink));
}

.president-card h2 {
  margin-bottom: 1rem;
}

.signature {
  color: rgba(255, 255, 255, .78);
  font-size: 1.05rem;
}

.story-letter {
  position: relative;
  padding: 3rem;
  border: 1px solid rgba(114, 86, 28, .18);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(242, 183, 5, .16) 0 6px, transparent 6px),
    linear-gradient(180deg, #fffdf7, #fffaf0);
  box-shadow: 0 22px 60px rgba(23, 32, 51, .12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.9;
}

.story-letter::before {
  content: "\201C";
  position: absolute;
  top: -1.6rem;
  left: 1.8rem;
  color: rgba(242, 183, 5, .35);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7rem;
  line-height: 1;
}

.story-letter h3 {
  margin-bottom: .25rem;
}

.story-lead {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  color: var(--brand-blue);
  font-size: 1.4rem;
  font-weight: 700;
}

.story-lead::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 96px;
  height: 3px;
  background: var(--brand-gold);
}

.story-letter p {
  color: #334155;
}

.story-refrain {
  margin: .45rem 0;
  color: var(--brand-blue) !important;
  font-family: var(--bs-body-font-family);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.story-signature {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brand-gold);
  color: var(--ink) !important;
  background: rgba(255, 255, 255, .72);
  font-family: var(--bs-body-font-family);
  font-weight: 700;
}

.work-map {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(17, 75, 122, .2), rgba(15, 118, 110, .18)),
    radial-gradient(circle at 35% 25%, rgba(242, 183, 5, .22), transparent 22%),
    linear-gradient(90deg, #dbeafe 0 48%, #f8fafc 48% 100%);
}

.work-map::before {
  content: "";
  position: absolute;
  inset: 8% 28% 8% 22%;
  border-radius: 58% 42% 55% 45%;
  background: #e8f3ed;
  border: 2px solid rgba(17, 75, 122, .18);
  transform: rotate(-8deg);
}

.work-map::after {
  content: "";
  position: absolute;
  top: 5%;
  bottom: 5%;
  left: 48%;
  width: 10px;
  border-radius: 999px;
  background: rgba(17, 75, 122, .16);
  transform: rotate(8deg);
}

.map-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, .2);
  z-index: 2;
}

.pin-miami-dade {
  top: 86%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--brand-teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .16);
  opacity: .82;
}

.pin-miami-beach {
  top: 42%;
  left: 60%;
  width: 24px;
  height: 24px;
  background: var(--brand-gold);
  box-shadow: 0 0 0 8px rgba(242, 183, 5, .26), 0 0 24px rgba(242, 183, 5, .55);
  z-index: 4;
}

.pin-city-miami,
.pin-coral-gables,
.pin-el-portal,
.pin-hialeah,
.pin-key-biscayne,
.pin-miami-beach,
.pin-pinecrest,
.pin-south-miami {
  background: var(--brand-gold);
  box-shadow: 0 0 0 6px rgba(242, 183, 5, .22);
}

.pin-city-miami {
  top: 51%;
  left: 56%;
}

.pin-hialeah {
  top: 34%;
  left: 36%;
}

.pin-el-portal {
  top: 27%;
  left: 51%;
}

.pin-coral-gables {
  top: 57%;
  left: 34%;
}

.pin-south-miami {
  top: 67%;
  left: 42%;
}

.pin-pinecrest {
  top: 78%;
  left: 48%;
}

.pin-key-biscayne {
  top: 65%;
  left: 59%;
}

.map-label {
  position: absolute;
  z-index: 2;
  padding: .28rem .48rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(17, 75, 122, .14);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.label-miami-beach {
  top: 36%;
  left: 59%;
  color: #111827;
  background: #f2b705;
  border-color: rgba(114, 86, 28, .35);
  box-shadow: 0 10px 24px rgba(23, 32, 51, .16);
  font-size: .95rem;
  z-index: 4;
}

.label-city-miami {
  top: 47%;
  left: 60%;
}

.label-hialeah {
  top: 29%;
  left: 21%;
}

.label-el-portal {
  top: 20%;
  left: 45%;
}

.label-coral-gables {
  top: 53%;
  left: 13%;
}

.label-south-miami {
  top: 64%;
  left: 18%;
}

.label-pinecrest {
  top: 77%;
  left: 52%;
}

.label-key-biscayne {
  top: 66%;
  left: 62%;
}

.label-miami-dade {
  top: 89%;
  left: 36%;
  opacity: .78;
}

.location-list {
  display: grid;
  gap: 1rem;
}

.location-list article {
  padding: 1.25rem;
}

.location-list h3 {
  font-size: 1.1rem;
}

.page-header {
  padding: 5rem 0;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-blue), #18324d);
}

.page-header.compact {
  padding: 3rem 0;
}

.metric-tile span {
  display: block;
  color: var(--muted);
}

.metric-tile strong {
  display: block;
  margin-top: .35rem;
  font-size: 1.8rem;
}

.dashboard-panel,
.payment-panel,
.empty-state {
  margin-top: 1.5rem;
}

.panel-header,
.invoice-layout {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.invoice-layout > * {
  flex: 1;
}

.invoice-summary {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr;
  gap: .5rem 1rem;
}

.invoice-summary dt {
  color: var(--muted);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.admin-form {
  max-width: 920px;
}

.project-monitoring .panel-header {
  align-items: flex-start;
}

.monitoring-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.5rem;
}

.monitoring-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  min-width: 0;
}

.monitoring-metric span,
.timeline-meta,
.monitoring-project p,
.monitoring-project dt,
.stage-chip span,
.stage-chip small {
  color: var(--muted);
}

.monitoring-metric strong {
  display: block;
  margin-top: .2rem;
  font-size: 1.55rem;
}

.monitoring-panel {
  overflow-x: auto;
}

.timeline-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  min-width: 980px;
  color: var(--muted);
  font-size: .9rem;
}

.timeline-header span:nth-child(2) {
  text-align: center;
}

.timeline-header span:last-child {
  text-align: right;
}

.monitoring-rows {
  display: grid;
  gap: 1rem;
  min-width: 980px;
  margin-top: .85rem;
}

.monitoring-row {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(640px, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.monitoring-row:first-child {
  border-top: 0;
}

.monitoring-project h3 {
  margin: 0;
  font-size: 1rem;
}

.monitoring-project p {
  margin: .25rem 0 .7rem;
}

.monitoring-project dl {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: .2rem .55rem;
  margin: 0;
  font-size: .88rem;
}

.monitoring-project dd {
  margin: 0;
}

.timeline-track {
  position: relative;
  height: 34px;
  border-radius: 8px;
  background: #eef2f4;
  overflow: hidden;
}

.timeline-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 24.8%, rgba(18, 40, 56, .08) 25%, transparent 25.2%, transparent 49.8%, rgba(18, 40, 56, .08) 50%, transparent 50.2%, transparent 74.8%, rgba(18, 40, 56, .08) 75%, transparent 75.2%);
}

.project-duration {
  position: absolute;
  top: 8px;
  bottom: 8px;
  min-width: 14px;
  border-radius: 999px;
  background: #c7d3dd;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(18, 40, 56, .08);
}

.project-progress {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #256f8f;
}

.monitoring-row.is-delayed .project-progress {
  background: #c73d32;
}

.monitoring-row.is-complete .project-progress {
  background: #2f7d4f;
}

.today-marker {
  position: absolute;
  z-index: 2;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #101820;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .35rem;
  font-size: .84rem;
}

.timeline-meta strong {
  color: #101820;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.stage-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem .75rem;
  min-height: 86px;
  background: #fff;
}

.stage-chip span,
.stage-chip strong,
.stage-chip small {
  display: block;
}

.stage-chip strong {
  margin: .15rem 0;
}

.stage-active {
  border-color: #b9cfdb;
  background: #f2f8fb;
}

.stage-complete {
  border-color: #bad8c6;
  background: #f1f8f4;
}

.stage-warning {
  border-color: #ead69f;
  background: #fff9e8;
}

.stage-risk {
  border-color: #edb7b2;
  background: #fff2f1;
}

.stage-pending {
  background: #f8fafb;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
}

.project-card-header,
.portal-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-card h3 {
  margin-bottom: .2rem;
  font-size: 1.2rem;
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-facts {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
  gap: .35rem .75rem;
  margin: 1rem 0;
}

.project-facts dt {
  color: var(--muted);
  font-weight: 600;
}

.project-facts dd {
  margin-bottom: 0;
}

.portal-toolbar {
  margin-bottom: 1rem;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

.news-editor img,
.news-article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  border-radius: .5rem;
}

.chat-shell { display:grid; grid-template-columns:minmax(260px,32%) minmax(0,1fr); height:clamp(560px,72vh,760px); min-height:0; border:1px solid #d9e1e7; border-radius:1rem; overflow:hidden; background:#fff; box-shadow:0 .6rem 2rem rgba(20,45,60,.08); }
.chat-sidebar { border-right:1px solid #d9e1e7; min-width:0; min-height:0; overflow:hidden; display:flex; flex-direction:column; }
.chat-sidebar-header,.chat-panel-header { padding:1rem 1.1rem; background:#f6f9fa; border-bottom:1px solid #d9e1e7; min-height:72px; }
.chat-panel-header small { display:block; color:var(--muted); }
.chat-panel-header .chat-ai-notice { margin-top:.2rem; color:#8a5a00; font-size:.72rem; }
.chat-panel-header .chat-ai-quota { margin-top:.2rem; color:#0b6e4f; font-weight:700; }
.chat-panel-header .chat-ai-quota.quota-exhausted { color:#b02a37; }
.chat-user-list { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.chat-user { width:100%; display:flex; align-items:center; gap:.75rem; padding:.85rem 1rem; border:0; border-bottom:1px solid #edf1f3; background:#fff; text-align:left; }
.chat-user:hover,.chat-user.active { background:#edf7f4; }
.chat-user.ai-user { background:#f2f9ff; }
.chat-user.ai-user.active { background:#dff1ff; }
.chat-user.ai-user .chat-avatar { background:#0d6efd; font-size:.8rem; }
.chat-avatar { position:relative; flex:0 0 42px; width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:#174d43; color:#fff; font-weight:700; }
.presence-dot { position:absolute; right:-1px; bottom:1px; width:12px; height:12px; border:2px solid #fff; border-radius:50%; background:#a9b3b8; }
.chat-user.online .presence-dot { background:#20bf6b; }
.chat-user-copy { display:flex; flex:1; min-width:0; flex-direction:column; }
.chat-user-copy strong,.chat-user-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-user-copy small { color:var(--muted); }
.chat-panel { min-width:0; min-height:0; overflow:hidden; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; background:#edf1ec; }
.chat-messages { min-width:0; min-height:0; overflow-x:hidden; overflow-y:scroll; overscroll-behavior:contain; scrollbar-gutter:stable; padding:1.25rem; display:flex; flex-direction:column; gap:.6rem; background-color:#eef2ed; background-image:radial-gradient(rgba(23,77,67,.06) 1px,transparent 1px); background-size:18px 18px; }
.chat-messages::-webkit-scrollbar,.chat-user-list::-webkit-scrollbar { width:10px; }
.chat-messages::-webkit-scrollbar-thumb,.chat-user-list::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:999px; background:#9aa9a4; background-clip:padding-box; }
.chat-empty { margin:auto; padding:.7rem 1rem; border-radius:1rem; background:rgba(255,255,255,.85); color:var(--muted); text-align:center; }
.chat-message { max-width:min(72%,520px); padding:.55rem .7rem; border-radius:.85rem; box-shadow:0 1px 2px rgba(0,0,0,.12); overflow-wrap:anywhere; }
.chat-message.received { align-self:flex-start; background:#fff; border-top-left-radius:.2rem; }
.chat-message.own { align-self:flex-end; background:#d7f7c9; border-top-right-radius:.2rem; }
.chat-message img { display:block; width:auto; max-width:100%; max-height:380px; border-radius:.55rem; cursor:pointer; margin-bottom:.35rem; }
.chat-message small { display:block; margin-top:.25rem; color:#65726f; font-size:.68rem; text-align:right; }
.chat-ai-typing { display:flex; align-items:center; gap:.3rem; min-width:3.5rem; padding:.8rem .9rem; }
.chat-typing-dot { width:.48rem; height:.48rem; border-radius:50%; background:#52716a; animation:chat-typing-bounce 1.15s ease-in-out infinite; }
.chat-typing-dot:nth-of-type(2) { animation-delay:.16s; }
.chat-typing-dot:nth-of-type(3) { animation-delay:.32s; }
@keyframes chat-typing-bounce { 0%,60%,100% { transform:translateY(0); opacity:.45; } 30% { transform:translateY(-.3rem); opacity:1; } }
@media (prefers-reduced-motion:reduce) { .chat-typing-dot { animation:none; opacity:.75; } }
.chat-listen-button { display:inline-flex; align-items:center; gap:.3rem; margin-top:.45rem; padding:.25rem .55rem; border:1px solid #8bb7d8; border-radius:999px; background:#f3faff; color:#174d70; font-size:.75rem; line-height:1.2; }
.chat-listen-button:hover,.chat-listen-button:focus-visible { background:#dff1ff; }
.chat-listen-button.speaking { border-color:#b02a37; background:#fff0f1; color:#842029; }
.chat-composer { display:flex; align-items:flex-end; gap:.55rem; padding:.75rem; border-top:1px solid #d9e1e7; background:#f7f9f9; }
.chat-composer { flex-wrap:wrap; }
.chat-ai-tools { flex:1 0 100%; display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.45rem .65rem; border:1px solid #c9dce9; border-radius:.55rem; background:#eef8ff; color:#174d70; }
.chat-ai-tools .form-check-input,.chat-ai-tools .form-check-label { cursor:pointer; }
.chat-ai-tools .form-check-label { font-size:.82rem; font-weight:600; }
.chat-composer textarea { resize:none; max-height:130px; }
.chat-dictation-controls { display:flex; align-items:flex-end; gap:.25rem; }
.chat-dictation-controls select { width:62px; height:38px; }
.chat-dictation-controls button.listening { border-color:#b02a37; background:#fff0f1; color:#b02a37; animation:chat-microphone-pulse 1.2s infinite; }
.chat-dictation-notice { padding:.3rem .75rem; border-top:1px solid #e2e7e5; background:#fff8df; color:#695514; font-size:.7rem; text-align:center; }
@keyframes chat-microphone-pulse { 50% { box-shadow:0 0 0 .3rem rgba(176,42,55,.16); } }
@media (max-width:700px) { .chat-shell { grid-template-columns:86px minmax(0,1fr); height:calc(100dvh - 155px); min-height:480px; } .chat-sidebar-header span,.chat-user-copy,.unread-badge { display:none!important; } .chat-user { justify-content:center; padding:.7rem; } .chat-sidebar-header { text-align:center; padding:1rem .25rem; } .chat-message { max-width:88%; } .chat-messages { padding:.75rem; } .chat-composer { gap:.3rem; padding:.5rem; } .chat-dictation-controls select { width:50px; padding-left:.35rem; padding-right:1.4rem; } }
@media (max-width:700px) {
    .chat-composer { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:center; gap:.45rem; }
    .chat-ai-tools { grid-column:1 / -1; grid-row:1; align-items:flex-start; flex-direction:column; gap:.2rem; }
    .chat-composer textarea { grid-column:1 / -1; grid-row:2; width:100%; min-width:0; min-height:3.25rem; max-height:9rem; }
    .chat-composer > label { grid-column:1; grid-row:3; }
    .chat-composer .chat-dictation-controls { grid-column:2; grid-row:3; }
    .chat-composer > button[type="submit"] { grid-column:3; grid-row:3; justify-self:end; min-width:5rem; }
}

.procedure-library-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.25rem; }
.procedure-card { padding:1.5rem; }
.procedure-guide { max-width:980px; }
.procedure-guide article { counter-reset:procedure-section; }
.procedure-guide article h2 { margin-top:2rem; padding-bottom:.4rem; border-bottom:2px solid rgba(23,77,67,.14); color:#174d43; font-size:1.35rem; }
.procedure-guide li { margin-bottom:.45rem; }
.procedure-critical { border-left:.4rem solid #b02a37; }
.procedure-checklist { list-style:none; padding-left:0; }
.procedure-checklist li { position:relative; padding:.45rem .5rem .45rem 2rem; border-bottom:1px solid #e7ecea; }
.procedure-checklist li::before { content:'☐'; position:absolute; left:.35rem; font-size:1.1rem; }
.procedure-references { margin-top:2.5rem; padding:1rem 1.25rem; border-radius:.6rem; background:#f4f7f6; color:#42514d; }
.procedure-end-marker { margin-top:2.5rem; padding:.6rem; border-top:3px double #174d43; border-bottom:3px double #174d43; color:#174d43; font-weight:700; text-align:center; }
.procedure-acknowledgment { margin-top:1.5rem; padding:1.35rem; border:2px solid #174d43; border-radius:.75rem; background:#fbfdfc; }
.procedure-guide abbr { text-decoration:underline dotted; text-underline-offset:.18rem; cursor:help; }
.procedure-guide abbr:focus { outline:3px solid rgba(13,110,253,.3); outline-offset:2px; border-radius:.15rem; }
.procedure-legend { margin:1rem 0 2rem; padding:1.1rem 1.25rem; border:1px solid #cfe0db; border-radius:.75rem; background:#f4faf8; }
.procedure-legend h2 { margin-top:0!important; }
.procedure-legend dl { display:grid; grid-template-columns:minmax(110px,160px) 1fr; gap:.45rem 1rem; margin-bottom:0; }
.procedure-legend dt { color:#174d43; font-weight:700; }
.procedure-legend dd { margin:0; }
@media (max-width:600px) { .procedure-legend dl { display:block; } .procedure-legend dt { margin-top:.75rem; } }
@media print { header,.footer,.procedure-language,.procedure-guide>.d-flex,.chat-shell { display:none!important; } .procedure-guide [hidden] { display:none!important; } .procedure-guide { max-width:none; } .procedure-guide article h2 { break-after:avoid; } }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 900px) {
  .service-grid,
  .metric-grid,
  .contact-grid,
  .project-card-grid,
  .portfolio-grid,
  .about-layout,
  .story-layout,
  .work-map-layout,
  .portal-row,
  .panel-header,
  .invoice-layout {
    display: block;
  }

  .service-card,
  .metric-tile,
  .project-card,
  .portfolio-card,
  .values-grid article,
  .contact-grid > *,
  .invoice-layout > * {
    margin-bottom: 1rem;
  }

  .values-grid {
    display: block;
  }

  .president-card {
    position: static;
    margin-bottom: 1rem;
  }

  .story-letter {
    padding: 2rem 1.4rem;
    font-size: 1rem;
  }

  .story-letter::before {
    top: -1rem;
    left: 1rem;
    font-size: 4.5rem;
  }

  .work-map {
    min-height: 340px;
    margin-bottom: 1rem;
  }
}

@media (max-width: 1100px) {
  .monitoring-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .monitoring-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
