:root {
  --desktop: #315f63;
  --desktop-dark: #24494c;
  --window: #d4d0c8;
  --window-light: #ffffff;
  --window-mid: #b7b7b7;
  --window-shadow: #777777;
  --window-dark: #222222;
  --title: #102a58;
  --title-active: #164f73;
  --primary: #0f633c;
  --primary-dark: #073b23;
  --text: #111111;
  --muted: #404040;
  --focus: #ffdf54;
  --danger: #9e2828;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  color: var(--text);
  background: var(--desktop);
  font-family: Tahoma, Verdana, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: #002b70;
  text-underline-offset: 2px;
}

a:hover {
  color: #005197;
}

:focus-visible {
  outline: 3px dotted var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: #000;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.desktop-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto;
  background: var(--window);
  border: 3px solid;
  border-color: var(--window-light) var(--window-dark) var(--window-dark) var(--window-light);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.28);
}

.window-titlebar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 5px 4px 7px;
  color: #fff;
  background: var(--title);
  border-bottom: 2px solid #000;
  font-size: 14px;
  font-weight: 700;
}

.titlebar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-brand > span:last-child {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.app-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 25px;
  color: #061327;
  background: #e6e4db;
  border: 2px solid;
  border-color: #fff #4b4b4b #4b4b4b #fff;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
}

.window-controls {
  display: flex;
  gap: 4px;
}

.window-control {
  width: 27px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #000;
  background: var(--window);
  border: 2px solid;
  border-color: #fff #333 #333 #fff;
  font-weight: 900;
  line-height: 1;
}

.close-control {
  color: #350000;
}

.menu-strip {
  min-height: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 7px;
  border-bottom: 2px solid var(--window-shadow);
}

.menu-strip a,
.menu-command {
  display: inline-block;
  padding: 4px 9px;
  color: #111;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.menu-strip a:hover,
.menu-command:hover {
  color: #111;
  background: #e7e5df;
  border-color: #fff #777 #777 #fff;
}

.menu-command {
  margin-left: auto;
}

.menu-separator {
  width: 2px;
  height: 24px;
  margin-left: 4px;
  border-left: 1px solid #777;
  border-right: 1px solid #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 6px 9px;
  background: #c8cfca;
  border-top: 1px solid #fff;
  border-bottom: 2px solid #676767;
  font-size: 13px;
}

.toolbar p {
  margin: 0;
}

.toolbar-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 25px;
  padding: 3px;
  background: #e4e7e3;
  border: 2px inset #eee;
}

.toolbar-mark span {
  width: 5px;
  background: var(--desktop);
}

.toolbar-mark span:nth-child(1) { height: 7px; }
.toolbar-mark span:nth-child(2) { height: 13px; }
.toolbar-mark span:nth-child(3) { height: 19px; }

.availability {
  margin-left: auto;
  white-space: nowrap;
  font-family: "Courier New", monospace;
}

.status-light {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  background: #1c9d42;
  border: 1px solid #083e18;
  box-shadow: inset 1px 1px 0 #8cff9f;
}

