
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--ground);
  border-bottom: var(--border-fine);
  transition: padding var(--duration-base) var(--ease-desk), background-color var(--duration-base) var(--ease-desk);
}

.site-header.is-condensed {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: var(--space-s);
}

.site-header.is-condensed .header-inner {
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.brand img {
  height: 3.2rem;
  width: auto;
  display: block;
}

/* Header Station Info (Engineering ledger touch) */
.header-station-info {
  display: none;
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  line-height: 1.3;
  color: var(--ink-muted);
  border-left: var(--border-fine);
  padding-left: var(--space-s);
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .header-station-info {
    display: block;
  }
}

.header-station-info strong {
  color: var(--ink-dark);
  display: block;
  font-weight: 500;
  white-space: nowrap;
}

/* Navigation Panel */
.site-nav {
  display: none;
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-s);
  }
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
  border-left: var(--border-fine);
  border-right: var(--border-fine);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
  border-right: var(--border-fine);
  transition: background-color var(--duration-fast) var(--ease-sharp), color var(--duration-fast) var(--ease-sharp);
}

.nav-item:last-child .nav-link {
  border-right: none;
}

.nav-link:hover {
  background-color: var(--panel-tint);
  color: var(--accent);
}

.nav-link:active {
  background-color: var(--panel-subtle);
  color: var(--ink);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.nav-link[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  background-color: var(--panel-tint);
  border-bottom: 2px solid var(--accent);
}

/* Header Direct Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.header-phone-link {
  display: none;
  align-items: center;
  gap: 0.4rem;

  font-family: var(--juki-b04);
  font-size: var(--step--1);
  color: var(--ink-dark);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border: var(--border-fine);
  background-color: var(--panel-tint);
  min-height: 44px;
  transition: border-color var(--duration-fast) var(--ease-sharp), background-color var(--duration-fast) var(--ease-sharp);
}

@media (min-width: 680px) {
  .header-phone-link {
    display: inline-flex;
  }
}

.header-phone-link:hover {
  border-color: var(--ink);
  color: var(--ink);
  background-color: var(--ground);
}

.header-phone-link:active {
  background-color: var(--panel-subtle);
}

.header-phone-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Nav Toggle Button (Mobile/Tablet) */
.nav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  background-color: var(--ground);
  border: 1px solid var(--ink);
  font-family: var(--juki-b04);

  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-sharp), color var(--duration-fast) var(--ease-sharp);
}

@media (min-width: 860px) {
  .nav-toggle-btn {
    display: none;
  }
}

.nav-toggle-btn:hover {
  background-color: var(--ink);
  color: var(--ground);
}

.nav-toggle-btn:active {
  background-color: var(--ink-dark);
  color: var(--ground);
}

.nav-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile Nav Drawer */
.mobile-nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--ground);
  border-bottom: 2px solid var(--ink);
  padding: var(--space-m) var(--shell-gutter);
  box-shadow: var(--shadow-overlay);
}

.mobile-nav-panel.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: var(--border-fine);
}

.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: var(--border-fine);
  font-family: var(--juki-f3a);
  font-size: var(--juki-d5c);
  font-weight: 600;
  color: var(--ink);

  text-decoration: none;
  min-height: 48px;
  transition: color var(--duration-fast) var(--ease-sharp), padding-left var(--duration-fast) var(--ease-sharp);
}

.mobile-nav-link:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.mobile-nav-link:active {
  color: var(--ink-dark);
}

.mobile-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.mobile-nav-link[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  min-height: 44px;
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--duration-fast) var(--ease-sharp),
              border-color var(--duration-fast) var(--ease-sharp),
              color var(--duration-fast) var(--ease-sharp),
              transform var(--duration-fast) var(--ease-sharp);
  white-space: normal;
  text-align: center;
  overflow-wrap: break-word;
}

.btn-primary {
  background-color: var(--ink);
  color: var(--ground);
  border-color: var(--ink);
}

