/* Cinematic shell for tool pages — matches the Next.js homepage. */
:root {
  --navy: #0b2c4d;
  --navy-900: #081d33;
  --navy-700: #10406e;
  --ink-950: #000;
  --ink-900: #070f1c;
  --blue: #0e7fd1;
  --blue-600: #22b8cf;
  --cyan: #22b8cf;
  --steel: #8aa0b6;
  --steel-200: rgba(255, 255, 255, 0.18);
  --steel-100: rgba(255, 255, 255, 0.06);
  --amber: #f7a600;
  --amber-600: #f7a600;
  --orange: #ff8a3c;
  --white: #ffffff;
  --ink: #f4f7fb;
  --ink-soft: rgba(255, 255, 255, 0.62);
  --risk: #d0342c;
  --status: #3dcc86;
  --bg: #000;
  --bg-alt: #070707;
  --bg-navy: #000;
  --line: rgba(255, 255, 255, 0.12);
  --grad-hero: none;
  --grad-cta: none;
  --grad-amber: #f7a600;
  --grad-blue: #fff;
  --grad-text: none;
  --glow-amber: none;
  --glow-blue: none;
  --maxw: 1400px;
  --gap: 24px;
  --radius: 0;
  --radius-sm: 0;
  --radius-pill: 0;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}

html {
  background: #000;
  color-scheme: dark;
}

body {
  background: #000;
  color: #fff;
  font-weight: 400;
  font-size: 16px;
}

a {
  color: #fff;
}
a:hover {
  color: var(--amber);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
strong {
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.94;
  font-weight: 500;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 500;
}

.container {
  max-width: 1400px;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

/* ---- Topbar (translation) ---- */
.topbar {
  background: #000;
  color: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.lang-picker select {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: 4px 8px;
}

/* ---- Cinematic header ---- */
.estate-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 70%, transparent);
}
.estate-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 768px) {
  .estate-bar-inner {
    padding-inline: 32px;
  }
}
.estate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.estate-brand:hover {
  color: #fff;
}
.estate-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}
.estate-brand-text {
  display: none;
  line-height: 1.15;
}
.estate-brand-text b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.estate-brand-text span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--steel);
  font-weight: 400;
}
@media (min-width: 640px) {
  .estate-brand-text {
    display: block;
  }
}
.estate-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}
@media (min-width: 768px) {
  .estate-nav {
    gap: 24px;
  }
}
.estate-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.estate-nav a:hover,
.estate-nav a.active {
  color: #fff;
}
.estate-nav .hide-sm {
  display: none;
}
@media (min-width: 768px) {
  .estate-nav .hide-sm {
    display: inline;
  }
}
.estate-review {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85) !important;
}
.estate-review:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}
.estate-review .hr-full {
  display: none;
}
@media (min-width: 640px) {
  .estate-review .hr-full {
    display: inline;
  }
  .estate-review .hr-short {
    display: none;
  }
}
.estate-cta {
  background: #fff !important;
  color: #000 !important;
  padding: 10px 18px !important;
  letter-spacing: 0.08em;
}
.estate-cta:hover {
  background: var(--amber) !important;
  color: #201607 !important;
}

/* Hide leftover hamburger if present */
.nav-toggle {
  display: none !important;
}

/* ---- Buttons ---- */
.btn {
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 13px;
  padding: 12px 20px;
  border-width: 1px;
}
.btn:hover {
  transform: none !important;
}
.btn-primary,
.btn-teal,
.btn-news {
  background: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}
