/*********************************************************************
* @file        : arqamA.css
* @purpose     : Page design A "Clear Indigo" (16 Nov 2026). Replaces css/arqam.css and css/mycss.css.
*                Compact version (16 Nov 2026): fonts 95%, tighter gaps, smaller buttons (phones keep 38-40 px touch sizes).
*                Light cards, indigo accent, options beside the result on wide screens and in a
*                panel that slides up from the bottom on phones (below 992 px).
* @works with  : index.html (ids kept from the old page), js/arqamUI.js (classes .show on .modal and
*                .offcanvas, .active on .nav-link and .tab-pane), js/arqamSelect.js (.aq-*), fonts.css.
* @sections    : 1 colours and base  2 top bar and menu  3 layout  4 cards, input, currency, prefix/suffix
*                5 output  6 batch  7 options panel  8 tiles, switches, fields, help links
*                9 buttons  10 info window  11 popover, spinner, backdrops  12 phones  13 the shared header (decision 143, OLD)
*                14 this page's pieces in the one header (decision 145)  15 About and Info (decision 145)
* @author      : Mohsen Alyafei
**********************************************************************/

/* ---------- 1. colours and base ---------- */
:root {
	--ground: #F6F7FB;
	--surface: #FFFFFF;
	--line: #E3E5EE;
	--line-strong: #C9CCD8;
	--ink: #1B1A2E;
	--muted: #5B5F73;
	--accent: #3B2DB8;
	--accent-dark: #2A1F8A;
	--accent-soft: #EEECFB;
	--danger: #B42318;
	--faint: #646879;   /* decision 214: 5.5:1 on white (was #8B8FA3, 3.2:1) */
	--soft: #EEF0F6;
	--soft2: #EBEDF4;
	--field: #FCFCFE;
	--bar: #FAFAFD;
	--line-hover: #A9ADBE;
	--ink2: #4A4E63;
	--ink3: #34374A;
	--accent-soft2: #E0DCF8;
	--accent-hover: #2A1F8A;
	--tile-hover: rgba(255,255,255,.6);
	--paper: var(--surface);          /* background of the words (stays light in dark mode, for the colours) */
	--radius: 16px;
	--ui: 'Cairo', system-ui, sans-serif;
/*	--words: 'Scheherazade', 'Cairo', serif;   //! OLD (decision 99): the Arabic separators ٫ ٬ from Scheherazade looked like «ر» and ’ */
	--words: 'ArqamSep', 'Scheherazade', 'Cairo', serif;   /* decision 99: ٫ ٬ from Cairo (css/fonts.css) */
}
/* dark page (button in the top bar; remembered in this browser; default follows the device) */
:root[data-theme="dark"] {
	color-scheme: dark;
	--ground: #12131C;
	--surface: #1B1D2A;
	--line: #2C2F42;
	--line-strong: #41455F;
	--ink: #E8E9F2;
	--muted: #A6AAC0;
	--accent: #6E61E8;
	--accent-dark: #BDB6FF;
	--accent-hover: #5A4CD9;
	--accent-soft: #2B2752;
	--accent-soft2: #37316A;
	--faint: #8C90A8;
	--soft: #23263A;
	--soft2: #23263A;
	--field: #161824;
	--bar: #191B27;
	--line-hover: #5B6080;
	--ink2: #C6C9DA;
	--ink3: #D8DAE7;
	--tile-hover: rgba(255,255,255,.05);
	--paper: #F7F5EE;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.4 var(--ui); }   /* tighter lines (was 1.6) */
h2 { margin: 0; font-size: 15px; font-weight: 700; }
small { font-size: .78em; font-weight: 400; color: var(--muted); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(59,45,184,.45); outline-offset: 2px; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

/* ---------- 2. top bar and menu ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1680px; margin: 0 auto; height: 48px; padding: 0 20px;   /* was 54px (decision 25) */ display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 9px; }
.brand-ar { font-size: 19px; font-weight: 700; }
.brand-en { font-size: 14px; color: var(--muted); }
.menu-btn { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; align-items: center; justify-content: center; }
.menu-btn:hover { background: var(--ground); }
.topnav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.topnav-head { display: none; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-btn:hover:not(:disabled) { background: var(--ground); color: var(--ink); }
.nav-btn:disabled { color: var(--faint); cursor: default; }

/* ---------- 3. layout ---------- */
.layout { max-width: 1680px;   /* wider page (was 1280px) */
	 margin: 0 auto; padding: 4px 16px 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }   /* top padding was 14px (decision 25) */
.work { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
body.aq-batch .normal-only { display: none; }

.modes { display: flex; gap: 4px; padding: 4px; background: var(--soft2); border-radius: 12px; align-self: flex-start; }
.modes button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font-weight: 600; }
.modes button[aria-pressed="true"] { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(20,20,40,.12); }
/* conversion type in the top row (decision 24): radios styled like the Single/Batch buttons */
.mode-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-row .modes:not(.types) button { min-height: 30px; padding: 0 10px; font-size: 13px; }   /* the Single/Batch toggle is the smaller of the two */
.mode-row .vline { width: 1px; height: 30px; background: var(--line-strong); }
.modes.types { align-items: center; }
.modes.types label { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 10px; border-radius: 9px; color: var(--ink2); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .12s; }
.modes.types label:hover { background: var(--tile-hover); }
.modes.types label input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.modes.types label:has(input:checked) { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(20,20,40,.12); }
.modes.types label:has(input:focus-visible) { outline: 3px solid rgba(59,45,184,.45); outline-offset: 1px; }
.modes button small, .modes.types label small { font-weight: 400; color: var(--faint); font-size: 11px; }
.modes.types .info { position: static; margin-inline-start: 4px; flex: 0 0 auto; }
@media (min-width: 992px) and (max-width: 1399.98px) { .modes.types label small { display: none; } }   /* the English labels only when there is room */

/* ---------- 4. cards, input, currency, prefix/suffix ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.in-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.lbl { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.num-wrap { position: relative; }
#NumberInput {
	width: 100%; height: 52px; padding: 0 50px 0 16px;   /* room for the clear button on both sides (number is left-to-right) */
	padding-left: 50px;
	border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field);
	font-size: 26.5px; font-weight: 600; letter-spacing: .3px;
}
#NumberInput::placeholder { font-size: 14px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
#NumberInput:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59,45,184,.12); }
.clear-in { position: absolute; top: 7px; inset-inline-end: 8px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
#CurrencySubjectsMenuDiv { flex: 1 1 260px; min-width: 0; }
.affixes { flex: 1 1 280px; display: flex; gap: 8px; flex-wrap: wrap; }
#PrefixDiv, #SuffixDiv { flex: 1 1 130px; min-width: 0; }
.affix { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.affix input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.affix-l { font-size: 12.5px; color: var(--muted); flex: none; }
.affix input[type=text] { flex: 1; min-width: 0; height: 32px; border: 0; border-bottom: 1px dashed var(--line-strong); background: transparent; font-weight: 700; padding: 0 2px; }
.affix input[type=text]:focus { outline: 0; border-bottom-color: var(--accent); }
.affix:has(input[type=checkbox]:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* currency / units list (js/arqamSelect.js), restyled to match */
.aq-select { font-family: var(--ui); font-size: 14px; }
.aq-current { height: 42px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; color: var(--ink); font-size: 15px; font-weight: 600; gap: 10px; }
.aq-current:hover { border-color: var(--line-hover); }
.aq-current:focus-visible { outline: 3px solid rgba(59,45,184,.45); }
.aq-panel { border-radius: 12px; box-shadow: 0 12px 32px rgba(20,20,40,.16); }
/* currency / units list follows the page colours (light and dark) */
.aq-current, .aq-panel { background: var(--surface); color: var(--ink); }
.aq-panel { border-color: var(--line); }
.aq-placeholder { color: var(--faint); }
.aq-search { background: var(--field); color: var(--ink); border-color: var(--line-strong); }
.aq-list li { color: var(--ink); }
.aq-list li.aq-active { background: var(--soft); }
.aq-list li.aq-separator { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }

/* ---------- 5. output ---------- */
.out-card { overflow: hidden; }
.out-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 14px; border-bottom: 1px solid var(--soft); }
.out-bar h2 { font-size: 14px; color: var(--muted); }
.out-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.outputText {
	min-height: 100px; padding: 10px 18px 14px;
	font-family: var(--words); font-size: 32.5px; font-weight: 700; line-height: 1.6;   /* was 1.9 */
	text-align: right; direction: rtl; overflow-wrap: anywhere;
}
[data-theme="dark"] .outputText { background: var(--paper); color: #1B1A2E; }   /* the word colours are made for a light background */
[data-theme="dark"] .outputText:empty::before { color: #6B6F85; }
.outputText:empty::before { content: "سيظهر النص هنا بعد كتابة العدد"; font: 400 15px var(--ui); color: var(--faint); }

/* ---------- 6. batch ---------- */
.batch-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.batch-head h2 { font-size: 17px; }
.batch-head small { display: block; font-size: 12.5px; }
.batch-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.batch-bar .out-tools { margin-inline-start: auto; }
.nav { display: flex; gap: 4px; padding: 4px; margin: 0; list-style: none; background: var(--soft2); border-radius: 12px; }
.nav-link { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 9px; color: var(--ink2); font-weight: 600; text-decoration: none; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(20,20,40,.12); }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.ta-wrap { position: relative; }
#BatchInput, #BatchOutput {
	display: block; width: 100%; height: 300px; padding: 10px 14px; resize: vertical;
	border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field); font-size: 15px; line-height: 1.5;
}
#BatchOutput { font-family: var(--words); font-size: 19px; white-space: pre; overflow: auto; }
#BatchInput:focus, #BatchOutput:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59,45,184,.12); }
/* batch output columns (decision 26): presets, column picker, table */
.batch-presets, .batch-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.batch-picker[hidden] { display: none; }
.batch-presets .chip, .batch-picker .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.batch-presets .chip small, .batch-picker .chip small { font-weight: 400; color: var(--faint); font-size: 11px; }
.batch-presets .chip[aria-pressed="true"], .batch-picker .chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.batch-picker .chip input { margin: 0; accent-color: var(--accent); }
.batch-presets .info { position: static; margin-inline-start: 2px; }
.batch-table { max-height: 420px; overflow: auto; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--paper); }
.batch-table[hidden] { display: none; }
.batch-table table { border-collapse: collapse; width: 100%; color: #1B1A2E; }
.batch-table th, .batch-table td { border: 1px solid #E3E5EE; padding: 4px 10px; text-align: right; vertical-align: middle; white-space: nowrap; }
.batch-table th { position: sticky; top: 0; background: #EEF0F6; color: #4A4E63; font-size: 13px; font-weight: 700; }
.batch-table td.words { font-family: var(--words); font-size: 19px; white-space: normal; min-width: 220px; }
.batch-table td.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }     /* numbers right-aligned */
.batch-table th.center, .batch-table td.center { text-align: center; }                                /* Value and Currency headers centred */
.batch-table td.ltr { direction: ltr; }
.batch-table tr.empty td { height: 28px; }
/* table input (decision 28) */
.batch-hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--faint); }
.card.drop { outline: 2px dashed var(--accent); outline-offset: -6px; }
/* toast (decision 29) */
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; z-index: 2000; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
/* copy split button and menu (decision 27) */
.split { position: relative; display: inline-flex; }
.split > .btn.primary:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.split > .arrow { border-start-start-radius: 0; border-end-start-radius: 0; padding: 0 9px; min-width: 0; border-inline-start: 1px solid rgba(255,255,255,.35); }
.copy-menu { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; min-width: 250px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; z-index: 20; display: flex; flex-direction: column; }
.copy-menu[hidden] { display: none; }
.copy-menu button { border: 0; background: none; text-align: start; padding: 7px 10px; border-radius: 7px; font: inherit; font-weight: 600; color: var(--ink2); cursor: pointer; }
.copy-menu button:hover, .copy-menu button:focus-visible { background: var(--accent-soft); color: var(--accent-dark); outline: 0; }
.copy-menu button small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; }
.copy-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
#labelBatchInput { position: absolute; inset: 14px 16px auto 16px; pointer-events: none; color: var(--faint); }
#labelBatchInput p { margin: 0 0 6px !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.7; }
#labelBatchInput br { display: none; }