.btn-primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--ground);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #BF360C;
  border-color: #BF360C;
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-secondary:hover {
  background-color: var(--ink);
  color: var(--ground);
  transform: translateY(-1px);
}

.btn-secondary:active {
  background-color: var(--ink-dark);
  transform: translateY(0);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-ghost {
  background-color: var(--panel-tint);
  color: var(--ink-dark);
  border: var(--border-fine);
}

.btn-ghost:hover {
  background-color: var(--ground);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:active {
  background-color: var(--panel-subtle);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Small Button Variant */
.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--step--2);
  min-height: 44px;
}

.btn-block {
  width: 100%;
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-m);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-size: var(--juki-843);
}

.directory-table thead th {
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background-color: var(--panel-tint);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ink);
  text-align: left;
}

.directory-table tbody tr {
  border-bottom: var(--border-fine);
  transition: background-color var(--duration-fast) var(--ease-sharp);
}

.directory-table tbody tr:hover {
  background-color: var(--panel-tint);
}

.directory-table td {
  padding: 1rem 1rem;
  vertical-align: middle;
}

.dir-col-num {
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  color: var(--ink-muted);
  width: 3.5rem;
  white-space: nowrap;
}

.dir-col-title {
  font-family: var(--juki-f3a);
  font-weight: 700;
  font-size: var(--juki-d5c);
}

.dir-col-title a {
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  transition: color var(--duration-fast) var(--ease-sharp);
}

.dir-col-title a:hover {
  color: var(--accent);
}

.dir-col-title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dir-col-desc {
  color: var(--ink-mid);
  font-size: var(--step--1);
  line-height: 1.45;
}

.dir-col-basis {
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  color: var(--ink-dark);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.dir-col-action {
  width: 3.5rem;
  text-align: right;
}

/* Mobile adaptation for directory table */
@media (max-width: 767px) {
  .directory-table thead {
    display: none;
  }
  
  .directory-table, .directory-table tbody, .directory-table tr, .directory-table td {
    display: block;
    width: 100%;
  }
  
  .directory-table tr {
    padding: var(--space-s) 0;
  }
  
  .directory-table td {
    padding: 0.25rem 0;
    text-align: left !important;
  }
  
  .dir-col-basis {
    margin-top: 0.35rem;
    color: var(--accent);
  }
}

.spec-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: var(--border-fine);
  background-color: var(--ground);
  margin: var(--space-m) 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 680px;
}

.spec-table th, .spec-table td,
.nita1e2 > table th, .nita1e2 > table td {
  padding: 0.85rem 1.1rem;
  border-bottom: var(--border-fine);
  border-right: var(--border-fine);
  text-align: left;
  min-width: 140px;
}

.spec-table th:last-child, .spec-table td:last-child {
  border-right: none;
}

.spec-table thead th {
  background-color: var(--panel-tint);
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:hover td {
  background-color: rgba(246, 247, 249, 0.6);
}

.spec-table .spec-label {
  font-weight: 600;
  color: var(--ink-dark);
  font-family: var(--juki-28c);
}

.spec-table .spec-value {
  font-family: var(--juki-b04);
  color: var(--ink);
}

.pull-quote-spread {
  padding: var(--space-2xl) 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background-color: var(--panel-tint);
  position: relative;
  overflow: hidden;
}

.pull-quote-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-gutter);
}

.pull-quote-tag {
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--space-m);
  display: block;
}

.pull-quote-text {
  font-family: var(--juki-f3a);
  font-size: clamp(1.8rem, 1.4rem + 2.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: var(--space-m);
  max-width: 32ch;
}

.pull-quote-author {
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pull-quote-author strong {
  color: var(--ink);
}

.form-ledger {
  background-color: var(--ground);
  border: var(--border-fine);
  padding: var(--space-l);
  box-shadow: var(--shadow-subtle);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
}

.form-label .label-aux {
  font-weight: 400;
  color: var(--ink-muted);
  font-size: var(--step--2);
  white-space: nowrap;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  background-color: var(--ground);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--juki-28c);
  font-size: var(--juki-843);
  transition: border-color var(--duration-fast) var(--ease-sharp), box-shadow var(--duration-fast) var(--ease-sharp);
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: var(--ink-mid);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--accent-tint), inset 0 0 0 1px var(--ink);
}