.btn-primary:hover,
.btn-teal:hover,
.btn-news:hover {
  background: var(--amber) !important;
  color: #201607 !important;
  border-color: var(--amber) !important;
}
.btn-secondary {
  background: var(--amber) !important;
  color: #201607 !important;
  border-color: var(--amber) !important;
}
.btn-ghost {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.eyebrow,
.page-head .eyebrow,
.hero .eyebrow,
.estate-hero .eyebrow,
.section--navy .eyebrow,
.section--teal .eyebrow {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: var(--amber) !important;
  letter-spacing: 0.24em;
  font-size: 11px;
  font-weight: 500;
}
.eyebrow::before {
  display: none !important;
}

.lead {
  color: rgba(255, 255, 255, 0.65);
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
}

body.estate p {
  color: rgba(255, 255, 255, 0.72);
}
body.estate .card p,
body.estate .panel p,
body.estate .lead {
  color: rgba(255, 255, 255, 0.65);
}

.ticks li::before {
  background: var(--amber) !important;
  border-radius: 0 !important;
}
.price-tag {
  color: var(--amber) !important;
  font-weight: 500 !important;
}
.price-card {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
}
.callout--risk {
  background: rgba(208, 52, 44, 0.12);
  border: 1px solid rgba(208, 52, 44, 0.45);
  border-radius: 0;
  color: #fff;
}
.stat b {
  background: none !important;
  -webkit-text-fill-color: #fff;
  color: #fff !important;
}
.stat span {
  color: rgba(255, 255, 255, 0.5) !important;
}
.book-cover {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ---- Hero ---- */
.page-head,
.hero,
.estate-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  background-color: #000;
  background-image: url("/assets/images/site-montage.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.page-head::before,
.hero::before,
.estate-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}
.page-head .container,
.hero .container,
.estate-hero .container {
  position: relative;
  z-index: 2;
  padding-block: 7rem 3.5rem;
}
.page-head.blueprint::after {
  display: none;
}
.estate-hero--bre {
  background-image: url("/assets/images/pile-platform.webp");
}
.estate-hero--scaffold {
  background-image: url("/assets/images/falsework-tower.webp");
}
.estate-hero--toolbox {
  background-image: url("/assets/images/audit-tablet.webp");
}
.estate-hero--rams {
  background-image: url("/assets/images/design-office.webp");
}
.estate-hero--train {
  background-image: url("/assets/images/david-teaching.webp");
}
.estate-hero--books {
  background-image: url("/assets/images/mastering-tw-books.webp");
}
.estate-hero--audit {
  background-image: url("/assets/images/audit-tablet.webp");
}

.section {
  background: #000;
  color: #fff;
}
.section--alt {
  background: #070707;
}
.section--navy,
.section--navy.blueprint {
  background: #000 !important;
  color: #fff;
}
.section--navy::before {
  display: none;
}
.section--navy .lead {
  color: rgba(255, 255, 255, 0.65);
}

.card,
.panel {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff;
}
.card:hover,
.panel:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}
.panel--navy {
  background: rgba(255, 255, 255, 0.04) !important;
}
.callout,
.callout--amber {
  background: rgba(247, 166, 0, 0.08);
  border: 1px solid rgba(247, 166, 0, 0.35);
  border-radius: 0;
  color: #fff;
}
.callout h3 {
  color: var(--amber);
}
.ticks li {
  color: rgba(255, 255, 255, 0.75);
}

.form-note,
.disclaimer {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Forms ---- */
input,
select,
textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 0 !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--amber) !important;
  outline: none;
}

/* ---- Footer ---- */
.estate-footer,
.site-footer {
  background: #000 !important;
  color: var(--steel);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 64px 0 0;
}
.estate-footer-grid {
  display: grid;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 48px;
}
@media (min-width: 768px) {
  .estate-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    padding-inline: 32px;
  }
}
.estate-footer h4,
.site-footer h4 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 500;
  margin: 0 0 16px;
}
.estate-footer ul,
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.estate-footer li,
.site-footer li {
  margin: 0 0 8px;
}
.estate-footer a,
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}
.estate-footer a:hover,
.site-footer a:hover {
  color: #fff;
}
.estate-footer-bottom,
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--steel);
}
@media (min-width: 768px) {
  .estate-footer-bottom,
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    padding-inline: 32px;
  }
}

