/* pages.css · the inner pages of halal-solution.com, linked AFTER assets/site.css (the locked landing
   page's stylesheet, which owns every token). Miniatur design: paper, ink, the logo's blue and green,
   Archivo across its width axis, IBM Plex Mono for clauses. See design-system/DESIGN-SYSTEM.md. */

/* ---------- page frame ---------- */
.pg { padding-top: var(--nav); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 22px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--mute); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs i { font-style: normal; color: var(--mute); }
.crumbs span { color: var(--ink); }

/* ---------- hero (shared bones; each page names its variant with data-hero) ---------- */
.pg-hero { position: relative; padding: clamp(24px, 3.4vw, 52px) 0 clamp(56px, 7vw, 104px); overflow: hidden; }
.pg-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 80% at 72% 40%, #000 0%, transparent 76%); mask-image: radial-gradient(70% 80% at 72% 40%, #000 0%, transparent 76%); }
.pg-hero h1 { font-size: clamp(42px, 5.2vw, 86px); font-stretch: 78%; font-weight: 720; line-height: .93; letter-spacing: -.028em; margin: 0 0 24px; }
.pg-hero h1 span { font-weight: 280; letter-spacing: -.035em; }
.pg-hero .kicker { margin-top: clamp(28px, 4vw, 56px); }
.pg-answer { font-size: clamp(17px, 1.32vw, 19.5px); line-height: 1.6; color: var(--ink-2); max-width: 33em; margin: 0; }
.pg-hero .cta-row { margin-top: 26px; }
.pg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(32px, 5vw, 84px); align-items: center; }
.onpage { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; }
.onpage a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); transition: border-color .25s, background .25s; }
.onpage a b { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--blue-ink); }
.onpage a:hover { border-color: var(--blue); background: var(--white); }

/* ---------- the route board (overseas companies hero) ---------- */
.board { margin: 0; position: relative; background: var(--white); border: 1px solid rgba(15, 27, 36, .08); border-radius: 24px; padding: clamp(20px, 2.4vw, 32px); box-shadow: 0 34px 90px -44px rgba(15, 27, 36, .5), 0 2px 6px rgba(15, 27, 36, .04); }
.board::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 24px 24px; opacity: .8; pointer-events: none; }
.board > * { position: relative; }
.board-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 14px 12px 10px; border-radius: 18px; background: rgba(241, 243, 241, .72); border: 1px solid var(--line-2); }
.lane .ico { width: 64px; height: 64px; }
.lane b { display: block; font-size: 17px; font-weight: 650; font-stretch: 90%; letter-spacing: -.01em; line-height: 1.2; }
.lane small { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.4; margin-top: 3px; }
.lane .to { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; padding: 6px 11px; border-radius: 8px; white-space: nowrap; position: relative; }
.lane .to::before { content: ''; position: absolute; right: 100%; top: 50%; width: 14px; border-top: 1.5px dashed #9AA6AE; margin-right: 4px; }
.to.jakim { background: var(--ink); color: #fff; }
.to.fhcb { background: var(--blue-soft); color: var(--blue-ink); }
.to.none { background: #E4E8EA; color: #4A5862; }
.board .src { margin-top: 14px; }

/* ---------- numbered sections: numeral in the left gutter, clause notes in the right ---------- */
.pg-body { padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 72px); }
.pg-sec { display: grid; grid-template-columns: 120px minmax(0, 44rem) minmax(200px, 1fr); column-gap: clamp(28px, 3.4vw, 52px); padding: clamp(36px, 4vw, 56px) 0; border-top: 1.5px solid var(--ink); }
.pg-sec:first-child { border-top: 0; padding-top: 8px; }
.sec-n { grid-column: 1; grid-row: 1 / span 30; align-self: start; position: sticky; top: calc(var(--nav) + 28px); font-stretch: 125%; font-weight: 780; font-size: clamp(44px, 4.2vw, 64px); line-height: .78; color: var(--blue-ink); letter-spacing: -.04em; }
.pg-sec > :not(.sec-n):not(.sec-aside):not(.wide) { grid-column: 2; }
.pg-sec h2 { font-size: clamp(32px, 3.3vw, 50px); font-stretch: 80%; line-height: .96; margin: 0 0 22px; }
.pg-sec h2 span { font-weight: 300; }
.pg-sec h3 { font-size: clamp(21px, 1.7vw, 25px); font-stretch: 88%; line-height: 1.12; margin: 30px 0 10px; }
.pg-sec p, .pg-sec li { color: var(--ink-2); }
.pg-sec p { max-width: 40em; }
.pg-sec ul.dash { list-style: none; padding: 0; margin: 0 0 1em; max-width: 40em; }
.pg-sec ul.dash li { position: relative; padding: 8px 0 8px 26px; border-bottom: 1px solid var(--line-2); }
.pg-sec ul.dash li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 12px; height: 1.5px; background: var(--blue); }
.pg-sec .src { margin-top: 10px; }
.sec-aside { grid-column: 3; grid-row: 1 / span 30; align-self: start; position: sticky; top: calc(var(--nav) + 28px); }
.wide { grid-column: 2 / -1; }
.note { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 20px; }
.note .ico { width: 56px; height: 56px; margin: -4px 0 10px -4px; }
.note h3, .note .note-t { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-ink); font-stretch: 100%; margin: 0 0 10px; line-height: 1.3; }
.note p { font-size: 15px; line-height: 1.55; margin: 0 0 10px; }
.note p:last-child { margin-bottom: 0; }
.note dl { margin: 0; }
.note dl div { padding: 10px 0; border-top: 1px solid var(--line-2); }
.note dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.note dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; font-stretch: 84%; letter-spacing: -.02em; color: var(--ink); line-height: 1.15; }
.note dd small { display: block; font-size: 13px; font-weight: 400; font-stretch: 100%; letter-spacing: 0; color: var(--mute); margin-top: 2px; }
.note.green { border-color: rgba(125, 187, 58, .45); background: linear-gradient(var(--green-soft), var(--green-soft)) padding-box; }
.note.green h3, .note.green .note-t { color: var(--green-ink); }