main {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.inset-panel {
  background: #e5e3dc;
  border: 3px solid;
  border-color: #666 #fff #fff #666;
  box-shadow: inset 1px 1px 0 #111;
}

.raised-panel {
  background: var(--window);
  border: 3px solid;
  border-color: #fff #555 #555 #fff;
  box-shadow: 1px 1px 0 #111;
}

.main-dialog {
  padding: 0;
}

.dialog-caption {
  padding: 7px 10px;
  color: #fff;
  background: var(--title-active);
  border-bottom: 2px solid #0a2535;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.65fr);
  gap: 24px;
  padding: clamp(24px, 5vw, 56px);
}

.system-kicker {
  margin: 0 0 12px;
  color: #244e51;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ui-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  color: #111;
  background: var(--window);
  border: 3px solid;
  border-color: #fff #333 #333 #fff;
  box-shadow: 1px 1px 0 #000;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ui-button:hover {
  color: #000;
  background: #e7e5de;
}

.ui-button:active {
  border-color: #333 #fff #fff #333;
  box-shadow: inset 1px 1px 0 #000;
  transform: translate(1px, 1px);
}

.primary-button,
.primary-button:hover {
  color: #fff;
  background: var(--primary);
  border-color: #8ed3a9 var(--primary-dark) var(--primary-dark) #8ed3a9;
}

.microcopy {
  margin: 13px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.fit-console {
  align-self: start;
  padding: 8px;
}

.console-header {
  margin: -2px -2px 8px;
  padding: 5px 7px;
  color: #fff;
  background: #3f6c70;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.fit-console dl {
  margin: 0;
  border: 2px inset #fff;
}

.fit-console dl div {
  display: grid;
  grid-template-columns: 95px 1fr;
  border-bottom: 1px solid #858585;
}

.fit-console dl div:last-child {
  border-bottom: 0;
}

.fit-console dt,
.fit-console dd {
  margin: 0;
  padding: 7px;
  font-size: 13px;
}

.fit-console dt {
  font-weight: 700;
  background: #c3c7c2;
  border-right: 1px solid #858585;
}

.measurement-motif {
  display: flex;
  align-items: flex-end;
  height: 55px;
  margin-top: 12px;
  padding: 8px 4px;
  background: #f2f0e6;
  border: 2px inset #fff;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.measurement-motif span {
  align-self: flex-start;
}

.measurement-motif i {
  flex: 1;
  height: 12px;
  border-left: 1px solid #111;
}

.section-window {
  border: 2px solid;
  border-color: #fff #3b3b3b #3b3b3b #fff;
}

.section-titlebar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  color: #fff;
  background: #436d70;
  border-bottom: 2px solid #193637;
}

.section-titlebar h1,
.section-titlebar h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
}

.section-titlebar span {
  font-family: "Courier New", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.section-body {
  padding: clamp(16px, 3vw, 30px);
}

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

.service-group {
  min-width: 0;
  margin: 0;
  padding: 15px;
  background: #deddd6;
  border: 2px solid;
  border-color: #777 #fff #fff #777;
}

.service-group legend {
  padding: 3px 8px;
  color: #fff;
  background: #315f63;
  border: 1px solid #163536;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.full-service {
  grid-column: 1 / -1;
}

.full-service p {
  margin: 0;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 27px;
}

.check-list li:last-child {
  margin-bottom: 0;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  top: 1px;
  left: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border: 1px solid #052f1b;
  font-size: 12px;
  font-weight: 900;
}

.two-column-panel,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 25px;
}

.two-column-panel h3,
.contact-grid h3,
.appointment-box h3 {
  margin-top: 0;
}

.value-list {
  padding: 9px;
}

.value-list > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 7px;
  border-bottom: 1px solid #888;
}

.value-list > div:last-child {
  border-bottom: 0;
}

.value-list p {
  margin: 0;
}

.value-code {
  display: grid;
  place-items: center;
  min-height: 34px;
  color: #fff;
  background: #315f63;
  border: 2px solid;
  border-color: #8ba9aa #183638 #183638 #8ba9aa;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
}

.process-list article {
  min-height: 200px;
  padding: 22px;
  background: #deddd6;
  border: 2px solid;
  border-color: #fff #777 #777 #fff;
}

.process-list h3 {
  margin: 14px 0 8px;
}

.process-list p {
  margin: 0;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 47px;
  height: 36px;
  color: #fff;
  background: var(--title);
  border: 2px solid;
  border-color: #8193ba #07122c #07122c #8193ba;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.contact-details address {
  margin-bottom: 14px;
  font-style: normal;
}

.hours-table {
  max-width: 430px;
  margin-top: 20px;
  border: 2px inset #fff;
}

.hours-table > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #888;
}

.hours-table > div:last-child {
  border-bottom: 0;
}

.hours-table span {
  padding: 6px 8px;
}

.hours-table span:first-child {
  font-weight: 700;
  border-right: 1px solid #888;
}