/* ---- FABs ---- */
.fab-stack {
  gap: 8px;
}
.fab {
  border-radius: 0 !important;
  background: #fff !important;
  color: #000 !important;
  box-shadow: none !important;
}
.fab-wa {
  background: #25d366 !important;
  color: #fff !important;
}
.fab-wa:hover {
  background: #1ebe5d !important;
  color: #fff !important;
}
.fab-label {
  color: inherit;
}

/* ---- BRE470 tool ---- */
.bre-card,
.bre-drawing,
.bre-step,
.bre-risk,
.bre-headline {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff;
}
.bre-card h3,
.bre-field label,
.bre-check b {
  color: #fff;
}
.bre-num {
  border-radius: 0;
  background: var(--amber);
  color: #201607;
  font-weight: 600;
}
.bre-field .bre-unit span,
.bre-hint,
.bre-toggle small,
.bre-check small {
  color: rgba(255, 255, 255, 0.45);
}
.bre-quick button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 0;
}
.bre-quick button:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.bre-toggle label {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  color: #fff;
}
.bre-toggle label:has(input:checked) {
  border-color: var(--amber);
  background: rgba(247, 166, 0, 0.1);
  color: var(--amber);
}
.bre-check {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0;
}
.bre-draft {
  border: 1px solid var(--amber);
  background: rgba(247, 166, 0, 0.08);
  border-radius: 0;
}
.bre-thk {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0;
}
.bre-thk strong {
  color: #fff;
  font-weight: 500;
}
.bre-formula {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.75);
}
.bre-drawing svg {
  background: #fff;
}
.bre-pay .price-tag {
  color: var(--amber);
  font-weight: 500;
}

/* ---- Scaffold Master ---- */
.sm-tab {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 0 !important;
  color: #fff;
}
.sm-tab span {
  color: rgba(255, 255, 255, 0.5);
}
.sm-tab.active {
  border-color: var(--amber) !important;
  background: rgba(247, 166, 0, 0.1) !important;
  box-shadow: none !important;
  color: var(--amber);
}
.sm-grid label {
  color: rgba(255, 255, 255, 0.55);
}
.sm-stats b {
  color: #fff;
}
.sm-view-toggle button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 0 !important;
}
.sm-view-toggle button.active {
  background: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}
.sm-svgwrap {
  background: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 !important;
}
.sm-checks {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
}
.sm-how .panel,
.sm-config,
.sm-export {
  background: transparent !important;
}

/* ---- RAMS Generator ---- */
.rg-card,
.rg-out,
.rg-group,
.rg-step {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff;
}
.rg-card h3,
.rg-field label,
.rg-group > summary,
.rg-doc h4 {
  color: #fff !important;
}
.rg-num {
  border-radius: 0 !important;
  background: var(--amber) !important;
  color: #201607 !important;
}
.rg-field input,
.rg-field select,
.rg-field textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
.rg-hint,
.rg-count {
  color: rgba(255, 255, 255, 0.45) !important;
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
.rg-group > summary {
  background: rgba(255, 255, 255, 0.04) !important;
}
.rg-group > summary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
.rg-out-head {
  background: #070707 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.rg-meta div {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 0 !important;
}
.rg-meta b {
  color: #fff !important;
}
.rg-empty {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Keep generated documents readable as sheets */
.rg-doc {
  color: #111;
}
.rg-out-body .rg-doc {
  background: #fff;
  color: #111;
  padding: 18px;
}

/* ---- News ---- */
.news-feature,
.news-article {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.news-filter {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0 !important;
}
.news-filter.is-on,
.news-filter:hover {
  background: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}
.news-feature-aside {
  background: #070707 !important;
}

table {
  color: inherit;
}
th {
  color: #fff;
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
    color-scheme: light;
  }
  .estate-bar,
  .estate-footer,
  .topbar,
  .fab-stack,
  .page-head {
    display: none !important;
  }
}
