/* ناجد — the pages' look: Najed's navy, mint and sage (its guide: Documents/marketing/najed-brand), Readex, mobile first (one column), wider screens get rows of fields. */
@font-face {font-family: "Readex"; src: url("/fonts/ReadexPro[HEXP,wght].ttf") format("truetype"); font-weight: 160 700; font-display: swap;}
:root {--navy: #133557; --deep: #0c2743; --teal: #2e6678; --aqua: #7fc0b8; --sage: #7fc0b8; --mint: #9ee9e6; --ink: #16293d; --mute: #5c7084; --line: #d6e4e6; --bg: #f2f8f7; --card: #fff; --warn: #8a5a00; --warnbg: #fff6e0; --err: #a3271c; --errbg: #fdecea; --okc: #0b5d3b; --okbg: #e9f7ef; --r: 14px;}
* {box-sizing: border-box;}
html {font-size: 16px;}
body {margin: 0; font-family: "Readex", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55;}
a {color: var(--teal);}
h2.sec {font-size: 1.2rem; margin: 22px 0 10px; color: var(--navy);}
h3 {margin: 0; font-size: 1.15rem; color: var(--navy);}
h4 {margin: 18px 0 8px; font-size: 1rem; color: var(--navy); border-right: 4px solid var(--teal); padding-right: 10px;}
h4 .help, h3 .help {font-weight: 400; margin-right: 6px;}
.help {font-size: .82rem; color: var(--mute); font-weight: 400;}
.muted {color: var(--mute);}
[hidden] {display: none !important;}
.inline {display: inline;}
.crumbs {margin: 8px 0 12px; font-size: .95rem;}

main {min-width: 0;}

/* cards, rows of fields */
.card, .box {background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 14px; box-shadow: 0 2px 10px rgba(19,53,87,.05);}
.row {display: grid; grid-template-columns: 1fr; gap: 12px 14px; margin-bottom: 8px;}
@media (min-width: 700px) {.row {grid-template-columns: repeat(2, 1fr);} .row.four, .row.five {grid-template-columns: repeat(2, 1fr);} .span2 {grid-column: span 2;}}
@media (min-width: 1000px) {.row {grid-template-columns: repeat(3, 1fr);} .row.four {grid-template-columns: repeat(4, 1fr);} .row.five {grid-template-columns: repeat(5, 1fr);} .row.two {grid-template-columns: repeat(2, 1fr);}}
.row .row {grid-column: 1 / -1; margin: 0;}
.fld {display: flex; flex-direction: column; gap: 5px; min-width: 0;}
.fld .l {font-size: .9rem; font-weight: 600; color: var(--navy);}
.fld.miss .l::before {content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #e0a800; margin-left: .45em;}
.fld.miss input, .fld.miss select, .fld.miss textarea {border-color: #e0a800; background: #fffbea;}
input, select, textarea {width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .12s, box-shadow .12s;}
input:focus, select:focus, textarea:focus {outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,102,120,.16);}
input[type="date"], input[type="time"] {direction: ltr;}
textarea {resize: vertical; min-height: 2.6em;}
.saved {box-shadow: 0 0 0 3px rgba(24,160,160,.25) !important; border-color: var(--aqua) !important;}
.seg {display: flex; gap: 6px; flex-wrap: wrap;}
.seg label {flex: 1;}
.seg input {position: absolute; opacity: 0; width: 0; height: 0;}
.seg span {display: block; text-align: center; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; background: #fff;}
.seg input:checked + span {background: var(--navy); color: #fff; border-color: transparent;}
.chk {display: flex; align-items: center; gap: 8px; font-size: .95rem;}
.chk input {width: auto;}

/* buttons */
.btn {display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--navy); color: var(--navy); background: #fff; font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none; transition: background .12s, color .12s, transform .12s, box-shadow .12s; white-space: nowrap;}
.btn:hover {background: var(--navy); color: #fff;}
.btn.primary {background: var(--navy); border: 0; color: #fff; box-shadow: 0 4px 14px rgba(46,102,120,.28);}
.btn.primary:hover {transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46,102,120,.36); filter: brightness(1.06);}
.btn.big {font-size: 1.05rem; padding: 12px 22px;}
.btn.small {padding: 6px 12px; font-size: .88rem;}
.btn.wide {width: 100%;}
.btn.danger {border-color: #c0392b; color: #c0392b;}
.btn.danger:hover, .btn.armed {background: #c0392b; color: #fff; border-color: #c0392b;}
.btn[disabled] {opacity: .45; cursor: default; pointer-events: none;}
.btn.file {position: relative; overflow: hidden;}
.btn.file input {position: absolute; inset: 0; opacity: 0; cursor: pointer;}
.tools, .agents, .upload-row, .photos-h {display: flex; flex-wrap: wrap; gap: 10px; align-items: center;}
.photos-h {justify-content: space-between;}
.photos-h h4 {margin: 6px 0;}
.agents .grow {flex: 1 1 240px;}
.danger-zone {display: block; margin: 8px 0 20px;}

/* notes */
.note, .ok, .warn, .err {border-radius: 10px; padding: 11px 14px; margin: 0 0 12px; font-weight: 600;}
.note {background: var(--okbg); border: 1px solid #bfe6cf; color: var(--okc);}
.ok {background: #e9f7f3; border: 1px solid #bfe6cf; color: var(--okc);}
.warn {background: var(--warnbg); border: 1px solid #f1d58a; color: var(--warn);}
.err {background: var(--errbg); border: 1px solid #f3b5ae; color: var(--err);}
#toast {position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: .9rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20; max-width: 90vw;}
#toast.show {opacity: 1; transform: translateX(-50%);}
#toast.bad {background: #a3271c;}

/* home */
.login {max-width: 420px; margin: 20px auto; display: flex; flex-direction: column; gap: 14px;}
.cards {display: grid; grid-template-columns: 1fr; gap: 12px;}
@media (min-width: 700px) {.cards {grid-template-columns: repeat(2, 1fr);}}
@media (min-width: 1000px) {.cards {grid-template-columns: repeat(3, 1fr);}}
.tag {font-size: .75rem; background: #e7eef1; color: var(--navy); border-radius: 6px; padding: 1px 7px; font-weight: 600;}

/* the property list */
.plist {display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px;}
.prow {display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; transition: box-shadow .12s, transform .12s;}
.prow:hover {box-shadow: 0 6px 18px rgba(19,53,87,.1); transform: translateY(-1px);}
.prow.gap {border-color: #f1d58a;}
.prow .num {width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;}
.prow .main {flex: 1; min-width: 0; display: flex; flex-direction: column;}
.prow .type {font-weight: 700; color: var(--navy);}
.prow .meta {color: var(--mute); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.prow .side {display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;}
.prow .go {font-size: 1.6rem; color: var(--mute);}
.chip.warn {background: var(--warnbg); color: var(--warn);}
.chip.faint {background: #f1f4f6; color: var(--mute); font-weight: 400;}
.chips {display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;}
.chip-chk {display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .92rem; cursor: pointer; background: #fff;}
.chip-chk input {width: auto; margin: 0;}
.chip-chk:has(input:checked) {border-color: var(--teal); background: #e6f3f5; color: var(--navy); font-weight: 600;}

/* photos and the plot editor */
.thumbs {display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 8px 0 14px;}
.th {position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #eef2f4; aspect-ratio: 4 / 3;}
.th img {width: 100%; height: 100%; object-fit: cover; display: block;}
.th figcaption {position: absolute; bottom: 0; right: 0; left: 0; background: rgba(19,53,87,.75); color: #fff; font-size: .78rem; padding: 2px 8px; text-align: center;}
.th .x {position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #c0392b; font-weight: 700; cursor: pointer;}
.logo-prev {max-width: 200px; max-height: 110px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 8px; padding: 6px;}
.cover-prev {max-width: 220px; border-radius: 8px;}
details.look {margin: 6px 0 10px;}
details summary {cursor: pointer; font-weight: 600; color: var(--navy); padding: 8px 0;}
#plot-editor {position: relative; margin-top: 6px;}
#plot-editor [hidden] {display: none !important;}
#plot-editor canvas {display: block; width: 100%; touch-action: none; cursor: crosshair; border-radius: 10px; background: #eef2f4; outline: none;}
#plot-editor canvas.label {cursor: text;}
#plot-editor #lab {position: absolute; display: none; transform: translate(50%, -50%); background: #18a0a0; color: #fff; border: 2px solid #fff; border-radius: 8px; padding: 3px 10px; font: 700 14px "Readex", system-ui, sans-serif; width: 11em; text-align: center; outline: none; box-shadow: 0 2px 8px rgba(0,0,0,.35);}
#plot-editor #tools {position: absolute; display: none; transform: translate(50%, -100%); background: #fff; border: 1.5px solid #121a44; border-radius: 10px; padding: 5px 7px; box-shadow: 0 3px 10px rgba(0,0,0,.25); white-space: nowrap; z-index: 2;}
#plot-editor #tools .g {display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 8px; vertical-align: middle;}
#plot-editor #tools button {width: auto; border: 1.5px solid #c6ccd3; background: #fff; color: #121a44; border-radius: 6px; min-width: 26px; height: 26px; padding: 0 6px; font: 600 12px "Readex", system-ui, sans-serif; cursor: pointer;}
#plot-editor #tools button.on {border-color: #121a44; box-shadow: 0 0 0 1.5px #121a44 inset;}
#plot-editor #tools button.sw {width: 26px; padding: 0;}
#plot-editor #tools button.del {border-color: #c0392b; color: #c0392b;}
#plot-editor .bar {display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; min-height: 32px;}
#plot-editor .bar button {width: auto; min-height: 44px; min-width: 44px; border: 1.5px solid #121a44; background: #fff; color: #121a44; border-radius: 8px; padding: 8px 12px; font: 600 13px "Readex", system-ui, sans-serif; cursor: pointer;}
#plot-editor .bar button:hover {background: #121a44; color: #fff;}
#plot-editor .bar button:disabled {opacity: .35; cursor: default; background: #fff; color: #121a44;}
#plot-editor .bar button.on {background: #18a0a0; border-color: #18a0a0; color: #fff;}
#plot-editor .bar button.primary {background: var(--navy); color: #fff;}
#plot-editor .bar button.primary:disabled {opacity: .4;}
#plot-editor .bar button:focus-visible, #plot-editor canvas:focus-visible {outline: 3px solid var(--teal); outline-offset: 3px;}
#plot-editor #methods {display: inline-flex; gap: 6px; flex-wrap: wrap;}
#plot-editor #saved {font-size: 12px; color: var(--mute); margin-inline-start: auto;}
#plot-editor .view-tools {border-top: 1px solid var(--line); padding-top: 10px;}
#plot-editor .extra-tools {margin-top: 8px;}
#plot-editor .n {font-size: 13px; font-weight: 600; min-width: 9em;}
#plot-editor .hint {font-size: 13px; color: #5a6472; margin: 8px 0; line-height: 1.8;}

/* pictures as choices */
.pick {display: grid; gap: 10px; margin-bottom: 10px; grid-template-columns: repeat(2, 1fr);}
@media (min-width: 700px) {.pick.cols3 {grid-template-columns: repeat(3, 1fr);} .pick.cols4 {grid-template-columns: repeat(4, 1fr);}}
.pick .opt {display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; color: var(--navy); text-align: center; width: 100%;}
.pick .opt img {width: 100%; border-radius: 8px; display: block; aspect-ratio: 16 / 10; object-fit: cover; background: #eef2f4;}
.pick .opt.on {border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,102,120,.18);}
.pick .opt input {width: auto; margin: 0 0 0 4px;}
.pick label.opt:has(input:checked) {border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,102,120,.18);}

/* the material boxes on «ماذا تُخرج» */
.box-h {display: flex; align-items: center; gap: 14px; flex-wrap: wrap;}
.box-h img {width: 120px; border-radius: 8px; aspect-ratio: 16 / 10; object-fit: cover; background: #eef2f4;}
.box-h h3 {flex: 1;}
.box.on {border-color: var(--teal);}
.box-b {margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px;}
.switch {display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--navy);}
.switch input {appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #cfd8de; position: relative; transition: background .15s; margin: 0;}
.switch input::after {content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s;}
.switch input:checked {background: var(--teal);}
.switch input:checked::after {transform: translateX(-20px);}
.ptable .prow-f {display: grid; grid-template-columns: 1fr; gap: 8px 12px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--line);}
@media (min-width: 900px) {.ptable .prow-f {grid-template-columns: 110px repeat(4, 1fr);}}
.ptable .pl {font-weight: 700; color: var(--navy); padding-bottom: 10px;}

/* the preview gallery */
.gallery {display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));}   /* by the room there is: the gallery sits beside the summary */
.gallery.small {grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));}
.g {margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;}
.g .im {position: relative; background: #e9eef1; min-height: 160px; display: flex; align-items: center; justify-content: center; cursor: zoom-in;}
.g .im img {width: 100%; display: block;}
.g .im img:not([src]) {display: none;}
.g .spin {position: absolute; color: var(--mute); font-size: .9rem;}
.g .im.ready .spin {display: none;}
.g figcaption {display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: .9rem; font-weight: 600; color: var(--navy);}
.g .pages {display: inline-flex; align-items: center; gap: 4px; font-weight: 400; color: var(--mute); white-space: nowrap;}
.g .pages .pg {width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--navy);}
.g .pages b, .g .pages i {font-style: normal; color: var(--navy);}
#lightbox {position: fixed; inset: 0; background: rgba(10,14,30,.92); z-index: 50; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 20px;}
#lightbox img {max-width: 96vw; max-height: 86vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5);}
#lightbox .cap {color: #fff; font-weight: 600;}
#lightbox .x {position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer;}

/* the export */
.export-row {display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;}
#export:not(:has(*)) {display: none;}  /* no export yet: no empty card */
.running {display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); padding: 8px 0;}
.spinner {width: 20px; height: 20px; border: 3px solid #d9e2e7; border-top-color: var(--teal); border-radius: 50%; animation: spin .9s linear infinite; flex: none;}
@keyframes spin {to {transform: rotate(360deg);}}
.files {display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px;}

/* bottom navigation */
/* the owner's page: a card per customer, its small forms each on a line */
.cust .name {font-weight: 700; color: var(--navy); font-size: 1.05rem;}
.cust .meta {color: var(--mute); font-size: .9rem;}
.cust form {display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px;}
.cust form input {width: auto; flex: 1; min-width: 0; max-width: 220px;}

/* the packages: one card each, the price the largest thing on it */
.cust .row-f {display: flex; gap: 8px; align-items: center; margin-top: 8px;}
.cust .row-f input {flex: 1; min-width: 0; max-width: 260px;}

/* ---------- the workspace: Najed's navy, mint and sage in flat colour; a side with the logo,
   the pages and the balance; the content on paper beside it; one family of line icons; on a phone a top bar and a tab bar ---------- */
:focus-visible {outline: 3px solid var(--sage); outline-offset: 2px;}
svg.i {width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none;}
svg.i.s {width: 16px; height: 16px;}
button.icon {background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; line-height: 0; font: inherit;}
button.icon:hover {background: rgba(127,192,184,.22);}
button.icon.armed {background: #c0392b; color: #fff; font-size: .8rem; line-height: 1.4; padding: 4px 10px;}
.chip {display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e6f7f6; color: var(--navy); white-space: nowrap;}
.chip.dark {background: rgba(12,39,67,.86); color: #fff;}
.chip.paid {background: var(--mint);}
.chip.white {background: #fff;}
.dot {width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex: none; display: inline-block;}
.dot.amber {background: #c98a12;}
.card, .box {border-radius: 18px; box-shadow: none; padding: 20px 22px;}
.btn {border-radius: 12px; min-height: 44px;}
.btn.small {min-height: 34px;}
.btn:hover {transform: translateY(-1px);}
.btn:active {transform: translateY(1px);}
.btn.primary {border: 1.5px solid var(--navy); box-shadow: none;}
.btn.primary:hover {background: var(--deep); border-color: var(--deep); filter: none; box-shadow: 0 12px 22px -14px rgba(19,53,87,.7);}
.btn.ghost {border-color: var(--line); background: #fff;}
.btn.ghost:hover {background: #fff; color: var(--navy); border-color: var(--navy);}
.btn.mint {background: var(--mint); border-color: var(--mint); color: var(--navy);}
.btn.mint:hover {background: #b9f1ee; border-color: #b9f1ee; color: var(--navy);}
.row, .row.two {grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));}   /* by the room there is, not by the screen: the form sits beside the summary */
.row.four {grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));}
.row.five {grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));}
.seg {gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; flex-wrap: nowrap;}   /* one track, the chosen option a white tile on it */
.seg span {border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; color: var(--mute); font-weight: 500; white-space: nowrap;}
.seg input:checked + span {background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 1px 2px rgba(19,53,87,.16), 0 0 0 1px var(--line);}
.seg input:focus-visible + span {outline: 3px solid var(--sage); outline-offset: 2px;}
@media (prefers-reduced-motion: reduce) {.btn, .acard, .tier {transition: none; transform: none !important;}}

/* the rail: the navy side */
body.app {display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start;}
.rail {position: sticky; top: 0; height: 100vh; background: var(--navy); color: #fff; padding: 26px 18px 20px; display: flex; flex-direction: column; overflow: hidden;}
.rail::after {content: ""; position: absolute; inset: auto -60px -10px -60px; height: 300px; background: url("/static/brand/plateau-sage.svg") no-repeat center bottom / cover; opacity: .13; pointer-events: none;}
.rail > * {position: relative; z-index: 1;}
.rail .logo {align-self: flex-start; margin-right: 6px; line-height: 0;}
.rail .logo img {height: 62px; width: auto; display: block;}
.rail nav {margin-top: 34px; display: grid; gap: 4px;}
.rail nav a {display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 12px; color: rgba(255,255,255,.76); font-weight: 500; text-decoration: none; transition: background .14s, color .14s;}
.rail nav a:hover {background: rgba(255,255,255,.07); color: #fff;}
.rail nav a.on {background: rgba(158,233,230,.14); color: var(--mint); font-weight: 600;}
.wallet {margin-top: auto; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); border-radius: 16px; padding: 14px 16px;}
.wallet .l {font-size: .82rem; color: rgba(255,255,255,.72);}
.wallet .n {font-size: 2.4rem; font-weight: 300; color: var(--mint); line-height: 1.2;}
.wallet a {font-size: .86rem; font-weight: 600; color: var(--mint); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; margin-top: 4px;}
.me {margin-top: 14px; display: flex; align-items: center; gap: 11px; padding: 6px 4px 0; color: rgba(255,255,255,.8);}
.wallet + .me {margin-top: 14px;}
.rail nav + .me {margin-top: auto;}
.av {width: 36px; height: 36px; border-radius: 50%; background: var(--sage); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none;}
.me > div {min-width: 0; flex: 1;}
.me b {display: block; color: #fff; font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; text-align: right;}
.me small {font-size: .75rem;}
.me small a {color: rgba(255,255,255,.8);}
.rail .ver {margin-top: 10px; font-size: .7rem; color: rgba(255,255,255,.4); text-align: center;}
.mtop, .tabs {display: none;}

/* the page beside it */
.page {min-width: 0; max-width: 1300px; padding: 30px 40px 60px;}
.ph {display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;}
.ph h1 {margin: 0; font-size: 1.85rem; font-weight: 700; color: var(--navy); line-height: 1.3; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;}
.ph p {margin: 2px 0 0; color: var(--mute); font-size: .95rem;}
.ph .acts {margin-right: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;}
.app .login {margin: 0 0 14px; max-width: 460px;}   /* a form inside the workspace starts at the page's edge like everything else */
.crumb {font-size: .85rem; color: var(--mute); display: flex; gap: 8px; align-items: center; margin-bottom: 6px;}
.crumb a {color: inherit; text-decoration: none;}
.crumb a:hover {color: var(--navy);}
.autosave {display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: .85rem;}
h2.sec, .sec h2 {font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 0;}
h2.sec {margin: 26px 0 12px;}
.sec {display: flex; align-items: baseline; gap: 10px; margin: 28px 0 14px;}
.sec span {color: var(--mute); font-size: .88rem;}

/* the home page: three numbers, then the auctions as cards with their photos */
.stats {display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 24px;}
.tile {background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; gap: 16px; align-items: center;}
.tile .ic {width: 46px; height: 46px; border-radius: 14px; background: #e6f7f6; color: var(--navy); display: flex; align-items: center; justify-content: center; flex: none;}
.tile .l {font-size: .85rem; color: var(--mute);}
.tile .v {font-size: 2.1rem; font-weight: 600; color: var(--navy); line-height: 1.15;}
.tile .v small {font-size: .88rem; font-weight: 500; color: var(--mute); margin-right: 6px;}
.acards {display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;}
.acard {background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .16s, box-shadow .16s;}
.acard:hover {transform: translateY(-2px); box-shadow: 0 18px 34px -22px rgba(19,53,87,.45);}
.acard .pic {display: flex; align-items: center; justify-content: center; height: 150px; position: relative; background: #dbe7e8; color: #8fa6ad; overflow: hidden;}
.acard .pic img {width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s;}
.acard:hover .pic img {transform: scale(1.03);}
.acard .pic .chip {position: absolute; top: 12px; right: 12px;}
.acard .pic > svg.i {width: 34px; height: 34px;}
.acard .b {padding: 15px 18px 12px; display: flex; flex-direction: column; flex: 1;}
.acard h3 {font-size: 1.03rem; font-weight: 700;}
.acard h3 a {color: var(--navy); text-decoration: none;}
.acard .meta {display: grid; gap: 5px; margin-top: 9px; color: var(--mute); font-size: .82rem;}
.acard .meta div {display: flex; align-items: center; gap: 7px;}
.acard .f {margin-top: auto; padding-top: 11px; display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--mute); white-space: nowrap;}
.acard .meta + .f {border-top: 1px solid var(--line); margin-top: 13px;}
.acard .f .del {margin-right: auto; line-height: 0;}
.acard .f .del button {color: var(--mute);}
.acard .f .open {color: var(--navy); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; text-decoration: none;}
.acard.new {border: 1.5px dashed #b9cdd0; background: transparent; min-height: 250px;}
.acard.new button {flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--navy);}
.acard.new .plus {width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;}
.acard.new small {color: var(--mute); font-weight: 400; font-size: .82rem;}

/* an auction's pages: the six steps as one line, the form, and the summary beside it */
.steps {display: flex; align-items: center; margin: 18px 0 0; padding: 12px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; scrollbar-width: none;}
.steps a {flex: 1 1 auto; display: flex; align-items: center; gap: 9px; color: var(--mute); font-size: .88rem; font-weight: 500; white-space: nowrap; text-decoration: none;}
.steps a::before {content: ""; flex: 1; min-width: 14px; height: 1.5px; background: var(--line); margin: 0 4px 0 12px;}   /* the line that leads to this step */
.steps a:first-child {flex: 0 0 auto;}
.steps a:first-child::before {display: none;}
.steps a .n {width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; flex: none;}
.steps a.done {color: var(--ink);}
.steps a.done::before, .steps a.on::before {background: var(--sage);}
.steps a.done .n {background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23133557' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; border-color: var(--sage); color: transparent;}
.steps a.on {color: var(--navy); font-weight: 700;}
.steps a.on .n {background: var(--navy); border-color: var(--navy); color: #fff;}
.step-h {display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px;}
.step-h .t {font-size: 1.12rem; font-weight: 700; color: var(--navy);}
.step-h .h {color: var(--mute); font-size: .88rem;}
.cols {margin-top: 20px;}
.sum, footer.nav {display: none;}
@media (min-width: 1180px) {
  .cols {display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start;}
  .sum {display: block; position: sticky; top: 20px;}
  .sum .card {margin: 0; padding: 16px;}
}
.sum .cover {width: 100%; height: 132px; object-fit: cover; border-radius: 12px; display: block;}
.sum .cover.none {background: #dbe7e8; color: #8fa6ad; display: flex; align-items: center; justify-content: center;}
.sum .cover.none svg.i {width: 30px; height: 30px;}
.sum dl {margin: 14px 0 0; display: grid; gap: 8px; font-size: .88rem;}
.sum dl div {display: flex; gap: 10px;}
.sum dt {color: var(--mute); width: 70px; flex: none;}
.sum dd {margin: 0; font-weight: 500;}
.ready {margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .84rem;}
.ready b {font-size: .88rem; color: var(--navy);}
.ready div {display: flex; align-items: baseline; gap: 8px;}
.ready .dot {transform: translateY(-1px);}
.ready .yes {color: #23786d; align-items: center;}
.ready .more {color: var(--mute);}
.sum .btn {margin-top: 14px;}
.sum .btn + .btn, .sum form + .btn {margin-top: 8px;}
@media (max-width: 1179px) {   /* no room for the summary: its two buttons become a bar along the bottom */
  body.editing .page {padding-bottom: 110px;}
  footer.nav {display: flex; gap: 10px; align-items: center; justify-content: space-between; position: fixed; bottom: 0; left: 0; right: 264px; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); z-index: 6;}
}

/* a phone: the side goes; a top bar with the logo, and a tab bar with the new-auction button in its middle */
@media (max-width: 900px) {
  body.app {display: block;}
  .rail {display: none;}
  .mtop {display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); color: var(--navy);}
  .mtop img {height: 42px; width: auto; display: block;}
  .page {padding: 20px 16px 110px;}
  .ph h1 {font-size: 1.5rem;}
  .ph .acts {margin-right: 0; width: 100%;}
  .ph .acts form, .ph .acts .btn {flex: 1;}
  .ph .acts form .btn {width: 100%;}
  .autosave {display: none;}
  footer.nav {right: 0;}
  .steps {padding: 10px 12px;}
  .steps a:not(.on) .t {display: none;}
  .steps a::before {margin: 0 2px 0 8px; min-width: 8px;}
  .stats {grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px;}
  .tile {display: block; padding: 12px 14px; border-radius: 16px;}
  .tile .ic {display: none;}
  .tile .v {font-size: 1.7rem;}
  .tile .l {font-size: .76rem;}
  .tabs {display: flex; align-items: center; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; height: 72px; background: #fff; border-top: 1px solid var(--line); z-index: 6; font-size: .72rem;}
  .tabs a {display: grid; justify-items: center; gap: 3px; color: var(--mute); text-decoration: none; min-width: 64px;}
  .tabs a.on {color: var(--navy); font-weight: 600;}
  .tabs .fab {width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; margin-top: -26px; box-shadow: 0 12px 22px -10px rgba(19,53,87,.8); cursor: pointer;}
}

/* a navy band with the plateau behind its words: the packages' heading */
.band {position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: 22px; padding: 22px;}
.band::before {content: ""; position: absolute; inset: 0; background: url("/static/brand/plateau-sage.svg") no-repeat center bottom / cover; opacity: .2; pointer-events: none;}
.band > * {position: relative;}
.band.head {text-align: center; padding: 54px 22px 132px;}
.band.head .eyebrow {color: var(--mint); font-weight: 600;}
.band.head h1 {font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.35; margin: 10px 0 12px; font-weight: 700;}
.band.head p {max-width: 34em; margin: 0 auto; color: rgba(255,255,255,.84); line-height: 1.9;}
.band.head .bal {display: inline-block; margin-top: 18px; padding: 6px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; font-size: .92rem;}
.band.head .bal b {color: var(--mint); font-size: 1.1rem;}

/* the sign-in page: the logo and one line beside the form, on navy */
.page-login {background: var(--navy);}
.page-login::before {content: ""; position: fixed; inset: 0; background: url("/static/brand/plateau-sage.svg") no-repeat center bottom / cover; opacity: .16; pointer-events: none;}
.page-login .page {position: relative; max-width: 1040px; margin: 0 auto; padding: 0 20px;}
.gate {min-height: 100vh; display: grid; align-content: center; align-items: center; gap: 30px; padding: 36px 0;}
@media (min-width: 900px) {.gate {grid-template-columns: 1fr 420px; gap: 72px;}}
.gate-brand img {width: min(290px, 60vw); height: auto; display: block;}
.gate-brand p {color: rgba(255,255,255,.84); font-size: 1.12rem; max-width: 28em; margin: 28px 0 0; line-height: 1.9;}
.gate .login {margin: 0; max-width: none; padding: 30px 26px; border: 0; border-radius: 22px;}
.gate .login h1 {margin: 0; font-size: 1.35rem; color: var(--navy);}

/* the packages: tall cards that rise into the band, the best value in navy */
.tiers {position: relative; display: grid; grid-template-columns: 1fr; gap: 18px; margin: -92px auto 0; padding: 0 14px; max-width: 1080px;}
@media (min-width: 720px) {.tiers {grid-template-columns: repeat(auto-fit, minmax(270px, 340px)); justify-content: center; gap: 22px;}}
.tier {position: relative; display: flex; flex-direction: column; min-height: 540px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 34px 28px 28px; box-shadow: 0 30px 60px -44px rgba(19,53,87,.55); transition: transform .18s, box-shadow .18s;}
.tier:hover {transform: translateY(-2px); box-shadow: 0 34px 64px -40px rgba(19,53,87,.7);}
.tier.best {background: var(--navy); border-color: var(--navy); color: #fff;}
.tier .flag {position: absolute; top: 20px; left: 20px; background: var(--mint); color: var(--navy); font-weight: 700; font-size: .8rem; padding: 4px 13px; border-radius: 999px;}
.tier h2 {margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--teal);}
.tier.best h2 {color: var(--mint);}
.tier .count {margin-top: 16px; font-size: 1.15rem; font-weight: 600; color: var(--navy); display: flex; align-items: baseline; gap: 10px;}
.tier .count b {font-size: 4rem; line-height: 1; font-weight: 700;}
.tier.best .count {color: #fff;}
.tier .price {margin-top: 20px; font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.2;}
.tier .price small {font-size: 1rem; font-weight: 500; margin-right: 6px;}
.tier.best .price {color: var(--mint);}
.tier .per {color: var(--mute); font-size: .9rem; margin-top: 2px;}
.tier.best .per {color: rgba(255,255,255,.7);}
.tier ul {list-style: none; margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px;}
.tier.best ul {border-top-color: rgba(255,255,255,.2);}
.tier li {position: relative; padding-right: 28px; line-height: 1.6;}
.tier li::before {content: ""; position: absolute; right: 3px; top: .5em; width: 12px; height: 6px; border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg);}
.tier li.gift {font-weight: 700;}
.tier li.gift::after {content: "هدية"; margin-right: 8px; font-size: .74rem; font-weight: 700; background: var(--mint); color: var(--navy); border-radius: 999px; padding: 2px 9px; vertical-align: middle;}
.tier .go {margin-top: auto; padding-top: 26px;}
.tiers-note {text-align: center; color: var(--mute); font-size: .92rem; margin: 26px auto 0; max-width: 40em;}

/* Local pilot pages reuse the application's colours and Readex face. */
.pilot-public .page {max-width: 1180px; margin: auto; padding: 22px 28px 40px;}
.pilot-header, .pilot-footer, .pilot-footer nav {display: flex; align-items: center; justify-content: space-between; gap: 24px;}
.pilot-header {padding-bottom: 28px; border-bottom: 1px solid var(--line);}
.pilot-header img {display: block; object-fit: contain;}
.pilot-header a, .pilot-footer a {text-decoration: none;}
.pilot-hero {display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 64px 0;}
.pilot-hero h1 {font-size: clamp(1.85rem, 3.4vw, 2.7rem); line-height: 1.55; margin: 10px 0 18px; color: var(--navy);}
.pilot-intro {font-size: 1.05rem; line-height: 1.9; margin-bottom: 26px;}
.pilot-public figure {margin: 0; min-width: 0;}
.pilot-public figure img {width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block;}
.pilot-public figcaption {font-size: .85rem; color: var(--mute); margin-top: 10px;}
.pilot-how, .pilot-samples {padding: 32px 0; border-top: 1px solid var(--line);}
.pilot-how ol {display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-right: 24px;}
.pilot-how li::marker {color: var(--teal); font-weight: 700;}
.pilot-how li span {display: block; margin-top: 8px; color: var(--mute);}
.pilot-sample-grid {display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0;}
.pilot-footer {margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--mute);}
.pilot-form {max-width: 560px; margin: 36px auto; padding: 28px;}
.pilot-form h1, .pilot-legal h1 {margin-top: 0; font-size: 1.7rem; color: var(--navy);}
.pilot-trap {position: fixed; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden;}
.pilot-consent, .pilot-choice {display: flex; gap: 10px; align-items: flex-start; margin: 18px 0;}
.pilot-consent input, .pilot-choice input {width: 18px; height: 18px; flex: none; margin-top: 4px;}
.pilot-legal {max-width: 800px; margin: 36px auto; padding: 30px; line-height: 1.9;}
.pilot-legal h2 {font-size: 1.15rem; margin-top: 28px;}
.pilot-feedback {max-width: 760px;}
.pilot-feedback fieldset, #deeds fieldset {border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 14px 0; min-width: 0;}
.pilot-funnel {display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;}
.pilot-funnel div {padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;}
.pilot-funnel b {display: block; font-size: 1.8rem; color: var(--navy);}
.pilot-lead {overflow-wrap: anywhere;}
.pilot-lead .row {margin-top: 12px;}
@media (max-width: 700px) {
  .pilot-public .page {padding: 18px 18px 32px;}
  .pilot-header {padding-bottom: 18px;}
  .pilot-hero {grid-template-columns: 1fr; padding: 32px 0; gap: 24px;}
  .pilot-how ol, .pilot-sample-grid {grid-template-columns: 1fr; gap: 24px;}
  .pilot-form, .pilot-legal {padding: 20px; margin-top: 24px;}
  .pilot-funnel {grid-template-columns: repeat(2, 1fr);}
  .pilot-footer {align-items: flex-start; flex-direction: column; gap: 14px;}
}
