/* YallaGooo — the electronic user guide: the code gate and the reader. The reader is for the screen only: nothing is
   selectable, nothing prints, pictures cannot be dragged out, and the words chosen with a code lie over the pages. */
@font-face { font-family: "Tajawal"; src: url("/fonts/Tajawal-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/fonts/Tajawal-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/fonts/Tajawal-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
:root { --g-brand: #CC3550; --g-brand-2: #E34C61; --g-soft: #FFF1F2; --g-ink: #2E2127; --g-muted: #8A767D; --g-line: #EFE3E6; --g-bg: #FAF6F7; --g-card: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif; color: var(--g-ink); background: var(--g-bg); line-height: 1.85; }
a { color: var(--g-brand); text-decoration: none; }

/* ---- the gate (code entry) ---- */
.guide-gate { display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #CC3550, #5E1A2C); }
.g-gate-card { width: min(100%, 440px); padding: 2rem 1.8rem; border-radius: 26px; background: #fff; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); text-align: center; }
.g-gate-logo { height: 40px; margin: 0 auto .8rem; display: block; }
.g-gate-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto .6rem; border-radius: 24px; font-size: 2.4rem; background: var(--g-soft); }
.g-gate-card h1 { margin: 0 0 .3rem; font-size: 1.6rem; }
.g-gate-card p { margin: 0 0 1.1rem; color: var(--g-muted); font-size: .95rem; }
.g-gate-card form { display: grid; gap: .6rem; text-align: start; }
.g-gate-card label { font-weight: 700; font-size: .9rem; }
.g-gate-card input { height: 56px; border: 2px solid var(--g-line); border-radius: 14px; text-align: center; font: 700 1.5rem/1 ui-monospace, Consolas, monospace; letter-spacing: .25em; text-transform: uppercase; color: var(--g-ink); }
.g-gate-card input:focus { outline: none; border-color: var(--g-brand); }
.g-gate-card button { height: 52px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #F2697D, #CC3550); color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 10px 22px rgba(204, 53, 80, .3); }
.g-gate-card button:hover { filter: brightness(1.06); }
.g-error { margin-bottom: .9rem; padding: .7rem .9rem; border-radius: 12px; background: #fdeceb; color: #9f1d2c; font-weight: 700; }
.g-gate-links { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1.1rem; font-size: .9rem; }
.g-gate-links a { color: var(--g-muted); }
.g-gate-links a:hover { color: var(--g-brand); }

/* ---- the reader ---- */
.guide-body { display: flex; flex-direction: column; overflow: hidden; }
.guide-body[data-protect="1"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.g-top { flex: none; display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; background: #fff; border-bottom: 1px solid var(--g-line); box-shadow: 0 2px 10px rgba(94, 26, 44, .05); z-index: 5; }
.g-brand { display: flex; align-items: center; gap: .6rem; color: var(--g-ink); font-size: 1.1rem; white-space: nowrap; }
.g-brand img { height: 30px; }
.g-brand strong { padding-inline-start: .6rem; border-inline-start: 1px solid var(--g-line); }
.g-search { flex: 1; display: flex; max-width: 560px; margin-inline: auto; border: 1px solid var(--g-line); border-radius: 999px; overflow: hidden; background: var(--g-bg); }
.g-search input { flex: 1; min-width: 0; height: 40px; padding: 0 1rem; border: 0; background: transparent; font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
.g-search input:focus { outline: none; }
.g-search:focus-within { border-color: var(--g-brand); background: #fff; }
.g-search button { width: 46px; border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.g-who { color: var(--g-muted); font-size: .85rem; white-space: nowrap; }
.g-until { display: flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border-radius: 999px; background: #fff7e6; color: #8a5a00; font-size: .78rem; white-space: nowrap; }
.g-until i { font-style: normal; }
.g-top form { margin: 0; }
.g-exit { padding: .4rem 1rem; border: 1px solid var(--g-line); border-radius: 999px; background: #fff; color: var(--g-ink); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.g-exit:hover { border-color: var(--g-brand); color: var(--g-brand); }
.g-toc-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--g-line); border-radius: 12px; background: #fff; font-size: 1.1rem; cursor: pointer; }
.g-shell { flex: 1; display: flex; min-height: 0; }
.g-toc { flex: none; width: 300px; overflow-y: auto; padding: 1rem .8rem 2rem; background: #fff; border-inline-end: 1px solid var(--g-line); }
.g-toc h2 { margin: 0 .5rem .5rem; font-size: .85rem; color: var(--g-muted); }
.g-toc ol { list-style: none; margin: 0; padding: 0; }
.g-toc details > ol { margin: .1rem 0 .4rem; padding-inline-start: .9rem; border-inline-start: 2px solid var(--g-line); margin-inline-start: .9rem; }
.g-toc summary { display: flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; border-radius: 10px; }
.g-toc summary::-webkit-details-marker { display: none; }
.g-toc summary::before { content: "◂"; color: var(--g-muted); font-size: .8rem; width: 1rem; text-align: center; transition: transform .15s; }
.g-toc details[open] > summary::before { transform: rotate(-90deg); }
.g-toc summary a, .g-toc .g-part { flex: 1; font-weight: 800; color: var(--g-ink); }
.g-toc summary small { padding: 0 .5rem; border-radius: 999px; background: var(--g-bg); color: var(--g-muted); font-size: .72rem; }
.g-toc a { display: block; padding: .38rem .6rem; border-radius: 10px; color: #4A3A40; font-size: .93rem; line-height: 1.55; }
.g-toc a:hover { background: var(--g-bg); }
.g-toc a.active { background: var(--g-soft); color: var(--g-brand); font-weight: 800; }
.g-toc details details > ol { margin-inline-start: .5rem; }
.g-toc details details summary a { font-weight: 700; font-size: .9rem; }
.g-main { flex: 1; min-width: 0; overflow-y: auto; padding: 1rem 1rem 2.5rem; }
.g-page { margin: 0; padding: 1.4rem clamp(1rem, 2vw, 1.8rem); border-radius: 22px; background: var(--g-card); border: 1px solid var(--g-line); box-shadow: 0 8px 26px rgba(94, 26, 44, .06); }
.g-way { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: .6rem; }
.g-back { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .95rem; border: 1px solid var(--g-line); border-radius: 999px; background: var(--g-bg); color: var(--g-ink); font-weight: 800; font-size: .9rem; }
.g-back:hover { border-color: var(--g-brand); color: var(--g-brand); }
.g-back i { font-style: normal; }
.g-back b { font-weight: 600; color: var(--g-muted); }
.g-back b::before { content: "· "; }
.g-crumb { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; color: var(--g-muted); font-size: .85rem; }
.g-crumb a { color: var(--g-brand); font-weight: 700; }
.g-crumb i { font-style: normal; }
.g-page h1 { margin: .1rem 0 .8rem; font-size: 1.7rem; line-height: 1.4; }
.g-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.g-head h1 { margin: 0; }
.g-step { display: flex; gap: .4rem; flex: none; }
.g-step a { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .95rem; border: 1px solid var(--g-line); border-radius: 999px; background: var(--g-bg); color: var(--g-ink); font-weight: 800; font-size: .9rem; white-space: nowrap; }
.g-step a:hover { border-color: var(--g-brand); color: var(--g-brand); }
.g-step i { font-style: normal; }
.g-text { font-size: 1.03rem; }
.g-text p { margin: .5rem 0; }
.g-text ul, .g-text ol { margin: .5rem 0; padding-inline-start: 1.5rem; }
.g-text li { margin: .25rem 0; }
.g-text h2, .g-text h3, .g-text h4 { margin: 1.2rem 0 .4rem; line-height: 1.4; }
.g-text h3 { font-size: 1.22rem; }
.g-text h4 { font-size: 1.08rem; }
.g-text figure { margin: 1rem 0; text-align: center; }
.g-text figure img { width: min(100%, 1180px); }
.g-text img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--g-line); box-shadow: 0 8px 22px rgba(94, 26, 44, .12); }
[data-protect="1"] .g-text img { pointer-events: none; -webkit-user-drag: none; }
.g-text figure.phone img { width: min(100%, 360px); }
.g-text figcaption { margin-top: .35rem; color: var(--g-muted); font-size: .85rem; }
.g-text table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .95rem; }
.g-text th, .g-text td { padding: .5rem .65rem; border: 1px solid var(--g-line); text-align: start; vertical-align: top; }
.g-text th { background: var(--g-bg); }
.g-text blockquote, .g-text .note { margin: .8rem 0; padding: .7rem .9rem; border-radius: 12px; background: var(--g-soft); border-inline-start: 4px solid var(--g-brand); }
.g-text .tip { margin: .8rem 0; padding: .7rem .9rem; border-radius: 12px; background: #EEFAF3; border-inline-start: 4px solid #1F9D60; }
.g-text kbd, .g-text .btn-name { display: inline-block; padding: 0 .45rem; border-radius: 8px; background: var(--g-bg); border: 1px solid var(--g-line); font: inherit; font-weight: 700; font-size: .92em; }
.g-text mark, .g-hits mark { background: #fde68a; border-radius: 4px; padding: 0 .15em; }
.g-children { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.g-children a { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 3.4rem; padding: .7rem .95rem; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-card); color: var(--g-ink); font-weight: 700; box-shadow: 0 3px 10px rgba(94, 26, 44, .04); }
.g-children a:hover { border-color: var(--g-brand); color: var(--g-brand); }
.g-children small { flex: none; padding: .1rem .6rem; border-radius: 999px; background: var(--g-bg); color: var(--g-muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.g-home .g-children { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g-home .g-children a { min-height: 4.4rem; font-size: 1.05rem; }
.g-count { color: var(--g-muted); margin: 0 0 .8rem; }
.g-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.g-hits a { display: grid; gap: .1rem; padding: .75rem 1rem; border: 1px solid var(--g-line); border-radius: 14px; color: var(--g-ink); }
.g-hits a:hover { border-color: var(--g-brand); }
.g-hits strong { color: var(--g-brand); }
.g-hits small { color: var(--g-muted); font-size: .8rem; }
.g-hits span { font-size: .93rem; color: #5A4A50; }
/* the words chosen with the code, over every page */
.g-mark { position: fixed; inset: -20%; z-index: 40; pointer-events: none; display: grid; grid-template-columns: repeat(6, 1fr); align-content: space-around; justify-items: center; gap: 5.5rem 1rem; transform: rotate(-24deg); opacity: .11; font-weight: 800; font-size: 1.25rem; color: #000; overflow: hidden; }
.g-mark span { white-space: nowrap; }
/* shown instead of the pages while the window is not in front (another program, a capture tool) */
.g-veil { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: #fff; font-size: 4rem; }
.guide-body.is-away .g-veil { display: grid; }
.guide-body.is-away .g-shell { visibility: hidden; }
@media print { body[data-protect="1"] { display: none !important; } }
@media (max-width: 900px) {
    .g-toc-toggle { display: block; }
    .g-brand strong, .g-who { display: none; }
    .g-until b { display: none; }
    .g-toc { position: fixed; inset-block: 57px 0; inset-inline-start: 0; z-index: 20; width: min(86vw, 330px); transform: translateX(105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
    .guide-body.toc-open .g-toc { transform: none; }
    .g-top { gap: .4rem; padding: .5rem .6rem; }
    .g-exit { padding: .4rem .7rem; }
    .g-mark { grid-template-columns: repeat(3, 1fr); font-size: 1rem; }
}
