@import url("fonts.css?v=2");
:root {
  --bg: #f6f4ee;
  --bg2: #efece3;
  --surface: #fffdf8;
  --surface2: #f1eee5;
  --ink: #11262a;
  --muted: #5a6d70;
  --line: #e0dccf;
  --primary: #0e7c73;
  --primary-ink: #fff;
  --accent: #2fa36b;
  --ok: #1f8a5b;
  --err: #c2412d;
  --glass: rgba(255,253,248,.72);
  --shadow: 0 10px 30px -12px rgba(17,38,42,.25);
  --shadow-s: 0 2px 8px -3px rgba(17,38,42,.18);
  --shine-a: #0e7c73;
  --shine-b: #2fa36b;
  --r: 18px;
  --r-s: 12px;
  --ease: cubic-bezier(.22,.8,.24,1);
  --f: "Thmanyah Sans","Segoe UI",Tahoma,sans-serif;
  --fd: "Thmanyah Display","Thmanyah Sans",sans-serif;
  --ft: "Thmanyah Text","Thmanyah Sans",sans-serif;
  color-scheme: light;
}
[data-theme=light] {
  color-scheme: light;
}
[data-theme=dark] {
  --bg: #0a1316;
  --bg2: #0d191d;
  --surface: #111f24;
  --surface2: #16282e;
  --ink: #e8f1ef;
  --muted: #8fa5a6;
  --line: #1f3338;
  --primary: #3fd0b4;
  --primary-ink: #06201b;
  --accent: #7ee2a8;
  --ok: #4ad28f;
  --err: #ff8068;
  --glass: rgba(17,31,36,.7);
  --shadow: 0 14px 34px -14px rgba(0,0,0,.7);
  --shadow-s: 0 2px 10px -3px rgba(0,0,0,.6);
  --shine-a: #3fd0b4;
  --shine-b: #7ee2a8;
  color-scheme: dark;
}
*, *::before, *::after {
  box-sizing:border-box
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust:100%
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-feature-settings: "salt" 1;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition:background .35s,color .35s
}
* {
  font-feature-settings:"salt" 1
}
main {
  flex: 1;
  padding-top:96px
}
a {
  color: inherit;
  text-decoration:none
}
img, svg {
  max-width:100%
}
h1, h2, h3, h4 {
  font-family: var(--fd);
  line-height: 1.35;
  margin: 0 0 .5em;
  font-weight:700
}
p {
  margin:0 0 1em
}
button, input, select, textarea {
  font: inherit;
  font-feature-settings: "salt" 1;
  color:inherit
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius:8px
}
.container {
  width: min(1180px,100% - 2rem);
  margin-inline:auto
}
.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -60px;
  background: var(--primary);
  color: var(--primary-ink);
  padding: .5rem 1rem;
  border-radius: 10px;
  z-index:200
}
.skip:focus {
  top:1rem
}
.ico {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex:none
}
.ico--sm {
  width: 16px;
  height:16px
}
.ico--lg {
  width: 30px;
  height:30px
}
.muted {
  color:var(--muted)
}
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events:none
}
.bg-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  animation:float 22s ease-in-out infinite
}
.bg-orbs i:nth-child(1) {
  width: 420px;
  height: 420px;
  background: var(--primary);
  top: -120px;
  inset-inline-start:-80px
}
.bg-orbs i:nth-child(2) {
  width: 360px;
  height: 360px;
  background: var(--accent);
  top: 40%;
  inset-inline-end: -120px;
  animation-delay: -8s;
  opacity:.18
}
.bg-orbs i:nth-child(3) {
  width: 300px;
  height: 300px;
  background: var(--primary);
  bottom: -100px;
  inset-inline-start: 30%;
  animation-delay: -14s;
  opacity:.14
}
[data-theme=dark] .bg-orbs i {
  opacity:.16
}
@keyframes float {
  50% {
    transform:translate(40px,30px) scale(1.08)
  }
}

/* header */
.header {
  position: fixed;
  top: 14px;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-inline: 14px;
  transition:top .3s
}
.header__pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(1100px,100%);
  padding: .55rem .7rem .55rem 1rem;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: width .45s var(--ease),padding .3s,box-shadow .3s;
  animation:dropin .8s var(--ease) both
}
.header.is-scrolled .header__pill {
  width: min(900px,100%);
  padding-block:.35rem
}
@keyframes dropin {
  from {
    opacity: 0;
    transform:translateY(-30px) scale(.96)
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--fd);
  font-weight: 900;
  font-size:1.25rem
}
.brand__mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: block;
  color: var(--primary);
  fill: none;
  transition:transform .5s var(--ease)
}
.brand:hover .brand__mark {
  transform:rotate(-12deg) scale(1.08)
}
.nav {
  display: flex;
  align-items: center;
  gap: .2rem;
  margin-inline-start:auto
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition:background .2s,color .2s
}
.nav__link:hover, .nav__link.is-active {
  background: var(--surface2);
  color:var(--ink)
}
.nav__drop {
  position:relative
}
.mega {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: -40px;
  width: min(640px,90vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .3rem;
  padding: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation:pop .25s var(--ease)
}
.mega[hidden] {
  display:none
}
@keyframes pop {
  from {
    opacity: 0;
    transform:translateY(-8px) scale(.98)
  }
}
.mega__item {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .6rem;
  border-radius: 14px;
  transition:background .2s
}
.mega__item:hover {
  background:var(--surface2)
}
.mega__item b {
  display: block;
  font-weight: 500;
  line-height:1.3
}
.mega__item small {
  color:var(--muted)
}
.mega__ico, .tcard__ico, .ccard__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb,var(--primary) 14%,transparent);
  color: var(--primary);
  flex:none
}
.header__actions {
  display: flex;
  gap:.3rem
}
.iconbtn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  transition:background .2s,transform .2s
}
.iconbtn:hover {
  background: var(--surface2);
  transform:scale(1.06)
}
.ico--moon {
  display:none
}
[data-theme=dark] .ico--sun {
  display:none
}
[data-theme=dark] .ico--moon {
  display:block
}
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items:center
}
.burger span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:transform .3s,opacity .3s
}
.burger[aria-expanded=true] span:nth-child(1) {
  transform:translateY(7px) rotate(45deg)
}
.burger[aria-expanded=true] span:nth-child(2) {
  opacity:0
}
.burger[aria-expanded=true] span:nth-child(3) {
  transform:translateY(-7px) rotate(-45deg)
}

/* hero */
.hero {
  padding: clamp(2rem,6vw,5rem) 0 2rem;
  text-align:center
}
.pill {
  display: inline-block;
  padding: .3rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb,var(--accent) 16%,transparent);
  color: var(--accent);
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: 1.2rem;
  border:1px solid color-mix(in srgb,var(--accent) 30%,transparent)
}
.hero__title {
  font-size: clamp(2rem,5.5vw,3.8rem);
  font-weight: 900;
  margin-bottom:.6em
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color:transparent
}
.hero__lead {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size:1.1rem
}
.hero__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  max-width: 640px;
  margin: 0 auto;
  padding: .45rem .5rem .45rem .45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition:border-color .2s,box-shadow .2s
}
.hero__tip {
  position: absolute;
  bottom: calc(100% + 12px);
  inset-inline-start: 50%;
  transform: translate(calc(50% + 22px), 6px) scale(.94);
  padding: .45rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s var(--ease), opacity .24s ease, visibility 0s .28s
}
.hero__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  inset-inline-start: 50%;
  transform: translateX(50%);
  border: 6px solid transparent;
  border-top-color: var(--ink)
}
.hero__tip.is-in {
  opacity: 1;
  visibility: visible;
  transform: translate(50%, 0) scale(1);
  transition: transform .28s var(--ease), opacity .24s ease, visibility 0s 0s
}
.hero__tip.is-out {
  opacity: 0;
  visibility: hidden;
  transform: translate(calc(50% - 22px), -6px) scale(.94);
  transition: transform .28s var(--ease), opacity .22s ease, visibility 0s .28s
}
.hero__tip--below {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translate(calc(50% + 22px), -6px) scale(.94)
}
.hero__tip--below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--ink)
}
.hero__tip--below.is-in {
  transform: translate(50%, 0) scale(1)
}
.hero__tip--below.is-out {
  transform: translate(calc(50% - 22px), 6px) scale(.94)
}
.hero__search:focus-within {
  border-color: var(--primary);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 18%,transparent)
}
.hero__search .ico {
  margin-inline-start: .9rem;
  color:var(--muted)
}
.hero__search input {
  flex: 1;
  border: 0;
  background: none;
  outline: 0;
  padding: .6rem .2rem;
  min-width:0
}
.hero__chips, .chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top:1.4rem
}
.chip {
  padding: .35rem .95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .92rem;
  transition:all .2s
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform:translateY(-2px)
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition:transform .2s,box-shadow .2s,background .2s
}
.btn--primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow:0 6px 16px -6px var(--primary)
}
.btn--primary:hover {
  transform:translateY(-2px)
}
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color:var(--ink)
}
.btn--ghost:hover {
  background:var(--surface2)
}
.btn--sm {
  padding: .35rem .9rem;
  font-size:.9rem
}

