/* Industree Edge shared styles (extracted from the home page; edit here, then run build_pages.py) */

  :root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  html { scroll-padding-top: calc(5rem + env(safe-area-inset-top, 0px)); }
  body { background: #0B0F17; color: #F9FAFB; font-feature-settings: "tnum" 1, "ss01" 1; -webkit-font-smoothing: antialiased; }
  .grid-paper {
    background-image:
      linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px);
    background-size: 32px 32px;
  }
  .stack-seg { transition: flex-grow .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
  .readout { transition: color .4s ease; }
  :focus-visible { outline: 2px solid #F59E0B; outline-offset: 3px; border-radius: 4px; }
  .field { width: 100%; background: #0B0F17; border: 1px solid #1F2937; border-radius: 6px; padding: .75rem .875rem; color: #F9FAFB; font-size: .9375rem; }
  .field:focus { outline: none; border-color: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
  .field::placeholder { color: #64748B; }
  select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .875rem center; padding-right: 2.5rem; }
  .check input:checked + span { background: #F59E0B; border-color: #F59E0B; }
  .check input:checked + span svg { opacity: 1; }
  /* Subsidy Updates panel */
  .su-chip { font-size: 12px; line-height: 1; padding: .42rem .7rem; border-radius: 9999px; border: 1px solid #1F2937; background: #0B0F17; color: #94A3B8; transition: color .2s, border-color .2s, background .2s; white-space: nowrap; }
  .su-chip:hover { color: #F9FAFB; border-color: #64748B; }
  .su-chip[aria-pressed="true"] { background: #F59E0B; border-color: #F59E0B; color: #0B0F17; font-weight: 600; }
  .su-chip .su-n { opacity: .7; font-weight: 500; margin-left: .3rem; }
  .su-viewport { scrollbar-width: thin; scrollbar-color: #1F2937 transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
  .su-viewport::-webkit-scrollbar { width: 6px; }
  .su-viewport::-webkit-scrollbar-thumb { background: #1F2937; border-radius: 3px; }
  .su-item a.su-link { overflow-wrap: anywhere; }
  .su-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px; border: 1px solid #1F2937; color: #94A3B8; font-size: 10.5px; letter-spacing: .02em; }
  .su-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
  .su-badge.new { background: rgba(245,158,11,.14); color: #F59E0B; border: 1px solid rgba(245,158,11,.45); }
  .su-badge.soon { background: rgba(37,99,235,.16); color: #93C5FD; border: 1px solid rgba(37,99,235,.5); }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  }

  /* ---------- Header navigation (desktop dropdown / mega menu) ---------- */
  .nav-item { position: relative; }
  .nav-item.mega { position: static; }
  .nav-top { display: inline-flex; align-items: center; gap: .25rem; height: 4rem; color: #94A3B8; transition: color .2s; white-space: nowrap; }
  .nav-top:hover, .nav-item.open > .nav-row .nav-top, .nav-item:hover > .nav-row .nav-top, .nav-top[aria-current="true"] { color: #F9FAFB; }
  .nav-top[aria-current="true"] { box-shadow: inset 0 -2px 0 #F59E0B; }
  .nav-row { display: inline-flex; align-items: center; }
  .nav-chev { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.75rem; margin-left: .1rem; color: #64748B; border-radius: 4px; transition: color .2s, transform .2s; }
  .nav-chev:hover { color: #F9FAFB; }
  .nav-item.open .nav-chev svg { transform: rotate(180deg); }
  .nav-chev svg { transition: transform .2s; }
  .nav-panel { position: absolute; top: 100%; z-index: 55; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
  .nav-item:not(.mega) > .nav-panel { left: 50%; margin-left: -9rem; width: 18rem; }
  .nav-item.mega > .nav-panel { left: 1.25rem; right: 1.25rem; }
  @media (min-width: 1024px) { .nav-item.mega > .nav-panel { left: 2rem; right: 2rem; } }
  .nav-item.open > .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
  @media (hover: hover) and (pointer: fine) {
    .nav-item:hover > .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease .08s, transform .18s ease .08s, visibility 0s .08s; }
  }
  .nav-item.mega > .nav-panel > .nav-card { max-height: calc(100vh - 5.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .nav-card { background: #111827; border: 1px solid #1F2937; border-radius: .75rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.85); }
  .nav-link { display: block; padding: .5rem .75rem; border-radius: .375rem; color: #CBD5E1; font-size: .875rem; line-height: 1.35; transition: background .15s, color .15s; }
  .nav-link:hover, .nav-link:focus-visible { background: #0B0F17; color: #F59E0B; }
  .nav-link.sub { padding-left: 1.5rem; color: #94A3B8; font-size: .8125rem; }
  .nav-link[aria-current="page"] { color: #F59E0B; }
  .nav-head { display: block; padding: .5rem .75rem; font-weight: 600; color: #F9FAFB; font-size: .875rem; border-radius: .375rem; }
  a.nav-head:hover { color: #F59E0B; background: #0B0F17; }
  .nav-desc { display: block; font-size: .75rem; color: #64748B; margin-top: .15rem; font-weight: 400; }

  /* ---------- Mobile accordion ---------- */
  .nav-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(3,5,10,.72); backdrop-filter: blur(2px); }
  @media (max-width: 1279px) { html.nav-open, html.nav-open body { overflow: hidden; } html.nav-open .wa-float { display: none !important; } }
  #mobileNav { max-height: calc(100vh - 4rem - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain; }
  .m-row { display: flex; align-items: stretch; border-bottom: 1px solid rgba(31,41,55,.7); }
  .m-row > a { flex: 1; padding: .8rem 0; color: #CBD5E1; }
  .m-row > button { width: 3rem; display: inline-flex; align-items: center; justify-content: center; color: #94A3B8; }
  .m-row > button[aria-expanded="true"] svg { transform: rotate(180deg); }
  .m-row > button svg { transition: transform .2s; }
  .m-sub { padding: .25rem 0 .75rem .75rem; border-bottom: 1px solid rgba(31,41,55,.7); }
  .m-sub a { display: block; padding: .5rem 0; color: #94A3B8; font-size: .9375rem; }
  .m-sub a.sub { padding-left: 1rem; font-size: .875rem; }
  .m-sub a:hover, .m-sub a[aria-current="page"] { color: #F59E0B; }
  .m-sub .m-note { display:block; padding: .5rem 0; color: #64748B; font-size: .8125rem; }

  /* ---------- Sub-page content ---------- */
  .crumbs { font-size: .8125rem; color: #64748B; }
  .crumbs a { color: #94A3B8; }
  .crumbs a:hover { color: #F59E0B; }
  .crumbs .sep { margin: 0 .45rem; color: #475569; }
  .rich p { color: #94A3B8; line-height: 1.75; }
  .rich p + p { margin-top: 1rem; }
  .rich strong { color: #F9FAFB; font-weight: 600; }
  .rich a, a.inline-link { color: #F59E0B; text-decoration: underline; text-decoration-color: rgba(245,158,11,.4); text-underline-offset: 3px; overflow-wrap: anywhere; }
  .rich a:hover, a.inline-link:hover { text-decoration-color: #F59E0B; }
  .rich code { font-size: .85em; background: #0B0F17; border: 1px solid #1F2937; border-radius: 4px; padding: 0 .3rem; color: #F9FAFB; }
  .blist { margin-top: 1rem; display: grid; gap: .7rem; }
  .blist li { position: relative; padding-left: 1.4rem; color: #94A3B8; line-height: 1.65; }
  .blist li::before { content: ""; position: absolute; left: .2rem; top: .62rem; width: .4rem; height: .4rem; border-radius: 2px; background: #F59E0B; }
  .blist li strong { color: #F9FAFB; font-weight: 600; }
  .dtable { width: 100%; border-collapse: collapse; font-size: .875rem; }
  .dtable th { text-align: left; font-weight: 600; color: #F9FAFB; background: #0B0F17; padding: .7rem .9rem; border-bottom: 1px solid #1F2937; white-space: nowrap; }
  .dtable td { color: #94A3B8; padding: .7rem .9rem; border-top: 1px solid #1F2937; vertical-align: top; line-height: 1.55; }
  .dtable td:first-child { color: #E2E8F0; font-weight: 500; min-width: 6.5rem; }
  .faq summary { cursor: pointer; list-style: none; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq details[open] summary .faq-ic { transform: rotate(45deg); }
  .faq-ic { transition: transform .2s; }
  .side-link { display: block; padding: .55rem .75rem; border-radius: .375rem; font-size: .875rem; color: #94A3B8; line-height: 1.35; }
  .side-link:hover { background: #0B0F17; color: #F9FAFB; }
  .side-link[aria-current="page"] { background: rgba(245,158,11,.1); color: #F59E0B; font-weight: 600; }
  .side-link.sub { padding-left: 1.5rem; font-size: .8125rem; }

  /* ---- Phase 2: calculators, booking form, printable checklist, feed status badges ---- */
  .su-badge.open { background: rgba(34,197,94,.14); color: #4ADE80; border: 1px solid rgba(34,197,94,.45); }
  .su-badge.closed { background: rgba(100,116,139,.14); color: #94A3B8; border: 1px solid rgba(100,116,139,.45); }
  .calc-in { position: relative; display: flex; align-items: stretch; }
  .calc-in .field { flex: 1; min-width: 0; padding-right: 4.5rem; }
  .calc-unit { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); font-size: .8rem; color: #64748B; pointer-events: none; }
  .calc-table td { vertical-align: middle; }
  .calc-table input.field { min-width: 7rem; padding: .45rem .6rem; font-size: .875rem; }
  .calc-out p:last-child { color: #F9FAFB; }
  .calc-out .bad { color: #F87171; } .calc-out .ok { color: #4ADE80; }
  .mode-opt { display: block; cursor: pointer; }
  .mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
  .mode-opt span { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border: 1px solid #1F2937; border-radius: .5rem; background: #0B0F17; color: #94A3B8; font-size: .875rem; transition: border-color .2s, color .2s; }
  .mode-opt input:checked + span { border-color: #F59E0B; color: #F9FAFB; box-shadow: inset 0 0 0 1px #F59E0B; }
  .mode-opt input:focus-visible + span { outline: 2px solid #F59E0B; outline-offset: 2px; }
  @media print {
    body.has-print-area * { visibility: hidden !important; }
    body.has-print-area #print-checklist, body.has-print-area #print-checklist * { visibility: visible !important; color: #000 !important; background: #fff !important; border-color: #999 !important; box-shadow: none !important; }
    body.has-print-area #print-checklist { position: absolute; left: 0; top: 0; width: 100%; padding: 0 !important; border: 0 !important; }
    body.has-print-area .no-print { display: none !important; }
    body.has-print-area .wa-float, body.has-print-area header { display: none !important; }
    .pc-group { break-inside: avoid; }
  }
