/* Ironhide HTML to PDF — Swiss Editorial Print Press & Forged Iron Design System */

:root {
  /* Archival paper & ink palette — zero generic SaaS blue */
  --paper: #f6f3ec;
  --paper-bright: #fcfbf8;
  --paper-tint: #ede8dc;
  --paper-card: #ffffff;

  --ink: #141311;
  --ink-strong: #0d0c0b;
  --ink-muted: #57524a;
  --ink-subtle: #787166;

  --iron: #171614;
  --iron-elevated: #211f1c;
  --iron-border: #322f2a;
  --iron-ink: #f2eee6;
  --iron-muted: #b5aea1;

  --rule: #ddd6c9;
  --rule-strong: #c4bba9;

  /* Brand Accent: Signal Vermilion / Press Orange-Red */
  --accent: #c8431f;
  --accent-hover: #a93515;
  --accent-soft: #faeae4;
  --accent-border: #e7b9aa;

  /* Status: Forest Press Ink */
  --ok: #1e6b45;
  --ok-soft: #e7f3ec;
  --danger: #b53212;
  --danger-soft: #fce8e3;

  --font-serif: "Instrument Serif", "Newsreader", Georgia, "Times New Roman", "Noto Serif", serif;
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Thai", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sheet: 0 18px 42px rgba(20, 19, 17, 0.14), 0 2px 6px rgba(20, 19, 17, 0.08);
  --shadow-card: 0 8px 24px rgba(20, 19, 17, 0.06);
  --max-w: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

code,
pre {
  font-family: var(--font-mono);
}

p code,
li code,
td code {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==================== Header ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--iron);
  color: var(--paper-bright);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--paper-tint);
  border: 1px solid var(--rule-strong);
  padding: 2px 7px;
  border-radius: 999px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a.btn-primary,
.nav a.btn-primary:hover,
.nav a.btn-primary[aria-current="page"] {
  color: #ffffff;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-ink {
  background: var(--iron);
  color: var(--paper-bright);
  border-color: var(--iron);
}

.btn-ink:hover {
  background: #2b2925;
  color: #ffffff;
}

.btn-secondary {
  background: var(--paper-bright);
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: #ffffff;
}

.btn-ghost-dark {
  background: transparent;
  color: var(--iron-ink);
  border-color: var(--iron-border);
}

.btn-ghost-dark:hover {
  border-color: var(--iron-ink);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==================== Hero (Split Editorial Spread) ==================== */
.hero {
  padding: 58px 0 72px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper-tint);
  border: 1px solid var(--rule-strong);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.85rem, 5.1vw, 4.35rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  margin: 0 0 28px;
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--ink-muted);
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-text-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 6px 4px;
  border-bottom: 1.5px solid var(--rule-strong);
}

.hero-text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1.5px solid var(--ink);
  padding-top: 18px;
  gap: 18px;
}

.hm-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hm-lbl {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin-top: 3px;
}

/* Tactile Real PDF Preview Stage in Hero */
.hero-stage {
  position: relative;
  background: var(--paper-tint);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
}

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.stage-tab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 8.5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  background: var(--paper-bright);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.14s ease;
}

.stage-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.stage-tab.active {
  background: var(--iron);
  border-color: var(--iron);
  color: var(--paper-bright);
}

.sheet-stack {
  position: relative;
  padding: 0 10px 10px 0;
}

.sheet-back {
  position: absolute;
  inset: 12px 0 0 14px;
  background: var(--paper-bright);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  box-shadow: 0 10px 26px rgba(20, 19, 17, 0.08);
  z-index: 1;
}

.sheet-front {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 1px solid #d5cdc0;
  border-radius: 3px;
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
  aspect-ratio: 210 / 260;
}