/* sections / cards */
.section {
  padding:2.5rem 0
}
.section--tight {
  padding:1rem 0 2rem
}
.section__head {
  margin-bottom:1.5rem
}
.section__head h2 {
  font-size: 1.7rem;
  margin-bottom:.2em
}
.section__head p {
  color: var(--muted);
  margin:0
}
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
  gap:1rem
}
.ccard {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .3s var(--ease),border-color .3s,box-shadow .3s;
  position: relative;
  overflow:hidden
}
.ccard:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow:var(--shadow)
}
.ccard b {
  font-family: var(--fd);
  font-size:1.15rem
}
.ccard__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .25rem;
}
.ccard__head b {
  line-height: 1.35;
}
.ccard small {
  color: var(--muted);
  line-height:1.6
}
.ccard__ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.ccard__ico:not(.ccard__ico--lg) .ico {
  width: 24px;
  height: 24px;
}
.ccard__ico--lg {
  width: 64px;
  height: 64px;
  border-radius:20px;
  margin-bottom:.4rem
}
.ccard__count {
  margin-top: auto;
  padding-top: .35rem;
  font-size: .85rem;
  color: var(--primary);
  font-weight:500
}
.tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(290px,1fr));
  gap:.9rem
}
.tcard {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  height: 100%;
  position: relative;
  transition:transform .25s var(--ease),border-color .25s,box-shadow .25s
}
.tcard:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow:var(--shadow-s)
}
.tcard__body b {
  display: block;
  font-weight: 500;
  line-height:1.4
}
.tcard__body small {
  color: var(--muted);
  line-height: 1.6;
  display: block;
  margin-top:.2rem
}
.tcard__tag {
  margin-inline-start: auto;
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top:.2rem
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap:1rem
}
.feature {
  padding: 1.5rem;
  border-radius: var(--r);
  background: linear-gradient(160deg,var(--surface),var(--surface2));
  border: 1px solid var(--line)
}
.feature__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .65rem
}
.feature__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb,var(--accent) 14%,transparent);
  color: var(--accent);
  flex: none
}
.feature .ico {
  color: var(--accent)
}
.feature b {
  font-family: var(--fd);
  font-size: 1.1rem;
  line-height: 1.35
}
.feature p {
  color: var(--muted);
  margin: 0
}

/* page head */
.pagehead {
  padding:1.5rem 0 1rem
}
.pagehead h1 {
  font-size: clamp(1.6rem,4vw,2.4rem);
  margin-bottom:.25em
}
.pagehead p {
  color: var(--muted);
  max-width: 720px;
  margin:0
}
.pagehead__row {
  display: flex;
  gap: 1.1rem;
  align-items:center
}
.crumbs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .88rem;
  margin-bottom:1rem
}
.crumbs a:hover {
  color:var(--primary)
}
.filter {
  margin-top: 1.2rem;
  max-width:420px
}
.filter input, .field input, .field select, .field textarea {
  width: 100%;
  padding: .7rem 1rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  outline: 0;
  transition:border-color .2s,box-shadow .2s
}
.filter input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)
}
.empty {
  text-align: center;
  color: var(--muted);
  padding:2rem
}

/* tool layout */
.toolwrap {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 1.5rem;
  align-items:start
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1rem,3vw,1.8rem);
  box-shadow:var(--shadow-s)
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: space-between;
  align-items: center;
  margin:1rem 0 2rem
}
.share {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap:wrap
}
.share__label {
  color: var(--muted);
  font-size: .9rem;
  margin-inline-end:.3rem
}
.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition:all .2s
}
.share__btn .ico {
  display:block
}
.share__btn:hover {
  background: var(--primary);
  color: var(--primary-ink);
  transform: translateY(-2px);
  border-color:var(--primary)
}
.side {
  position: sticky;
  top: 96px;
  display: grid;
  gap:1rem
}
.sidebox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding:1.1rem
}
.sidebox h3 {
  font-size: 1rem;
  margin-bottom:.7rem
}
.side__link {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding: .5rem .4rem;
  border-radius: 10px;
  transition:background .2s
}
.side__link:hover {
  background: var(--surface2);
  color:var(--primary)
}
.stars {
  display: flex;
  gap: .2rem;
  direction: ltr;
  justify-content:flex-end
}
.stars button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  padding:.1rem
}
.stars button.on {
  color:var(--accent)
}
.stars button.on .ico {
  fill:currentColor
}
.prose {
  margin-top: 1rem;
  line-height:1.95
}
.prose h2 {
  font-size: 1.4rem;
  margin-top:1.6rem
}
.prose ul, .prose ol {
  padding-inline-start:1.4rem
}
.prose--wide {
  max-width:780px
}
.faq {
  margin-top:2rem
}
.faq h2 {
  font-size:1.4rem
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  margin-bottom: .6rem;
  padding:.2rem 1rem
}
.faq summary {
  cursor: pointer;
  padding: .7rem 0;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap:1rem
}
.faq summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1;
  transition:transform .25s
}
.faq details[open] summary::after {
  transform:rotate(45deg)
}
.faq p {
  color:var(--muted)
}

/* forms / calculators */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:1rem
}
.field {
  display: block;
  margin-bottom:1rem
}
.field>span {
  display: block;
  margin-bottom: .35rem;
  font-weight: 500;
  font-size:.95rem
}
.field--row {
  display: flex;
  gap: .5rem;
  align-items:center
}
.calc__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .9rem 0;
  border-bottom:1px dashed var(--line)
}
.calc__row:last-of-type {
  border-bottom:0
}
.calc__row input {
  width: 130px;
  text-align: center;
  padding: .55rem .6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  outline:0
}
.calc__row input:focus {
  border-color:var(--primary)
}
.calc__row b {
  color:var(--primary)
}
.calc__out {
  display: inline-block;
  min-width: 90px;
  padding: .5rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb,var(--primary) 14%,transparent);
  color: var(--primary);
  font-weight: 700;
  font-family: var(--fd);
  text-align:center
}
.result {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: var(--r-s);
  background: color-mix(in srgb,var(--primary) 10%,var(--surface));
  border:1px solid color-mix(in srgb,var(--primary) 30%,transparent)
}
.result strong {
  font-size: 1.6rem;
  font-family:var(--fd)
}
.tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom:1rem
}
.tabs button {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  cursor:pointer
}
.tabs button.on {
  background: var(--primary);
  color: var(--primary-ink);
  border-color:var(--primary)
}
.alert {
  padding: .8rem 1rem;
  border-radius: var(--r-s);
  margin-bottom:1rem
}
.alert--ok {
  background: color-mix(in srgb,var(--ok) 15%,transparent);
  color:var(--ok)
}
.alert--err {
  background: color-mix(in srgb,var(--err) 15%,transparent);
  color:var(--err)
}
.hp {
  position: absolute;
  inset-inline-start: -9999px;
  height: 0;
  overflow:hidden
}
.num {
  direction: ltr;
  unicode-bidi:plaintext
}
input[type=number], input[inputmode=decimal], [dir=ltr] {
  font-feature-settings:"salt" 1
}

/* search overlay */
.sx {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  justify-items: center;
  align-items: start;
  padding:12vh 1rem 1rem
}
.sx[hidden] {
  display:none
}
.sx__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,12,14,.55);
  backdrop-filter: blur(6px);
  animation:fade .2s
}
.sx__panel {
  position: relative;
  width: min(640px,100%);
  max-width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: visible;
  animation:pop .25s var(--ease)
}
.sx__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  max-width: 100%;
  padding: .9rem 1.1rem;
  border-bottom:1px solid var(--line)
}
.sx__form input {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  max-width: 100%;
  border: 0;
  background: none;
  outline: 0;
  font-size:1.1rem
}
kbd {
  font-family: inherit;
  font-size: .72rem;
  padding: .1rem .45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color:var(--muted)
}
.sx__list {
  list-style: none;
  margin: 0;
  padding: .4rem;
  min-width: 0;
  max-width: 100%;
  max-height: 50vh;
  overflow:auto
}
.sx__list a {
  display: flex;
  gap: .7rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: .6rem .7rem;
  border-radius:12px
}
.sx__list a small {
  color: var(--muted);
  margin-inline-start:auto
}
.sx__list li.on a, .sx__list a:hover {
  background:var(--surface2)
}
.sx__hint {
  margin: 0;
  padding: .6rem 1.1rem;
  color: var(--muted);
  font-size: .85rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-top:1px solid var(--line)
}
@keyframes fade {
  from {
    opacity:0
  }
}

