/* Radhe Steel — grade pages. Screen styles for the web page, @media print for the A4 PDF datasheet.
   One HTML file feeds both, so the web page and PDF always show the same figures. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/geist-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/geist-mono-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper: #F3EFE7; --paper-2: #ECE7DB; --card: #FBF8F1;
  --ink: #1A1C1B; --ink-2: #2F332F; --muted: #6B6962;
  --line: #D8D2C0; --line-soft: #E5DFD0;
  --accent: #5C6B4E; --accent-2: #4A5740; --accent-soft: #D9DCC8; --accent-wash: #E8E6D6;
  --clay: #A96A42; --clay-wash: #F1E3D6;
  --wa: #1F7A4D;
  /* Layered shadow: edge ring, contact, soft lift */
  --shadow-lift: 0 0 0 1px rgb(26 28 27 / 0.06), 0 2px 4px rgb(26 28 27 / 0.06), 0 12px 28px -6px rgb(26 28 27 / 0.16);
  --font-display: 'Instrument Serif', ui-serif, Georgia, serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent-2); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
address { font-style: normal; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; z-index: 200; }
.skip-link:focus { left: 0; }
.print-only { display: none; }

/* Placeholder: values still to be supplied from the standards / MTCs */
.ph { background: var(--clay-wash); color: var(--clay); border: 1px dashed var(--clay); border-radius: 4px; padding: 0 4px; font-family: var(--font-mono); font-size: 0.86em; white-space: nowrap; }

/* Logo colours (shared by web header and PDF band) */
.logo .l-frame { fill: var(--ink); }
.logo .l-mark { fill: var(--accent); }