.sheet-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.stage-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--iron);
  color: var(--iron-ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.stage-bar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-badge {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.stage-bar a {
  color: #f3b5a4;
  font-weight: 700;
  white-space: nowrap;
}

.stage-bar a:hover {
  color: #ffffff;
}

/* ==================== Sections ==================== */
.section {
  padding: 78px 0;
  border-bottom: 1px solid var(--rule);
}

.section-paper-bright {
  background: var(--paper-bright);
}

.section-iron {
  background: var(--iron);
  color: var(--iron-ink);
  border-bottom: 1px solid var(--iron-border);
}

.section-head {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-iron .section-kicker {
  color: #e87a5a;
}

.section-head h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  font-size: 16.5px;
  color: var(--ink-muted);
  line-height: 1.62;
}

.section-iron .section-head p {
  color: var(--iron-muted);
}

.section-iron code {
  background: #2a2723;
  border-color: var(--iron-border);
  color: var(--iron-ink);
}

/* ==================== Pain / Contrast Strip ==================== */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.pain-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--iron);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.pain-card.accent-top {
  border-top-color: var(--accent);
}

.pain-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.pain-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pain-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* Comparison Table */
.table-wrap {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

th {
  background: var(--iron);
  color: var(--iron-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 13px 16px;
  text-align: left;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: var(--paper-bright);
}

.col-ironhide {
  background: #fdf6f3 !important;
  font-weight: 600;
}

.tag-yes {
  display: inline-block;
  color: var(--ok);
  background: var(--ok-soft);
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 3px;
}

.tag-no {
  display: inline-block;
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 3px;
}

/* ==================== Real Output Showcase Gallery ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.gallery-card {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(20, 19, 17, 0.12);
  border-color: var(--ink);
}

.gallery-card.featured-wide {
  grid-column: span 2;
}

.gallery-mat {
  background: var(--paper-tint);
  padding: 20px 22px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.gallery-sheet-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gallery-sheet {
  background: #ffffff;
  border: 1px solid #d4ccc0;
  border-bottom: 0;
  box-shadow: 0 10px 24px rgba(20, 19, 17, 0.13);
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 210 / 260;
}

.gallery-sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.25s ease;
}

.gallery-sheet:hover img {
  transform: scale(1.02);
}

.gallery-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gallery-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.gallery-spec {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
}

.gallery-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.gallery-body p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
  flex: 1;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 14, 12, 0.84);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--iron);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--iron-border);
  color: var(--iron-ink);
  font-size: 13px;
  font-weight: 600;
}

.lightbox-scroll {
  overflow: auto;
  padding: 18px;
  background: #2b2926;
}

.lightbox-scroll img {
  width: 100%;
  height: auto;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

/* ==================== Live Wasm Playground (Forged Iron Studio) ==================== */
.pg-shell {
  background: var(--iron-elevated);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

.pg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #141311;
  border-bottom: 1px solid var(--iron-border);
}

.pg-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pg-toolbar label {
  font-size: 12.5px;
  color: var(--iron-muted);
  font-weight: 600;
}

.pg-toolbar select {
  background: #262420;
  color: var(--iron-ink);
  border: 1px solid #3f3b35;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.pg-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--iron-ink);
  cursor: pointer;
}

.pg-check input {
  accent-color: var(--accent);
}

.pg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.pg-editor-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--iron-border);
}

.pg-preview-pane {
  display: flex;
  flex-direction: column;
  background: #2b2926;
}

.pg-pane-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  background: #1b1917;
  border-bottom: 1px solid var(--iron-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--iron-muted);
}

.pg-editor-wrap {
  position: relative;
  flex: 1;
  min-height: 560px;
  background: #161513;
  overflow: hidden;
}

.pg-highlight,
.pg-textarea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  box-sizing: border-box;
  letter-spacing: 0;
}

.pg-highlight {
  pointer-events: none;
  color: #ebe6dc;
  background: #161513;
  z-index: 1;
}