/* footer */
.footer {
  position: relative;
  margin-top: 4rem;
  padding-top: 3rem;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  overflow:hidden
}
.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap:2rem
}
.footer__col h4 {
  font-size: 1rem;
  margin-bottom:.8rem
}
.footer__col a:not(.share__btn):not(.brand) {
  display: block;
  color: var(--muted);
  padding: .2rem 0;
  transition:color .2s,transform .2s
}
.footer__col a:not(.share__btn):not(.brand):hover {
  color: var(--primary);
  transform:translateX(-4px)
}
.footer__col .brand--footer {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
}
.footer__col--brand p {
  color: var(--muted);
  max-width: 320px;
  margin-top:.8rem
}
.footer__brand-name {
  max-width: 560px;
  margin: 1.1rem auto 0;
  padding-inline:1rem
}
.footer__brand-name svg {
  width: 100%;
  height: auto;
  display:block
}
.footer__brand-name text {
  font-family: var(--fd);
  font-weight: 900;
  font-size: 118px;
  font-feature-settings:"salt" 1
}
.footer__brand-outline {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-linejoin:round
}
.footer__brand-shine {
  fill: none;
  stroke: url(#footerShine);
  stroke-width: 2.4;
  stroke-linejoin:round
}
.footer__glow {
  position: absolute;
  width: 500px;
  height: 260px;
  background: var(--primary);
  filter: blur(120px);
  opacity: .1;
  top: 0;
  inset-inline-start: 50%;
  transform: translateX(50%);
  pointer-events: none;
  z-index:0
}
.footer__bottom {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  color: var(--muted);
  font-size:.88rem
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap:.5rem
}
.errorpage {
  text-align: center;
  padding:4rem 0
}
.errorpage__code {
  font-family: var(--fd);
  font-weight: 900;
  font-size: clamp(5rem,18vw,10rem);
  line-height: 1;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color:transparent
}
.errorpage__act {
  display: flex;
  gap: .7rem;
  justify-content: center;
  margin-top:1.5rem
}
.toast {
  position: fixed;
  bottom: 24px;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 90vw;
  padding: .7rem 1.3rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all .3s var(--ease);
  z-index:400
}
.toast.show {
  opacity: 1;
  transform:none
}

/* reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease),transform .7s var(--ease);
  transition-delay:var(--d,0s)
}
.js .reveal.in {
  opacity: 1;
  transform:none
}
@media(max-width:900px) {
  .toolwrap {
    grid-template-columns:1fr
  }
  .side {
    position:static
  }
  .footer__grid {
    grid-template-columns:1fr 1fr
  }
  .nav {
    display:none
  }
  .header {
    flex-wrap:wrap
  }
  .header__pill {
    position:relative
  }
  .burger {
    display:flex
  }
  .mega {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    box-shadow: none;
    border: 0;
    padding:.2rem
  }
  .brand {
    margin-inline-end:auto
  }
  .nav {
    margin-inline-start:0
  }
}
@media(max-width:560px) {
  .grid2 {
    grid-template-columns:1fr
  }
  .footer__grid {
    grid-template-columns:1fr
  }
  .pagehead__row {
    align-items:flex-start
  }
  .ccard__ico--lg {
    width: 50px;
    height:50px
  }
  .hero__search .btn {
    padding-inline:1rem
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    animation: none!important;
    transition:none!important
  }
  .js .reveal {
    opacity: 1;
    transform:none
  }
}

/* ===== أدوات: مكوّنات مشتركة ===== */
.datef {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  min-width:0
}
.datef legend {
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: .35rem;
  padding:0
}
.datef__row {
  display: grid;
  grid-template-columns: .8fr 1.5fr 1fr;
  gap:.5rem
}
.datef input, .datef select, .field select {
  width: 100%;
  padding: .7rem .8rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  outline: 0;
  transition:border-color .2s,box-shadow .2s
}
.datef input:focus, .datef select:focus {
  border-color: var(--primary);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: .7rem;
  margin-top:.9rem
}
.stat {
  padding: .8rem 1rem;
  border-radius: var(--r-s);
  background: var(--surface);
  border:1px solid var(--line)
}
.stat small {
  display: block;
  color: var(--muted);
  font-size:.82rem
}
.stat b {
  font-family: var(--fd);
  font-size: 1.25rem;
  line-height:1.5
}
.stat--big {
  grid-column: 1/-1;
  background: color-mix(in srgb,var(--primary) 12%,var(--surface));
  border-color:color-mix(in srgb,var(--primary) 35%,transparent)
}
.stat--big b {
  font-size: 1.6rem;
  color:var(--primary)
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top:1rem
}
.note {
  margin-top: .9rem;
  padding: .7rem 1rem;
  border-radius: var(--r-s);
  background: color-mix(in srgb,var(--accent) 10%,transparent);
  border: 1px solid color-mix(in srgb,var(--accent) 28%,transparent);
  font-size: .9rem;
  color:var(--muted)
}
.cal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  text-align:center
}
.cal th {
  font-weight: 500;
  color: var(--muted);
  font-size: .85rem;
  padding:.3rem 0
}
.cal td {
  padding: .5rem .1rem;
  border-radius: 12px;
  background: var(--surface2);
  line-height: 1.2;
  font-size:1rem
}
.cal td small {
  display: block;
  font-size: .68rem;
  color:var(--muted)
}
.cal td.today {
  background: var(--primary);
  color:var(--primary-ink)
}
.cal td.today small {
  color:inherit
}
.cal td.empty {
  background:none
}
.cal td.fri {
  color:var(--accent)
}
.count {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .6rem;
  text-align:center
}
.count div {
  padding: 1rem .3rem;
  border-radius: var(--r-s);
  background: var(--surface2);
  border:1px solid var(--line)
}
.count b {
  display: block;
  font-family: var(--fd);
  font-size: clamp(1.5rem,5vw,2.4rem);
  line-height: 1.2;
  font-variant-numeric:tabular-nums
}
.count small {
  color:var(--muted)
}
.big {
  font-family: var(--fd);
  font-weight: 900;
  font-size: clamp(2rem,7vw,3.6rem);
  text-align: center;
  font-variant-numeric: tabular-nums;
  direction:ltr
}
.tbl {
  width: 100%;
  border-collapse:collapse
}
.tbl th, .tbl td {
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--line);
  text-align:start
}
.tbl th {
  color: var(--muted);
  font-weight: 500;
  font-size:.88rem
}
.tbl-wrap {
  overflow-x:auto
}
.btn--on {
  background: var(--primary);
  color:var(--primary-ink)
}
@media(max-width:560px) {
  .count {
    grid-template-columns:repeat(2,1fr)
  }
}
.calc__input {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 1.3rem;
  outline: 0;
  text-align:left
}
.calc__input:focus {
  border-color:var(--primary)
}
.calc__res {
  font-family: var(--fd);
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
  direction: ltr;
  padding: .5rem .2rem;
  min-height: 3.2rem;
  word-break: break-all;
  color:var(--primary)
}
.calc__res.err {
  font-size: 1rem;
  color: var(--err);
  font-weight:400
}
.keys {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: .5rem;
  direction:ltr
}
.key {
  padding: .8rem 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
  cursor: pointer;
  font-size: 1.05rem;
  transition:transform .12s,background .2s
}
.key:hover {
  background: var(--surface);
  transform:translateY(-1px)
}
.key:active {
  transform:scale(.96)
}
.k-eq {
  background: var(--primary);
  color: var(--primary-ink);
  border-color:var(--primary)
}
.k-op {
  color:var(--primary)
}
.k-del {
  color:var(--err)
}
.hist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  direction: ltr;
  text-align:left
}
.hist li {
  padding: .4rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  cursor:pointer
}
.hist li b {
  color:var(--ink)
}
.qibla {
  display: grid;
  place-items: center;
  margin:1.2rem 0
}
.qibla__dial {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: radial-gradient(circle,var(--surface2),var(--surface));
  transition:transform .3s
}
.qibla__n {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-weight:700
}
.qibla__needle {
  position: absolute;
  inset: 14px;
  transform-origin: center;
  transition:transform .5s var(--ease)
}
.qibla__needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  margin-left: -9px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom:96px solid var(--primary)
}
.qibla__needle::after {
  content: "🕋";
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  font-size:1.3rem
}

/* ===== بوصلة القبلة ===== */
:root {
  --q-face1: #fffdf8;
  --q-face2: #ece8dc;
  --q-ring: #cfc9b8;
  --q-tick: #9aa5a4;
  --q-tick-m: #11262a;
  --q-inner:#d9d4c4
}
[data-theme=dark] {
  --q-face1: #16292f;
  --q-face2: #0d1a1e;
  --q-ring: #25414a;
  --q-tick: #46636a;
  --q-tick-m: #cfe3df;
  --q-inner:#1f3a41
}
.qcompass {
  position: relative;
  max-width: 360px;
  margin:.5rem auto 1rem
}
.qsvg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  filter:drop-shadow(0 18px 30px rgba(0,0,0,.22))
}
.q-outer {
  fill: none;
  stroke: var(--q-ring);
  stroke-width:5
}
.q-face {
  stroke: var(--line);
  stroke-width:1
}
.tk {
  stroke: var(--q-tick);
  stroke-width: 1.2;
  stroke-linecap:round
}
.tk--m {
  stroke: var(--q-tick-m);
  stroke-width:2
}
.cl {
  fill: var(--ink);
  font-family: var(--fd);
  font-weight: 700;
  font-size:17px
}
.cl--n {
  fill:var(--err)
}
.q-inner {
  fill: none;
  stroke: var(--q-inner);
  stroke-width: 1;
  stroke-dasharray:3 5
}
.q-line {
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  opacity:.8
}
.q-badge {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width:2.5
}
.q-pointer {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
  stroke-linejoin:round
}
.q-hub {
  fill:var(--primary)
}
.q-hub2 {
  fill:var(--surface)
}
#qdial, #qmark {
  transition: transform .35s cubic-bezier(.22,.8,.24,1);
  transform-box: view-box;
  transform-origin:170px 170px
}
.qread {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  padding-top:78px
}
.qread b {
  font-family: var(--fd);
  font-size: 1.7rem;
  font-weight: 900;
  direction: ltr;
  color:var(--primary)
}
.qread small {
  color: var(--muted);
  font-size:.85rem
}
.qaligned {
  text-align: center;
  font-weight: 700;
  animation:pop .3s var(--ease)
}
.qc-on .q-pointer {
  fill:var(--ok)
}