.foot { padding: 2px 4px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.foot a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }

/* ---------- 7. options panel ---------- */
.opts { flex: 1 1 500px; max-width: 540px;   /* wide enough for Tashkeel in 3 x 2 (was 360-420px) */
	 background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 65px; max-height: calc(100vh - 79px);   /* decision 217: header 56 + border 1 + gap 8 (was 53px / 67px with the 44 px header) */ display: flex; flex-direction: column; }
.opts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--soft); flex-wrap: wrap; }
.opts-head h2 { font-size: 17px; }
.opts-actions { display: flex; gap: 6px; }
.btn.sheet-done { display: none; }
.opts-body { overflow-y: auto; padding: 2px 14px 12px; overscroll-behavior: contain; }
.grp { border-bottom: 1px solid var(--soft); }
.grp:last-child { border-bottom: 0; }
.grp > summary { list-style: none; display: flex; align-items: baseline; gap: 8px; min-height: 36px; padding: 7px 0; cursor: pointer; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::after { content: ""; margin-inline-start: auto; align-self: center; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.grp[open] > summary::after { transform: rotate(-135deg); }
.g-ar { font-size: 14px; font-weight: 700; }
.g-en { font-size: 11.5px; color: var(--muted); }
.grp-body { padding: 0 0 8px; display: flex; flex-direction: column; gap: 2px; }

/* ---------- 8. tiles, switches, fields, help links ---------- */
.tiles { display: grid; gap: 3px; background: var(--soft); border-radius: 10px; padding: 3px; }
.tiles.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 38px; padding: 3px 8px; padding-inline-end: 30px; border-radius: 9px; cursor: pointer; line-height: 1.3; transition: background .12s; }
.tile:hover { background: var(--tile-hover); }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.t-ar { font-size: 13.5px; font-weight: 600; color: var(--ink3); }
.t-en { font-size: 10.5px; color: var(--muted); }
.t-en, .sw-txt > small, .g-en { unicode-bidi: plaintext; text-align: right; }   /* English hints keep their punctuation in order */
.tile:has(input:checked) { background: var(--surface); box-shadow: 0 1px 3px rgba(20,20,40,.14), inset 0 0 0 1.5px var(--accent); }
.tile:has(input:checked) .t-ar { color: var(--accent-dark); font-weight: 700; }
.tile:has(input:focus-visible) { outline: 3px solid rgba(59,45,184,.45); outline-offset: 1px; }
.tile:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.tile .info { position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%); }

.sw, .fld { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 1px 0; cursor: pointer; }
.sw-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.sw-txt > span { font-size: 13.5px; }
.sw-txt > small { font-size: 11px; }
.sw input { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 12px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.sw input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: right .15s; }
.sw input:checked { background: var(--accent); }
.sw input:checked::after { right: 21px; }
.sw:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.fld select, .fld input { flex: none; width: 150px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); font-size: 13.5px; }
.fld input[type=number] { width: 96px; text-align: center; font-weight: 700; }
.fld:has(:disabled) { opacity: .55; }