.pg-highlight code {
  display: block;
  font: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.pg-textarea {
  z-index: 2;
  resize: none;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #f3b5a4;
  outline: none;
}

.pg-textarea::selection {
  background: rgba(200, 67, 31, 0.38);
}

/* Syntax tokens (Forged Iron warm palette) */
.tok-comment { color: #857d72; font-style: italic; }
.tok-doctype { color: #9c9284; }
.tok-punct   { color: #9c9284; }
.tok-tag     { color: #ee7d5c; }
.tok-kw      { color: #ee7d5c; font-weight: 600; }
.tok-attr    { color: #e2b86b; }
.tok-type    { color: #e2b86b; }
.tok-flag    { color: #e2b86b; }
.tok-str     { color: #9bc483; }
.tok-fn      { color: #8ecae6; }
.tok-macro   { color: #d494df; }
.tok-num     { color: #f4a261; }
.tok-css-sel { color: #e2b86b; }
.tok-css-at  { color: #d494df; }
.tok-css-prop{ color: #8ecae6; }
.tok-css-val { color: #ebe6dc; }
.tok-css-num { color: #f4a261; }
.tok-css-hex { color: #9bc483; }

.pg-error {
  display: none;
  padding: 12px 16px;
  background: #421912;
  color: #ffd6cc;
  border-bottom: 1px solid #8a3420;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.pg-preview-stage {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 550px;
  background: #2b2926;
}

.pg-iframe {
  flex: 1;
  width: 100%;
  min-height: 550px;
  border: 0;
  background: #3a3733;
}

.pg-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 22, 20, 0.92);
  backdrop-filter: blur(4px);
}

.pg-loading[hidden] {
  display: none;
}

.pg-loading-card {
  width: 100%;
  max-width: 360px;
  background: #1b1917;
  border: 1px solid var(--iron-border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
}

.pg-loading-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.pg-spinner {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid rgba(242, 238, 230, 0.16);
  border-top-color: var(--accent);
  border-right-color: #e87a5a;
  animation: pg-spin 0.8s linear infinite;
}

.pg-loading-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pg-loading-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--iron-ink);
  line-height: 1.3;
}

.pg-loading-copy span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--iron-muted);
  line-height: 1.4;
}

.pg-skeleton-sheet {
  background: var(--paper-bright);
  border: 1px solid #d5cdc0;
  border-radius: 3px;
  padding: 14px 16px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.pg-skel-rule {
  height: 3px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--accent) 0 34%, var(--iron) 34% 100%);
  border-radius: 1px;
}

.pg-skel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pg-skel-block,
.pg-skel-card,
.pg-skel-line,
.pg-skel-row {
  background: linear-gradient(90deg, #e7e1d5 25%, #f5f1e8 50%, #e7e1d5 75%);
  background-size: 200% 100%;
  animation: pg-shimmer 1.5s ease-in-out infinite;
  border-radius: 2px;
}

.pg-skel-title {
  height: 14px;
  width: 56%;
}

.pg-skel-badge {
  height: 14px;
  width: 24%;
}

.pg-skel-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pg-skel-card {
  height: 34px;
  border-top: 2px solid #d5cdc0;
}

.pg-skel-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 13px;
}

.pg-skel-line {
  height: 7px;
}

.pg-skel-line.w-92 { width: 92%; }
.pg-skel-line.w-84 { width: 84%; }
.pg-skel-line.w-70 { width: 70%; }

.pg-skel-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pg-skel-row {
  height: 11px;
  width: 100%;
}

.pg-skel-row-head {
  height: 13px;
  background: linear-gradient(90deg, #2d2a26 25%, #3d3933 50%, #2d2a26 75%);
  background-size: 200% 100%;
}

@keyframes pg-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pg-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-spinner {
    animation-duration: 2.2s;
  }
  .pg-skel-block,
  .pg-skel-card,
  .pg-skel-line,
  .pg-skel-row {
    animation: none;
  }
}

.pg-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: #121110;
  border-top: 1px solid var(--iron-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--iron-muted);
}

.pg-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.pg-metric strong {
  color: var(--iron-ink);
}

.pg-hash {
  color: #e87a5a !important;
}

/* ==================== SDK Code Switcher ==================== */
.sdk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sdk-tab {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  background: var(--paper-bright);
  color: var(--ink-muted);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s ease;
}

.sdk-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.sdk-tab.active {
  background: var(--iron);
  border-color: var(--iron);
  color: var(--paper-bright);
}

.code-box {
  background: var(--iron);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #121110;
  border-bottom: 1px solid var(--iron-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--iron-muted);
}

.code-box pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f0ece3;
}

.code-box code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.howto-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subhead-serif {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  color: var(--ink);
}

.license-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 36px;
}

.license-box {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.license-box.ok-box {
  border-top-color: var(--ok);
}

.license-box ul {
  margin: 0;
  padding-left: 18px;
}

.license-box li {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.license-doc {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}

.license-doc h2 {
  margin-top: 0;
}

.license-doc h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.license-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-subtle);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px !important;
}

/* ==================== Engineering Guarantees Grid ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ==================== Pricing ==================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
}

.price-card {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.price-card.featured {
  background: var(--iron);
  color: var(--iron-ink);
  border-color: var(--iron);
  border-top: 4px solid var(--accent);
  box-shadow: 0 22px 46px rgba(20, 19, 17, 0.22);
}

.price-tier {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.price-card.featured .price-tier {
  color: #e87a5a;
}

.price-amount {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}

.price-card.featured .price-amount {
  color: #ffffff;
}

.price-note {
  font-size: 14.5px;
  color: var(--ink-muted);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}

.price-card.featured .price-note {
  color: var(--iron-muted);
  border-bottom-color: var(--iron-border);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.price-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 11px;
  font-size: 14.5px;
  color: var(--ink);
}

.price-card.featured .price-list li {
  color: var(--iron-ink);
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--ok);
}

.price-card.featured .price-list li::before {
  color: #e87a5a;
}

.price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==================== Prose Subpages ==================== */
.prose {
  max-width: 860px;
}

.prose h1 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.2vw, 3.3rem);
  line-height: 1.08;
  color: var(--ink-strong);
}

.prose h2 {
  margin: 38px 0 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  color: var(--ink);
}

.prose p {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.7;
  margin: 0 0 16px;
}

.prose ul {
  padding-left: 20px;
  margin: 0 0 20px;
  color: var(--ink-muted);
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--ink);
}

.callout-strip {
  background: var(--paper-bright);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 28px 0;
}

.callout-strip h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.callout-strip p {
  margin: 0;
  font-size: 14.5px;
}

/* ==================== Footer ==================== */
.site-footer {
  background: var(--iron);
  color: var(--iron-muted);
  padding: 36px 0;
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer strong {
  color: var(--iron-ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--iron-muted);
  font-weight: 600;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==================== Responsive ==================== */
@media (max-width: 980px) {
  .hero-grid,
  .pg-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pain-grid,
  .card-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-card.featured-wide {
    grid-column: span 2;
  }
  .pg-editor-pane {
    border-right: 0;
    border-bottom: 1px solid var(--iron-border);
  }
  .pg-editor-wrap,
  .pg-preview-stage,
  .pg-iframe {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .wrap {
    padding: 0 18px;
  }
  .hero {
    padding: 36px 0 48px;
  }
  .hero-metrics,
  .pain-grid,
  .card-grid,
  .gallery-grid,
  .gallery-sheet-pair,
  .license-summary-grid {
    grid-template-columns: 1fr;
  }
  .gallery-card.featured-wide {
    grid-column: span 1;
  }
  .nav {
    gap: 14px;
  }
  .section {
    padding: 52px 0;
  }
}

/* ==================== Language Switcher ==================== */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.lang-select {
  appearance: auto;
  background: var(--paper-bright);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  max-width: 152px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lang-select:hover,
.lang-select:focus-visible {
  border-color: var(--ink);
  background: #ffffff;
  outline: none;
}

/* Multi-script heading rhythm for CJK / Indic / Thai / Arabic / Cyrillic */
:lang(zh) .hero h1,
:lang(ja) .hero h1,
:lang(ko) .hero h1,
:lang(hi) .hero h1,
:lang(bn) .hero h1,
:lang(th) .hero h1,
:lang(ar) .hero h1,
:lang(ru) .hero h1,
:lang(uk) .hero h1,
:lang(zh) .section-head h2,
:lang(ja) .section-head h2,
:lang(ko) .section-head h2,
:lang(hi) .section-head h2,
:lang(bn) .section-head h2,
:lang(th) .section-head h2,
:lang(ar) .section-head h2,
:lang(ru) .section-head h2,
:lang(uk) .section-head h2,
:lang(zh) .prose h1,
:lang(ja) .prose h1,
:lang(ko) .prose h1,
:lang(hi) .prose h1,
:lang(bn) .prose h1,
:lang(th) .prose h1,
:lang(ar) .prose h1,
:lang(ru) .prose h1,
:lang(uk) .prose h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.01em;
}

/* ==================== RTL Support (Arabic) ==================== */
[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}

[dir="rtl"] .callout-strip {
  border-left: 1px solid var(--rule-strong);
  border-right: 4px solid var(--accent);
}

[dir="rtl"] .price-list li {
  padding-left: 0;
  padding-right: 22px;
}

[dir="rtl"] .price-list li::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .prose ul,
[dir="rtl"] .license-box ul {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .sheet-stack {
  padding: 0 0 10px 10px;
}

[dir="rtl"] .sheet-back {
  inset: 12px 14px 0 0;
}

[dir="rtl"] .pg-editor-pane {
  border-right: 0;
  border-left: 1px solid var(--iron-border);
}

@media (max-width: 980px) {
  [dir="rtl"] .pg-editor-pane {
    border-left: 0;
  }
}

/* Keep source code, CLI snippets, inline code, editor, errors, and numeric metric values strictly LTR */
[dir="rtl"] pre,
[dir="rtl"] code,
[dir="rtl"] .pg-editor-wrap,
[dir="rtl"] .pg-error {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

[dir="rtl"] .pg-metric strong {
  direction: ltr;
  unicode-bidi: isolate;
}
