/* ==========================================================================
   Millhouse — a walk along a production floor, station by station.

   The signature device is the bay: a numbered station with an in/out/check
   triple. No contents rail, no directory board, no parameter strip, no
   calendar, no question spine, no A-Z index, no spec sheets, no dated log,
   no monographs, no status register.
   ========================================================================== */

:root {
  --ink: #1e242a; --ink-2: #47525b; --ink-3: #7d8891;
  --page: #f5f4f2; --page-2: #e9e8e4; --page-3: #dbd9d3;
  --steel: #2b3a47; --steel-2: #1d2831; --amber: #b5751f;
  --line: #cfccc5; --hold: 1140px; --read: 810px;
  --disp: "Domine", Georgia, serif;
  --ui: "Urbanist", "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--ui); font-size: 17px; line-height: 1.64; }
img { max-width: 100%; height: auto; }
a { color: var(--steel); text-underline-offset: 2px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.mh-skip { position: absolute; left: -9999px; top: 0; z-index: 40; background: var(--steel); color: #fff; padding: 12px 18px; text-decoration: none; }
.mh-skip:focus { left: 0; }
.mh-hold { max-width: var(--hold); margin: 0 auto; padding: 0 22px; }
.mh-read { max-width: var(--read); }

.mh-top { background: var(--steel); color: #fff; }
.mh-top-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 16px 0 14px; }
.mh-id { text-decoration: none; color: #fff; display: block; }
.mh-id-name { display: block; font-family: var(--disp); font-weight: 700; font-size: clamp(1.26rem, 2.5vw, 1.68rem); line-height: 1.12; }
.mh-id-sub { display: block; margin-top: 3px; font-size: 0.73rem; letter-spacing: 0.12em; text-transform: uppercase; color: #9fadb8; }
.mh-nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.mh-nav a { color: #e6ecf0; text-decoration: none; font-weight: 500; font-size: 0.94rem; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.mh-nav a:hover { border-bottom-color: var(--amber); color: #fff; }
.mh-open { display: none; font: inherit; font-weight: 500; cursor: pointer; background: transparent; color: #fff; border: 1px solid #ffffff59; padding: 8px 16px; }
.mh-drop { display: none; padding: 0 22px 14px; background: var(--steel-2); }
.mh-drop[hidden] { display: none; }
.mh-drop a { display: block; padding: 11px 0; color: #e6ecf0; text-decoration: none; border-bottom: 1px solid #ffffff26; }

h1, h2, h3 { font-family: var(--disp); color: var(--ink); line-height: 1.2; margin: 0 0 13px; font-weight: 700; }
h1 { font-size: clamp(1.95rem, 4.4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.7vw, 1.78rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 15px; }
.mh-over { margin: 0 0 11px; font-size: 0.72rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.mh-lede { font-size: 1.12rem; color: var(--ink-2); margin-bottom: 19px; }
.mh-fine-t { font-size: 0.88rem; color: var(--ink-2); }

.mh-zone { padding: 48px 0; border-bottom: 1px solid var(--line); }
.mh-zone--head { padding: 54px 0 42px; background: var(--page-2); }
.mh-zone--tint { background: var(--page-2); }
.mh-pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 46px; align-items: start; }

/* --- the bay: this theme's signature ------------------------------------ */
.mh-bays { margin: 26px 0 0; }
.mh-bay { border-left: 5px solid var(--steel); padding: 0 0 0 24px; margin-bottom: 26px; position: relative; }
.mh-bay-no {
  display: inline-block; background: var(--steel); color: #fff; padding: 4px 12px;
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; margin-bottom: 10px;
}
.mh-bay h3 { margin-bottom: 10px; }
.mh-bay-io { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 26px; margin: 0 0 12px; }
.mh-bay-io > div { padding: 9px 0; border-top: 1px solid var(--line); }
.mh-bay-io dt { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.mh-bay-io dd { margin: 0; font-size: 0.92rem; }
.mh-bay p { color: var(--ink-2); margin-bottom: 0; }

.mh-box { border: 2px solid var(--steel); background: var(--page-2); padding: 21px 24px; margin: 22px 0; }
.mh-box > :last-child { margin-bottom: 0; }
.mh-box-h { font-family: var(--disp); font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; }

.mh-items { list-style: none; margin: 0 0 15px; padding: 0; }
.mh-items li { padding: 9px 0 9px 26px; border-bottom: 1px solid var(--line); position: relative; }
.mh-items li::before { content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 4px; background: var(--amber); }
.mh-items li:last-child { border-bottom: 0; }

.mh-tab-wrap { overflow-x: auto; margin: 20px 0; }
.mh-tab { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.mh-tab caption { text-align: left; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 9px; font-weight: 600; }
.mh-tab th, .mh-tab td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.mh-tab thead th { border-bottom: 2px solid var(--steel); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-family: var(--ui); }
.mh-tab tbody th { font-family: var(--disp); font-weight: 700; }

.mh-acts { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.mh-btn { display: inline-block; font: inherit; font-weight: 500; text-decoration: none; padding: 13px 26px; border: 2px solid var(--steel); cursor: pointer; text-align: center; }
.mh-btn--solid { background: var(--steel); color: #fff; }
.mh-btn--solid:hover { background: var(--steel-2); color: #fff; }
.mh-btn--thin { background: transparent; color: var(--steel); }
.mh-btn--thin:hover { background: var(--page-3); color: var(--steel); }
.mh-btn--wide { width: 100%; }
.mh-btn[disabled] { opacity: 0.55; cursor: progress; }

.mh-form { border: 2px solid var(--steel); background: var(--page); padding: 26px; }
.mh-form h3 { margin-top: 0; }
.mh-f { margin-bottom: 16px; }
.mh-l { display: block; font-weight: 500; font-size: 0.93rem; margin-bottom: 5px; }
.mh-hint { display: block; font-size: 0.82rem; color: var(--ink-3); margin-bottom: 6px; }
.mh-in { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--ink-3); background: #fff; color: var(--ink); }
.mh-in:focus { border-color: var(--steel); }
textarea.mh-in { min-height: 114px; resize: vertical; }
.mh-agree { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.mh-agree input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--steel); }
.mh-agree-t { font-size: 0.86rem; line-height: 1.55; color: var(--ink-2); }
.mh-said { margin: 12px 0 0; font-size: 0.92rem; font-weight: 500; }
.mh-said.is-bad { color: #9c2c16; }
.mh-said.is-good { color: var(--steel); }
.mh-done { border: 2px solid var(--steel); background: var(--page-2); padding: 26px; }
.mh-done h3 { margin-top: 0; }
.mh-done p:last-child { margin-bottom: 0; }

.mh-doc { padding: 44px 0; }
.mh-doc-in { max-width: 810px; }
.mh-doc-date { font-size: 0.77rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid var(--steel); padding-bottom: 13px; margin-bottom: 25px; }
.mh-doc h2 { font-size: 1.24rem; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.mh-doc ul, .mh-doc ol { padding-left: 22px; }
.mh-doc li { margin-bottom: 7px; }
.mh-idx { border: 2px solid var(--steel); background: var(--page-2); padding: 20px 24px; margin-bottom: 28px; }
.mh-idx h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 1.05rem; }
.mh-idx ol { margin: 0; }

.mh-foot { background: var(--steel); color: #b6c3cc; }
.mh-foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; padding: 34px 0 24px; }
.mh-foot-h { font-size: 0.71rem; letter-spacing: 0.15em; text-transform: uppercase; color: #8b9aa5; margin: 0 0 9px; font-weight: 600; }
.mh-foot-cols a { display: block; padding: 4px 0; color: #e6ecf0; text-decoration: none; width: fit-content; border-bottom: 1px solid transparent; }
.mh-foot-cols a:hover { border-bottom-color: var(--amber); color: #fff; }
.mh-foot-p { margin: 0; font-size: 0.91rem; }
.mh-foot-f { display: block; padding: 4px 0; font-size: 0.91rem; }
.mh-entity { margin: 0; padding: 22px 0; display: grid; gap: 9px; border-top: 1px solid #ffffff26; }
.mh-entity > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
.mh-entity dt { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8b9aa5; }
.mh-entity dd { margin: 0; font-size: 0.92rem; color: #e6ecf0; }
.mh-entity a { color: #e6ecf0; }
.mh-fine { border-top: 1px solid #ffffff26; padding: 18px 0; }
.mh-fine p { font-size: 0.87rem; }
.mh-fine p:last-child { margin-bottom: 0; }
.mh-fine strong { color: #f0f4f7; }
.mh-fine a { color: #e6ecf0; }
.mh-close { border-top: 2px solid #ffffff40; padding: 18px 0 36px; margin: 0; font-size: 0.84rem; color: #8b9aa5; }

@media (max-width: 1000px) { .mh-pair { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 780px) {
  body { font-size: 16px; }
  .mh-nav { display: none; }
  .mh-open { display: inline-block; }
  .mh-drop { display: block; }
  .mh-drop[hidden] { display: none; }
  .mh-entity > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mh-zone { padding: 34px 0; }
  .mh-form { padding: 20px; }
  .mh-bay { padding-left: 16px; }
}
@media print {
  .mh-nav, .mh-open, .mh-drop, .mh-form, .mh-skip { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .mh-top, .mh-foot { background: #fff; color: #000; }
}
