/* Eight primary destinations need a compact menu before tablet/landscape widths. */
@media (max-width:1100px) {
  :root, body.dark-theme { --header:90px; }
  body.menu-open { overflow:hidden; }
  .dark-theme .site-header,
  .dark-theme.is-home .site-header { height:var(--header); padding-inline:20px; gap:12px; }
  .dark-theme .site-header .brand img,
  .dark-theme.is-home .site-header .brand img { width:clamp(122px,17vw,154px); max-height:30px; }
  .dark-theme .header-contact,
  .dark-theme.is-home .header-contact { display:flex; align-items:center; justify-content:center; min-height:44px; margin-left:auto; padding:8px 13px; font-size:11px; flex:none; }
  .dark-theme .header-contact .arrow { display:none; }
  .dark-theme .site-header .menu-toggle { display:block; flex:0 0 44px; width:44px; height:44px; padding:12px; }
  .dark-theme .site-header .nav-main,
  .dark-theme.is-home .site-header .nav-main {
    position:fixed; top:var(--header); left:0; right:0; height:auto;
    max-height:calc(100svh - var(--header)); max-height:calc(100dvh - var(--header));
    display:flex; flex-direction:column; align-items:stretch; gap:0;
    padding:12px 24px max(20px,env(safe-area-inset-bottom));
    border-bottom:1px solid #2b456a; background:#071127;
    overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
    transform:translateY(-12px); visibility:hidden; opacity:0;
    transition:transform .2s ease,opacity .2s ease,visibility .2s;
  }
  .dark-theme.menu-open .site-header .nav-main { transform:none; visibility:visible; opacity:1; box-shadow:0 45vh 0 40vh #020817bd; }
  .dark-theme .site-header .nav-main>a,
  .dark-theme .site-header .nav-group>a,
  .dark-theme.is-home .site-header .nav-main>a,
  .dark-theme.is-home .site-header .nav-group>a { height:auto; min-height:48px; padding:10px 0; font-size:16px; line-height:1.8; }
  .dark-theme .site-header .nav-main>a::after,
  .dark-theme .site-header .nav-group>a::after { bottom:8px; right:auto; width:28px; }
  .dark-theme .site-header .nav-group { height:auto; }
  .dark-theme .site-header .nav-dropdown {
    position:static; min-width:0; display:flex; flex-wrap:wrap; gap:4px 18px;
    padding:0 0 10px; border:0; border-radius:0; box-shadow:none; background:transparent;
    visibility:inherit; opacity:1; transform:none;
  }
  .dark-theme .site-header .nav-dropdown a { min-height:44px; display:flex; align-items:center; padding:6px 0; font-size:13px; }
  .menu-open .menu-toggle span:first-child { transform:translateY(3.5px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform:translateY(-3.5px) rotate(-45deg); }
  .menu-open .back-top { visibility:hidden; }
}

/* Product split layouts should not squeeze screenshots beside narrow text columns. */
@media (max-width:900px) {
  .tc-hero-grid { grid-template-columns:minmax(0,1fr); gap:36px; }
  .tc-hero .actions { flex-direction:row; flex-wrap:wrap; }
  .tc-architecture { width:100%; max-width:560px; justify-self:center; }
  .tc-feature-split, .tc-builder, .tc-extension, .tc-knowledge-grid, .tc-governance-detail { grid-template-columns:minmax(0,1fr); gap:30px; }
}

@media (max-width:760px) {
  .dark-theme .detail-dialog { overscroll-behavior:contain; max-width:calc(100% - 24px); max-height:calc(100dvh - 32px); }
  .dark-theme .dialog-close,
  .dark-theme .bluebook-dialog .dialog-close { width:44px; height:44px; right:8px; top:8px; border-radius:50%; }
  .dark-theme .detail-dialog h2 { padding-right:22px; overflow-wrap:anywhere; }
  .dark-theme .detail-dialog .actions { flex-wrap:wrap; }
  .dark-theme .detail-dialog .actions .btn { max-width:100%; white-space:normal; }
  .dark-theme input:not([type=checkbox]):not([type=radio]),
  .dark-theme textarea,
  .dark-theme select { min-width:0; font-size:16px; }
  .dark-theme .back-top { width:44px; height:44px; right:15px; bottom:max(18px,env(safe-area-inset-bottom)); }
  .contact-float { bottom:calc(78px + env(safe-area-inset-bottom)); }
  .dark-theme .footer-nav a { min-height:44px; display:flex; align-items:center; }
  .dark-theme .site-footer { padding-bottom:max(38px,env(safe-area-inset-bottom)); }

  .tc-brand-heading { gap:12px; }
  .tc-brand-heading .transclaw-brand-logo { width:176px; }
  .tc-architecture-top { gap:10px; }
  .tc-architecture-top .transclaw-brand-logo { width:144px; flex-basis:144px; }
  .tc-architecture-top>small { flex:none; }
  .tc-mode-icon { flex-shrink:0; }
  .tc-mode small, .tc-mode p { font-size:12px; }
  .tc-product .btn { min-height:44px; max-width:100%; font-size:13px; line-height:1.5; white-space:normal; }
  .dark-theme .tc-index .wrap { width:100%; gap:24px; padding-inline:20px; scroll-padding-inline:20px; scrollbar-width:thin; scrollbar-color:#517cab #07152b; }
  .tc-index .wrap::-webkit-scrollbar { display:block; height:2px; }
  .tc-index .wrap::-webkit-scrollbar-thumb { background:#517cab; }
  .dark-theme .tc-index a { min-height:48px; padding:14px 0; font-size:12px; }
  .tc-screen-bar { gap:10px; padding:11px 12px; font-size:11px; }
  .tc-screen-bar b { margin-inline:0 5px; }
  .tc-screenshot figcaption { font-size:11px; line-height:1.8; }
  .tc-image-zoom { font-size:11px; }
  .tc-product .tc-section-head p,
  .tc-points span,
  .tc-card-heading p,
  .tc-extension p,
  .tc-capability-list p,
  .tc-tower-benefits p,
  .tc-operations-points p { font-size:14px; line-height:1.9; }
  .tc-management-item { padding:21px 17px 28px; }
  .tc-management-item>strong, .tc-management-item p { font-size:13px; }
  .tc-steps p { font-size:12px; line-height:1.8; }
  .tc-steps li>div { min-width:0; }
  .tc-governance-path { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap:6px; text-align:center; }
  .tc-governance-path span { font-size:12px; }
  .tc-inline-note p { font-size:13px; }
  .tc-inline-note .text-link { display:flex; align-items:center; min-height:44px; }
  .tc-closing-copy .tc-purchase-note { font-size:12px; line-height:1.9; }
  .tc-preview { padding:20px 16px; }
  .tc-preview-brand { min-height:30px; padding-right:46px; margin-bottom:13px; }
  .dark-theme .tc-preview h2 { font-size:24px; line-height:1.5; margin:12px 0 17px; }
  .tc-preview-toolbar { gap:8px 12px; }
  .tc-preview-hint { flex:1 1 125px; font-size:12px; }
  .tc-preview p a { display:inline-flex; align-items:center; min-height:44px; }
  .tc-preview-viewport { max-height:58svh; max-height:58dvh; }
}

@media (max-width:380px) {
  .dark-theme .site-header, .dark-theme.is-home .site-header { padding-inline:16px; gap:8px; }
  .dark-theme .header-contact, .dark-theme.is-home .header-contact { padding-inline:10px; }
  .tc-brand-heading .transclaw-brand-logo { width:160px; }
  .tc-window-dots { display:none; }
}
@media (max-width:420px) {
  .tc-hero .actions, .tc-closing .actions { flex-direction:column; align-items:stretch; }
  .tc-hero .actions .btn, .tc-closing .actions .btn { width:100%; justify-content:center; }
}
@media (prefers-reduced-motion:reduce) {
  .dark-theme .site-header .nav-main { transition:none; }
}

/* V49: decorative workbench glow must stay inside narrow viewports. */
@media (max-width:760px) { .domain-stage-glow { left:0; right:0; } }