/* ===== مواقيت الصلاة ===== */
.pcontrols {
  margin-bottom:1rem
}
.ploc {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .8rem;
  font-weight: 600;
  color:var(--primary)
}
.ploc .ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width:1.6
}
.pnext {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 1.4rem;
  border-radius: var(--r);
  background: linear-gradient(135deg,color-mix(in srgb,var(--primary) 22%,var(--surface)),color-mix(in srgb,var(--accent,var(--primary)) 10%,var(--surface)));
  border:1px solid color-mix(in srgb,var(--primary) 35%,transparent)
}
.pnext small {
  display: block;
  color:var(--muted)
}
.pnext b {
  font-family: var(--fd);
  font-size: 1.9rem;
  display: block;
  line-height:1.3
}
.pnext__cd {
  font-family: var(--fd);
  font-size: 2.3rem;
  color: var(--primary);
  letter-spacing: .04em;
  font-variant-numeric:tabular-nums
}
.parc {
  margin: 1rem auto 0;
  max-width:420px
}
.parc__svg {
  width: 100%;
  height: auto;
  display: block;
  overflow:visible
}
.parc__track {
  fill: none;
  stroke: var(--line);
  stroke-width: 3;
  stroke-dasharray: 2 7;
  stroke-linecap:round
}
.parc__done {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  transition:stroke-dasharray .8s ease
}
.parc__hor {
  stroke: var(--line);
  stroke-width:1.5
}
.parc__sun {
  transition:transform .8s ease,opacity .5s
}
.parc__core {
  fill:#f2b84b
}
.parc__rays line {
  stroke: #f2b84b;
  stroke-width: 2;
  stroke-linecap:round
}
.parc__sun.is-night {
  opacity:.35
}
.parc__lbl {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
  margin-top:.3rem
}
.plist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
@media(max-width:560px) {
  .plist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pcard {
  padding: 1rem;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  transition:transform .25s,border-color .25s,box-shadow .25s
}
.pcard small {
  display: block;
  color:var(--muted)
}
.pcard b {
  font-family: var(--fd);
  font-size: 1.3rem;
  display: block;
  margin-top:.2rem
}
.pcard__24 {
  display: block;
  margin-top: .18rem;
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pcard__tag {
  display: inline-block;
  margin-top: .35rem;
  padding: .12rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 700;
}
.pcard__tag[hidden] {
  display: none;
}
.pcard.is-next {
  border-color: var(--primary);
  box-shadow: 0 8px 24px color-mix(in srgb,var(--primary) 25%,transparent);
  transform:translateY(-3px)
}
.pcard.is-next b {
  color:var(--primary)
}
.pt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  padding: .85rem 1.05rem;
  margin-bottom: 1rem;
  border-radius: var(--r-s);
  background: var(--surface2);
  border: 1px solid var(--line);
}
.pt-head__info {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.pt-head__loc {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: var(--primary);
}
.pt-head__loc .ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex: none;
}
.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .68rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
  font-size: .82rem;
  color: var(--ink);
  font-weight: 600;
}
.pt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.05rem;
}
@media(max-width:560px) {
  .pt-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}
.pt-mcard {
  padding: .9rem 1rem;
  border-radius: var(--r-s);
  background: var(--surface2);
  border: 1px solid var(--line);
}
.pt-mcard small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .22rem;
}
.pt-mcard b {
  display: block;
  font-family: var(--fd);
  font-size: 1.04rem;
  color: var(--ink);
  line-height: 1.4;
}
.pt-mcard span {
  display: block;
  margin-top: .22rem;
  font-size: .82rem;
  color: var(--muted);
}
.pt-holidays {
  margin-top: .85rem;
  padding: .75rem 1rem;
  border-radius: var(--r-s);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  font-size: .9rem;
}
.pnote {
  margin-top: .8rem;
  text-align:center
}
.imtable-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius:var(--r-s)
}
.imtable {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width:620px
}
.imtable th, .imtable td {
  padding: .55rem .6rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space:nowrap
}
.imtable thead th {
  background: color-mix(in srgb,var(--primary) 12%,var(--surface));
  position: sticky;
  top:0
}
.imtable tr.is-today td {
  background: color-mix(in srgb,var(--primary) 16%,transparent);
  font-weight:700
}
.imtable tr:last-child td {
  border-bottom:0
}
@media(max-width:560px) {
  .pnext {
    justify-content: center;
    text-align:center
  }
  .pnext__cd {
    font-size:2rem
  }
}

/* ===== رسم بياني ===== */
.chartwrap {
  position:relative
}
.chart {
  width: 100%;
  height: auto;
  display: block;
  direction: ltr;
  touch-action:pan-y
}
.chart__grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray:3 5
}
.chart__line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation:chartdraw 1.1s ease forwards
}
.chart__area {
  opacity: 0;
  animation:chartfade .9s .5s ease forwards
}
.chart__dot {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width:3
}
.chart__lbl {
  fill: var(--muted);
  font-size: 11px;
  font-family:inherit
}
.chart__tip {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  background: var(--ink,#111);
  color: var(--surface);
  padding: .2rem .55rem;
  border-radius: 8px;
  font-size: .8rem;
  white-space: nowrap;
  pointer-events: none;
  direction:ltr
}
@keyframes chartdraw {
  to {
    stroke-dashoffset:0
  }
}
@keyframes chartfade {
  to {
    opacity:1
  }
}
@media(prefers-reduced-motion:reduce) {
  .chart__line {
    animation: none;
    stroke-dashoffset:0
  }
  .chart__area {
    animation: none;
    opacity:1
  }
}

/* ===== العملات ===== */
.fxrow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .8rem;
  align-items:end
}
.fxswap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:transform .35s,background .2s
}
.fxswap:hover {
  background:color-mix(in srgb,var(--primary) 12%,var(--surface))
}
.fxswap.is-spin {
  transform:rotate(180deg)
}
.fxswap svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width:1.7
}
.fxbig {
  display: block;
  font-family: var(--fd);
  font-size: clamp(1.6rem,6.5vw,2.2rem);
  color: var(--primary);
  line-height: 1.4;
  word-break:break-word
}
.fxsub {
  color:var(--muted)
}
.fxchips {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin:.8rem 0 .3rem
}
.chip {
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: var(--ink,inherit);
  transition:all .2s
}
.chip.is-on {
  background: var(--primary);
  color: #fff;
  border-color:var(--primary)
}
.fxtable {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: .6rem;
  margin-top:1rem
}
@media(max-width:560px) {
  .fxrow {
    grid-template-columns:1fr
  }
  .fxswap {
    justify-self: center;
    transform:rotate(90deg)
  }
  .fxswap.is-spin {
    transform:rotate(270deg)
  }
}
.rnsteps {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  direction: ltr;
  justify-content:center
}
.rnchip {
  padding: .5rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  animation:pop .35s ease backwards
}
.rnchip b {
  display: block;
  font-family: var(--fd);
  font-size: 1.3rem;
  color:var(--primary)
}
.rnchip small {
  color:var(--muted)
}
.nbcustom {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  font-family: monospace;
  font-size: 1.05rem;
  word-break: break-all;
  min-height:3rem
}
@keyframes pop {
  from {
    opacity: 0;
    transform:scale(.85)
  }
}
.fxltr {
  display: block;
  text-align:right
}