.form-input:focus-visible, .form-select:focus-visible, .form-textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-check-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.form-check-input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 0.2rem;
  cursor: pointer;
  accent-color: var(--accent);
  border: 1px solid var(--ink);
}

.form-check-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-check-label {
  font-size: var(--step--1);
  color: var(--ink-mid);
  line-height: 1.45;
  cursor: pointer;
}

.form-error-inline {
  color: var(--status-alert);
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: var(--status-alert);
  background-color: rgba(198, 40, 40, 0.02);
}

.form-group.has-error .form-error-inline {
  display: block;
}

.form-status-alert {
  padding: 1rem;
  margin-bottom: var(--space-m);
  border: 1px solid var(--line);
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  display: none;
}

.form-status-alert.is-success {
  display: block;
  background-color: rgba(14, 131, 69, 0.08);
  border-color: var(--status-live);
  color: #08502A;
}

.form-status-alert.is-error {
  display: block;
  background-color: rgba(198, 40, 40, 0.08);
  border-color: var(--status-alert);
  color: var(--status-alert);
}

.site-footer {
  margin-top: auto;
  background-color: var(--ink-dark);
  color: var(--ground);
  border-top: 3px solid var(--accent);
  padding: var(--space-2xl) 0 var(--space-m);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.footer-brand-col .brand img {
  height: 3.6rem;
  width: auto;
}

.footer-fact-list {
  list-style: none;
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-fact-list strong {
  color: var(--ground);
  font-weight: 500;
}

.footer-fact-list a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.footer-fact-list a:hover {
  color: var(--accent);
}

.footer-col-title {
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FF7043;
  margin-bottom: var(--space-s);
  font-weight: 700;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-link {
  font-family: var(--juki-28c);
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: inline-block;
  padding: 0.2rem 0;
  transition: color var(--duration-fast) var(--ease-sharp), transform var(--duration-fast) var(--ease-sharp);
}

.footer-nav-link:hover {
  color: var(--ground);
  transform: translateX(2px);
}

.footer-nav-link:active {
  color: var(--accent);
}

.footer-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer Mandatory Legal Row */
.footer-legal-row {
  padding-top: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 860px) {
  .footer-legal-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  align-items: center;
}

.footer-legal-link, .consent-reopen-btn {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--duration-fast) var(--ease-sharp);
}

.footer-legal-link:hover, .consent-reopen-btn:hover {
  color: var(--ground);
  text-decoration: underline;
}

.footer-legal-link:active, .consent-reopen-btn:active {
  color: var(--accent);
}

.footer-legal-link:focus-visible, .consent-reopen-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background-color: var(--ink-dark);
  color: var(--ground);
  border-top: 2px solid var(--accent);
  padding: 0.85rem var(--shell-gutter);
  box-shadow: 0 -4px 20px rgba(10, 11, 14, 0.25);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-m);
  }
}

.cookie-text {
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  margin: 0;
  max-width: 58ch;
}

.cookie-text a {
  color: var(--ground);
  text-decoration: underline;
}

.cookie-text a:hover {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .cookie-actions {
    width: auto;
  }
}

.cookie-btn-allow {
  background-color: var(--accent);
  color: var(--ground);
  border: 1px solid var(--accent);
  padding: 0.45rem 1rem;
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  flex: 1;
  transition: background-color var(--duration-fast) var(--ease-sharp), border-color var(--duration-fast) var(--ease-sharp);
}

.cookie-btn-allow:hover {
  background-color: #BF360C;
  border-color: #BF360C;
}

.cookie-btn-allow:active {
  background-color: #A02B08;
}

.cookie-btn-allow:focus-visible {
  outline: 2px solid var(--ground);
  outline-offset: 2px;
}

