:root {
  --mtc-paper: #f4f4f6;
  --mtc-paper-deep: #eceef1;
  --mtc-ink: #24252b;
  --mtc-muted: #666870;
  --mtc-rule: #858890;
  --mtc-hairline: rgba(36, 37, 43, .35);
  --mtc-shadow: rgba(35, 37, 43, .14);
}

* { box-sizing: border-box; }

body:has(.mtc-shell) {
  min-height: 100vh;
  margin: 0;
  color: var(--mtc-ink);
  background:
    radial-gradient(circle at 50% 5%, rgba(255,255,255,.9), transparent 42%),
    linear-gradient(180deg, #eff0f3, #e8e9ed);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body:has(.mtc-shell) #wpadminbar { display: none; }
html:has(.mtc-shell) { margin-top: 0 !important; }

.mtc-shell {
  position: relative;
  width: min(92vw, 1100px);
  min-height: 800px;
  margin: clamp(24px, 5vh, 54px) auto;
  overflow: hidden;
  border: 1px solid var(--mtc-rule);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(246,246,248,.84)),
    repeating-linear-gradient(0deg, rgba(25,28,35,.025) 0, rgba(25,28,35,.025) 1px, transparent 1px, transparent 4px);
  box-shadow: 0 12px 24px var(--mtc-shadow), inset 0 0 70px rgba(90, 96, 112, .08);
}

.mtc-shell::before,
.mtc-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.mtc-shell::before {
  opacity: .23;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(50,52,60,.12) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(255,255,255,.14) 2px 3px);
  background-size: 9px 11px, 7px 100%;
  mix-blend-mode: multiply;
}

.mtc-shell::after {
  box-shadow: inset 0 0 110px rgba(74, 79, 93, .08);
}

.mtc-header {
  min-height: 258px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 28px;
  padding: 42px 28px 20px;
  border-bottom: 1px solid var(--mtc-rule);
}

.mtc-brand {
  min-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 7px;
  text-align: center;
}

.mtc-brand h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: .035em;
}

.mtc-mark { width: 116px; height: 116px; color: #a4a7af; }

.mtc-tabs {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  min-width: 0;
}

.mtc-tab,
.mtc-partner a,
.mtc-partner span {
  appearance: none;
  border: 0;
  padding: 0 0 8px;
  color: var(--mtc-muted);
  background: none;
  font: inherit;
  font-size: 18px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

button.mtc-tab { cursor: pointer; }
.mtc-tab.is-active { color: var(--mtc-ink); border-bottom: 2px solid var(--mtc-ink); }
.mtc-partner { justify-self: end; padding-bottom: 7px; text-align: right; }
.mtc-partner a:hover { color: var(--mtc-ink); }

.mtc-case-strip {
  display: grid;
  grid-template-columns: 1.35fr .85fr .85fr;
  gap: 20px;
  align-items: center;
  min-height: 50px;
  padding: 9px 145px;
  border-bottom: 1px solid var(--mtc-rule);
  background: linear-gradient(180deg, rgba(228,235,239,.72), rgba(240,243,245,.65));
  font-size: 17px;
  text-align: center;
}

.mtc-case-strip strong { font-weight: 500; }

.mtc-terminal {
  position: relative;
  width: min(78%, 840px);
  min-height: 375px;
  margin: 36px auto 0;
  border: 1px solid var(--mtc-rule);
  background: rgba(247,247,249,.62);
}

.mtc-panel { min-height: 288px; }
.mtc-message {
  min-height: 288px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 42px;
  text-align: center;
}

.mtc-message h2,
.mtc-partner-panel h2 {
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 500;
}

.mtc-message p { max-width: 760px; margin: 0; font-size: 17px; line-height: 1.4; }
.mtc-choices { display: grid; gap: 4px; margin: 26px 0 12px; }
.mtc-choices button,
.mtc-back {
  appearance: none;
  border: 0;
  padding: 0;
  color: var(--mtc-ink);
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1.25;
  cursor: pointer;
}
.mtc-choices button:hover,
.mtc-choices button:focus-visible,
.mtc-back:hover,
.mtc-back:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.mtc-small { margin-top: 2px !important; font-size: 13px !important; }
.mtc-message--detail { align-items: stretch; text-align: left; }
.mtc-message--detail h2 { text-align: center; }
.mtc-message--detail .mtc-back { margin-top: 28px; text-align: center; }

.mtc-case-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--mtc-rule);
  border-bottom: 1px solid var(--mtc-rule);
  font-size: 16px;
  text-align: center;
}

.mtc-partner-panel {
  margin: 0;
  padding: 24px 40px;
  border-top: 1px dashed var(--mtc-rule);
  background: rgba(232,235,239,.5);
}
.mtc-partner-panel h2 { font-size: 20px; }
.mtc-partner-panel p { margin: 0; line-height: 1.5; }

.mtc-response {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 32px;
  border-top: 1px solid var(--mtc-rule);
  font-size: 17px;
}

.mtc-input-line { display: flex; gap: 10px; align-items: center; font-size: 23px; }
.mtc-input-line input {
  width: 50px;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  color: var(--mtc-ink);
  background: transparent;
  font: inherit;
  caret-color: var(--mtc-ink);
}
.mtc-input-line input:focus { border-bottom-color: var(--mtc-ink); }
.mtc-feedback { min-height: 1em; color: var(--mtc-muted); font-size: 12px; }
.mtc-prompt { font-size: 23px; }

.mtc-disclosure {
  width: min(78%, 840px);
  margin: 30px auto 32px;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.mtc-terminal--lookup { margin-top: 36px; }
.mtc-shell--lookup .mtc-message { min-height: 288px; }

.mtc-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mtc-tab:focus-visible,
.mtc-partner a:focus-visible,
.mtc-choices button:focus-visible,
.mtc-back:focus-visible,
.mtc-input-line input:focus-visible {
  outline: 2px solid var(--mtc-ink);
  outline-offset: 4px;
}

@media (max-width: 920px) {
  .mtc-shell { width: calc(100vw - 24px); min-height: 0; margin: 12px; }
  .mtc-header { grid-template-columns: 1fr; align-items: center; gap: 20px; min-height: 0; padding: 28px 20px 18px; }
  .mtc-brand { grid-row: 1; min-width: 0; }
  .mtc-tabs { grid-row: 2; justify-content: center; flex-wrap: wrap; }
  .mtc-partner { grid-row: 3; justify-self: center; }
  .mtc-mark { width: 88px; height: 88px; }
  .mtc-case-strip { grid-template-columns: 1fr; gap: 6px; padding: 12px 20px; }
  .mtc-terminal, .mtc-disclosure { width: calc(100% - 32px); }
  .mtc-message { padding: 28px 18px; }
}

@media (max-width: 560px) {
  .mtc-tab, .mtc-partner a, .mtc-partner span { font-size: 14px; }
  .mtc-tabs { gap: 14px; }
  .mtc-brand h1 { font-size: 25px; }
  .mtc-case-strip { font-size: 14px; }
  .mtc-terminal { margin-top: 18px; }
  .mtc-message h2 { font-size: 22px; }
  .mtc-message p { font-size: 15px; }
  .mtc-choices button { font-size: 16px; }
  .mtc-response { padding-inline: 18px; }
  .mtc-case-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