/* ===== تعليم ===== */
.gparows {
  display: grid;
  gap: .6rem;
  margin:.6rem 0
}
.gparow {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr .8fr auto;
  gap: .5rem;
  align-items:center
}
.gparow--4 {
  grid-template-columns:1.5fr 1fr 1fr 1fr auto
}
.gparow input, .gparow select {
  width: 100%;
  padding: .6rem .8rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  min-width:0
}
.gparow input:focus, .gparow select:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)
}
.gpax {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color:var(--muted)
}
.gpax:hover {
  color: var(--err);
  border-color:var(--err)
}
.gpawrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap:wrap
}
.gringbox {
  position: relative;
  width: 132px;
  height: 132px;
  flex:none
}
.gring {
  width: 100%;
  height:100%
}
.gring__bg {
  fill: none;
  stroke: var(--line);
  stroke-width:9
}
.gring__fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 9;
  stroke-linecap: round;
  transition:stroke-dasharray .8s ease
}
.gringval {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align:center
}
.gringval b {
  font-family: var(--fd);
  font-size: 1.9rem;
  color: var(--primary);
  line-height:1.1
}
.gringval small {
  color:var(--muted)
}
.gpainfo {
  display: grid;
  gap:.25rem
}
.gpaclass {
  display: inline-block;
  width: max-content;
  padding: .15rem .8rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size:.9rem
}
.gbar {
  height: 12px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-top:1rem
}
.gbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,var(--primary),#f2b84b);
  border-radius: 99px;
  transition:width .8s ease
}
@media(max-width:560px) {
  .gparow {
    grid-template-columns:1fr 1fr 70px auto
  }
  .gparow>input:first-child {
    grid-column:1/-1
  }
  .gparow--4 {
    grid-template-columns:1fr 1fr 1fr auto
  }
  .gparow--4>input:first-child {
    grid-column:1/-1
  }
  .gparow:not(.gparow--4)>.gpax {
    grid-column:auto
  }
}
.eqsteps {
  margin: 1rem 0 0;
  padding-inline-start: 1.4rem;
  display: grid;
  gap: .35rem;
  color:var(--muted)
}
.eqsteps li {
  animation:pop .3s ease backwards
}
.eqplot {
  margin-top:1rem
}
.sthist {
  display: flex;
  align-items: flex-end;
  gap: .35rem;
  height: 170px;
  margin-top: 1rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  direction:ltr
}
.sthist__col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap:.2rem
}
.sthist__col small {
  color: var(--muted);
  font-size:.75rem
}
.sthist__col i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg,var(--primary),color-mix(in srgb,var(--primary) 55%,transparent));
  border-radius: 6px 6px 0 0;
  transform-origin: bottom;
  animation: grow .6s ease backwards;
  min-height:2px
}
@keyframes grow {
  from {
    transform:scaleY(0)
  }
}
.fgin {
  display: grid;
  gap:.5rem
}
.fgrow {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: .6rem;
  align-items:center
}
.fgrow input {
  padding: .6rem .8rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  min-width:0
}
.fgrow input.is-bad {
  border-color:var(--err)
}
.fgdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display:block
}
.fgtip {
  margin:.6rem 0
}
.fgbox {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
  touch-action:none
}
.fgbox canvas {
  display: block;
  width: 100%;
  height: min(62vh,440px);
  cursor:grab
}
.fgctl {
  position: absolute;
  top: .6rem;
  inset-inline-start: .6rem;
  display: flex;
  gap:.3rem
}
.fgpos {
  position: absolute;
  bottom: .4rem;
  inset-inline-end: .6rem;
  font-size: .78rem;
  color: var(--muted);
  background: color-mix(in srgb,var(--surface) 80%,transparent);
  padding: .1rem .5rem;
  border-radius:8px
}

/* ===== أدوات الشبكة ===== */
.nform {
  display: flex;
  gap: .6rem;
  align-items:flex-end
}
.nform .field {
  flex: 1;
  margin:0
}
.nspin {
  display: flex;
  align-items: center;
  gap:.7rem
}
.nspin i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  animation:spin .8s linear infinite
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: .6rem;
  margin-top:.6rem
}
.kv__row {
  padding: .7rem .9rem;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width:0
}
.kv__row small {
  display: block;
  color: var(--muted);
  font-size:.8rem
}
.kv__row b {
  font-weight: 600;
  word-break: break-word;
  overflow-wrap:anywhere
}
.kv__row b.ok {
  color:var(--ok)
}
.kv__row b.bad {
  color:var(--err)
}
.kv__row b.warn {
  color:#c47a0c
}
.badge {
  display: inline-block;
  padding: .15rem .7rem;
  border-radius: 999px;
  font-size: .85rem;
  background: var(--line);
  margin-inline-end:.3rem
}
.badge.ok {
  background: color-mix(in srgb,var(--ok) 18%,transparent);
  color:var(--ok)
}
.badge.bad {
  background: color-mix(in srgb,var(--err) 18%,transparent);
  color:var(--err)
}
.badge.warn {
  background: #f6e2bd;
  color:#8a5a00
}
.ntable {
  width: 100%;
  border-collapse: collapse;
  margin-top: .5rem;
  font-size:.92rem
}
.ntable th, .ntable td {
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  overflow-wrap:anywhere
}
.ntable td.l {
  direction: ltr;
  text-align:left
}
.nsec {
  margin-top:1.1rem
}
.nsec h3 {
  font-size: 1rem;
  margin: 0 0 .3rem;
  color:var(--primary)
}
.chain {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top:.6rem
}
.chain div {
  direction: ltr;
  text-align: left;
  padding: .4rem .7rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-size:.88rem
}
.sgauge {
  position: relative;
  width: 150px;
  height: 150px;
  flex:none
}
.sgauge svg {
  width: 100%;
  height:100%
}
.score {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap:wrap
}
.chk {
  display: grid;
  gap: .45rem;
  margin-top:.8rem
}
.chk div {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .55rem .8rem;
  border-radius: var(--r-s);
  background: var(--surface);
  border:1px solid var(--line)
}
.chk i {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  color: #fff;
  font-size: .8rem;
  margin-top:.1rem
}
.chk .ok i {
  background:var(--ok)
}
.chk .bad i {
  background:var(--err)
}
.chk .warn i {
  background:#d9822b
}
.chk span {
  overflow-wrap:anywhere
}
.spd {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .7rem;
  margin-top:1rem
}
.spd__c {
  padding: 1rem;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align:center
}
.spd__c small {
  color: var(--muted);
  display:block
}
.spd__c b {
  font-family: var(--fd);
  font-size: 1.8rem;
  color: var(--primary);
  display: block;
  line-height:1.4
}
.spd__c em {
  font-style: normal;
  color: var(--muted);
  font-size:.85rem
}
.dial {
  width: min(320px,80vw);
  margin: 1rem auto 0;
  display:block
}
.dial__bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 14;
  stroke-linecap:round
}
.dial__fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 14;
  stroke-linecap: round;
  transition:stroke-dashoffset .35s ease
}
.dial text {
  font-family: var(--fd);
  fill:var(--primary)
}
@media(max-width:560px) {
  .nform {
    flex-direction: column;
    align-items:stretch
  }
  .spd {
    grid-template-columns:1fr
  }
}
.pwwrap {
  display: flex;
  gap:.5rem
}
.pwwrap input {
  flex:1
}

/* developers & text tools */
.field textarea {
  min-height: 9rem;
  resize: vertical;
  line-height:1.6
}
.field textarea.mono, .codeout {
  font-family: ui-monospace,Menlo,Consolas,monospace;
  font-feature-settings: normal;
  font-size:.9rem
}
.codeout {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: .9rem 1rem;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 22rem;
  overflow: auto;
  margin:0
}
.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin:.9rem 0
}
.btnrow .btn {
  padding:.55rem 1.1rem
}
.swatch {
  height: 5.5rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  transition:background .35s
}
.kvrow {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .6rem 0;
  border-bottom:1px dashed var(--line)
}
.kvrow:last-child {
  border:0
}
.kvrow b {
  direction: ltr;
  word-break: break-all;
  text-align:left
}
.kvrow button {
  flex:none
}
.mark {
  background: color-mix(in srgb,var(--primary) 30%,transparent);
  border-radius: 3px;
  padding:0 2px
}
.dadd {
  background:color-mix(in srgb,#2ea66a 22%,transparent)
}
.ddel {
  background:color-mix(in srgb,#d9534f 22%,transparent)
}
.diffline {
  padding: .15rem .6rem;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace,Menlo,Consolas,monospace;
  font-size: .85rem;
  white-space: pre-wrap;
  word-break:break-all
}
.check {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .4rem 0;
  cursor:pointer
}
.check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color:var(--primary)
}
input[type=range] {
  width: 100%;
  accent-color:var(--primary)
}
.pgbar {
  height: .55rem;
  border-radius: 99px;
  background: var(--surface2);
  margin: .9rem 0 .5rem;
  overflow:hidden
}
.pgbar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition:width .4s,background .4s
}
.ubars {
  display: flex;
  gap: .4rem;
  align-items: flex-end;
  height: 9rem;
  margin: 1rem 0;
  direction:ltr
}
.ubar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap:.3rem
}
.ubar i {
  display: block;
  width: 100%;
  max-width: 2rem;
  background: var(--primary);
  border-radius: 6px 6px 2px 2px;
  transition:height .5s
}
.ubar small {
  font-size: .6rem;
  color: var(--muted);
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform:rotate(180deg)
}
.ogcard {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  max-width: 30rem;
  background: var(--surface);
  margin-bottom:1rem
}
.ogcard__img {
  height: 9rem;
  display: grid;
  place-items: center;
  background: var(--surface2);
  color:var(--muted)
}
.ogcard__body {
  padding:1rem
}
.ogcard__body small {
  color: var(--muted);
  letter-spacing:.05em
}
.ogcard__body b {
  display: block;
  margin:.3rem 0
}
.checks {
  list-style: none;
  padding: 0;
  margin:0
}
.checks li {
  padding:.35rem 0
}
.checks .ok {
  color:var(--ok)
}
.checks .warn {
  color:#c9801f
}