/* ─── HEADER ─── */
header { border-bottom: 1px solid var(--line-soft); background: var(--paper); }
.nav { max-width: 1240px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.nav-logo .brand { font-family: var(--font-display); font-size: 24px; line-height: 1; display: block; }
.nav-logo .sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-back { font-size: 15px; color: var(--ink-2); text-decoration: none; }
.nav-back:hover { color: var(--accent); }
.btn-primary { background: var(--ink); color: var(--paper); font: 500 15px var(--font-body); padding: 12px 24px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-primary:hover { background: var(--accent-2); }

/* ─── INTRO ─── */
.grade { max-width: 1040px; margin: 0 auto; padding: 0 40px 96px; }
.intro { padding: 56px 0 36px; }
.crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--muted); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.1; letter-spacing: -0.02em; max-width: 860px; }
h1 em { font-style: italic; color: var(--accent); }
.lede { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 680px; line-height: 1.9; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-wa, .btn-ghost { font: 500 15px var(--font-body); padding: 12px 24px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #17603C; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.terms { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ─── DATASHEET SECTIONS (screen) ─── */
.ds-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.ds-sec, .web-sec { background: var(--card); border: 1px solid var(--line-soft); border-radius: 18px; padding: 26px 28px; }
.web-sec { margin-top: 20px; }
.ds-sec h2, .web-sec h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.15; margin-bottom: 12px; }
/* Heading sits closer to its content than to the card edge (card padding 26px above, 12px below) */
.ds-sec h2 + *, .web-sec h2 + * { margin-top: 0; }
.unit { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); vertical-align: middle; }
.ds-std-grid { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: start; }
.kv { display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.kv dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); padding-top: 3px; text-transform: uppercase; }
.kv dd { font-weight: 400; }
.photo-slot { aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-soft); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
thead th { background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; }
tbody th { font-weight: 500; background: var(--accent-wash); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
table.num td { font-family: var(--font-mono); font-size: 14px; }
/* Quantity columns people compare down the table: right-aligned, tabular figures */
table.qty td, table.qty thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.src, .note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.note { font-style: italic; }
.cert { margin-top: 14px; display: inline-block; font-weight: 400; color: var(--accent-2); border-left: 3px solid var(--clay); padding-left: 10px; }

/* ─── WEB-ONLY ─── */
.apps { padding-left: 22px; display: grid; gap: 8px; margin-bottom: 14px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 18px; background: var(--paper); }
.faq-item summary { cursor: pointer; font-weight: 500; }
.faq-a { margin-top: 10px; color: var(--ink-2); }
.sisters { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.sisters li > * { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.sisters a { color: var(--ink-2); }
.wa-sticky { display: none; }


@media (max-width: 760px) {
  .nav { padding: 14px 16px; }
  .grade { padding: 0 16px 110px; }
  .intro { padding-top: 36px; }
  .ds-sec, .web-sec { padding: 20px 16px; border-radius: 14px; }
  .ds-sec h2, .web-sec h2 { margin-bottom: 10px; }
  .ds-std-grid { grid-template-columns: 1fr; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .wa-sticky { display: flex; justify-content: center; position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px; background: var(--wa); color: #fff; font: 600 16px var(--font-body); padding: 15px; border-radius: 999px; text-decoration: none; box-shadow: var(--shadow-lift); }
}

/* Mobile menu: the button is wired in analytics.js (adds .nav-open to the header) */
.nav-menu { display: flex; align-items: center; gap: 20px; }
.nav-toggle { display: none; }
@media (max-width: 960px) {
  header { position: relative; z-index: 110; }
  .nav-right { gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; flex: none; font: 500 14px var(--font-body); color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; } /* icon + visible "Menu" label */
  .nav-toggle::before { content: ''; width: 14px; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav-open .nav-toggle { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .nav-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 4px 20px 12px; box-shadow: 0 24px 30px -24px rgba(0,0,0,0.35); }
  .nav-open .nav-menu { display: flex; }
  .nav-menu .nav-back { display: block; padding: 14px 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
  .nav-menu .nav-back:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
  .nav-logo { gap: 9px; }
  .nav-logo svg { width: 32px; height: 32px; }
  .nav-logo .brand { font-size: 21px; }
  .nav-logo .sub { display: none; }
  .nav-right .btn-primary { position: relative; padding: 10px 20px; font-size: 14px; white-space: nowrap; }
  .nav-right .btn-primary::after { content: ''; position: absolute; inset: -3px 0; } /* 44px tap area */
}
/* Phones: the wordmark, "Request quote" and the labelled Menu button share one line */
@media (max-width: 420px) { .nav-logo svg { display: none; } .nav-logo .brand { white-space: nowrap; } .nav-right { gap: 8px; } .nav-toggle { padding: 0 12px; } }
/* Under 350px there is no room for the word: icon only, the text stays for screen readers */
@media (max-width: 350px) { .nav-toggle { font-size: 0; gap: 0; width: 44px; padding: 0; } }

/* Quote form (grade, export, German and Italian pages) */
.quote-sec { scroll-margin-top: 16px; }
.quote-card { margin-top: 16px; max-width: 720px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lift); }
.quote-card .quick-contact, .quote-card .qc-or { margin-top: 0; }
.quote-card .qc-or { margin: 18px 0 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
/* Same fields, layout and look as the homepage inquiry form (home.css) */
.quote-form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid > * { min-width: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea { width: 100%; min-width: 0; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px 16px; color: var(--ink); font: 400 16px var(--font-body); transition: border-color 0.2s, background 0.2s; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #9A978E; }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.form-group select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236b6f6a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--line); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); background-color: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.quote-form .btn-primary { width: 100%; justify-content: center; margin-top: 8px; border: 0; cursor: pointer; padding: 14px 26px; font-size: 16px; }
.form-note { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .quote-card { padding: 20px 16px; border-radius: 16px; }
  .form-grid { gap: 14px 10px; }
  .form-grid .full-sm { grid-column: 1 / -1; }
  .form-group label { font-size: 10.5px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .form-group input, .form-group select { min-height: 46px; padding: 10px 14px; border-radius: 10px; }
  .form-group select { padding-right: 34px; background-position: right 12px center; }
  .form-group textarea { min-height: 88px; padding: 12px 14px; border-radius: 10px; }
  .quote-form .btn-primary { min-height: 52px; margin-top: 4px; }
}

/* ═══════════ PDF DATASHEET (A4, one page) ═══════════ */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff; font-size: 9pt; line-height: 1.35; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .web-only, .skip-link { display: none !important; }
  .print-only { display: flex; }
  .ph { font-size: 0.92em; padding: 0 2px; }

  .grade { width: 210mm; height: 297mm; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }

  /* Header band */
  .ds-head { background: var(--accent); color: var(--paper); padding: 5mm 12mm 4.5mm; align-items: center; justify-content: space-between; gap: 10mm; border-bottom: 2.2mm solid var(--clay); }
  .ds-head-brand { display: flex; align-items: center; gap: 3mm; }
  .ds-head .logo { width: 13mm; height: 13mm; }
  .ds-head .logo .l-frame { fill: var(--paper); }
  .ds-head .logo .l-mark { fill: var(--accent-soft); }
  .ds-brand { font-family: var(--font-display); font-size: 20pt; line-height: 1; }
  .ds-head-grade { text-align: right; }
  .ds-kicker { font-family: var(--font-mono); font-size: 7pt; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
  .ds-title { font-family: var(--font-display); font-size: 26pt; line-height: 1.05; margin: 1mm 0; }
  .ds-category { font-size: 9.5pt; }

  /* Body */
  .ds-body { flex: 1; padding: 4mm 12mm 3mm; gap: 2.4mm; align-content: start; }
  .ds-sec { background: none; border: 0; border-radius: 0; padding: 0; break-inside: avoid; }
  .ds-sec h2 { font-family: var(--font-mono); font-size: 7.5pt; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; background: var(--accent-2); color: var(--paper); padding: 1.4mm 3mm; margin: 0 0 1.6mm; border-left: 1.6mm solid var(--clay); }
  .ds-sec h2 .unit { color: var(--accent-soft); font-size: 7pt; letter-spacing: 0.04em; text-transform: none; }
  .ds-std-grid { grid-template-columns: 1fr 52mm; gap: 6mm; }
  .kv { gap: 1.2mm; }
  .kv div { grid-template-columns: 34mm 1fr; padding-bottom: 1.2mm; }
  .kv dt { font-size: 7pt; padding-top: 0.4mm; }
  .photo-slot { aspect-ratio: auto; height: 22mm; border-radius: 2mm; font-size: 7pt; }

  .table-wrap { overflow: visible; border: 0.25mm solid var(--line); border-radius: 0; }
  table { font-size: 8.5pt; }
  th, td { padding: 1mm 2mm; white-space: normal; }
  thead th { background: var(--accent-soft); color: var(--ink); font-size: 7pt; }
  tbody th { background: var(--accent-wash); }
  table.num td { font-size: 8pt; }
  .src, .note { margin-top: 1mm; font-size: 7pt; }
  .cert { margin-top: 2mm; font-size: 9pt; padding-left: 2.5mm; border-left-width: 1mm; }

  /* Footer band */
  .ds-foot { margin-top: auto; background: var(--paper); border-top: 1mm solid var(--accent); padding: 4mm 12mm 5mm; align-items: center; gap: 6mm; }
  .ds-foot .qr { width: 22mm; height: 22mm; }
  .ds-foot-contact { flex: 1; font-size: 8pt; line-height: 1.5; color: var(--ink-2); }
  .ds-foot-wa { font-weight: 600; color: var(--ink); font-size: 9pt; }
  .ds-rev { align-self: flex-end; font-family: var(--font-mono); font-size: 7pt; color: var(--muted); }
}

@media print { .ds-sec p:not(.src):not(.note):not(.cert) { font-size: 8pt; } }

/* ─── Reference / hub pages (bright-bars, tolerance-chart, equivalents, export, de, it) ─── */
.web-sec p + p, .web-sec p + .table-wrap, .web-sec .table-wrap + p { margin-top: 12px; }
.web-sec h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.25; margin: 22px 0 8px; }
.web-sec ul.plain { padding-left: 22px; display: grid; gap: 6px; margin-top: 10px; }
.web-sec .fam { margin-top: 14px; }
.web-sec .fam strong { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }
.web-sec .table-wrap table { min-width: 520px; }
.photo-slot.has-photo { border: 0; overflow: hidden; }
.photo-slot.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Quick contact above the quote form */
.quick-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; max-width: 720px; }
.qc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border-radius: 12px; font: 600 15px var(--font-body); text-decoration: none; border: 1px solid var(--line); }
.qc-btn svg { width: 22px; height: 22px; flex: none; }
.qc-wa { background: #25D366; border-color: #25D366; color: #0b3d1f; }
.qc-wa:hover { background: #1fbb59; }
.qc-mail { background: #fff; color: var(--ink); }
.qc-mail:hover { border-color: var(--accent); }
.qc-or { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 18px 0 0; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.qc-or::before, .qc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.qc-or span { text-align: center; }
/* Phones: two buttons share 343px; the label is centred in its cell, so side padding only needs to keep it off the edges (deliberate exception to 2x side padding) */
@media (max-width: 520px) { .qc-btn { padding: 12px 10px; } }
@media (max-width: 520px) {
  .quote-form { gap: 12px; }
  .quote-form .btn-primary { min-height: 52px; }
}

/* Mobile: shorter copy. Text in .m-x is shown on larger screens only; intro text sized down. */
@media (max-width: 760px) {
  .m-x { display: none; }
  .lede { font-size: 16px; line-height: 1.55; margin-top: 14px; }
}

/* Quote forms: note when an unsent enquiry is put back (forms.js), and the sending state */
.form-restored { font-size: 13px; color: var(--muted); margin: 0; }
.form-restored .link-btn { position: relative; background: none; border: 0; padding: 0; font: 500 13px var(--font-body); color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.form-restored .link-btn::after { content: ''; position: absolute; inset: -14px -6px; }
button.is-sending { opacity: 0.7; cursor: progress; }

/* Quote form: standard inline validation (forms.js adds .is-invalid / .field-error) */
label.is-invalid { color: #C62828 !important; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: #C62828 !important; background-color: #FFF5F5 !important; }
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15) !important; }
.field-error { display: block; color: #C62828; font-size: 12.5px; line-height: 1.35; font-family: var(--font-body); }