/* help link (?) beside each option: opens the info window */
a.info { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--faint); text-decoration: none; font: 700 12.5px var(--ui); border: 1.5px solid var(--line-strong); }
a.info::before { content: "?"; }
a.info:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile a.info { width: 22px; height: 22px; font-size: 11.5px; }

/* help texts from js/data.js */
.about { display: block; text-align: center; text-decoration: none; direction: rtl; margin: 0 auto; }

/* ordinal / date choices (js/arqamExtras.js) */
#OrdinalDiv, #DateDiv, #W2NDiv { flex: 1 1 260px; }   /* W2NDiv: decision 48 */
#TimeDiv, #FracDiv { flex: 1 1 260px; min-width: 0; }   /* decisions 82-83 */
#TimeDiv .xopt select, #FracDiv .xopt select { flex: 1 1 0; }
/* engine 1.18 (decision 37): date style and the extra date settings, collapsed */
#DateDiv .xopt select { flex: 1 1 0; }
.xmore { margin-top: 6px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.xmore summary { cursor: pointer; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.xmore .xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 12px; padding: 4px 10px 10px; }
.xmore label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.xmore select { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; }
.xmore .xcheck { color: var(--ink); }
.xopt { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.xopt label { font-size: 13px; color: var(--muted); flex: none; }
.xopt select { flex: 1; min-width: 0; height: 32px; border: 0; background: transparent; font-weight: 600; }
/* recent conversions */
.recent > summary { list-style: none; cursor: pointer; padding: 8px 14px; display: flex; align-items: center; }
.recent > summary::-webkit-details-marker { display: none; }
.recent > summary::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.recent[open] > summary::after { transform: rotate(-135deg); }
.recent > summary h2 { font-size: 14px; color: var(--muted); }
.recent-body { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
#recentList { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; }
#recentList li { padding: 6px 0; border-top: 1px solid var(--line); }
.rc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-num { font-weight: 700; font-size: 15px; }
.rc-lab { font-size: 12px; color: var(--muted); margin-inline-end: auto; }
.rc-words { font-family: var(--words); font-size: 18px; line-height: 1.5; color: var(--ink2); }
/* search in the options panel */
.opts-search { padding: 8px 14px 4px; border-bottom: 1px solid var(--line); }
#optSearch { width: 100%; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--field); font-size: 13.5px; }
#optSearch:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,45,184,.12); }
#themeButton[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- 9. buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn small { color: inherit; opacity: .75; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.btn.soft { background: var(--accent-soft); color: var(--accent-dark); }
.btn.soft:hover { background: var(--accent-soft2); color: var(--accent-dark); }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { border-color: var(--line-hover); background: var(--bar); color: var(--ink); }
.colour-opts { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.tick { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
#colourTashkeelType { height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 12.5px; }
#colourTashkeelType:disabled { display: none; }   /* shown only when "تلوين التشكيل" is ticked */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--ground); color: var(--ink); }
.opts-fab { display: none; }

/* ---------- 10. info window ---------- */
body.aq-modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 1055; display: none; overflow-y: auto; padding: 24px 16px; }
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal-dialog { width: 100%; max-width: 560px; margin: auto; }
.modal-content { background: var(--surface); border-radius: 18px; box-shadow: 0 24px 60px rgba(20,20,40,.3); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--accent-dark); }
.modal-body { padding: 10px 16px; overflow-y: auto; white-space: pre-wrap; direction: rtl; text-align: justify; font-size: 15px; line-height: 1.6; }
.modal-footer { display: flex; justify-content: flex-start; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--bar); }
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(20,20,40,.45); }

/* ---------- 11. popover, spinner, backdrops ---------- */
.aq-popover { position: absolute; z-index: 1070; max-width: 280px; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(20,20,40,.18); overflow: hidden; }
.aq-popover-header { padding: 8px 14px; font-weight: 700; background: var(--accent-soft); color: var(--accent-dark); }
.aq-popover-body { padding: 10px 14px; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: aq-spin .75s linear infinite; }
@keyframes aq-spin { to { transform: rotate(360deg); } }
.offcanvas-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(20,20,40,.4); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 2s !important; } }

/* ---------- 12. phones and narrow windows (below 992 px) ---------- */
@media (max-width: 991.98px) {
	.topbar-in { height: 52px; padding: 0 12px; }   /* was 58px (decision 25) */
	.brand-en { display: none; }
	.menu-btn { display: inline-flex; }
	/* top menu becomes a side panel */
	.topnav { position: fixed; top: 0; bottom: 0; right: 0; z-index: 1045; width: min(300px, 82vw); margin: 0; padding: 12px; flex-direction: column; align-items: stretch; gap: 4px; background: var(--surface); box-shadow: -8px 0 30px rgba(20,20,40,.18); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
	.topnav.show { transform: none; visibility: visible; }
	.topnav-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
	.nav-btn { min-height: 48px; justify-content: flex-start; }

	.layout { padding: 4px 10px 90px; gap: 10px; }   /* top padding was 10px (decision 25) */
	.btn, .modes button, .nav-link { min-height: 38px; }
	.tile, .sw, .fld { min-height: 40px; }
	.work { gap: 10px; }
	.modes { align-self: stretch; }
	.modes button { flex: 1; }
	.mode-row { flex-direction: column; align-items: stretch; gap: 6px; }
	.mode-row .vline { display: none; }
	.mode-row, .modes.types { min-width: 0; max-width: 100%; }
	.modes.types { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.modes.types label { flex: 0 0 auto; }
	.in-card { padding: 12px; }
	#NumberInput { height: 50px; font-size: 23px; }
	.clear-in { top: 6px; }
	.outputText { font-size: 25.5px; padding: 14px 16px 18px; min-height: 110px; }
	.out-bar { padding: 6px 12px; }
	.batch-card { padding: 12px; }
	#BatchInput, #BatchOutput { height: 260px; }

	/* options become a panel that slides up from the bottom */
	.opts { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1045; max-width: none; max-height: 86vh; height: 86vh; border-radius: 20px 20px 0 0; border: 0; box-shadow: 0 -10px 40px rgba(20,20,40,.22); transform: translateY(100%); visibility: hidden; transition: transform .28s ease, visibility .28s; }
	.opts.show { transform: none; visibility: visible; }
	.opts-head { padding: 8px 12px 8px; position: relative; padding-top: 20px; }
	.opts-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-strong); }
	.btn.sheet-done { display: inline-flex; }
	.opts-body { padding: 4px 14px 24px; }
	.opts-fab { display: inline-flex; align-items: center; gap: 8px; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1020; min-height: 46px; padding: 0 22px; border: 0; border-radius: 23px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(59,45,184,.35); }
	.modal { padding: 12px; }
	.modal-content { max-height: calc(100vh - 24px); }
}
@media (max-width: 420px) {
	.tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.t-ar { font-size: 12.5px; }
	.fld select { width: 130px; }
}

/* decision 65: the date picker: the browser's own, opened from the calendar button; the field stays out of sight unless
   the browser has no showPicker(), then it shows under the button */