/* ===== الحسابات ===== */
.authbox {
  max-width: 30rem;
  margin-inline:auto
}
.btn--block {
  width:100%
}
.btn--danger {
  background: #c0392b;
  color:#fff
}
.btn--danger:hover {
  filter:brightness(1.1)
}
.authlinks {
  text-align: center;
  margin-top: 1rem;
  color:var(--muted)
}
.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow:hidden
}
.hint {
  display: block;
  margin-top: .3rem;
  color: var(--muted);
  font-size:.85rem
}
.alert {
  padding: .75rem 1rem;
  border-radius: var(--r-s);
  margin-bottom: 1rem;
  border:1px solid
}
.alert--err {
  background: color-mix(in srgb,#c0392b 12%,var(--surface));
  border-color:color-mix(in srgb,#c0392b 40%,transparent)
}
.alert--ok {
  background: color-mix(in srgb,var(--primary) 12%,var(--surface));
  border-color:color-mix(in srgb,var(--primary) 40%,transparent)
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom:1.2rem
}
.subnav__a {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition:background .2s,transform .2s
}
.subnav__a:hover {
  transform:translateY(-1px)
}
.subnav__a.is-active {
  background: var(--primary);
  color: var(--primary-ink);
  border-color:transparent
}
.subnav__out {
  margin-inline-start:auto
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(10rem,1fr));
  gap: .75rem;
  margin-bottom:1rem
}
.section .panel+.panel {
  margin-top:1rem
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap:.5rem
}
.chip {
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--surface2);
  border:1px solid var(--line)
}
.cut {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space:nowrap
}
.panel--danger {
  border-color:color-mix(in srgb,#c0392b 45%,var(--line))
}
.switchrow {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content:space-between
}
.switchrow p {
  margin:.2rem 0 0
}
.switch {
  position: relative;
  display: inline-block;
  flex: none;
  cursor:pointer
}
.switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor:pointer
}
.switch__track {
  display: block;
  width: 3.2rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--line);
  transition:background .35s
}
.switch__thumb {
  position: absolute;
  top: .2rem;
  inset-inline-start: .2rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition:inset-inline-start .35s cubic-bezier(.4,1.4,.5,1)
}
.switch input:checked~.switch__track {
  background:var(--primary)
}
.switch input:checked~.switch__track .switch__thumb {
  inset-inline-start:1.6rem
}
.switch input:focus-visible~.switch__track {
  outline: 2px solid var(--primary);
  outline-offset:3px
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip:rect(0 0 0 0)
}

/* شريط الإعلان العلوي */
.top-banners {
  padding-top:92px
}
.top-banners~main {
  padding-top:16px
}
.annbar {
  padding: .55rem 1rem;
  text-align: center;
  font-size: .95rem;
  background: color-mix(in srgb,var(--primary) 16%,var(--surface));
  border-block:1px solid var(--line)
}
.annbar a {
  margin-inline-start: .5rem;
  text-decoration:underline
}
.annbar--success {
  background:color-mix(in srgb,#2e9e6b 18%,var(--surface))
}
.annbar--warning {
  background:color-mix(in srgb,#d9a21b 22%,var(--surface))
}
.ratefix {
  margin-top:.8rem
}
.ratefix[hidden] {
  display:none
}
.ratefix textarea {
  min-height:4rem
}
.adslot {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-s);
  text-align: center;
  background:var(--surface)
}
.adslot img {
  max-width: 100%;
  height: auto;
  border-radius:var(--r-s)
}
.adslot small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  margin-top:.3rem
}
.nudge {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0,0,0,.45);
  backdrop-filter:blur(3px)
}
.nudge[hidden] {
  display:none
}
.nudge__box {
  position: relative;
  max-width: 30rem;
  width: 100%;
  padding: 1.6rem;
  border-radius: var(--r-l,18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation:nudgein .35s ease
}
.nudge__box h2 {
  margin: 0 0 .5rem;
  font-size:1.25rem
}
.nudge__box p {
  margin: 0 0 1rem;
  color:var(--muted)
}
.nudge__act {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .5rem
}
.nudge__act > .btn {
  flex: 1 1 0;
  white-space: nowrap;
  justify-content: center;
  padding-inline: .75rem
}
@media (max-width: 380px) {
  .nudge__act {
    flex-wrap: wrap
  }
}
.nudge__x {
  position: absolute;
  inset-block-start: .5rem;
  inset-inline-end: .7rem;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor:pointer
}
body.nudge-open {
  overflow:hidden
}
@keyframes nudgein {
  from {
    opacity: 0;
    transform:translateY(12px) scale(.97)
  }
  to {
    opacity: 1;
    transform:none
  }
}
@media (prefers-reduced-motion:reduce) {
  .nudge__box {
    animation:none
  }
}

/* ===== درج القائمة للموبايل ===== */
.drawer__ov, .adm__overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5,12,14,.55);
  backdrop-filter: blur(2px);
  animation:fadein .25s ease
}
.drawer__ov[hidden], .adm__overlay[hidden] {
  display:none
}
@keyframes fadein {
  from {
    opacity:0
  }
}
.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 130;
  width: min(20rem,86vw);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .32s var(--ease),visibility 0s .32s;
  padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
  padding-inline-start:env(safe-area-inset-right)
}
.drawer.open {
  transform: none;
  visibility: visible;
  transition:transform .32s var(--ease)
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem .8rem;
  border-bottom:1px solid var(--line)
}
.drawer__nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .6rem .7rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap:.15rem
}
.drawer__t {
  margin: .9rem .5rem .3rem;
  font-size: .78rem;
  letter-spacing: .02em;
  color:var(--muted)
}
.drawer__a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .8rem;
  border-radius: var(--r-s);
  transition:background .2s
}
.drawer__a:hover {
  background:var(--surface2)
}
.drawer__a .ico {
  color: var(--primary);
  width: 20px;
  height:20px
}
.drawer__a small {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: .78rem;
  background: var(--surface2);
  padding: 0 .5rem;
  border-radius:999px
}
body.drawer-lock, body.adm-lock {
  overflow:hidden
}
@media(min-width:901px) {
  .drawer, .drawer__ov {
    display:none
  }
}
.brand__mark {
  background:none
}

/* ===== لوحة الحساب ===== */
.acct {
  display: grid;
  grid-template-columns: 15.5rem minmax(0,1fr);
  gap: 1.4rem;
  align-items:start
}
.acct__side {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  max-height: calc(100dvh - 7.5rem);
  overflow:auto
}
.acct__card, .acct__nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow:var(--shadow-s)
}
.acct__card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding:.9rem
}
.acct__card b {
  display: block;
  line-height:1.3
}
.acct__card small {
  color:var(--muted)
}
.acct__nav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding:.5rem
}
.acct__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .6rem .8rem;
  border-radius: var(--r-s);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: start;
  transition:background .2s,color .2s
}
.acct__link .ico {
  width: 20px;
  height: 20px;
  color:var(--muted)
}
.acct__link:hover {
  background:var(--surface2)
}
.acct__link.is-active {
  background: var(--primary);
  color:var(--primary-ink)
}
.acct__link.is-active .ico {
  color:inherit
}
.acct__out {
  margin-top: .3rem;
  padding-top: .3rem;
  border-top:1px solid var(--line)
}
.acct__main {
  min-width:0
}
.adm__av {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 55%,var(--accent)));
  color: var(--primary-ink);
  font-family: var(--fd);
  font-weight: 900;
  font-size:1.1rem
}
.acct .statgrid {
  grid-template-columns:repeat(auto-fit,minmax(10rem,1fr))
}
@media(max-width:860px) {
  .acct {
    grid-template-columns: minmax(0,1fr);
    gap:1rem
  }
  .acct__side {
    position: static;
    max-height:none
  }
  .acct__card {
    display:none
  }
  .acct__nav {
    flex-direction: row;
    overflow-x: auto;
    gap: .3rem;
    padding: .4rem;
    scrollbar-width:none
  }
  .acct__link {
    width: auto;
    white-space: nowrap;
    flex:none
  }
  .acct__out {
    margin: 0;
    padding: 0;
    border:0
  }
}
.votelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap:.5rem
}
.votelist li {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background:var(--surface)
}
.votelist form {
  margin:0
}
.votebtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  min-width: 3rem;
  padding: .35rem .5rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition:transform .2s,background .2s,color .2s
}
.votebtn:hover {
  transform:translateY(-2px)
}
.votebtn.is-on {
  background: var(--primary);
  color: var(--primary-ink);
  border-color:transparent
}
.votebtn .ico {
  width: 18px;
  height:18px
}
.votebtn b {
  font-family: var(--fd);
  line-height:1.2
}
.small {
  font-size:.85rem
}

