/* Shared finishing layer. Page illustrations and app previews keep their own UI. */
:root {
  --surface-panel:#1b2b22;
  --surface-input:#111e17;
  --edge-panel:#4f6855;
  --radius-panel:16px;
  --radius-control:8px;
  --shadow-panel:0 18px 44px #0003, inset 0 1px 0 #edf8e60a;
  --space-section:clamp(64px,7vw,104px);
}

/* One frame around the portfolio, cases and tools. */
.site-header { border-bottom-color:#344b3c; }
.site-header .header-contact { border-radius:var(--radius-control); border-color:#68816b; }
.site-header :is(.main-nav,.mobile-menu) a[aria-current] { color:var(--lime); }
.site-header .mobile-menu[open] nav {
  border-radius:12px;
  border-color:var(--edge-panel);
  background:#15221b;
  box-shadow:0 22px 50px #0006;
}
.site-footer { border-top-color:#344b3c; padding-block:clamp(38px,5vw,72px); }
.site-footer :is(p,small) { color:#afc1b3; }
.footer-links a { padding-block:6px; }
.footer-links a:hover { color:var(--lime); }

:is(.home .action,.case--editorial .case-button,.case--editorial .case-demo-cta,
.case--editorial .case-outcome-contact,.case--editorial .case-next a,
.about-hero-links a,.about-next a,.demo-catalog-actions a,.demo-catalog-tool-meta a,
.lab .lab-end a,.report-playground .playground-next a,.calc-page .calc-next a) {
  border-radius:var(--radius-control);
}

/* The tools use the same type scale and pace as the new case pages. */
.demo-catalog h1,.lab .lab-intro h1,.report-playground .playground-heading h1,
.calc-page .calc-hero h1 {
  font-size:clamp(44px,6.3vw,88px);
  line-height:1.04;
  letter-spacing:-.06em;
}
.demo-catalog-hero-grid,.lab .lab-intro-grid,
.report-playground .playground-heading,.calc-page .calc-hero-grid {
  padding-block:clamp(44px,6vw,80px) 40px;
  gap:clamp(28px,5vw,72px);
  align-items:center;
}
.demo-catalog-hero { padding-top:32px; }
.demo-catalog-intro p,.lab .lab-intro-grid>p,
.report-playground .playground-heading>p,.calc-page .calc-hero-aside>p {
  font-size:clamp(16px,1.45vw,21px);
  line-height:1.65;
  letter-spacing:-.02em;
  max-width:440px;
}
.lab .lab-body,.report-playground .playground-main { padding-block:var(--space-section); }
.calc-page .calc-workspace { padding-block:var(--space-section); }
.calc-page .calc-results { padding-block:var(--space-section); background:#18271e; }
.calc-page .calc-scenario-section { margin-top:var(--space-section); }
.lab .lab-end,.report-playground .playground-next,.calc-page .calc-next {
  padding-block:40px var(--space-section);
}
.lab .lab-end h2,.report-playground .playground-next h2,.calc-page .calc-next h2 {
  font-size:clamp(36px,4.5vw,68px);
  line-height:1.08;
  letter-spacing:-.055em;
  margin-block:24px 32px;
}
.lab .lab-back,.report-playground .playground-back,.calc-page .calc-back {
  min-height:44px;
  box-sizing:border-box;
}

/* Rounded, layered workspaces repeat the treatment of the homepage task cards. */
.demo-catalog-card,.lab :is(.tg-flow,.tg-device,.onec-editor,.onec-response),
.report-playground :is(.scenario-panel,.demo-currency),.calc-page .calc-input-group {
  border-radius:var(--radius-panel);
  border-color:var(--edge-panel);
  box-shadow:var(--shadow-panel);
}
.demo-catalog-card,.lab :is(.tg-flow,.onec-editor,.onec-response),
.report-playground :is(.scenario-panel,.demo-currency),.calc-page .calc-input-group {
  background-color:var(--surface-panel);
  background-image:radial-gradient(ellipse at 0 0,#3b593b38,transparent 65%);
}
.lab :is(.lab-notice,.tg-explain,.onec-explain),
.report-playground .playground-safety,.calc-page :is(.calc-disclaimer,.calc-note) {
  border-radius:12px;
  border-color:var(--edge-panel);
  background:#1b2b22;
}
.demo-catalog-card { padding:clamp(22px,2.2vw,32px); min-height:590px; }
.demo-catalog-card-title { margin-block:38px 18px; }
.demo-catalog-card h2 { font-size:clamp(30px,2.7vw,42px); letter-spacing:-.055em; line-height:1.12; }
.demo-catalog-card>p { font-size:15px; line-height:1.7; }
.demo-catalog-stack span { border-radius:5px; color:#c5d4c7; }
.demo-catalog-actions { grid-template-columns:minmax(0,1fr); gap:8px; }
.demo-catalog-actions a { font-size:11px; padding-inline:16px; }
.demo-catalog-case { color:#d7e4d8; }
.demo-catalog-tool { border-radius:var(--radius-panel); margin-top:20px; padding:clamp(24px,3vw,40px); }
.demo-catalog-tool h2 { font-size:clamp(30px,3.6vw,52px); line-height:1.1; letter-spacing:-.055em; }
.demo-catalog-safety { margin-top:var(--space-section); }
.demo-catalog-safety p { font-size:14px; }

/* Native form controls stay distinct from actions and scenario choices. */
.lab #onec-payload,.report-playground :is(.playground-controls select,.currency-inputs input),
.calc-page .calc-field-grid input {
  border-radius:var(--radius-control);
  border-color:#617c66;
  background:var(--surface-input);
  color:#edf3e8;
  color-scheme:dark;
}
.lab #onec-payload { line-height:1.7; }
.report-playground .currency-inputs label { font-size:12px; line-height:1.5; }
.report-playground .currency-no-rate { border-radius:var(--radius-control); }
.lab :is(.tg-scenarios button,.onec-scenarios button),
.report-playground .scenario-buttons button,.calc-page .calc-presets button {
  border-radius:var(--radius-control);
  min-height:48px;
}
.lab .tg-scenarios button[aria-pressed=true] {
  background:#2a3f30;
  box-shadow:inset 0 3px 0 var(--lime);
}
.lab :is(#tg-next,#tg-reset,#onec-submit,#onec-reset),
.report-playground #demo-submit,.calc-page #calc-copy { border-radius:var(--radius-control); }
.lab .tg-timeline-item { color:#b5c9b8; }
.lab .tg-timeline-item b { color:#b5c9b8; }
.lab .tg-timeline-item:is(.is-active,.is-complete) b { color:var(--lime); }
.lab .tg-timeline-item.is-stopped { color:#f4bf9a; }
.lab .tg-timeline-item.is-stopped b { color:#f4bf9a; }

/* Results have a quieter surface; numbers and warnings carry the emphasis. */
.report-playground .result-metrics>div,.calc-page :is(.calc-metrics article,.calc-scenario-grid article) {
  border-radius:12px;
  border-color:var(--edge-panel);
  background-color:var(--surface-panel);
}
.report-playground :is(.result-badge,#demo-warnings .warning-item),
.lab :is(.onec-result-badge,.onec-http-status,.onec-method),.calc-page .calc-error { border-radius:6px; }
.report-playground .result-table-wrap { border:1px solid #405b46; border-radius:12px; background:#15241b; }
.report-playground .result-table th { background:#203428; line-height:1.6; }
.report-playground .result-table tbody tr:last-child td { border-bottom:0; }
.calc-page .calc-year { border-radius:var(--radius-panel); }
.calc-page .calc-bar-track { border-radius:4px; overflow:hidden; }
.calc-page .calc-result-hero strong { font-size:clamp(44px,6.5vw,100px); letter-spacing:-.06em; }
.calc-page .calc-scenario-grid article.is-current { background:#2a3f30; box-shadow:inset 0 3px 0 var(--lime); }
.calc-page .calc-range { border-radius:4px; }
.calc-page .calc-range::-webkit-slider-thumb { border-radius:50%; }
.calc-page .calc-range::-moz-range-thumb { border-radius:50%; }
.calc-page .calc-error { border:1px solid #c78c6d; }
.not-found h1 { font-size:clamp(38px,7vw,88px); letter-spacing:-.055em; }
.not-found>a { display:inline-flex; align-items:center; min-height:48px; color:var(--lime); }

@media (hover:hover) and (pointer:fine) {
  .demo-catalog-card:hover { border-color:#78946b; }
  .lab :is(.tg-scenarios button,.onec-scenarios button):not([aria-pressed=true]):hover,
  .report-playground .scenario-buttons button:not([aria-pressed=true]):hover,
  .calc-page .calc-presets button:not([aria-pressed=true]):hover { background:#2a3f30; border-color:#a0be86; }
  .lab :is(#tg-next,#onec-submit):not(:disabled):hover,
  .report-playground #demo-submit:not(:disabled):hover,.calc-page #calc-copy:hover,
  .demo-catalog-launch:hover { filter:brightness(1.08); }
}

@media (max-width:950px) {
  .demo-catalog-card { min-height:0; }
  .demo-catalog-actions { grid-template-columns:minmax(0,1fr) auto; }
}
@media (max-width:740px) {
  .demo-catalog h1,.lab .lab-intro h1,.report-playground .playground-heading h1,
  .calc-page .calc-hero h1 { font-size:clamp(34px,9.4vw,62px); letter-spacing:-.055em; }
  .demo-catalog-hero-grid,.lab .lab-intro-grid,
  .report-playground .playground-heading,.calc-page .calc-hero-grid { gap:24px; padding-block:38px 32px; }
  .lab .lab-end h2,.report-playground .playground-next h2,.calc-page .calc-next h2 {
    font-size:clamp(30px,7.9vw,49px);
  }
  .demo-catalog-card-title { margin-top:30px; }
  .demo-catalog-actions { grid-template-columns:1fr; }
  .report-playground .scenario-buttons { width:100%; }
  .report-playground .scenario-buttons button { flex:1 1 120px; }
  .report-playground .demo-currency { padding-inline:16px; }
  .calc-page .calc-input-group { padding-inline:16px; }
  .calc-page .calc-field-grid input { font-size:18px; }
  .footer-links a { min-height:44px; display:flex; align-items:center; box-sizing:border-box; }
}

/* Keep keyboard focus visible on the light contact surface as well. */
.home .contact-section :is(a,button):focus-visible { outline-color:#17251c; }
.home .contact-section .contact-form :is(a,button,input,select,textarea):focus-visible { outline-color:#e6f7c6; }

/* Compact screens: preserve readable type and let results wrap rather than
   force a fixed 130px column. These rules follow the existing finishing layers. */
@media (max-width:500px) {
  .home .hero h1 {
    font-size:clamp(2.125rem,calc(.75rem + 6.5vw),3.0625rem);
    overflow-wrap:anywhere;
  }
  .home .result-strip>a {
    grid-template-columns:minmax(0,.85fr) minmax(0,1fr) auto;
    padding-inline:clamp(12px,4vw,20px);
  }
  .home .result-strip :is(strong,span) { min-width:0; overflow-wrap:anywhere; }
  .home .result-strip strong { font-size:clamp(1.5rem,calc(.75rem + 4vw),1.875rem); }
}
@media (max-width:355px) {
  .home .result-strip>a { grid-template-columns:minmax(0,1fr) auto; }
  .home .result-strip span { grid-column:1/-1; grid-row:2; }
  .home .result-strip b { grid-column:2; grid-row:1; }
  .home .section-intro h2 { font-size:clamp(2rem,calc(.75rem + 7vw),3rem); }
}
@media (hover:none) and (pointer:coarse) {
  .home .featured-card:hover,.home .archive-card:hover,
  .home .expertise-grid>a:hover,.home .integration-lab-links a:hover,
  .screen-shot:hover { transform:none; }
  .home .featured-card:hover .featured-visual img,
  .home .archive-card:hover .archive-image img { transform:none; }
}
