html {
  --ev-ivory: #f5e1ce;
  --ev-paper: #fff3e7;
  --ev-ink: #3e271f;
  --ev-mark: #842746;
  --ev-edge: #a67d67;
  --ev-field: #efdbc5;
  --ev-focus: #922f56;
  --ev-ivory-pile: url("eyvalla-ivory.webp");
  --ev-berry-pile: url("eyvalla-berry.webp");
  --ev-leather: url("eyvalla-leather.webp");
  --ev-font: Vazirmatn, Tahoma, sans-serif;
  --ink: var(--ev-ink);
  --muted: #674437;
  --accent: var(--ev-mark);
  --line: #ba9481;
  --bg: var(--ev-paper);
  --soft: #f3e0cc;
}
html[data-theme="dark"] {
  --ev-ivory: #3c2a32;
  --ev-paper: #34242b;
  --ev-ink: #ffeadb;
  --ev-mark: #ffb6cc;
  --ev-edge: #a77785;
  --ev-field: #48313b;
  --ev-focus: #ffc0d1;
}
html:is([data-theme="light"],[data-theme="dark"]) {
  --ink: var(--ev-ink);
  --paper: var(--ev-ivory);
  --surface: var(--ev-paper);
  --field: var(--ev-field);
  --muted: color-mix(in srgb, var(--ev-ink) 82%, var(--ev-paper));
  --brand: var(--ev-mark);
  --line: var(--ev-edge);
  --focus: var(--ev-focus);
  --selected: color-mix(in srgb, var(--ev-mark) 15%, var(--ev-field));
  --rim: color-mix(in srgb, var(--ev-edge) 55%, transparent);
  --glass: linear-gradient(165deg, var(--ev-paper), var(--ev-field));
  --hover: linear-gradient(165deg, var(--ev-field), var(--ev-paper));
  --lift: inset 0 1px 2px #fff3e45c, 0 1px 3px #643c3028;
  --inset: inset 0 2px 4px #6b42333b;
}
html body, html[data-theme] body {
  color: var(--ev-ink);
  font-family: var(--ev-font);
  isolation: isolate;
  background-color: var(--ev-ivory);
  background-image: var(--ev-ivory-pile);
  background-repeat: no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ev-ivory-pile) center / cover no-repeat;
}
html[data-theme="dark"] body {
  background-image: linear-gradient(#362129e8,#392630f2), var(--ev-ivory-pile);
}
html[data-theme="dark"] body::before { background-image: linear-gradient(#362129e8,#392630f2), var(--ev-ivory-pile); }
body :is(button,input,select,textarea,summary) { font-family: var(--ev-font); }
body :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 3px solid var(--ev-focus);
  outline-offset: 3px;
}
body :is(h1,h2,h3,legend,label,strong) { color: inherit; }
body :is(h1,h2,h3) { text-wrap: pretty; }
body :is(main,section,article,form,fieldset) { min-inline-size: 0; }
body a { text-underline-offset: .22em; }
body a:hover { text-decoration-thickness: .14em; }
body :is(.paper,.role-card,.hero,.card,.story-strip,.support-shell,.access-state),
html[data-theme] body :is(.card,.hero,.account,.story-strip,.support-shell) {
  color: var(--ev-ink);
  background: color-mix(in srgb, var(--ev-paper) 94%, transparent);
  border-color: color-mix(in srgb, var(--ev-edge) 55%, transparent);
  box-shadow: inset 0 1px 0 #fff6eb65, 0 2px 6px #633d3025;
}
body.editorial .hero {
  background: color-mix(in srgb, var(--ev-paper) 26%, transparent);
  box-shadow: none;
}
body.editorial :is(.paper,.role-card) { box-shadow: inset 0 1px 2px #fff6eb65, 0 3px 8px #633d3030; }
body.editorial :is(.role-entry a,.tag,.tabs a) {
  color: var(--ev-ink);
  background: color-mix(in srgb, var(--ev-paper) 82%, transparent);
  border-color: var(--ev-edge);
}
body.editorial :is(.lead,.note,.row small) { color: #684536; }
body.editorial :is(.bar i,.bar b) { background: var(--ev-mark); }
body.editorial .sticky { background: #faecdf; border-color: var(--ev-edge); }
body :is(header,.topbar,.dock), html[data-theme] body :is(.topbar,.dock) {
  color: var(--ev-ink);
  background: color-mix(in srgb, var(--ev-paper) 91%, transparent);
  border-color: var(--ev-edge);
}
body :is(.ey-brand,.logo.ey-brand) {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  flex: 0 0 auto;
  padding: .25rem .55rem;
  border: 1px solid #966849;
  border-radius: .85rem;
  background: #d7ad8b;
  box-shadow: inset 0 2px 4px #56322250, 0 1px 0 #fff9ee;
  color: #472634;
  text-decoration: none;
  font-weight: 800;
}
.ey-brand-mark { display: block; width: 2rem; height: 2.45rem; object-fit: contain; flex: none; }
.ey-brand .brand-domain { display: none; }
.stitch-menu { position: relative; z-index: 4; flex: 0 0 auto; align-self: center; }
body header .stitch-menu { padding: 0; border: 0; background: none; }
body header .stitch-menu:not([open]) > nav { display: none; }
.stitch-menu summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  border: 1px solid;
  border-radius: 999px;
  min-inline-size: 6rem;
  padding: .38rem .8rem;
  font-weight: 700;
  cursor: pointer;
}
.stitch-menu summary::-webkit-details-marker { display: none; }
.stitch-menu summary::after {
  content: "";
  width: .44rem;
  height: .44rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.stitch-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
body header .stitch-menu nav {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + .35rem);
  display: grid;
  min-inline-size: min(13rem, 66vw);
  gap: 0;
  padding: .35rem;
  border: 1px solid var(--ev-edge);
  border-radius: .75rem;
  background: var(--ev-paper);
  box-shadow: 0 4px 12px #44211940;
}
body header .stitch-menu nav a { min-block-size: 44px; align-content: center; padding-inline: .5rem; }
body header .stitch-menu nav a + a { border-block-start: 1px solid #aa80604a; }
body :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="file"]),select,textarea),
html[data-theme] body :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="file"]),select,textarea) {
  color: var(--ev-ink);
  background: var(--ev-field);
  border: 1px solid var(--ev-edge);
  border-radius: .72rem;
  box-shadow: inset 0 2px 4px #6b42333b;
  font-size: max(16px, 1em);
}
body :is(input,textarea)::placeholder { color: var(--ev-ink); opacity: .73; }
body :is(button,.btn,select,summary,input:not([type="checkbox"],[type="radio"],[type="hidden"])) { min-block-size: 44px; }
body :is(button,.btn), html[data-theme] body button {
  color: var(--ev-ink);
  background: var(--ev-paper);
  border: 1px solid var(--ev-edge);
  border-radius: .8rem;
  box-shadow: inset 0 1px 2px #fff5e090, 0 2px 3px #643c3028;
  font-weight: 700;
}
body :is(.role-card,.tabs button,.role-tabs button,.dock a,[role="tab"])[aria-selected="true"],
body :is(button,.role-card)[aria-pressed="true"], body nav a[aria-current="page"] {
  border-color: var(--ev-mark);
  box-shadow: inset 0 0 0 1px var(--ev-mark);
}
body :is(.btn,.primary,button[type="submit"],.sticky .btn),
html[data-theme] body :is(button.primary,button[type="submit"]) {
  color: #fff8f1;
  background: linear-gradient(#65102b56,#59112583), var(--ev-berry-pile) center / auto 160px no-repeat, #91264a;
  border: 1px solid #942846;
  box-shadow: inset 0 2px 5px #ffd0db60, 0 3px 4px #6a234337;
  text-shadow: 0 1px 1px #3d0d1d;
}
body :is(.menu-toggle,button[aria-expanded],.stitch-menu summary),
html[data-theme] body :is(.menu-toggle,button[aria-expanded],.menu-toggle:hover:not(:disabled)) {
  color: #fff5ea;
  background: linear-gradient(#4c261c12,#43261a66), var(--ev-leather) center / auto 76px no-repeat, #704a35;
  border-color: #744b36;
  box-shadow: inset 0 1px 3px #ffdbb672, 0 2px 3px #4d30295d;
  text-shadow: 0 1px 2px #3c2015;
}
body :is(button,.btn):active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px #44211955;
}
body button:disabled { opacity: .63; cursor: not-allowed; }
body input[type="range"] { accent-color: #875b45; inline-size: 100%; }
body :is(input[type="checkbox"],input[type="radio"]) { accent-color: #842746; }
body input::file-selector-button {
  min-block-size: 44px;
  border: 1px solid #956d56;
  border-radius: .65rem;
  background: var(--ev-paper);
  color: var(--ev-ink);
  font: inherit;
}
body :is(.skip,.skip-link):focus { z-index: 20; }
@media (max-width: 640px) {
  body::before { background-position: 54% top; }
  body :is(header,.topbar) nav { flex-wrap: wrap; }
  body :is(nav,.tabs,.role-tabs) a { min-block-size: 44px; align-content: center; }
  html[data-theme] .topbar {
    position: sticky;
    inset: 0 0 auto;
    gap: .4rem;
    height: auto;
    min-height: 65px;
    padding: 5px 9px;
  }
  html[data-theme] #home { padding-top: 12px; }
  html[data-theme] .topbar .actions { justify-content: flex-end; gap: .1rem .35rem; }
  html[data-theme] .topbar .actions :is(button,a,summary) { font-size: .75rem; }
  html[data-theme] .app-shortcuts summary { min-inline-size: 0; gap: .38rem; padding-inline: .5rem; }
  html[data-theme] .topbar .profile-link { min-inline-size: 44px; min-block-size: 44px; }
  html[data-theme] .topbar .ey-brand { font-size: .9rem; gap: .2rem; }
  html[data-theme] .topbar .ey-brand-mark { width: 1.65rem; height: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(button,.btn) { transition: none; }
  body :is(button,.btn):active { transform: none; }
}
/* EY-01 public sample only: no membership, permission or app role. */
body.editorial:has(#role-demo) .role-entry a,
body.editorial #role-demo .role-tabs button{
 min-height:48px;display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.45rem;
 border:1px solid #986d58;border-radius:15px;
 background:linear-gradient(#fff4e3b8,#f4dfc8bd),var(--ev-ivory-pile) center/220px;
 box-shadow:inset 0 2px 3px #fff8,0 3px 5px #5a39282b;
 padding:12px 14px;line-height:1.75;
}
body.editorial:has(#owner-panel:not([hidden])) .role-entry a[data-role=owner],
body.editorial:has(#creator-panel:not([hidden])) .role-entry a[data-role=creator],
body.editorial #role-demo .role-tabs button[aria-pressed=true]{
 border:2px solid #842746;background:#f2dfd2;
 box-shadow:inset 3px 4px 7px #643c3042,inset -2px -2px 3px #fff8;
}
body.editorial:has(#owner-panel:not([hidden])) .role-entry a[data-role=owner]::before,
body.editorial:has(#creator-panel:not([hidden])) .role-entry a[data-role=creator]::before,
body.editorial #role-demo .role-tabs button[aria-pressed=true]::before{content:'✓';font-weight:700;color:#842746}
body.editorial:has(#owner-panel:not([hidden])) .role-entry a[data-role=owner]::after,
body.editorial:has(#creator-panel:not([hidden])) .role-entry a[data-role=creator]::after,
body.editorial #role-demo .role-tabs button[aria-pressed=true]::after{content:'انتخاب‌شده';font-size:.8em;width:100%;font-weight:400}
body.editorial:has(#role-demo) .role-card:has(button[aria-pressed=true]){border:2px solid #986d73;box-shadow:inset 0 2px 5px #633d3025}
body.editorial:has(#role-demo) .paper.sample,
body.editorial #role-demo :is(.comparison-table,#decision){background:#fff8ee;background-image:none;box-shadow:none;color:#3e281e}
body.editorial:has(#role-demo) .paper.sample .row,
body.editorial #role-demo .comparison-table :is(th,td){background:transparent;font-variant-numeric:tabular-nums}
body.editorial:has(#role-demo) :is(.role-entry a,.role-tabs button):focus-visible{outline:3px solid #552562;outline-offset:3px}
body.editorial #role-demo .role-tabs button:disabled{opacity:1;color:#77675e;box-shadow:none;border-style:dashed}
@media(prefers-reduced-motion:reduce){body.editorial:has(#role-demo) :is(.role-entry a,.role-tabs button){transition:none;transform:none}}
/* Reserve the state label so switching examples does not change the hero height. */
body.editorial:has(#role-demo) .hero .role-entry a{position:relative;min-height:108px;padding:14px 26px 34px}
body.editorial:has(#role-demo) .hero .role-entry a::before{position:absolute;inset-inline-end:9px;top:14px}
body.editorial:has(#role-demo) .hero .role-entry a::after{position:absolute;inset-inline:10px;bottom:8px;width:auto}