/* لوحة المستخدم: ألوان الصور الرمزية، الإشعارات، قوائم */
.av-1 {
  --av:#0e7c73
}
.av-2 {
  --av:#2f6fd6
}
.av-3 {
  --av:#c2412d
}
.av-4 {
  --av:#d98324
}
.av-5 {
  --av:#1f8a5b
}
.av-6 {
  --av:#8a5a2b
}
.av-7 {
  --av:#b0457a
}
.av-8 {
  --av:#475569
}
.adm__av[class*="av-"] {
  background:var(--av,linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 55%,var(--accent))))
}
html.fs-sm {
  font-size:93.75%
}
html.fs-lg {
  font-size:112.5%
}
.avpick {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items:center
}
.avpick legend {
  width: 100%;
  margin-bottom: .4rem;
  color:var(--muted)
}
.avpick label {
  cursor:pointer
}
.avpick input {
  position: absolute;
  opacity: 0;
  pointer-events:none
}
.avpick input:checked+.adm__av {
  outline: 3px solid var(--primary);
  outline-offset:2px
}
.avpick input:focus-visible+.adm__av {
  outline: 3px solid var(--accent);
  outline-offset:2px
}
.notiflist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap:.7rem
}
.notiflist li {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background:var(--surface)
}
.notiflist li.is-new {
  border-inline-start:4px solid var(--primary)
}
.notiflist p {
  margin:.3rem 0
}
.notiflist small {
  color:var(--muted)
}
.toplist {
  margin: 0;
  padding-inline-start: 1.3rem;
  display: grid;
  gap:.4rem
}
.toplist b {
  color: var(--muted);
  margin-inline-start:.4rem
}
.secretbox {
  padding: .9rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-s);
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: .08em;
  overflow-wrap:anywhere
}
.inlineform {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items:center
}
.linkact .rowform {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items:center
}
.linkact select {
  max-width:8rem
}
.section .grid2>.panel, .grid2>.panel {
  margin:0
}
@media(max-width:760px) {
  .acct .tbl-wrap:has(.tbl--card) {
    overflow:visible
  }
  .acct .tbl--card thead {
    display:none
  }
  .acct .tbl--card, .acct .tbl--card tbody, .acct .tbl--card tr, .acct .tbl--card td {
    display: block;
    width:100%
  }
  .acct .tbl--card tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .2rem .8rem;
    padding: .9rem;
    margin-bottom: .7rem;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background:var(--surface)
  }
  .acct .tbl--card td {
    border: 0;
    padding: .15rem 0;
    min-width: 0;
    overflow-wrap:anywhere
  }
  .acct .tbl--card td::before {
    content: attr(data-l);
    display: block;
    font-size: .74rem;
    color:var(--muted)
  }
  .acct .tbl--card td:first-child, .acct .tbl--card td:last-child {
    grid-column:1/-1
  }
  .acct .tbl--card td:last-child {
    margin-top: .4rem;
    padding-top: .6rem;
    border-top:1px solid var(--line)
  }
  .acct .tbl--card td:last-child::before {
    display:none
  }
}

/* أدوات الصور */
.imgdrop {
  display: grid;
  place-items: center;
  min-height: 9rem;
  padding: 1.4rem;
  border: 2px dashed var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition:border-color .2s,background .2s
}
.imgdrop:hover, .imgdrop.is-over, .imgdrop:focus-within {
  border-color: var(--primary);
  background:color-mix(in srgb,var(--primary) 8%,var(--surface))
}
.imgdrop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity:0
}
.imgdrop__msg {
  margin:0
}
.imgdrop__err {
  color: var(--err);
  margin: .4rem 0 0;
  min-height:1.2em
}
.imglist {
  display: grid;
  gap: .6rem;
  margin:1rem 0
}
.imgrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background:var(--surface)
}
.imgrow__th {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-2,var(--line));
  flex:none
}
.imgrow__t {
  flex: 1;
  min-width: 0;
  display:grid
}
.imgrow__t b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space:nowrap
}
.imgrow__a {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content:flex-end
}
.imgprev {
  display: grid;
  place-items: center;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background:repeating-conic-gradient(var(--line) 0 25%,transparent 0 50%) 0 0/16px 16px
}
.imgprev img {
  max-width: 100%;
  max-height: 360px;
  height:auto
}
.cpwrap {
  margin:1rem 0
}
.cpcanvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-s);
  cursor: crosshair;
  border:1px solid var(--line)
}
.cppal {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin:.6rem 0
}
.cpchip {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor:pointer
}
.cpchip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset:2px
}
.cpout {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items:center
}
.cpsw {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-s);
  border:1px solid var(--line)
}
.cpvals {
  display: flex;
  flex-wrap: wrap;
  gap:.4rem
}
@media(max-width:560px) {
  .imgrow {
    flex-wrap:wrap
  }
  .imgrow__a {
    width: 100%;
    justify-content:flex-start
  }
}

/* مراجعة التصميم: منع تمدد الأعمدة بسبب جداول عريضة، وترتيب صف المشاركة في الفوتر */
.toolcol, .toolcol>* {
  min-width:0
}
.footer .share {
  margin-top:.9rem
}
@media(max-width:560px) {
  .footer .share__label {
    flex-basis: 100%;
    margin:0 0 .1rem
  }
}
.section .panel+.grid2, .section .grid2+.panel, .section .grid2+.grid2 {
  margin-top:1rem
}

/* صقل النتائج (يشمل كل الأدوات) */
.result {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -18px color-mix(in srgb,var(--primary) 60%,transparent);
  line-height:1.9
}
.result::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background:linear-gradient(var(--primary),var(--accent,var(--primary)))
}
.result--in {
  animation:resin .55s var(--ease) both
}
@keyframes resin {
  from {
    opacity: 0;
    transform:translateY(10px) scale(.985)
  }
}
.result__bar {
  display: flex;
  justify-content: flex-end;
  margin-top:.5rem
}
.result .stat {
  transition:transform .25s var(--ease),box-shadow .25s,border-color .25s
}
.result .stat:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow:0 8px 20px -12px color-mix(in srgb,var(--primary) 70%,transparent)
}
.stat--big b {
  font-size:clamp(1.5rem,5vw,2.1rem)
}
.toolcol .actions .btn:active {
  transform:scale(.97)
}
.toolcol .btn--primary {
  box-shadow:0 8px 22px -10px color-mix(in srgb,var(--primary) 80%,transparent)
}
img.brand__mark--img {
  object-fit: contain;
  border-radius: 10px;
  fill:none
}
img.brand__mark--default {
  border-radius: 0;
}
.adm .panel--inner {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius:var(--r-s)
}
.result__bar[hidden] {
  display:none
}
@media (max-width:900px) {
  .acct__nav {
    flex-wrap: wrap;
    overflow:visible
  }
  .acct__link {
    flex: 1 1 auto;
    justify-content:center
  }
}
.result--empty, .result:empty {
  display:none
}
.imgrow__ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: color-mix(in srgb,var(--err) 12%,var(--surface));
  color: var(--err);
  font-weight: 700;
  font-family: var(--fd);
  font-size:.9rem
}
.cropbox {
  position: relative;
  display: block;
  width: 100%;
  max-width: 720px;
  margin: .8rem auto;
  line-height: 0;
  border-radius: var(--r-s);
  overflow: hidden;
  background: repeating-conic-gradient(var(--line) 0 25%,transparent 0 50%) 0 0/16px 16px;
  user-select: none;
  -webkit-user-select:none
}
.cropbox img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events:none
}
.cropsel {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  cursor: move;
  touch-action: none;
  outline-offset:2px
}
.cropsel:focus-visible {
  outline:3px solid var(--primary)
}
.cropsel::before, .cropsel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:linear-gradient(#fff6,#fff6) 33.3% 0/1px 100% no-repeat,linear-gradient(#fff6,#fff6) 66.6% 0/1px 100% no-repeat
}
.cropsel::after {
  background:linear-gradient(#fff6,#fff6) 0 33.3%/100% 1px no-repeat,linear-gradient(#fff6,#fff6) 0 66.6%/100% 1px no-repeat
}
.cropsel i {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  touch-action:none
}
.cropsel i[data-h=nw] {
  left: -13px;
  top: -13px;
  cursor:nwse-resize
}
.cropsel i[data-h=ne] {
  right: -13px;
  top: -13px;
  cursor:nesw-resize
}
.cropsel i[data-h=sw] {
  left: -13px;
  bottom: -13px;
  cursor:nesw-resize
}
.cropsel i[data-h=se] {
  right: -13px;
  bottom: -13px;
  cursor:nwse-resize
}
.btn--primary[data-fav] .ico, .btn.is-on[data-fav] .ico {
  fill:currentColor
}
.suggest {
  align-items:stretch
}
@media(min-width:561px) {
  .suggest {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)
  }
}
.suggest>.panel {
  height: 100%;
  display: flex;
  flex-direction:column
}
.suggest__note {
  margin: 1.15rem 0 0;
  padding: .65rem .9rem;
  border-radius: var(--r-s);
  background: color-mix(in srgb,var(--accent) 10%,transparent);
  border: 1px solid color-mix(in srgb,var(--accent) 26%,transparent);
  color: var(--ink);
  font-size: .88rem;
  line-height:1.6
}
.suggest .votelist {
  max-height: 19rem;
  overflow-y: auto;
  padding-inline-end:.25rem
}
.votelist .pill {
  margin: 0 .35rem;
  padding: .15rem .65rem;
  font-size: .78rem;
  line-height: 1.4;
  vertical-align:middle
}
.acct .btnrow {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items:center
}
.acct .tbl th, .acct .tbl td {
  text-align: center;
  vertical-align: middle;
  padding:.72rem .65rem
}
.acct .tbl td [dir=ltr] {
  display: inline-block;
  direction: ltr;
  unicode-bidi:isolate
}
.acct .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: .22rem .75rem;
  font-size: .82rem;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
  background: var(--surface2);
  border: 1px solid var(--line);
  color:var(--ink)
}
.acct .pill--ok {
  background: color-mix(in srgb,var(--primary) 14%,var(--surface));
  color: var(--primary);
  border-color:color-mix(in srgb,var(--primary) 30%,transparent)
}
.acct .pill--bad {
  background: color-mix(in srgb,var(--err) 14%,var(--surface));
  color: var(--err);
  border-color:color-mix(in srgb,var(--err) 30%,transparent)
}
.acct .pill--warn {
  background: color-mix(in srgb,#d98324 16%,var(--surface));
  color: #b86812;
  border-color:color-mix(in srgb,#d98324 35%,transparent)
}
[data-theme=dark] .acct .pill--warn {
  color:#f5b041
}
.acct .linkact .rowform, .acct__acts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content:center
}
.acct__logout-all {
  margin-top:1.1rem
}
.acct__iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius:999px
}
.acct__modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5,12,14,.55);
  backdrop-filter:blur(6px)
}
.acct__modal[hidden] {
  display:none
}
.acct__modalbox {
  width: min(34rem,100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.45rem;
  animation:pop .22s var(--ease)
}
.acct__modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom:1px solid var(--line)
}
.acct__modalhead h3 {
  margin: 0;
  font-size:1.12rem
}
.acct__modalfoot {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
  margin-top:1.1rem
}
.acct__urlbox {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface2);
  margin-bottom:.9rem
}
.acct__urltxt {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-size: .92rem;
  text-align:left
}
.acct__urllbl {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom:.35rem
}

