@font-face {
  font-family: Vazir;
  src: url('/assets/vazir.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/assets/inter-latin.woff2') format('woff2');
  font-weight: 530;
  font-display: swap;
}
:root {
  --ink: #281e39;
  --muted: #645768;
  --accent: #5730a9;
  --indigo: #33204d;
  --paper: #fcf5e9;
  --card: #fffaf1;
  --line: #d8cbbb;
  --tint: #eae0f4;
  --radius: 3px;
  --stock-wash: linear-gradient(#fffaf195,#fffaf195);
  --fiber: url('/assets/paper-fiber.webp');
  --folds: url('/assets/paper-folds-1440.webp');
  --sheet-shadow: 0 2px 1px #49324b1c, 1px 5px 10px -6px #33203e66;
  --dog-ear: linear-gradient(45deg, transparent 48%, #a993bb 49%, #d8c3e3 57%, #e7d6ee 98%);

  color-scheme: light;
  font: 16px/1.8 Vazir, Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, figure, blockquote { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--fiber) repeat, var(--paper); }
body > .site-body { flex: 1; }
.shell { width: min(1280px, calc(100% - clamp(36px, 7vw, 112px))); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { color: #4421a6; }
a:focus-visible, summary:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #825be3; outline-offset: 4px;
}
bdi, code, [lang=en], input[dir=ltr] { font-family: Inter, Vazir, sans-serif; }
.skip { position: absolute; inset-block-start: -100px; inset-inline-start: 16px; z-index: 9; background: white; padding: 6px 14px; }
.skip:focus { inset-block-start: 4px; }
.mast { position:relative; z-index:5; background:var(--fiber) repeat, #291d42; border-bottom:1px solid #1d142f; box-shadow:0 3px 7px #2416323b; }
.mast .brand, .mast .wide-nav a { color:#fff5e7; }
.mast .brand small { color:#d1bfdc; border-color:#675575; }
.mast .wide-nav a:hover, .mast .wide-nav a[aria-current=page] { color:#ead3ff; }
.mast .navbtn { background:var(--fiber) repeat, #fff5e4; border-color:#e9dfd1; color:#352744; }
.mast .navbtn:hover { background-color:#eaddf3; color:#332044; }
.mast-inner, .mast-actions, .wide-nav, .footer-inner, .footer-inner nav, .brand {
  display: flex; align-items: center;
}
.mast-inner { justify-content: space-between; min-height: 76px; gap: 1.5rem; position: relative; }
.brand { gap: .65rem; color: var(--indigo); text-decoration: none; white-space: nowrap; }
.brand b { font-size: 1.52rem; font-weight: 880; }
.brand small { border-inline-end: 1px solid #c5bfd6; padding-inline-end: .6rem; font-size: .76rem; font-weight: 640; letter-spacing: -.025em; color: #68617c; }
.wide-nav { gap: clamp(18px,2.4vw,38px); }
.wide-nav a, .mobile-nav nav a, .tabs a { text-decoration: none; color: #514a63; font-size: .92rem; font-weight: 550; }
.wide-nav a:hover, .tabs a:hover, nav [aria-current=page] { color: var(--accent); }
.wide-nav a[aria-current=page] { text-decoration: underline 2px; text-underline-offset: .6rem; }
.mast-actions { gap: .5rem; }
.navbtn, .button, button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; border: 0; border-radius: 3px; box-shadow: var(--sheet-shadow); font: 650 .94rem/1.4 Vazir,sans-serif; background: var(--accent); color: white; padding: .74rem 1.12rem; cursor: pointer; text-decoration: none; }
.navbtn, .button, button { background-image:var(--fiber); border:1px solid #422177; border-bottom-width:2px; }
.navbtn { background-color:var(--indigo); }
/* Cut stock corners while retaining the full keyboard focus outline. */
.navbtn:not(:focus-visible), .button:not(:focus-visible), button:not(:focus-visible), .landing-actions a:not(:focus-visible) {
  clip-path:polygon(6px 0,calc(100% - 6px) 0,100% 6px,100% calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,0 calc(100% - 6px),0 6px);
}
.button:active, button:active, .navbtn:active { transform:translateY(1px); }
.navbtn:hover, .button:hover, button:hover { background: #4924ad; color: white; }
button:disabled { cursor: progress; opacity: .8; }
.mobile-nav { display: none; }
main { min-width: 0; }
.domain-form { display: block; margin: 1.6rem 0 0; max-width: 470px; }
.domain-form label { color: #f4efff; margin-block-end: .32rem; font-size: .87rem; }
.domain-control { display: flex; direction: ltr; align-items: stretch; padding: 5px; border: 1px solid #fff; border-radius: 3px; background: var(--card); gap: 4px; }
.domain-control input { flex: 1; border: 0; min-width: 0; padding-inline: 10px; min-height: 40px; }
.domain-control button { white-space: nowrap; direction: rtl; }
.domain-form [role=alert] { margin: .6rem 0 0; background: #fff0f2; color: #791e37; border-radius: 8px; padding: .25rem .7rem; }
.research-panel { --unit: 5.1px; min-width: 0; align-self: center; background: var(--fiber) repeat, var(--card); color: var(--ink); border-radius: var(--radius); padding: clamp(18px,2vw,29px); border:1px solid var(--line); box-shadow:var(--sheet-shadow); }
.research-meta, .chart-link-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.research-meta { color: var(--muted); font-size: .75rem; }
.research-label { display: inline-flex; align-items: center; gap: .4rem; color: #4f368c; font-weight: 650; }
.live-dot { width: 8px; height: 8px; border: 2px solid #6b45bb; border-radius: 50%; box-shadow: 0 0 0 3px #eae2fa; }
.research-panel h2 { margin: 1rem 0 .1rem; font-size: clamp(1.19rem,1.85vw,1.58rem); line-height: 1.5; font-weight: 800; }
.research-panel figcaption p { margin: 0; color: var(--muted); font-size: .85rem; }
.plot { display: flex; direction: ltr; gap: 7px; margin: 1.8rem 0 1.1rem; }
.axis { display: flex; flex-direction: column; justify-content: space-between; text-align: end; width: 16px; height: calc(var(--unit) * 25); font-size: .68rem; color: #6c667d; line-height: 1; }
.columns { flex: 1; display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: 6px; direction: rtl; position: relative; }
.columns::before { content: ''; pointer-events: none; position: absolute; inset: 0 0 auto; height: calc(var(--unit) * 25); background: repeating-linear-gradient(to top, #dbd4ea 0 1px, transparent 1px calc(var(--unit) * 5)); border-top: 1px solid #dbd4ea; }
.plot-group { position: relative; text-align: center; min-width: 0; }
.column-track { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: calc(var(--unit) * 25); }
.plot-value { z-index: 1; color: #49405e; font-weight: 730; font-size: .84rem; line-height: 1; margin-bottom: 5px; padding-inline: 2px; background: var(--card); }
.plot-bar { width: min(52%,35px); flex-shrink: 0; border-radius: 2px 2px 0 0; background:var(--fiber) repeat, #af98c9; box-shadow:inset -2px 0 #6149803b, 1px 0 2px #3e275f30; }
.plot-bar i { height: var(--unit); display: block; }
.plot-bar.lead-bar { background: repeating-linear-gradient(135deg,#6e46cc 0 5px,#8056db 5px 6.5px); }
.plot-name { display: block; margin-top: 7px; font-size: .71rem; color: #565164; line-height: 1.6; }
.chart-link-row { border-top: 1px solid var(--line); padding-top: .8rem; flex-wrap: wrap; align-items: baseline; }
.chart-link { font-size: .84rem; font-weight: 710; text-decoration: none; }
.data-details { font-size: .77rem; color: #655e75; }
.data-details[open] { width: 100%; }
summary { cursor:pointer; }
.tiles { display:grid;gap:15px;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr)); }
.card,.metric,.notice,.empty,.report-filters { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--fiber) repeat, var(--card); box-shadow:var(--sheet-shadow); padding: clamp(17px,2vw,27px); margin: 16px 0; }
.card h2,.card h3 { margin: 0 0 .5rem; font-weight: 750; line-height: 1.55; }
.card h2 { font-size: 1.2rem; }
.card h3 { font-size: 1.05rem; }
.card p { color: var(--muted); }
.tiles .card,.tiles .metric { margin: 0; }
.tiles { margin-block: 16px; }
.pagehead { margin: 0; padding: clamp(30px,4.5vw,63px) 0 12px; }
.pagehead h1 { margin: 0; font-size: clamp(1.85rem,3.2vw,2.85rem); font-weight: 820; line-height: 1.5; }
.pagehead p { color: var(--muted); margin: .4rem 0 0; max-width: 65ch; }
.notice { border-inline-start: 4px solid var(--accent); background:var(--fiber) repeat, var(--tint); }
.empty { color: var(--muted); padding-block: 2.3rem; background:var(--fiber) repeat, #f5ecde; border-style:dashed; box-shadow:none; }
.tabs,.links { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.tabs { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--fiber) repeat, #f2e8d9; }
.tabs a { padding: 4px 8px; }
.tabs a[aria-current=page] { border-radius: 2px; background: var(--tint); }
.metric { display: grid; color: var(--ink); text-decoration: none; gap: .3rem; border-top: 3px solid #8c70c7; }
.metric strong { color: var(--accent); font-size: clamp(1.32rem,2.5vw,2rem); }
.metric small,.subtle { color: var(--muted); }
.dashboard-summary { margin-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; color: white; padding: 22px 27px; border-radius: var(--radius); background:#2c2043; box-shadow:var(--sheet-shadow); }
.dashboard-summary h2,.dashboard-summary p { margin: 0; }
.dashboard-summary p { color: #e2dcf2; font-size: .88rem; }
.dashboard-summary .button { background: #f1eaff; color: var(--indigo); }
.report-filters summary { color: var(--accent); font-weight: 660; }
.report-filters form { grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); max-width: 100%; align-items:end; }
form { display: grid; gap: 12px; max-width: 680px; margin: .75rem 0; }
form button { justify-self: start; }
label { display:grid; gap:.3rem; font-weight: 570; }
input,select,textarea { width: 100%; min-width: 0; border: 1px solid #a69993; border-radius: 3px; background: #fffdf7; padding: .52rem .7rem; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
input[type=url],input[type=email],input[type=date],input[type=datetime-local],code,bdi { direction: ltr; text-align:start; }
.scroll { overflow-x:auto; }
.wrap, td, dd, p { overflow-wrap:anywhere; }
table { width:100%; border-collapse:collapse; }
td,th { padding: .6rem .8rem; text-align:start; border-bottom:1px solid var(--line); }
th { background:var(--fiber) repeat, #efe4d6; color:#48374e; font-size:.85rem; }
dt { font-weight:700; }
dd { margin-inline-start:1em; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.practice-fields { display:grid; gap:.75rem; }
.practice-fields div { min-width:0; }
.practice-fields dd { margin-inline-start:0; white-space:pre-line; overflow-wrap:anywhere; }
fieldset { min-width:0; border:1px solid var(--line); border-radius:3px; margin-block:.6rem; padding:1rem; }
fieldset label:has(input[type=checkbox]) { display:flex; align-items:center; gap:.5rem; }
input[type=checkbox] { inline-size:1.2rem; block-size:1.2rem; min-height:0; flex:none; }
.auth-layout main { max-width:760px; margin:clamp(32px,8vw,108px) auto; }
.auth-sheet { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(165px,32%); background:var(--fiber) repeat, var(--card); border:1px solid var(--line); border-radius:3px; box-shadow:0 5px 0 -1px #dfd1e6, 0 6px 0 #ac98b6, 0 14px 23px -15px #33204488; }
.auth-fields { min-width:0; padding:clamp(22px,3vw,40px); align-self:center; }
.auth-art { display:grid; align-items:end; justify-items:center; padding:22px 12px 0; background:#2c2043 var(--folds) center / 100% 100% no-repeat; }
.auth-meo { display:block; width:min(100%,150px); height:auto; }
.auth-layout .pagehead { padding:0; }
.auth-layout .pagehead h1 { text-wrap:balance; font-size:clamp(1.45rem,2.25vw,2.1rem); }
.auth-layout .card { margin:16px 0 0; border:0; padding:0; box-shadow:none; background:none; }
.auth-layout .card > h2:first-child { margin-bottom:.65rem; font-size:1rem; color:var(--muted); }
.auth-layout .card > h2:first-child:has(+ form label) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.auth-layout form button { width:100%; }
.auth-layout input[type=tel],.auth-layout input[autocomplete=one-time-code] { font-size:1.2rem; font-variant-numeric:tabular-nums; }
.site-footer { border-top:1px solid var(--line); margin-top:32px; background:var(--fiber) repeat, #f6ecdd; }
.footer-inner { min-height:80px; justify-content:space-between; gap:1rem; }
.footer-inner nav { gap:1.2rem; flex-wrap:wrap; }
.footer-inner nav a { color:var(--muted); font-size:.84rem; text-decoration:none; }
/* The cover belongs to the page, while report panels use quiet, lighter stock. */
main > .pagehead:first-child {
  margin:clamp(20px,3vw,38px) 0 23px; padding:clamp(20px,3vw,39px) clamp(18px,3vw,42px);
  background:#281c3e;
  border-radius:var(--radius); color:#fff4e4; box-shadow:var(--sheet-shadow);
}
main > .pagehead:first-child, .dashboard-summary { position:relative; isolation:isolate; }
main > .pagehead:first-child::before, .dashboard-summary::before {
  content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; transform:scaleX(-1);
  background:linear-gradient(to right,#261b3d99,transparent 63%), var(--folds) center / 100% 100% no-repeat;
  border-radius:inherit;
}
main > .pagehead:first-child p { color:#ede3ee; max-width:min(65ch,84%); }
main > .pagehead:first-child h1 { max-width:86%; }
.workspace-main .pagehead { border-bottom:1px solid var(--line); padding-bottom:12px; }
.scroll { background:#fffbf3; }
tbody tr:nth-child(even) { background:#f8f1e6; }
tbody tr:hover { background:#f2e8f4; }
input[type=checkbox] { accent-color:var(--accent); }
@media(max-width:700px) {
  :root { --folds:url('/assets/paper-folds-640.webp'); }
}
@media(max-width:600px) {
  .auth-layout main { max-width:440px; margin:28px auto 40px; }
  .auth-sheet { display:flex; flex-direction:column-reverse; }
  .auth-art { min-height:88px; justify-items:end; padding:9px 24px 0; }
  .auth-meo { width:78px; }
  .auth-fields { width:100%; }
}
@media(max-width:800px) {
  .wide-nav { display:none; }
  .mobile-nav { display:block; }
  .mobile-nav summary { display:grid; place-items:center; width:44px; height:44px; border:1px solid #83738c; border-radius:3px; list-style:none; }
  .mobile-nav summary::-webkit-details-marker { display:none; }
  .mobile-nav summary i { width:16px; height:2px; background:#fff3e4; box-shadow:0 5px #fff3e4,0 -5px #fff3e4; }
  .mobile-nav nav { display:grid; position:absolute; z-index:6; top:calc(100% - 2px); inset-inline:0; padding:10px; background:var(--fiber) repeat, var(--card); border:1px solid var(--line); border-radius:3px; box-shadow:0 10px 26px #26174622; }
  .mobile-nav nav a { padding:9px 12px; }
  .mobile-nav nav a[aria-current=page] { color:var(--accent); background:var(--tint); }
  .research-panel { --unit:4.8px; }
  .mast-inner { min-height:66px; }
}
@media(max-width:570px) {
  .shell { width:calc(100% - 28px); }
  .brand b { font-size:1.25rem; }
  .brand small { font-size:.67rem; }
  .navbtn { min-height:42px; padding:.5rem .8rem; font-size:.84rem; }
  .domain-form { margin-top:1.1rem; }
  .research-panel { border-radius:var(--radius); padding:15px; --unit:4px; }
  .research-panel h2 { margin-top:.7rem; }
  .plot { margin:1.5rem 0 .8rem; }
  .plot-name { font-size:.66rem; }
  .footer-inner { flex-wrap:wrap; padding-block:15px; }
  .card,.metric,.notice,.empty { margin-block:10px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; } }
.workspace-frame { display:grid; grid-template-columns:180px minmax(0,1fr); background:var(--card); box-shadow:var(--sheet-shadow); border:1px solid var(--line); border-radius:var(--radius); margin:24px 0; overflow:hidden; }
.workspace-rail { min-width:0; background:var(--fiber) repeat, #efe5d9; border-inline-end:1px solid var(--line); padding:16px 12px; }
.workspace-rail > div { padding:0 6px 14px; }
.workspace-rail h2 { margin:9px 0 0; font-size:1.1rem; overflow-wrap:anywhere; }
.workspace-rail bdi,.workspace-rail > div a { font-size:.77rem; color:var(--muted); }
.workspace-rail nav { display:grid; gap:3px; }
.workspace-rail nav a { text-decoration:none; color:#544c60; font-size:.86rem; padding:7px 9px; border-radius:2px; }
.workspace-rail nav a:hover,.workspace-rail nav a[aria-current=page] { background:var(--tint); color:#503177; box-shadow:inset -3px 0 #8a60a7; }
.workspace-main { min-width:0; padding:clamp(14px,2vw,26px); }
.workspace-main > .pagehead:first-child { padding:0; }
.workspace-main > .pagehead h1 { font-size:clamp(1.65rem,3vw,2rem); }
.workspace-main .dashboard-summary { background-color:#302342; padding:18px 20px; }
.workspace-main .dashboard-summary h2 { font-size:1.1rem; }
.workspace-main .dashboard-summary p { color:#f1e6f4; }
.workspace-main .tiles:has(.metric) { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.workspace-main :is(.metric,.card,.report-filters) { background:var(--stock-wash), var(--fiber) repeat, var(--card); }
.workspace-main .metric { border-top-width:3px; padding:12px; }
.workspace-main .metric span,.workspace-main .metric small { font-size:.8rem; }
.compact-work-nav { display:none; }
@media(max-width:900px){
 .workspace-frame {grid-template-columns:150px minmax(0,1fr);}
 .workspace-main .tiles:has(.metric){grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px){
 .workspace-frame {display:block;margin:12px 0;}
 .workspace-rail {border-inline-end:0;border-bottom:1px solid var(--line);}
 .workspace-rail > div {padding-bottom:4px;}
 .workspace-rail > nav {display:none;}
 .compact-work-nav {display:block;padding:4px 6px;}
 .compact-work-nav summary {color:var(--accent);font-weight:650;}
 .compact-work-nav nav {margin-top:8px;grid-template-columns:repeat(2,minmax(0,1fr));}
 .chart-link,.data-details summary {display:inline-flex;align-items:center;min-height:38px;}
 .plot-name {font-size:.72rem;}
}
