:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --ink: #161916;
  --blue: #193bd4;
  --line: #b8b7ad;
  --soft: #4d514d;
  --gutter: clamp(18px, 4.5vw, 70px);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 16px/1.7 "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans", system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: .26em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wrap { width: min(1440px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 12px; transform: translateY(-160%); z-index: 1; background: var(--paper); padding: 8px 12px; }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead .wrap, .footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; }
.masthead .wrap { padding-block: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .055em; text-decoration: none; }
.mark { display: grid; place-items: center; width: 49px; height: 44px; color: white; background: var(--blue); font-size: 19px; font-weight: 700; letter-spacing: -.10em; padding-right: .10em; }
nav { display: flex; flex-wrap: wrap; gap: 0 clamp(12px, 2.6vw, 36px); align-items: center; }
nav a { padding-block: 10px; font-size: .83rem; font-weight: 700; text-decoration: none; }
nav a:hover, .brand:hover { text-decoration: underline; }
.languages { gap: 0 14px; justify-content: flex-start; }
.languages a { color: var(--blue); }
.languages [aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-weight: 700; }
h1 { font-size: clamp(2.65rem, 5.4vw, 5.75rem); letter-spacing: -.075em; line-height: .99; }
h1 span { display: block; color: var(--blue); }
h1 .h1a { color: var(--ink); }
:is(:lang(ja), :lang(zh-Hans)) h1 { font-size: clamp(2.12rem, 4.25vw, 4.65rem); line-height: 1.16; letter-spacing: -.075em; }
h2 { font-size: clamp(1.9rem, 3.55vw, 3.85rem); line-height: 1.13; letter-spacing: -.055em; }
:is(:lang(ja), :lang(zh-Hans)) h2 { font-size: clamp(1.7rem, 3vw, 3.15rem); line-height: 1.3; }
h3 { font-size: clamp(1.12rem, 1.8vw, 1.45rem); line-height: 1.35; }
.hero { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); gap: clamp(24px, 4vw, 68px); padding-block: clamp(32px, 5.3vw, 80px); align-items: center; }
.hero p { max-width: 40ch; margin-top: 23px; color: var(--soft); }
.hero img, .photo-spread img { width: 100%; height: auto; display: block; background: #deddd1; }
figcaption { padding-top: 7px; font-size: .73rem; color: var(--soft); }
.cta { display: inline-flex; align-items: center; padding: 12px 17px; background: var(--blue); color: white; font-weight: 700; text-decoration: none; }
.cta:hover { text-decoration: underline; }
.cta:focus-visible { outline-color: var(--blue); }
.hero .cta { margin-top: 24px; }
.section { padding-block: clamp(48px, 7.5vw, 110px); border-top: 1px solid var(--line); }
.section p { max-width: 53ch; }
.two-column { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: clamp(24px, 6vw, 95px); align-items: start; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.4em 1fr; gap: .75em; padding: 18px 0; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-arrow { color: var(--blue); font-size: 1.2rem; line-height: 1.25; }
.steps p { margin-top: 5px; color: var(--soft); }
.photo-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  align-items: start;
  gap: clamp(22px, 4vw, 64px);
  margin-top: clamp(32px, 6vw, 88px);
}
.photo-spread figure + figure { margin-top: clamp(28px, 8vw, 120px); }
.market { background: #eeece3; }
.market h2 { max-width: 19ch; margin-bottom: clamp(24px, 4vw, 52px); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; padding: clamp(18px, 3.7vw, 52px); }
.stat:first-child { padding-left: 0; border-right: 1px solid var(--line); }
.stat:last-child { padding-right: 0; }
.metric { color: var(--blue); font-weight: 700; font-size: clamp(2.15rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -.07em; margin-block: 12px 5px; }
:is(:lang(ja), :lang(zh-Hans)) .metric { font-size: clamp(2rem, 4vw, 4.3rem); }
.context, .footnote { font-size: .83rem; color: var(--soft); }
.stat .context { margin-bottom: 16px; }
.market-photo { margin-bottom: 16px; }
.market-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #deddd1; }
.sources { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 16px; margin-top: auto; color: var(--blue); font-size: .84rem; }
.section .footnote { max-width: 80ch; margin-top: 14px; }
dl { margin: 0; border-top: 1px solid var(--line); }
dl div { display: grid; grid-template-columns: minmax(7.75rem, .35fr) minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
dt { font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
dd a { color: var(--blue); }
.contact { background: var(--blue); color: white; }
.contact .two-column { align-items: center; }
.contact p { margin-bottom: 15px; }
.contact .cta { background: var(--paper); color: var(--blue); }
.contact .cta:focus-visible { outline-color: white; }
.footer .wrap { padding-block: 18px; flex-wrap: wrap; font-size: .8rem; }
@media (max-width: 700px) {
  .hero, .two-column { grid-template-columns: 1fr; }
  .hero { gap: 28px; }
  .photo-spread { grid-template-columns: 1fr; }
  .photo-spread figure + figure { width: 88%; margin: 0 0 0 auto; }
  .hero p { margin-top: 15px; }
  .hero .cta { margin-top: 18px; }
}
@media (max-width: 480px) {
  :lang(en) h1 { font-size: clamp(2.25rem, 8.5vw, 2.65rem); text-wrap: wrap; }
  .masthead .wrap { padding-block: 10px 3px; row-gap: 4px; }
  nav { width: 100%; justify-content: space-between; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding-inline: 0; }
  .stat:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== The GATE standard additions (v2) ===== */
/* Rule 6: line breaking */
html, body, * { line-break: strict; -webkit-line-break: strict; }
html { word-break: normal; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
:lang(th) { word-break: normal; }

/* Header layout with language switcher */
.masthead .wrap { gap: 10px 28px; }
.masthead .main-nav { margin-inline-start: auto; }

/* Rule 3: globe outside the button, on its left */
.lang-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.globe-icon { font-size: 16px; flex-shrink: 0; line-height: 1; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.lang-btn:hover { border-color: var(--ink); }
.lang-btn svg { width: 10px; height: 10px; flex-shrink: 0; }
.lang-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-dropdown { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 10; list-style: none; margin: 0; padding: 6px 0; min-width: 260px; max-height: min(70vh, 520px); overflow-y: auto; background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 10px 30px rgba(22,25,22,.14); }
.lang-option { padding: 9px 16px; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.lang-option:hover, .lang-option:focus { background: #e4e2d7; outline: none; }
.lang-option[aria-selected="true"] { color: var(--blue); font-weight: 700; }

/* Footer links */
.footer .wrap { gap: 8px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Sub pages */
.page { padding-block: clamp(40px, 6vw, 88px); }
.page h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.2; letter-spacing: -.04em; }
:is(:lang(ja), :lang(zh-Hans), :lang(zh-Hant), :lang(ko)) .page h1 { letter-spacing: -.02em; }
.page .lead { margin-top: 18px; max-width: 60ch; color: var(--soft); }
.legal { margin-top: clamp(28px, 4vw, 48px); max-width: 760px; border-top: 1px solid var(--line); }
.legal section { padding-block: 20px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 1.08rem; line-height: 1.5; letter-spacing: 0; }
.legal p { margin-top: 6px; color: var(--soft); max-width: 68ch; }
.legal-date { margin-top: 20px; font-size: .85rem; color: var(--soft); }

/* Contact form */
.form { margin-top: clamp(28px, 4vw, 48px); max-width: 720px; display: grid; gap: 22px; }
.field { display: grid; gap: 7px; }
.field label, .field .label { font-weight: 700; font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag { font-size: .7rem; font-weight: 700; padding: 1px 7px; border: 1px solid currentColor; line-height: 1.6; }
.tag.req { color: #b4231c; }
.tag.opt { color: var(--soft); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fffefa; border: 1px solid #8f8e86; padding: 11px 13px; border-radius: 0; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field input[aria-invalid="true"] { border-color: #b4231c; }
.error { color: #b4231c; font-size: .86rem; font-weight: 700; }
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.agree input { width: 18px; height: 18px; margin-top: 4px; flex-shrink: 0; accent-color: var(--blue); }
.agree a { color: var(--blue); }
.form .cta { border: 0; cursor: pointer; font: inherit; font-weight: 700; justify-self: start; padding: 14px 26px; }
.hp-field { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.thanks { min-height: 50vh; }
.thanks .cta { margin-top: 28px; }

/* RTL (Arabic) */
[dir="rtl"] .stat:first-child { padding-left: clamp(18px, 3.7vw, 52px); padding-right: 0; border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .stat:last-child { padding-right: clamp(18px, 3.7vw, 52px); padding-left: 0; }
[dir="rtl"] .step-arrow { transform: scaleX(-1); }
[dir="rtl"] .photo-spread figure + figure { margin-inline: auto 0; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) .metric { letter-spacing: 0; }
:lang(hi) h1, :lang(hi) h2, :lang(th) h1, :lang(th) h2 { letter-spacing: -.01em; line-height: 1.35; }

@media (max-width: 860px) {
  .masthead .main-nav { order: 3; width: 100%; margin-inline-start: 0; }
  /* Mobile: keep the switcher at the end of its row so the menu (anchored to the button's end) stays on screen */
  .lang-wrap { margin-inline-start: auto; }
  .lang-dropdown { max-width: calc(100vw - 2 * var(--gutter)); min-width: 0; width: max-content; }
  .lang-option { white-space: normal; }
}
@media (max-width: 480px) {
  .masthead .main-nav { justify-content: space-between; }
  .lang-dropdown { min-width: min(280px, calc(100vw - 36px)); }
  [dir="rtl"] .stat:first-child { border-left: none; padding-inline: 0; }
  [dir="rtl"] .stat:last-child { padding-inline: 0; }
}