/* تحسين واجهات الأدوات: أزرار، حقول نصوص، مربعات رفع الملفات */
.toolcol .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: .95rem 0;
  align-items: center;
}
.toolcol .actions .btn,
.toolcol .btnrow .btn {
  padding: .58rem 1.15rem;
}
.btn--xs {
  padding: .25rem .6rem !important;
  font-size: .78rem !important;
  border-radius: 8px;
}
.ta-tools {
  display: flex;
  gap: .4rem;
  justify-content: flex-end;
  margin-top: .35rem;
}
.toolcol input[type="color"] {
  width: 100%;
  min-height: 2.75rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  cursor: pointer;
}
.filedrop {
  position: relative;
  min-height: 8.5rem;
  gap: .35rem;
  margin-bottom: .9rem;
}
.filedrop__ico {
  font-size: 2rem;
  line-height: 1;
}
.filedrop__meta {
  font-size: .82rem;
}
.filedrop.has-file {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

/* لوحة المستخدم: قوائم تفاعلية قابلة للبحث والتمرير + ترقيم الصفحات + تجاوب الموبايل */
.acct-panelhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .8rem;
}
.acct-panelhead h2 {
  margin: 0;
}
.acct-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface2));
  color: var(--primary);
}
.acct-search {
  position: relative;
  margin-bottom: .75rem;
}
.acct-search input {
  width: 100%;
  padding: .55rem .85rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
}
.acct-search input:focus {
  outline: none;
  border-color: var(--primary);
}
.acct-scroll {
  max-height: 330px;
  overflow-y: auto;
  display: grid;
  gap: .55rem;
  padding-inline-end: 4px;
}
.acct-scroll::-webkit-scrollbar {
  width: 6px;
}
.acct-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}
.acct-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .68rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  transition: border-color .18s, background .18s, transform .18s;
}
.acct-item[hidden],
[data-search-empty][hidden] {
  display: none !important;
}
.acct-search-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r-s);
  margin: 0;
  font-size: .95rem;
}
.acct-item:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.acct-item__info {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: .18rem;
}
.acct-item__title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-item__title:hover {
  color: var(--primary);
}
.acct-item__sub {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
}
.acct-item__cat {
  display: inline-block;
  padding: .08rem .45rem;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--line);
  font-size: .75rem;
}
.acct-item__acts {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: none;
}
.acct-item__count {
  min-width: 2.2rem;
  text-align: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface2));
  color: var(--primary);
  font-weight: 700;
  font-size: .85rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-top: .95rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}
.pager__btns {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 .65rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}
.pager__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pager__btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}
.pager__btn.is-disabled {
  opacity: .45;
  pointer-events: none;
}

@media (max-width: 900px) {
  .acct__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .55rem;
    overflow: visible;
  }
  .acct__link {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
    padding: .62rem .75rem;
    font-size: .9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--surface);
  }
  .acct__out {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: .2rem;
    padding-top: .5rem;
    border-top: 1px solid var(--line);
  }
  .acct__out .acct__link {
    justify-content: center;
  }
  .acct .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .acct .tbl:not(.tbl--card) {
    min-width: 480px;
  }
  .acct .tbl:not(.tbl--card) th,
  .acct .tbl:not(.tbl--card) td {
    white-space: nowrap;
  }
}

/* توحيد وتحسين تصميم القوائم المنسدلة select في الوضعين الفاتح والداكن */
select,
.field select,
.datef select,
.gparow select,
.linkact select,
.acct select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: .65rem 1rem .65rem 2.35rem;
  min-height: 2.75rem;
  line-height: 1.5;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    left 1.05rem center,
    left .72rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color .2s, box-shadow .2s;
}
select:hover,
.field select:hover,
.datef select:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
}
select:focus,
.field select:focus,
.datef select:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
select[multiple],
.field select[multiple] {
  appearance: auto;
  -webkit-appearance: auto;
  background-image: none;
  padding: .6rem .85rem;
}
.datef select,
.gparow select,
.linkact select {
  padding-inline-end: .75rem;
  padding-inline-start: 2rem;
}
select option,
select optgroup {
  background-color: var(--surface);
  color: var(--ink);
}
[data-theme="light"] select,
[data-theme="light"] .field select,
[data-theme="light"] .datef select,
[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: #fffdf8;
  color: #11262a;
}
[data-theme="dark"] select,
[data-theme="dark"] .field select,
[data-theme="dark"] .datef select,
[data-theme="dark"] select option,
[data-theme="dark"] select optgroup {
  background-color: #111f24;
  color: #e8f1ef;
}

/* توحيد تصميم حقول الإدخال والنصوص داخل الأدوات (سواء داخل .field أو منفردة) + مسرح لعبة الذاكرة */
.toolcol input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]),
.toolcol textarea {
  width: 100%;
  padding: .72rem 1rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.toolcol input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]):focus,
.toolcol textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.toolcol input:disabled,
.toolcol textarea:disabled {
  opacity: .58;
  cursor: not-allowed;
  background: var(--surface2);
}
.mem-stage {
  position: relative;
  padding: 1.4rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--surface2), var(--surface));
  text-align: center;
  margin-bottom: 1rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.mem-stage__digits {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(1.45rem, 4.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--primary);
  direction: ltr;
  margin: .35rem 0;
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}
.mem-stage__bar {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
#memSpeed,
.mem-ans-box {
  height: 2.95rem;
  min-height: 2.95rem;
  box-sizing: border-box;
}
.mem-ans-box {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.15rem !important;
  font-weight: 700;
  text-align: center;
  letter-spacing: 5px;
  padding: .35rem 1rem !important;
  line-height: 1.2;
}
.dt-ar {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  white-space: nowrap;
  direction: rtl;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.dt-ar__sep {
  color: var(--muted);
  opacity: .75;
}
.dt-ar__d,
.dt-ar__t,
.dt-ar__ap {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.footer__cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .15rem .85rem;
}
.footer__dev {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s ease, text-decoration-color .2s ease;
}
.footer__dev:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: .9;
}
.hub-guide {
  margin-top: 1.5rem;
}
.side__link {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.side__link-meta {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
}

/* ===== استوديو التصميم الاحترافي للصور ===== */
.dstudio {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface2);
  overflow: hidden;
}
.dstudio__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.dstudio__title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--fd);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
}
.dstudio__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.dstudio__tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: .28rem .78rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.dstudio__tab.is-on {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}
.dstudio__pane {
  padding: .9rem 1rem;
}
.dstudio__pane[hidden] {
  display: none;
}
.dstudio__presets {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .8rem;
}
.dstudio__sw {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .78rem;
  cursor: pointer;
  color: var(--ink);
}
.dstudio__sw i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255,255,255,.35);
}
.dstudio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .65rem .8rem;
}
.dstudio__exp {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

/* تحسينات استجابة الهيرو ونافذة البحث على التابلت والموبايل (دون تغيير الكمبيوتر) */
@media (max-width: 900px) {
  .hero__title {
    font-size: clamp(1.9rem, 4.9vw, 2.95rem);
    line-height: 1.38;
  }
}
@media (max-width: 640px) {
  .hero {
    padding: clamp(1.6rem, 5vw, 2.4rem) 0 1.6rem;
  }
  .hero__inner {
    width: min(1180px, 100% - 1.25rem);
  }
  .hero__title {
    font-size: clamp(1.25rem, 6.1vw, 1.85rem);
    line-height: 1.44;
    margin-bottom: .5em;
  }
  .hero__lead {
    font-size: 1.02rem;
    margin-bottom: 1.5rem;
  }
  .hero__tip {
    white-space: normal;
    width: max-content;
    max-width: calc(100vw - 2.5rem);
    text-align: center;
    line-height: 1.45;
    transform: translate(50%, 6px) scale(.94);
  }
  .hero__tip.is-out {
    transform: translate(50%, -6px) scale(.94);
  }
  .sx {
    padding: max(4.5rem, 10vh) .75rem 1rem;
  }
  .sx__panel {
    border-radius: 18px;
  }
  .sx__form {
    padding: .75rem .9rem;
    gap: .5rem;
  }
  .sx__form input {
    font-size: 1rem;
  }
  .sx__form kbd {
    display: none;
  }
  .sx__list a {
    padding: .55rem .65rem;
    font-size: .92rem;
    flex-wrap: wrap;
    gap: .3rem .6rem;
  }
  .sx__hint {
    padding: .55rem .9rem;
    font-size: .8rem;
    line-height: 1.55;
  }
}
@media (max-width: 380px) {
  .hero__search .ico {
    margin-inline-start: .55rem;
  }
  .hero__search .btn {
    padding-inline: .9rem;
  }
}