/* DEV036 — seven-authority hardening layer
   Japan DADS / Korea KRDS+One UI / India UX4G / China-Taiwan IA /
   Europe Porsche DoD / Brazil-LatAm GovBR+Andes / UAE Design System.
   This file changes implementation behavior only; it does not copy third-party branding. */

:root{
  --control-min:44px;
  --focus-ring:3px;
  --density-compact:clamp(10px,1.4vw,16px);
  --density-standard:clamp(18px,2.4vw,28px);
}

/* Europe/UAE: keyboard and high-contrast completion behavior. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline:var(--focus-ring) solid currentColor;
  outline-offset:4px;
}

button,
.button,
.menu-toggle,
.lang-strip a{
  min-block-size:var(--control-min);
}

/* Japan/Brazil: named density behavior rather than accidental squeezing. */
html[data-density="compact"] .surface-cell,
html[data-density="compact"] .meta-strip div,
html[data-density="compact"] .strategy-points div{
  padding-block:var(--density-compact);
}
html[data-density="standard"] .surface-cell,
html[data-density="standard"] .meta-strip div,
html[data-density="standard"] .strategy-points div{
  padding-block:var(--density-standard);
}

/* UAE/Gulf: Arabic is first-class, not mirrored LTR with an rtl attribute. */
html[dir="rtl"] body{text-align:start;}
html[dir="rtl"] .desktop-nav a:after{left:auto;right:0;transform-origin:right;}
html[dir="rtl"] .hero:before,
html[dir="rtl"] .hero--gems:before{
  background:linear-gradient(270deg,#020203 0%,rgba(2,2,3,.86) 42%,rgba(2,2,3,.34) 100%),radial-gradient(620px 420px at 24% 46%,rgba(255,66,26,.22),transparent 70%);
}
html[dir="rtl"] .hero-bg img{object-position:left center;}
html[dir="rtl"] .eyebrow:before{order:2;}
html[dir="rtl"] .rich-text ul{padding-left:0;padding-right:1.2rem;}
html[dir="rtl"] .surface-cell + .surface-cell{border-left:0;border-right:1px solid var(--surface-line-soft,var(--line2));}
html[dir="rtl"] .strategy-points div + div{border-left:0;border-right:1px solid var(--surface-line-soft,var(--line2));}
html[dir="rtl"] .surface-cell:before{left:auto;right:0;}
html[dir="rtl"] .hero-portrait figcaption{left:auto;right:18px;}

/* Arabic typography must not inherit Latin uppercase/tracking conventions. */
html:lang(ar) .desktop-nav,
html:lang(ar) .mobile-grid a,
html:lang(ar) .button,
html:lang(ar) .kicker,
html:lang(ar) .status-pill,
html:lang(ar) .meta-strip span,
html:lang(ar) .footer h3,
html:lang(ar) .caption{
  letter-spacing:0;
  text-transform:none;
}

/* China/Taiwan: dense information stays explicit and readable rather than hidden. */
html:lang(zh) .lead,
html:lang(zh-CN) .lead,
html:lang(zh-SG) .lead{line-height:1.65;}
html:lang(zh) .desktop-nav,
html:lang(zh-CN) .desktop-nav,
html:lang(zh-SG) .desktop-nav{letter-spacing:.06em;}

/* Korea: viewing field remains quiet; detailed controls stay below it. */
.hero .calc-panel,
.hero [data-trade-calc]{display:none;}

/* India: state indicators must remain text-readable without relying on color alone. */
.status-pill .status-dot{flex:0 0 auto;}
.status-pill{white-space:normal;}

/* One quiet navigation glyph: three lines, no decorative icon set. */
.menu-toggle{width:46px;min-width:46px;padding:0;justify-content:center;border-radius:0;background:transparent;}
.hamburger-lines{display:grid;gap:5px;width:20px;}
.hamburger-lines span{display:block;width:100%;height:1.5px;background:currentColor;transition:transform .2s var(--ease),opacity .2s var(--ease);}
.menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(1){transform:translateY(6.5px) rotate(45deg);}
.menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(2){opacity:0;}
.menu-toggle[aria-expanded="true"] .hamburger-lines span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg);}
.mobile-grid [data-operator-link]{border-top:1px solid var(--line);color:#fff;}

/* Progressive enhancement / 200% zoom and narrow-screen recomposition. */
@media(max-width:980px){
  html[dir="rtl"] .surface-cell + .surface-cell,
  html[dir="rtl"] .strategy-points div + div{border-right:0;}
  html[dir="rtl"] .hero-bg img{object-position:center top;}
}

@media(max-width:700px){
  .header-inner{min-height:66px;height:auto;padding-block:8px;}
  .brand{max-width:70%;}
  .brand span{white-space:normal;line-height:1.2;}
  .hero-actions,.section-actions{align-items:stretch;}
}

@media(max-width:420px){
  .container{width:calc(100% - 28px);}
  .hero h1,.page-hero h1{font-size:clamp(38px,13vw,58px);line-height:.94;}
}

@media(forced-colors:active){
  .button,.surface-cell,.status-pill,.calc-panel{border:1px solid CanvasText;}
  .grad{background:none;color:CanvasText;}
  .status-dot{background:CanvasText;box-shadow:none;}
  .hamburger-lines span{background:CanvasText;}
}

@media(prefers-contrast:more){
  :root{--muted:#d0d0d3;--soft:#b4b5ba;--line:rgba(255,255,255,.32);--line2:rgba(255,255,255,.2);}
}
