/* ==========================================================================
   Temporary Works Toolbox
   toolbox.css — shared styles for guidance notes
   Matches the TWCD "Nexus" design language: deep navy, safety amber,
   electric blue accents.
   ========================================================================== */

:root {
  --navy:      #0b2c4d;
  --navy-900:  #081d33;
  --ink-950:   #070f1c;
  --ink-900:   #0a1626;
  --blue:      #1d7f88;
  --cyan:      #2a9d9f;
  --steel:     #5d6b7a;
  --steel-200: #dbe3ec;
  --steel-100: #eef2f7;
  --amber:     #a8884d;
  --orange:    #c2a05f;
  --white:     #ffffff;
  --ink:       #16202c;
  --ink-soft:  #47535f;
  --risk:      #d0342c;
  --status:    #199d5c;
  --bg:        #ffffff;
  --bg-alt:    #f4f7fb;
  --line:      #e2e8f1;
  --grad-hero: linear-gradient(160deg, #081d33 0%, #0b2c4d 55%, #103a63 100%);
  --font:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw:      1080px;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow-md: 0 4px 14px rgba(10,22,38,.08), 0 12px 32px rgba(10,22,38,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--navy); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---- Header ---- */
.site-header {
  background: var(--ink-950);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--amber) 0%, var(--orange) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: var(--ink-950); letter-spacing: -.5px;
}
.brand-text { line-height: 1.2; font-size: 15px; }
.brand-text b { display: block; font-size: 16px; }
.brand-text span { color: var(--steel-200); font-size: 12.5px; }
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--steel-200); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav a:hover, .nav a.active { color: var(--white); }

/* ---- Page head ---- */
.page-head {
  background: var(--grad-hero);
  color: var(--white);
  padding: 56px 0 48px;
}
.page-head .eyebrow {
  color: var(--amber); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: 12.5px; margin: 0 0 10px;
}
.page-head h1 { margin: 0 0 14px; font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; letter-spacing: -.5px; }
.page-head .lead { color: var(--steel-200); font-size: 18px; max-width: 760px; margin: 0; }
.breadcrumb { font-size: 13px; color: var(--steel-200); margin-bottom: 18px; }
.breadcrumb a { color: var(--steel-200); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.doc-meta span {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 5px 14px; font-size: 12.5px; color: var(--steel-200);
}

/* ---- Sections & typography ---- */
.section { padding: 46px 0; }
.section--alt { background: var(--bg-alt); }
.gn h2 {
  font-size: 24px; letter-spacing: -.3px; margin: 40px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--steel-200);
}
.gn h2:first-child { margin-top: 0; }
.gn h2 .gn-num { color: var(--amber); margin-right: 8px; }
.gn h3 { font-size: 18px; margin: 26px 0 10px; }
.gn p { margin: 0 0 14px; }
.gn ul, .gn ol { margin: 0 0 16px; padding-left: 24px; }
.gn li { margin-bottom: 7px; }
.gn strong { color: var(--navy); }

/* ---- Components ---- */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-md); margin: 0 0 18px;
}
.panel--navy { background: var(--navy-900); color: var(--steel-200); border-color: transparent; }
.panel--navy h3 { color: var(--white); margin-top: 0; }

.callout {
  border-left: 4px solid var(--blue);
  background: var(--steel-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 18px 0;
}
.callout--amber { border-left-color: var(--amber); background: #f7f2e7; }
.callout--risk  { border-left-color: var(--risk);  background: #fbeeed; }
.callout h4 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

table.gn-table {
  width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 14.5px;
  border: 1px solid var(--line);
}
.gn-table th {
  background: var(--navy); color: var(--white); text-align: left;
  padding: 10px 12px; font-weight: 600;
}
.gn-table td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.gn-table tr:nth-child(even) td { background: var(--bg-alt); }
.table-scroll { overflow-x: auto; }

.checklist { list-style: none; padding-left: 0; }
.checklist li {
  padding-left: 30px; position: relative; margin-bottom: 9px;
}
.checklist li::before {
  content: "☐"; position: absolute; left: 4px; top: 0;
  color: var(--blue); font-size: 17px; line-height: 1.4;
}

.eqn {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 18px; margin: 12px 0; font-family: "Cambria Math", Cambria, Georgia, serif;
  font-size: 16.5px; overflow-x: auto;
}

/* ---- Note cards (hub page) ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.note-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 26px; display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease;
}
.note-card:hover { transform: translateY(-3px); color: var(--ink); }
.note-card .gn-ref {
  color: var(--amber); font-weight: 800; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 8px;
}
.note-card h3 { margin: 0 0 10px; font-size: 19px; color: var(--navy); }
.note-card p { margin: 0 0 16px; color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.note-card .cta { color: var(--blue); font-weight: 600; font-size: 14.5px; }

.btn {
  display: inline-block; border-radius: 999px; padding: 11px 24px; font-weight: 700;
  text-decoration: none; font-size: 15px; border: 0; cursor: pointer;
}
.btn-primary { background: linear-gradient(120deg, var(--amber) 0%, var(--orange) 100%); color: var(--ink-950); }
.btn-secondary { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }

/* ---- Disclaimer & footer ---- */
.disclaimer {
  font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line);
  margin-top: 40px; padding-top: 18px;
}
.site-footer {
  background: var(--ink-950); color: var(--steel-200); padding: 34px 0; margin-top: 56px; font-size: 14px;
}
.site-footer a { color: var(--steel-200); }
.site-footer a:hover { color: var(--white); }

/* ---- Print / PDF ---- */
.print-only { display: none; }
@media print {
  :root { --shadow-md: none; }
  body { font-size: 11pt; color: #000; }
  .site-header, .site-footer, .no-print, .breadcrumb, .doc-meta .hide-print { display: none !important; }
  .print-only { display: block; }
  .page-head { background: none !important; color: #000; padding: 0 0 12pt; }
  .page-head .lead, .page-head .eyebrow { color: #333; }
  .doc-meta span { border: 1px solid #999; color: #333; background: none; }
  .panel, .callout { box-shadow: none; break-inside: avoid; }
  .gn h2 { break-after: avoid; }
  .gn-table, .eqn { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .gn-section-break { break-before: page; }
  .cover { break-after: page; }
}


/* ---- TWCD Ltd brand refresh overrides ---- */
.brand-mark { background: #ffffff; padding: 3px; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.page-head .eyebrow { color: #d9b877; }
.btn-primary {
  background: linear-gradient(120deg, #1d7f88 0%, #155f66 100%);
  color: #ffffff;
}
.hero-photo {
  width: 100%; height: auto; border-radius: 16px; margin: 0 0 26px; display: block;
  box-shadow: 0 4px 14px rgba(10,22,38,.12), 0 12px 32px rgba(10,22,38,.14);
}