.appointment-box {
  padding: 20px;
}

.compact-list {
  margin-bottom: 20px;
}

.wide-button {
  width: 100%;
}

.status-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) minmax(250px, 1fr) auto auto;
  gap: 3px;
  padding: 4px;
  border-top: 2px solid #777;
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.status-cell {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 4px 7px;
  border: 2px solid;
  border-color: #777 #fff #fff #777;
}

.status-cell a {
  color: #111;
}

.status-main {
  min-width: 0;
}

.social-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  align-items: center;
  padding: 8px 10px;
  background: #c2c7c2;
  border-top: 1px solid #fff;
  font-size: 12px;
}

.social-strip a {
  color: #002b70;
  font-weight: 700;
}

.copyright {
  margin-left: auto;
}

.booking-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  color: var(--text);
  background: var(--window);
  border: 3px solid;
  border-color: #fff #222 #222 #fff;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.42);
}

.booking-dialog::backdrop {
  background: rgba(12, 28, 29, 0.75);
}

.dialog-titlebar {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dialog-close {
  flex: 0 0 auto;
  cursor: pointer;
}

.booking-dialog form {
  padding: 10px;
}

.form-body {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.form-body > p:first-child {
  margin: 0 0 8px;
}

.form-body label:not(.consent-label) {
  font-size: 13px;
  font-weight: 700;
}

.form-body input,
.form-body textarea {
  width: 100%;
  padding: 8px;
  color: #111;
  background: #fff;
  border: 3px solid;
  border-color: #555 #fff #fff #555;
  border-radius: 0;
}

.form-body textarea {
  resize: vertical;
}

.consent-label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 8px;
  font-size: 12px;
}

.consent-label input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.form-status {
  min-height: 22px;
  margin: 3px 0 0;
  color: #0b4b2d;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 2px 2px;
}

.privacy-shell {
  max-width: 940px;
}

.privacy-window {
  width: min(760px, 100%);
  margin: 0 auto;
}

.privacy-content {
  padding: clamp(20px, 5vw, 48px);
}

.privacy-content > p:first-child {
  margin-top: 0;
  padding: 13px;
  background: #d1d8d3;
  border: 2px solid;
  border-color: #777 #fff #fff #777;
  font-weight: 700;
}

.privacy-content h2 {
  margin: 28px 0 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid #527174;
  font-size: 1.15rem;
}

.privacy-actions {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 2px solid #777;
}

@media (max-width: 850px) {
  .hero-layout,
  .two-column-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .fit-console {
    width: 100%;
  }

  .status-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  body {
    font-size: 15px;
  }

  .desktop-shell {
    width: 100%;
    margin: 0;
    border-left-width: 2px;
    border-right-width: 2px;
    box-shadow: none;
  }

  .titlebar-brand > span:last-child {
    max-width: 58vw;
  }

  .window-controls .window-control:first-child,
  .window-controls .window-control:nth-child(2) {
    display: none;
  }

  .menu-strip {
    align-items: stretch;
  }

  .menu-strip a,
  .menu-command {
    flex: 1 1 auto;
    text-align: center;
  }

  .menu-command {
    margin-left: 0;
  }

  .menu-separator {
    display: none;
  }

  .toolbar {
    align-items: flex-start;
  }

  .availability {
    white-space: normal;
    text-align: right;
  }

  main {
    gap: 12px;
    padding: 8px;
  }

  .hero-layout {
    gap: 18px;
    padding: 24px 17px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .button-row .ui-button {
    width: 100%;
  }

  .service-grid,
  .process-list {
    grid-template-columns: 1fr;
  }

  .full-service {
    grid-column: auto;
  }

  .process-list article {
    min-height: 0;
  }

  .section-titlebar span {
    display: none;
  }

  .status-bar {
    grid-template-columns: 1fr;
  }

  .social-strip {
    justify-content: center;
    text-align: center;
  }

  .copyright {
    width: 100%;
    margin-left: 0;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .ui-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