.cookie-btn-decline {
  background-color: transparent;
  color: var(--ground);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.45rem 1rem;
  font-family: var(--juki-b04);
  font-size: var(--step--2);
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  flex: 1;
  transition: background-color var(--duration-fast) var(--ease-sharp), border-color var(--duration-fast) var(--ease-sharp);
}

.cookie-btn-decline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--ground);
}

.cookie-btn-decline:active {
  background-color: rgba(255, 255, 255, 0.2);
}

.cookie-btn-decline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chat-widget {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9980;
  transition: bottom var(--duration-base) var(--ease-desk);
}

body.has-cookie-banner .chat-widget {
  bottom: 5.5rem;
}

@media (max-width: 767px) {
  body.has-cookie-banner .chat-widget {
    bottom: 7.25rem;
  }
}

.chat-launcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  background-color: var(--ink);
  color: var(--ground);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-desk);
  cursor: pointer;
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 600;
  transition: background-color var(--duration-fast) var(--ease-sharp),
              border-color var(--duration-fast) var(--ease-sharp),
              transform var(--duration-fast) var(--ease-sharp);
}

.chat-launcher-btn:hover {
  background-color: var(--accent);
  border-color: var(--ink);
  color: var(--ground);
  transform: translateY(-2px);
}

.chat-launcher-btn:active {
  background-color: #BF360C;
  transform: translateY(0);
}

.chat-launcher-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.chat-launcher-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--ground);
  font-size: var(--step--2);
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-weight: 700;
  line-height: 1;
}

.chat-panel {
  display: none;
  position: fixed;
  bottom: 5rem;
  right: 1.25rem;
  width: calc(100vw - 2.5rem);
  max-width: 380px;
  height: 520px;
  max-height: calc(100vh - 7rem);
  background-color: var(--ground);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-overlay);
  z-index: 9995;
  flex-direction: column;
}

.chat-panel.is-open {
  display: flex;
}

.chat-panel-header {
  background-color: var(--ink-dark);
  color: var(--ground);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent);
}

.chat-panel-title {
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-panel-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--status-live);
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--ground);
  cursor: pointer;
  padding: 0.25rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--ease-sharp);
}

.chat-close-btn:hover {
  color: var(--accent);
}

.chat-close-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--panel-tint);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  font-size: var(--step--1);
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-msg-operator {
  align-self: flex-start;
  background-color: var(--ground);
  border: var(--border-fine);
  color: var(--ink);
}

.chat-msg-user {
  align-self: flex-end;
  background-color: var(--ink-dark);
  color: var(--ground);
  border: 1px solid var(--ink);
}

.chat-input-bar {
  display: flex;
  border-top: var(--border-fine);
  background-color: var(--ground);
}

.chat-input-text {
  flex: 1;
  border: none;
  padding: 0.75rem 0.85rem;
  font-family: var(--juki-28c);
  font-size: var(--step--1);
  min-height: 44px;
}

.chat-input-text:focus {
  outline: none;
}

.chat-send-btn {
  background-color: var(--ink);
  color: var(--ground);
  border: none;
  padding: 0 1.1rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  font-family: var(--juki-b04);
  font-size: var(--step--1);
  font-weight: 700;
  transition: background-color var(--duration-fast) var(--ease-sharp);
}

.chat-send-btn:hover {
  background-color: var(--accent);
}

.chat-send-btn:active {
  background-color: #BF360C;
}

.chat-send-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Chat Intake Step (Consent & Name) */
.chat-init-view {
  padding: 1.25rem;
  background-color: var(--ground);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  flex: 1;
  overflow-y: auto;
}

.hover-preview-container {
  position: fixed;
  pointer-events: none;
  z-index: 10050;
  width: 220px;
  height: 140px;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-overlay);
  background-color: var(--ground);
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease-out, transform 120ms ease-out;
  transform: translate(-50%, -100%) scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .hover-preview-container.is-active {
    opacity: 1;
    visibility: visible;
    transform: translate(15px, 15px) scale(1);
  }
}

.hover-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