/* ---------- tables in figures (stack into cards on phones) ---------- */
.pg-table { margin: 26px 0 8px; }
.tscroll { background: var(--white); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.pg-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.pg-table th, .pg-table td { text-align: left; vertical-align: top; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pg-table thead th { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); background: var(--paper); padding-top: 13px; padding-bottom: 13px; }
.pg-table tbody th { font-weight: 650; font-stretch: 90%; color: var(--ink); font-size: 16.5px; }
.pg-table tbody tr:last-child > * { border-bottom: 0; }
.pg-table td { color: var(--ink-2); }
.pg-table .cl { display: block; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--blue-ink); }
.pg-table .no { color: var(--mute); }
.pg-table figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.pg-table figcaption .src { margin: 0; }
.pg-table tr.hl > * { background: var(--blue-soft); }

/* ---------- the night band ---------- */
.pg-night { background: var(--night); color: var(--on-night); padding: clamp(72px, 9vw, 132px) 0; position: relative; overflow: hidden; }
.pg-night::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%); mask-image: linear-gradient(to bottom, #000, transparent 90%); }
.pg-night .wrap { position: relative; }
.pg-night .kicker { color: #7FD0F5; }
.pg-night h2 { font-size: clamp(38px, 5vw, 80px); font-stretch: 80%; line-height: .94; color: #fff; margin: 0 0 clamp(32px, 4vw, 56px); max-width: 15em; }
.pg-night h2 span { font-weight: 250; color: var(--on-night-2); }
.pg-night .src { color: var(--on-night-2); }
.pg-night a { color: #7FD0F5; }
.forks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.fork { padding: 28px clamp(20px, 3vw, 44px) 8px 0; }
.fork + .fork { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: clamp(20px, 3vw, 44px); }
.fork .fk { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-2); margin: 0 0 14px; }
.fork h3 { font-size: clamp(26px, 2.6vw, 40px); font-stretch: 82%; color: #fff; margin: 0 0 12px; line-height: 1; }
.fork h3 em { font-style: normal; color: var(--blue); }
.fork p { color: var(--on-night); font-size: 16.5px; max-width: 30em; }

/* ---------- figures with pictures ---------- */
.pg-fig { margin: 30px 0 10px; }
.pg-fig img { display: block; width: 100%; height: auto; border-radius: 24px; background: var(--paper-2); box-shadow: 0 30px 70px -44px rgba(15, 27, 36, .55); }
.pg-fig figcaption { margin-top: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--mute); max-width: 60em; }

/* ---------- country chips ---------- */
.cty { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 8px; padding: 0; }
.cty li { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 13px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.cty li b { font-family: var(--mono); font-size: 12px; color: var(--blue-ink); font-weight: 500; }

/* ---------- does / doesn't ---------- */
.dd2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 8px; }
.dd2 > div { border-radius: 22px; padding: 22px 24px 18px; border: 1px solid var(--line); background: var(--white); }
.dd2 > div.not { background: transparent; border-style: dashed; border-color: #AEB8BE; }
.dd2 h3 { margin: 0 0 12px; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.dd2 h3::before { content: ''; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.dd2 .not h3::before { background: #C8D0D5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8l8 8M16 8l-8 8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.dd2 ul { list-style: none; margin: 0; padding: 0; }
.dd2 li { padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 16px; color: var(--ink-2); line-height: 1.5; }

/* ---------- where next ---------- */
.pg-next { padding: clamp(56px, 6vw, 88px) 0; background: var(--paper-2); }
.pg-next-h { font-size: clamp(30px, 3.2vw, 46px); font-stretch: 80%; margin: 0 0 26px; }
.pg-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-next-list.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-next-list.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-next-list a { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; align-items: start; height: 100%; padding: 20px 20px 18px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .35s; }
.pg-next-list a:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: 0 24px 50px -32px rgba(15, 27, 36, .5); }
.pg-next-list .ico { width: 56px; height: 56px; grid-row: 1 / span 2; }
.pg-next-list b { font-size: 18px; font-weight: 650; font-stretch: 90%; line-height: 1.2; letter-spacing: -.01em; }
.pg-next-list span { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; margin-top: 5px; }

/* ---------- the closing contact band ---------- */
.pg-close { background: var(--white); padding: clamp(72px, 9vw, 130px) 0; }
.pg-close-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.pg-close h2 { font-size: clamp(42px, 5.4vw, 88px); font-stretch: 78%; line-height: .92; letter-spacing: -.033em; margin: 0 0 22px; }
.pg-close h2 span { font-weight: 280; }
.pg-close .lede { margin: 0; }
.pg-close-act { display: grid; gap: 12px; justify-items: start; }
.pg-close-act .btn { width: 100%; justify-content: center; }
.pg-close-act .src { margin-top: 6px; }

/* ---------- icons ---------- */
.ico { width: 48px; height: 48px; display: block; flex: none; overflow: visible; }

/* ---------- isometric drawings (iso.py): the landing page's shop-office drawing language ---------- */
.iso { width: 100%; height: auto; display: block; overflow: visible; }
.iso polygon { stroke: #9FADB6; stroke-width: .12; stroke-linejoin: round; }
.iso .gd { fill: var(--paper-2); stroke: none; }
.iso .gd2 { fill: #DCE3DE; stroke: none; }
.iso .floor { fill: #F7F9F7; }
.iso .water { fill: #D6ECF8; stroke: none; }
.iso .tp { fill: #F3F6F4; } .iso .lf { fill: #fff; } .iso .rt { fill: #E7ECE9; }
.iso .rf { fill: #F7F9F8; } .iso .rf2 { fill: #E9EEEB; }
.iso .wall.tp { fill: #46606F; } .iso .wall.lf { fill: #EEF2F0; } .iso .wall.rt { fill: #DCE3DE; }
.iso .wn { fill: #DCE6EC; stroke: none; } .iso .gl { fill: #46606F; stroke: none; }
.iso .hi.tp { fill: #CFE9F7; } .iso .hi.lf { fill: var(--blue-soft); } .iso .hi.rt { fill: #B8DDF2; }
.iso .g.tp { fill: #CFE7B5; } .iso .g.lf { fill: var(--green-soft); } .iso .g.rt { fill: #BFDDA0; }
.iso .gr.tp { fill: #CFE7B5; } .iso .gr.lf { fill: var(--green-soft); } .iso .gr.rt { fill: #BFDDA0; }
.iso .dark { fill: #33424D; } .iso .dark.tp { fill: #33424D; } .iso .dark.lf { fill: #46606F; } .iso .dark.rt { fill: #33424D; }
.iso .plate { fill: #fff; } .iso .plate2.tp { fill: #fff; }
.iso .band.hi { fill: var(--blue); stroke: none; } .iso .band.g { fill: var(--green); stroke: none; }
.iso .lnf { fill: #C9D3D9; stroke: none; } .iso .bk { fill: #7D8B94; stroke: none; }
.iso .card { fill: #fff; } .iso .card.hi { fill: var(--blue-soft); stroke: var(--blue-ink); }
.iso .sack { fill: #EADFC8; } .iso .mat { fill: var(--green); stroke: var(--green-ink); }
.iso .coin { fill: #EEF2F0; } .iso .coint { fill: #F7F9F7; }
.iso .coin.hi { fill: #B8DDF2; } .iso .coint.hi { fill: var(--blue-soft); }
.iso .path { fill: none; stroke: var(--blue); stroke-width: .3; stroke-dasharray: .8 .9; stroke-linecap: round; }
.iso .path.g { stroke: var(--green-ink); }
.iso .string { fill: none; stroke: var(--ink-2); stroke-width: .12; stroke-dasharray: .5 .4; }
.iso .trunk { stroke: #A98E6F; stroke-width: .35; }
.iso .leaf { fill: #9BCB68; }
.iso .pinl { stroke: var(--ink); stroke-width: .2; } .iso .pinc { fill: var(--blue); stroke: #fff; stroke-width: .3; } .iso .pinh { fill: rgba(15, 27, 36, .25); }
.iso-fig { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 2.4vw, 34px); background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 24px 24px; }
.iso-fig figcaption { margin-top: 14px; }
.iso-fig .iso { max-height: 440px; }

/* ---------- consistency fixes after the first design review ---------- */
.pg-sec .src, .note .src, .pg-table .src, .pg-fig .src { font-size: 12px; line-height: 1.55; color: var(--mute); }
.pg-night .src, .fork .src { font-size: 12px; line-height: 1.55; color: var(--on-night-2); }
.pg-next-list a { align-content: start; }
.pg-table table { font-size: 17px; }
.pg-table tbody th { font-size: 17px; }
.pg-close-in { align-items: start; }
/* who-tags on the route board follow the landing's .who colours: JAKIM grey; a recognised foreign body gets an outline */
.to.jakim { background: #DCE2E5; color: #3C4A53; }
.to.fhcb { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.to.none { background: transparent; color: #4A5862; box-shadow: inset 0 0 0 1px #9AA6AE; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pg-sec { grid-template-columns: 88px minmax(0, 1fr) minmax(190px, 260px); }
  .pg-next-list.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .pg-split { grid-template-columns: 1fr; }
  .pg-sec { grid-template-columns: 64px minmax(0, 1fr); }
  .sec-aside { grid-column: 2; grid-row: auto; position: static; margin-top: 20px; max-width: 34rem; }
  .wide { grid-column: 2; }
  .sec-n { font-size: 42px; }
  .pg-close-in { grid-template-columns: 1fr; align-items: start; }
  .pg-next-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-next-list.n3 > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* tables become one card per row */
  .tscroll { border-radius: 20px; }
  .pg-table thead { display: none; }  /* every cell carries its data-label; a clipped thead tripped render_gate R-overflow */
  .pg-table table, .pg-table tbody, .pg-table tr, .pg-table th, .pg-table td { display: block; width: 100%; }
  .pg-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .pg-table tbody tr:last-child { border-bottom: 0; }
  .pg-table tbody th, .pg-table td { padding: 4px 0; border: 0; }
  .pg-table tbody th { font-size: 17px; padding-bottom: 8px; }
  .pg-table td::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 6px; }
}
/* 641-980px: each stacked row keeps a label/value grid, so the comparison still reads across (design review, 5 Oct 2026) */
@media (min-width: 641px) and (max-width: 980px) {
  .pg-table td { position: relative; padding-left: calc(30% + 18px); min-height: 1.6em; }
  .pg-table td::before { position: absolute; left: 0; top: 5px; width: 30%; margin-top: 0; }
}
@media (max-width: 640px) {
  .pg-sec { grid-template-columns: 1fr; }
  .sec-n { grid-row: auto; position: static; font-size: 40px; margin-bottom: 14px; }
  .pg-sec > :not(.sec-n):not(.sec-aside):not(.wide), .sec-aside, .wide { grid-column: 1; }
  .lane { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .lane .ico { width: 48px; height: 48px; }
  .lane .to { grid-column: 2; justify-self: start; }
  .lane .to::before { display: none; }
  .forks { grid-template-columns: 1fr; }
  .fork + .fork { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .16); padding-left: 0; }
  .dd2 { grid-template-columns: 1fr; }
  .pg-next-list, .pg-next-list.n2, .pg-next-list.n4 { grid-template-columns: 1fr; }
  .pg-next-list.n3 > li:last-child:nth-child(odd) { grid-column: auto; }
}

/* footer numbers never break mid-number (the landing page's own footer wraps the office number at some widths: recorded as a chrome defect) */
.foot a[href^="tel:"], .foot a[href^="https://wa.me"] { white-space: nowrap; }