.datepick-wrap { position: relative; display: inline-flex; flex: none; }
.datepick-wrap .btn { padding: 0 8px; }
.datepick { position: absolute; inset-inline-end: 0; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.datepick.shown { width: auto; height: 32px; opacity: 1; pointer-events: auto; z-index: 20; padding: 0 6px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
/* decision 65: the date row with the calendar button fits a phone: the option boxes may shrink below their content */
#OrdinalDiv, #DateDiv, #W2NDiv, .xopt { min-width: 0; }
@media (max-width: 480px) { #DateDiv .xopt { gap: 6px; padding: 0 8px; } #DateDiv .xopt > label { display: none; } }

/* ---------- decision 66: «اشرح» (the grammar of the words) ---------- */
.explain-bar { display: flex; justify-content: flex-start; padding: 0 14px 10px; }
.explain-bar .btn small { margin-inline-start: 6px; }
.explain-box { border-top: 1px solid var(--soft); padding: 10px 14px 14px; }
.explain-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.explain-tip { font-size: 13px; color: var(--muted); }
.explain-box .seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.explain-box .seg button { border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 2px 12px; cursor: pointer; }
.explain-box .seg button + button { border-inline-start: 1.5px solid var(--line-strong); }
.explain-box .seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.explain-words { font-family: var(--words); font-size: 24px; line-height: 2.2; }
.xw { display: inline-block; padding: 0 5px; border-radius: 8px; border-bottom: 3px solid transparent; cursor: pointer; }
.xw:hover { background: var(--accent-soft); }
.xw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xw[aria-selected="true"] { background: var(--accent-soft2); }
.xw-number, .xw-scale { border-bottom-color: var(--accent); }
.xw-noun { border-bottom-color: #0E7C66; }
.xw-adjective { border-bottom-color: #B5530B; }
.xw-separator { color: var(--faint); }
/* explain page 0.1: the word panel and the rule cards   //! OLD (explain page 0.2): cards replaced by lines
.explain-panel { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 8px; background: var(--surface); }
.explain-panel .xbig { font-family: var(--words); font-size: 28px; font-weight: 700; }
.xtag { display: inline-block; font-size: 12px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-inline-end: 6px; }
.explain-panel dl { margin: 6px 0 0; }
.explain-panel dt { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.explain-panel dd { margin: 0; font-size: 15px; }
.xcmp div { display: flex; justify-content: space-between; gap: 10px; }
.xcmp b { font-family: var(--words); font-size: 17px; font-weight: 600; }
.xcmp span { color: var(--muted); font-size: 13px; }
.explain-rules-title { font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
.explain-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.xrule { display: flex; flex-direction: column; gap: 2px; text-align: start; font: inherit; color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); cursor: pointer; }
.xrule:hover, .xrule.on { border-color: var(--accent); }
.xrule b { font-size: 13.5px; }
.xrule span { font-size: 13px; color: var(--muted); }
.xrule .xex { color: var(--ink); font-family: var(--words); font-size: 15px; }
.xrule .xon { color: var(--accent); font-size: 12.5px; }
*/
.xw-qualifier, .xw-idafa { border-bottom-color: #7A5BB5; }
/* explain page 0.2 (decision 67): lines, not cards */
.explain-rules-title { font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
.explain-lines { margin: 0; padding-inline-start: 26px; }
.explain-lines li { padding: 5px 8px; border-radius: 8px; line-height: 1.7; cursor: pointer; font-size: 15px; }
.explain-lines li + li { border-top: 1px solid var(--soft); }
.explain-lines li:hover { background: var(--accent-soft); }
.explain-lines li.on { background: var(--accent-soft2); }
.explain-lines li:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.xl-w { font-family: var(--words); font-size: 19px; }
.xl-k, .xl-r { font-size: 12.5px; color: var(--muted); }
.xl-why { color: var(--muted); font-size: 14px; }
.xl-cmp, .xl-ex, .xl-on { font-size: 13.5px; color: var(--muted); }
.xl-cmp span, .xl-ex span { font-family: var(--words); font-size: 16px; color: var(--ink); }
.xl-on { color: var(--accent); }
[data-theme="dark"] .xw-noun { border-bottom-color: #4FD1B0; }
[data-theme="dark"] .xw-adjective { border-bottom-color: #F2A65A; }
[data-theme="dark"] .xw-qualifier, [data-theme="dark"] .xw-idafa { border-bottom-color: #B79CF0; }
.explain-bar[hidden], .explain-box[hidden] { display: none; }

/* ---------- 13. display modes, quick settings, other forms, read-back (decision 73, 20 Nov 2026; js/arqamViews.js) ---------- */
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft2); }
.view-switch button { border: 0; background: transparent; color: var(--ink2); font: inherit; font-size: 13px; font-weight: 700; padding: 3px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.view-switch button:hover:not(:disabled) { color: var(--ink); background: var(--tile-hover); }
.view-switch button[aria-checked="true"] { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(20,20,40,.15); }
.view-switch button:disabled { color: var(--faint); cursor: default; opacity: .75; }
.quick { padding: 8px 14px 10px; border-bottom: 1px solid var(--soft); }
.quick h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.quick-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.quick-lbl { flex: 0 0 104px; font-size: 12.5px; color: var(--muted); }
.quick-seg { flex: 1; display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.quick-seg button { flex: 1; border: 0; background: var(--surface); color: var(--ink2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 4px; cursor: pointer; white-space: nowrap; }
.quick-seg button + button { border-inline-start: 1px solid var(--line-strong); }
.quick-seg button:hover { background: var(--soft); }
.quick-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.read-back { margin: -4px 18px 10px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #E5F6EC; color: #11663A; font-size: 12.5px; font-weight: 700; }
[data-theme="dark"] .read-back { background: #143A27; color: #9BE6BC; }
.read-back[hidden] { display: none; }
.forms-card { padding: 8px 14px 12px; }
.forms-card[hidden] { display: none; }
.forms-card > h2 { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.forms-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.form-item { border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px 8px; background: var(--paper); color: #1B1A2E; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; color: #5B5F73; font-weight: 700; }
.form-words { font-family: var(--words); font-size: 19px; line-height: 1.6; overflow-wrap: anywhere; }
.form-words .fig { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: var(--ui); font-size: 15px; }
@media (max-width: 991.98px) {
	.view-switch button { padding: 3px 10px; font-size: 12.5px; }
}
@media (max-width: 420px) {
	.view-switch button { padding: 3px 8px; font-size: 12px; }
	.quick-lbl { flex-basis: 86px; }
	.quick-seg button { font-size: 11.5px; padding: 4px 2px; }
}

/* ---------- 14. «سريع»: one box for everything (decision 74, 20 Nov 2026; js/arqamViews.js) ---------- */
:root:not([data-view="quick"]) .quick-only { display: none !important; }
[data-view="quick"] .layout { max-width: 980px; }
[data-view="quick"] #optionsPanel, [data-view="quick"] .opts-fab, [data-view="quick"] .mode-row,
[data-view="quick"] #NormalDiv, [data-view="quick"] .affixes, [data-view="quick"] #colorifyButton,
[data-view="quick"] #iCopyImage, [data-view="quick"] #otherForms, [data-view="quick"] #explainBar { display: none !important; }
.q-hero { margin: 0 -2px; border-radius: var(--radius); padding: 22px 20px 64px; text-align: center; color: #fff;
	background: radial-gradient(900px 260px at 70% -40%, #8B74FF 0, transparent 60%), linear-gradient(160deg, #1E1650, #2C1F7A 55%, #3B2DB8); }
.q-hero h1 { margin: 0 0 4px; font-size: 25px; font-weight: 800; }
.q-hero p { margin: 0; font-size: 14px; opacity: .85; }
[data-view="quick"] .in-card { margin: -58px 14px 0; position: relative; z-index: 2; border-radius: 18px; box-shadow: 0 20px 40px -20px rgba(30,20,90,.45); padding: 12px 16px; }
.q-in { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--field); padding: 2px 6px 2px 12px; }
.q-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.q-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 24px; font-weight: 700; padding: 8px 0; }
.q-in input::placeholder { font-size: 15px; font-weight: 500; color: var(--faint); }
.q-in .icon-btn[hidden] { display: none; }
.q-det, .q-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.q-det-l { font-size: 12.5px; color: var(--muted); margin-inline-end: 2px; }
.q-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.q-chip:hover { border-color: var(--line-hover); color: var(--ink); }
.q-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
/* decision 173: the type understood, as a line of text below «جرّب» (not buttons) */
.q-det { margin-top: 10px; gap: 5px; font-size: 13.5px; color: var(--muted); }
.q-det[hidden] { display: none; }
/* the row «النوع:» with the eight types, above «جرّب»; a tap chooses the type */
.q-typ { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.q-det .q-det-l { font-size: 13.5px; margin: 0; }
.q-det .q-det-t { color: var(--accent-dark); font-weight: 700; }
.q-det .q-det-i { color: var(--accent); font-size: 13px; }
.q-ex { color: var(--muted); font-size: 12.5px; }
.q-more { margin-top: 8px; }
.q-more > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-dark); width: max-content; }
.q-more .quick-box { margin: 4px 0 8px; }
[data-view="quick"] .pick-row:empty { display: none; }
.q-tabs { padding: 0; overflow: hidden; }
.q-tabs[hidden] { display: none; }
.q-tablist { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.q-tablist button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.q-tablist button[hidden] { display: none; }
.q-tablist button[aria-selected="true"] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.q-tablist button small { font-weight: 500; }
.q-panel { padding: 10px 14px 14px; }
.q-panel[hidden] { display: none; }
#qp-explain .explain-box { margin: 0; }
.q-dev-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.q-dev { margin: 0; direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; background: #14152A; color: #E6E3FF; border-radius: 12px; padding: 10px 14px; font: 12.5px/1.6 ui-monospace, Consolas, monospace; }
.q-welcome { position: absolute; top: calc(100% + 8px); inset-inline-start: 120px; z-index: 1100; width: 340px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.7; box-shadow: 0 18px 40px -12px rgba(20,10,80,.45); }
.q-welcome[hidden] { display: none; }
.q-welcome p { margin: 4px 0 8px; }
.nav-views { display: none; gap: 6px;   /* in the phone menu only: the desktop has the switch in the top bar */ padding: 4px 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.nav-views-h { font-size: 13px; font-weight: 700; color: var(--muted); }
.view-card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 6px 8px; font: inherit; cursor: pointer; }
.view-card:hover:not(:disabled) { border-color: var(--line-hover); }
.view-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.view-card:disabled { opacity: .55; cursor: default; }
.view-card b { font-size: 14px; }
.view-card > span:last-child { font-size: 12px; color: var(--muted); grid-column: 2; }
.vc-th { grid-row: 1 / 3; height: 40px; border-radius: 8px; position: relative; overflow: hidden; }
.vc-q { background: linear-gradient(160deg, #1E1650, #3B2DB8); }
.vc-q::after { content: ""; position: absolute; inset: auto 12% 8px; height: 9px; border-radius: 5px; background: #fff; }
.vc-s { background: #F6F7FB; border: 1px solid #E3E5EE; }
.vc-s::after { content: ""; position: absolute; inset: 5px 5px 5px 40%; background: #fff; border: 1px solid #E3E5EE; border-radius: 4px; }
.vc-d { background: linear-gradient(135deg, #FBF8EF, #EFF4F2); border: 1px solid #D9CFB4; }
.vc-d::after { content: ""; position: absolute; inset: auto 8px 10px 8px; height: 2px; background: #9C9479; box-shadow: 0 -10px 0 #9C9479; }
@media (max-width: 991.98px) {
	.nav-views { display: grid; }
	.q-welcome { inset-inline: 12px; width: auto; }
	[data-view="quick"] .in-card { margin-inline: 6px; }
}
@media (max-width: 560px) {
	.q-hero { padding: 16px 14px 58px; }
	.q-hero h1 { font-size: 19px; }
	.q-hero p { font-size: 12.5px; }
	.q-in input { font-size: 20px; }
	.q-chip { padding: 2px 10px; font-size: 12.5px; }
	.q-tablist { padding: 0 6px; }
	.q-tablist button { padding: 8px 8px; font-size: 13px; }
}

/* ---------- 15. «مستندات»: the amount in a cheque, invoice, contract clause or receipt (decision 75, 20 Nov 2026; js/arqamViews.js) ---------- */
:root:not([data-view="docs"]) .docs-only { display: none !important; }
:root:not([data-view="studio"]) .studio-only { display: none !important; }   /* decision 214 */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* read by screen readers, not shown */
[data-view="docs"] .layout { max-width: 1180px; }
[data-view="docs"] #optionsPanel, [data-view="docs"] .opts-fab, [data-view="docs"] .mode-row, [data-view="docs"] .affixes,
[data-view="docs"] .out-card, [data-view="docs"] #otherForms { display: none !important; }
[data-view="docs"] #NumberInput { font-size: 24px; font-weight: 700; direction: ltr; text-align: left; }
#quickSettings3 .quick-row:has([data-quick="tashkeel"]) { display: none; }   /* the tashkeel of the document is its own switch */
.d-head { border-radius: var(--radius); padding: 16px 20px; color: #fff; background: linear-gradient(135deg, #0F3D5E, #1B5A82); }
.d-head h1 { margin: 0 0 2px; font-size: 21px; font-weight: 800; }
.d-head p { margin: 0; font-size: 13.5px; opacity: .88; }
.d-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; padding: 16px; align-items: start; }
.d-side { display: flex; flex-direction: column; gap: 10px; }
.d-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.d-f[hidden] { display: none; }
.d-l { font-size: 12.5px; color: var(--muted); }
.d-f input { border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px; background: var(--field); color: var(--ink); font: inherit; font-size: 14px; }
.d-f input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.d-tpl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.d-tpl button { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 10px; padding: 7px 4px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.d-tpl button:hover { border-color: var(--line-hover); }
.d-tpl button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.d-note { margin: 0; font-size: 12px; color: var(--muted); }
.d-sws { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.d-sw { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.d-sw input { width: 17px; height: 17px; accent-color: var(--accent); }
.d-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.d-acts .btn:disabled { opacity: .5; cursor: default; }
.d-view { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.d-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.d-forms:empty { display: none; }
/* the document itself: paper colours in light and dark mode alike, as printed */
.d-doc { position: relative; overflow: hidden; color: #1E2230; background: #FFFEFA; border: 1px solid #DCD3BC; border-radius: 14px; padding: 22px 26px 20px; font-size: 15px; line-height: 1.9; box-shadow: 0 14px 30px -18px rgba(40,30,0,.45); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.d-doc .fig, .d-fig { direction: ltr; unicode-bidi: isolate; }
.d-empty .d-doc { color: #8A8573; }
.d-r1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: #4A4636; }
.d-bank { font-size: 18px; color: #0F3D5E; }
.d-title { font-size: 20px; color: #0F3D5E; margin: 0; }
.d-meta { display: flex; flex-direction: column; align-items: flex-end; }
.d-pay { display: flex; gap: 10px; align-items: baseline; margin-top: 14px; font-size: 14px; }
.d-pay > span:first-child { white-space: nowrap; }
.d-line { flex: 1; border-bottom: 1px solid #9C9479; min-height: 24px; font-weight: 700; }
.d-lw { font-weight: 700; line-height: 2.1; }
.d-amt { display: flex; gap: 14px; align-items: stretch; margin-top: 14px; }
.d-words { flex: 1; font-size: 19px; font-weight: 700; line-height: 2.1; background-image: linear-gradient(to bottom, transparent 38px, #9C9479 38px, #9C9479 39px, transparent 39px); background-size: 100% 40px; }
.d-box { flex: 0 0 auto; min-width: 150px; border: 2px solid #0F3D5E; border-radius: 10px; background: #fff; display: flex; justify-content: center; align-items: center; padding: 6px 12px; font-weight: 700; font-size: 19px; color: #0F3D5E; white-space: nowrap; }
.d-box-r { width: max-content; margin: 10px auto 0 0; margin-inline: auto 0; }
.d-r3 { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; }
.d-ref { color: #5C5A50; font-size: 13px; }
.d-mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: 2px; }
.d-sigs { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; }
.d-sigs .d-sig:only-child { margin-inline-start: auto; }
.d-sig { width: 180px; border-top: 1px solid #9C9479; text-align: center; font-size: 12.5px; color: #6A6656; padding-top: 3px; }
.d-cheque { background: repeating-linear-gradient(115deg, rgba(15,61,94,.045) 0 2px, transparent 2px 9px), repeating-linear-gradient(65deg, rgba(176,138,62,.05) 0 2px, transparent 2px 11px), linear-gradient(135deg, #FBF8EF, #EFF4F2); }
.d-cheque::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(15,61,94,.25); border-radius: 10px; pointer-events: none; }
.d-wm { position: absolute; inset-inline-start: 38%; top: 22%; font-size: 110px; font-weight: 800; color: rgba(15,61,94,.04); pointer-events: none; }
.d-to { margin: 12px 0 8px; font-size: 14px; }
.d-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-tab th, .d-tab td { padding: 7px 10px; border-bottom: 1px solid #E4DDCB; text-align: start; }
.d-tab th { background: #E3EEF5; color: #0F3D5E; }
.d-tab .d-num { text-align: end; white-space: nowrap; }
.d-tot td { font-weight: 700; }
.d-inw { font-size: 15.5px; font-weight: 700; }
.d-contract p { margin: 10px 0 0; text-align: justify; font-size: 16px; line-height: 2.1; }
.d-contract .d-small { font-size: 13.5px; color: #4A4636; }
@media (max-width: 991.98px) {
	.d-panel { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
	.d-side { display: contents; }   /* phone and tablet: the template choice, then the document, then the fields */
	.d-side > :first-child { order: -2; }
	.d-view { order: -1; margin-bottom: 4px; }
	.d-tpl { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
	.d-head h1 { font-size: 18px; }
	.d-panel { padding: 10px; }
	.d-doc { padding: 14px 14px 12px; font-size: 14px; }
	.d-amt { flex-direction: column; }
	.d-words { font-size: 16px; line-height: 1.95; background-size: 100% 31px; background-image: linear-gradient(to bottom, transparent 30px, #9C9479 30px, #9C9479 31px, transparent 31px); }
	.d-box { font-size: 17px; }
	.d-wm { font-size: 70px; }
	.d-forms { grid-template-columns: 1fr; }
	.d-sig { width: 120px; }
	.d-tpl button { font-size: 12.5px; padding: 6px 2px; }
}
/* printing in «مستندات» prints the document alone */
@media print {
	[data-view="docs"] body * { visibility: hidden !important; }
	[data-view="docs"] #docsSheet, [data-view="docs"] #docsSheet * { visibility: visible !important; }
	[data-view="docs"] #docsSheet { position: absolute; inset: 0 0 auto 0; }
	[data-view="docs"] .d-doc { box-shadow: none; }
	@page { margin: 12mm; }
}

/* ---------- decision 91: the vowel marks in colour, drawn in layers (js/index.js arqamLayerTashkeel) ---------- */
.tl-stack { display: grid; font-kerning: none; }
.tl-l { grid-area: 1 / 1; }
.tl-l[aria-hidden] { user-select: none; -webkit-user-select: none; pointer-events: none; }
.tl-ink { -webkit-text-stroke: 0.4px currentColor; }   /* covers the edges of the coloured layers below */
.tl-sel { color: transparent; }

/* decision 119: «بضع» and «نيّف» take some numbers only: the hint shown in the result box */
.approx-hint{font-size:.62em;color:var(--muted,#666);font-family:Cairo,sans-serif;line-height:1.6}

/* ---------- decision 125 (24 Nov 2026): the region chip, its list, the tags and the first-visit offer (js/arqamRegion.js) ---------- */
.rg-wrap { position: relative; display: inline-flex; }
.rg-chip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 2px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 30px; }
.rg-chip b { font-weight: 700; }
.rg-chip:hover { background: var(--accent-soft2); }
.rg-ico { flex: none; }
.rg-chip.rg-none { border-style: dashed; border-color: var(--line-strong); background: var(--surface); color: var(--muted); }
.rg-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1050; width: min(620px, 94vw); max-height: min(75vh, 640px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(20,20,40,.22); padding: 10px 12px 12px; }
.rg-pop-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rg-x { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.rg-g { margin-top: 8px; }
.rg-gh { font-size: 12px; color: var(--muted); margin: 2px 2px 4px; }
.rg-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; }
.rg-pop [data-rg-pick] { display: block; width: 100%; text-align: start; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 5px 8px; font: inherit; cursor: pointer; }
.rg-pop [data-rg-pick]:hover { border-color: var(--accent); }
.rg-pop [data-rg-pick][aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.rg-pop [data-rg-pick] b { display: block; font-size: 14px; }
.rg-pop [data-rg-pick] small { display: block; color: var(--muted); font-size: 11.5px; }
.rg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.rg-set { border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; background: var(--field); }
.rg-set small { display: block; color: var(--muted); font-size: 11.5px; }
.rg-set b { font-size: 13.5px; }
.rg-tag { display: inline-block; font-size: 10.5px; font-weight: 600; line-height: 1.5; background: #E6F4EC; color: #1F7A4D; border: 1px solid #BFE0CD; border-radius: 999px; padding: 0 7px; margin-inline-start: 6px; vertical-align: middle; white-space: nowrap; }
.rg-tag.rg-hand { background: #FFF4E0; color: #8A5A00; border-color: #F0D39A; }
:root[data-theme="dark"] .rg-tag { background: #173A2A; color: #8FD8B0; border-color: #2D6247; }
:root[data-theme="dark"] .rg-tag.rg-hand { background: #3D2E10; color: #F2C66D; border-color: #6B5320; }
.rg-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.rg-note:empty { display: none; }
.rg-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #F0D68A; background: #FFF8E6; color: #3D3420; border-radius: 12px; font-size: 14px; }
:root[data-theme="dark"] .rg-ask { background: #3A3118; border-color: #6B5A26; color: #F3E7C4; }
.rg-ask[hidden], .rg-pop[hidden] { display: none; }
.rg-ask span { flex: 1 1 260px; }
#CurrencyMenuDiv > .rg-tag { margin-top: 4px; }
@media (max-width: 991.98px) {
	.rg-chip { padding: 2px 9px; font-size: 12.5px; }
	.rg-chip .rg-l { display: none; }
	.rg-wrap { margin-inline-start: auto; }
	.rg-wrap + .q-welcome + .menu-btn, .rg-wrap ~ .menu-btn { margin-inline-start: 0; }
	.rg-pop { position: fixed; top: 70px; right: 3vw; left: 3vw; width: auto; }
}
@media (max-width: 575.98px) {   /* phones: the globe and the country only; no region: the globe alone */
	.topbar-in { gap: 8px; }
	.rg-chip { padding: 2px 7px; gap: 3px; min-height: 32px; }
	.rg-chip b { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
	.rg-chip.rg-none b { display: none; }
	.topbar-in .brand-ar { display: none; }   /* the logo stays: room for the region chip (decision 125) */
}
@media (max-width: 400px) {
	.rg-chip b { max-width: 52px; }
	.topbar-in { padding: 0 8px; gap: 6px; }
}

/* ===== 13 (decision 144), kept as OLD: the shared header on this page's own top bar; decision 145 gives the page the one
   header of tools/site_header.js instead (css/arqamHeader.css), and section 14 below dresses this page's pieces in it.
/* ===== 13 the shared header (decision 143;
   the same indigo bar as the manual and the playground, tools/site_header.js; this page is right to left, so the logo is at the right end) ===== * /
.topbar { background: linear-gradient(225deg, #1d1859, #3b2db3 60%, #6a5cff); border-bottom: 0; color: #fff; }
.topbar-in { height: 56px; }
.topbar .brand { color: #fff; }
.topbar .brand img { width: 40px; height: auto; border-radius: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.topbar .brand-ar { font-family: ArqamSep, Scheherazade, "Noto Naskh Arabic", serif; font-size: 27px; line-height: 1; }
.topbar .brand-en { color: rgba(255,255,255,.8); }
.topbar .ah-badge { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 1px 10px; font-size: 12px; color: #fff; white-space: nowrap; }
.topbar .view-switch { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); }
.topbar .view-switch button { color: rgba(255,255,255,.88); }
.topbar .view-switch button:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.18); }
.topbar .view-switch button[aria-checked="true"] { background: #fff; color: #1d1859; }
.topbar .rg-chip, .topbar .rg-chip.rg-none { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.topbar .rg-chip.rg-none { border-style: dashed; color: rgba(255,255,255,.85); }
.topbar .rg-chip:hover { background: rgba(255,255,255,.26); }
.topbar .menu-btn { color: #fff; }
.topbar .menu-btn:hover { background: rgba(255,255,255,.18); }
.topbar a:focus-visible, .topbar button:focus-visible { outline: 2px solid #FFD233; outline-offset: 2px; }
@media (min-width: 992px) {   /* the links as the shared header's buttons; below 992 px they are in the side menu and keep its look * /
	.topbar .topnav { gap: 6px; }
	.topbar .nav-btn { min-height: 32px; padding: 0 11px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 13px; white-space: nowrap; }
	.topbar .nav-btn small { color: rgba(255,255,255,.75); }
	.topbar .nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.26); color: #fff; }
	.topbar .nav-btn:disabled { color: rgba(255,255,255,.55); background: transparent; }
}
@media (max-width: 1299.98px) { .topbar .nav-btn small, .topbar .brand-en { display: none; } }
@media (max-width: 991.98px) { .topbar-in { height: 54px; } }
@media (max-width: 575.98px) { .topbar .ah-badge { display: none; } .topbar .brand img { width: 36px; } }
@media print { .topbar { background: none; color: #000; } }
   OLD (decision 145) */

/* ===== 14 this page's pieces in the one header (decision 145). The bar itself is
   css/arqamHeader.css; here: the display modes, the region chip, the ☰ menu and the menu's buttons on the indigo bar. ===== */
header.ah .view-switch { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); }
header.ah .view-switch button { color: rgba(255,255,255,.9); }
header.ah .view-switch button:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.18); }
header.ah .view-switch button[aria-checked="true"] { background: #fff; color: #1d1859; }
header.ah .rg-chip, header.ah .rg-chip.rg-none { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; min-height: 32px; }
header.ah .rg-chip.rg-none { border-style: dashed; color: rgba(255,255,255,.88); }
header.ah .rg-chip:hover { background: rgba(255,255,255,.26); }
header.ah .menu-btn { color: #fff; flex: none; margin: 0; width: 38px; height: 36px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); }
header.ah .menu-btn:hover { background: rgba(255,255,255,.22); }
header.ah .ah-mid, header.ah .rg-pop, header.ah .q-welcome { font-family: Cairo, "Segoe UI", sans-serif; }
@media (min-width: 576px) { header.ah .q-welcome { inset-inline: auto; left: calc(50% - 170px); } }
@media (min-width: 992px) {   /* the menu's own links stay in the bar as buttons: «عن الصفحة» and «داكن»; the rest are the tabs and the logo */
	header.ah .topnav { margin: 0; gap: 8px; }
	header.ah .topnav #arqamAbout, header.ah .topnav #manualLink, header.ah .topnav #playLink, header.ah .topnav #ArabicButton { display: none; }
	header.ah .topnav .nav-btn { min-height: 32px; height: 32px; padding: 0 11px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 13px; white-space: nowrap; }
	header.ah .topnav .nav-btn small { display: none; }
	header.ah .topnav .nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.26); color: #fff; }
	header.ah .topnav #themeButton[aria-pressed="true"] { background: #fff; color: #1d1859; }
}
@media (max-width: 1150px) and (min-width: 992px) { header.ah .rg-chip .rg-l { display: none; } }

/* ===== 15 «حول أرقام» and «عن الصفحة» (decision 145;
   js/arqamAbout.js fills .iv inside the info window; .iv-on hides the window's usual title, text and button) ===== */
#infomodal .modal-content > .iv { display: none; }
#infomodal .modal-content.iv-on > .modal-header, #infomodal .modal-content.iv-on > .modal-body, #infomodal .modal-content.iv-on > .modal-footer { display: none; }
#infomodal .modal-content.iv-on > .iv { display: block; overflow-y: auto; }
#infomodal .modal-content.iv-on { max-width: 600px; }
.iv { font-family: Cairo, "Segoe UI", system-ui, sans-serif; color: var(--ink); }
.iv[dir="ltr"] { font-family: "Segoe UI", Cairo, system-ui, sans-serif; }
.iv-top { position: relative; padding: 52px 22px 18px; color: #fff; background: linear-gradient(225deg, #1d1859, #3b2db3 60%, #6a5cff); }
.iv[dir="ltr"] .iv-top { background: linear-gradient(135deg, #1d1859, #3b2db3 60%, #6a5cff); }
.iv-x { position: absolute; top: 12px; inset-inline-end: 14px; width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 15px; cursor: pointer; }
.iv-x:hover { background: rgba(255,255,255,.3); }
.iv-lang { position: absolute; top: 13px; inset-inline-start: 14px; display: flex; gap: 2px; background: rgba(255,255,255,.15); border-radius: 999px; padding: 2px; }
.iv-lang button { border: 0; background: none; color: #fff; font: 700 12.5px Cairo, "Segoe UI", sans-serif; padding: 2px 12px; border-radius: 999px; cursor: pointer; }
.iv-lang button[aria-pressed="true"] { background: #fff; color: #1d1859; }
.iv-who { display: flex; align-items: center; gap: 14px; }
.iv-who img { width: 64px; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.iv-who img.sm { width: 46px; }
.iv-nm { font-family: Scheherazade, "Noto Naskh Arabic", serif; font-size: 40px; font-weight: 700; line-height: 1.05; }
.iv-nm.sm { font-family: inherit; font-size: 26px; }
.iv-en { font-family: "Segoe UI", Cairo, sans-serif; font-size: 22px; }
.iv-tg { font-size: 14.5px; opacity: .92; margin-top: 4px; }
.iv-demo { margin-top: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 9px 14px; }
.iv-demo .n { font-size: 13px; opacity: .85; display: inline-block; }
.iv-demo .w { display: block; font-family: Scheherazade, "Noto Naskh Arabic", serif; font-size: 22px; line-height: 1.55; text-align: right; }
.iv-bd { padding: 16px 22px 20px; }
.iv-bd h3 { font-size: 15px; margin: 14px 0 6px; color: var(--accent-dark); }
.iv-bd p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.75; color: var(--ink2, var(--ink)); }
.iv-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.iv-facts div { background: var(--ground); border-radius: 10px; padding: 8px 4px; text-align: center; }
.iv-facts b { display: block; font-size: 21px; line-height: 1.2; color: var(--accent); font-family: "Segoe UI", Cairo, sans-serif; }
.iv-facts span { font-size: 12px; color: var(--muted); }
.iv-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.iv-links a { border: 1px solid var(--line); border-radius: 9px; padding: 5px 13px; font-size: 13.5px; font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.iv-links a:hover { border-color: var(--accent); }
.iv-links a.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.iv-sig { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; font-size: 13px; color: var(--muted); }
.iv-sig b { color: var(--ink); font-size: 14px; }
.iv-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.iv-modes button { text-align: start; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; line-height: 1.5; cursor: pointer; }
.iv-modes button:hover { border-color: var(--accent); }
.iv-modes b { display: block; font-size: 15px; color: var(--accent-dark); }
.iv-types { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-types span { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 600; }
.iv-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.iv-feat div { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; padding: 5px 0; }
.iv-feat i { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-style: normal; font-size: 14px; }
.iv-priv { display: flex; gap: 10px; align-items: center; background: #e9f8ee; border: 1px solid #c6ebd3; border-radius: 12px; padding: 9px 12px; font-size: 13.5px; color: #11643a; margin-top: 12px; }
[data-theme="dark"] .iv-priv { background: #12321f; border-color: #1f5435; color: #8fe0ae; }
@media (max-width: 560px) { .iv-facts { grid-template-columns: repeat(2, 1fr); } .iv-modes, .iv-feat { grid-template-columns: 1fr; } .iv-nm { font-size: 34px; } .iv-top { padding: 50px 16px 16px; } .iv-bd { padding: 14px 16px 18px; } }

/* ===== 16 this page's pieces in the smaller header (decision 165): 26 px high, 12 px text, as tools/site_header.js ===== */
header.ah .rg-chip, header.ah .rg-chip.rg-none { min-height: 26px; height: 26px; font-size: 12px; padding-block: 0; }
header.ah .menu-btn { width: 32px; height: 28px; }
header.ah .view-switch { padding: 2px; }
header.ah .view-switch button { font-size: 12px; padding-block: 3px; min-height: 0; }
@media (min-width: 992px) {
	header.ah .topnav .nav-btn { min-height: 26px; height: 26px; padding: 0 9px; font-size: 12px; }
}

/* gen:tight */
/* made by tools/build_tight.js from the rules above: do not edit here (decision 195) */
:root[data-view="studio"] .layout { gap: 12px; column-gap: 12px; }
:root[data-view="studio"] .layout { padding: 3px 16px 23px 16px; }
:root[data-view="studio"] .work { gap: 8px; column-gap: 8px; }
:root[data-view="studio"] .modes { gap: 2px; column-gap: 2px; }
:root[data-view="studio"] .modes { padding: 3px 4px 3px 4px; }
:root[data-view="studio"] .mode-row { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .modes.types label { gap: 2px; column-gap: 2px; }
:root[data-view="studio"] .in-card { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .in-card { padding: 11px 14px 11px 14px; }
:root[data-view="studio"] .lbl { margin-bottom: 2px; }
:root[data-view="studio"] .pick-row { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .affixes { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .affix { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .aq-current { gap: 8px; column-gap: 8px; }
:root[data-view="studio"] .out-bar { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .out-bar { padding: 5px 14px 5px 14px; }
:root[data-view="studio"] .out-tools { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .outputText { padding: 9px 18px 13px 18px; }
:root[data-view="studio"] .batch-card { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .batch-card { padding: 11px 14px 11px 14px; }
:root[data-view="studio"] .batch-bar { gap: 10px; column-gap: 10px; }
:root[data-view="studio"] #BatchInput, :root[data-view="studio"] #BatchOutput { padding: 9px 14px 9px 14px; }
:root[data-view="studio"] .batch-presets, :root[data-view="studio"] .batch-picker { gap: 4px; column-gap: 4px; margin-bottom: 6px; }
:root[data-view="studio"] .batch-presets .chip, :root[data-view="studio"] .batch-picker .chip { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .batch-table th, :root[data-view="studio"] .batch-table td { padding: 3px 10px 3px 10px; }
:root[data-view="studio"] .batch-hint { margin-top: 4px; }
:root[data-view="studio"] .copy-menu { padding: 5px 6px 5px 6px; }
:root[data-view="studio"] .copy-menu hr { margin-top: 2px; margin-bottom: 2px; }
:root[data-view="studio"] #labelBatchInput p { margin-bottom: 4px; }
:root[data-view="studio"] .foot { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .foot a { gap: 2px; column-gap: 2px; }
:root[data-view="studio"] .opts-head { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .opts-head { padding: 7px 14px 7px 14px; }
:root[data-view="studio"] .opts-actions { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .grp > summary { gap: 6px; column-gap: 6px; min-height: 34px; }
:root[data-view="studio"] .grp > summary { padding: 6px 0 6px 0; }
:root[data-view="studio"] .sw, :root[data-view="studio"] .fld { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .xmore { margin-top: 4px; }
:root[data-view="studio"] .xmore summary { padding: 5px 10px 5px 10px; }
:root[data-view="studio"] .xmore .xgrid { row-gap: 4px; column-gap: 10px; }
:root[data-view="studio"] .xmore .xgrid { padding: 3px 10px 9px 10px; }
:root[data-view="studio"] .xmore label { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .xopt { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .recent > summary { padding: 7px 14px 7px 14px; }
:root[data-view="studio"] .recent-body { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] #recentList li { padding: 5px 0 5px 0; }
:root[data-view="studio"] .rc-head { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .opts-search { padding: 7px 14px 3px 14px; }
:root[data-view="studio"] .btn { gap: 3px; column-gap: 3px; }
:root[data-view="studio"] .colour-opts { row-gap: 4px; column-gap: 12px; }
:root[data-view="studio"] .tick { gap: 3px; column-gap: 3px; }
@media (max-width: 991.98px) { :root[data-view="studio"] .layout { gap: 8px; column-gap: 8px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .layout { padding: 3px 10px 89px 10px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .work { gap: 8px; column-gap: 8px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .mode-row { gap: 4px; column-gap: 4px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .in-card { padding: 11px 12px 11px 12px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .outputText { padding: 13px 16px 17px 16px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .out-bar { padding: 5px 12px 5px 12px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .batch-card { padding: 11px 12px 11px 12px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .opts-head { padding: 7px 12px 7px 12px; padding-top: 19px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .opts-body { padding: 3px 14px 23px 14px; } }
@media (max-width: 991.98px) { :root[data-view="studio"] .opts-fab { gap: 6px; column-gap: 6px; } }
@media (max-width: 480px) { :root[data-view="studio"] #DateDiv .xopt { gap: 4px; column-gap: 4px; } }
:root[data-view="studio"] .explain-box { padding: 9px 14px 13px 14px; }
:root[data-view="studio"] .explain-head { gap: 6px; column-gap: 6px; margin-bottom: 4px; }
:root[data-view="studio"] .explain-rules-title { margin-top: 10px; margin-bottom: 2px; }
:root[data-view="studio"] .explain-lines li { padding: 4px 8px 4px 8px; }
:root[data-view="studio"] .read-back { margin-bottom: 8px; gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .forms-card { padding: 7px 14px 11px 14px; }
:root[data-view="studio"] .forms-card > h2 { margin-bottom: 4px; }
:root[data-view="studio"] .forms-list { gap: 6px; column-gap: 6px; }
:root[data-view="studio"] .form-item { padding: 5px 10px 7px 10px; }
:root[data-view="studio"] .form-head { gap: 4px; column-gap: 4px; }
:root[data-view="studio"] .layout { max-width: none; padding-left: 8px; padding-right: 8px; }
/* /gen:tight */
