/* Rahyar phase 3: one local font, a shared shell and five stable destinations.
   RAHYAR_UI_T0_DESIGN_FOUNDATION_v1: --bg/--sf/--tx/... below are no longer
   literal hex — they alias the locked token contract (rh_ds_tokens_contract.
   css) so this file's palette always matches rh_uiux_v13.css and the new
   rh-ds- components, loaded right after this file on every page that has
   it. No consumer of these names needs to change: the custom-property
   NAMES are unchanged, only their source of truth moved one level up.
   No pinned test in tests/student_design targets this file's values
   (confirmed by reading tests/student_design before this change), so this
   alias is safe; phase2_theme.css (which IS pinned) was left untouched. */
@import url("rh_ds_tokens_contract.css");
@import url("rh_ds_components.css");
@font-face{font-family:Vazirmatn;src:url('phase3_fonts/Vazirmatn-Variable.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
:root,html body,html body.rh-dashboard,html body .rh-activity,html body #pg-app{
 --bg:var(--rh-ds-canvas);--sf:var(--rh-ds-surface);--tx:var(--rh-ds-ink);--mu:var(--rh-ds-muted);--ac:var(--rh-ds-action);--on:var(--rh-ds-on-action);--acb:var(--rh-ds-action-soft);
 --ok:var(--rh-ds-teal);--okb:var(--rh-ds-teal-soft);--er:var(--rh-ds-danger);--erb:var(--rh-ds-danger-soft);--wn:var(--rh-ds-amber);--wnb:var(--rh-ds-amber-soft);--bd:var(--rh-ds-border);
 --rh-accent-teal:var(--ok);--rh-accent-teal-b:var(--okb);--rh-shadow:var(--rh-ds-shadow-md);
 color-scheme:light;
}
/* Same legacy dark triggers rh_uiux_v13.css extends (data-appearance,
   data-ps-theme) plus the contract's own data-rh-theme — all three must
   keep flipping this file's --bg/--sf/... too, since it can load on a
   page before or independently of rh_uiux_v13.css's own @import result. */
@media(prefers-color-scheme:dark){
 html:not([data-rh-theme="light"]):not([data-appearance="light"]):not([data-ps-theme="light"]),html:not([data-rh-theme="light"]):not([data-appearance="light"]):not([data-ps-theme="light"]) body,html:not([data-rh-theme="light"]):not([data-appearance="light"]):not([data-ps-theme="light"]) body.rh-dashboard,html:not([data-rh-theme="light"]):not([data-appearance="light"]):not([data-ps-theme="light"]) body .rh-activity,html:not([data-rh-theme="light"]):not([data-appearance="light"]):not([data-ps-theme="light"]) body #pg-app{
 --bg:#101b2a;--sf:#18283b;--tx:#edf4fd;--mu:#b5c7dd;--ac:#97c7ff;--on:#102d4f;--acb:#223f5d;--ok:#7fdec4;--okb:#153f37;--er:#ffb0be;--erb:#49232d;--wn:#f0d28b;--wnb:#40351e;--bd:#364b64;--rh-shadow:none;color-scheme:dark;
 }
}
html[data-rh-theme="dark"],html[data-rh-theme="dark"] body,html[data-rh-theme="dark"] body.rh-dashboard,html[data-rh-theme="dark"] body .rh-activity,html[data-rh-theme="dark"] body #pg-app,
html[data-appearance="dark"],html[data-appearance="dark"] body,html[data-appearance="dark"] body.rh-dashboard,html[data-appearance="dark"] body .rh-activity,html[data-appearance="dark"] body #pg-app,
html[data-ps-theme="dark"],html[data-ps-theme="dark"] body,html[data-ps-theme="dark"] body.rh-dashboard,html[data-ps-theme="dark"] body .rh-activity,html[data-ps-theme="dark"] body #pg-app{
 --bg:#101b2a;--sf:#18283b;--tx:#edf4fd;--mu:#b5c7dd;--ac:#97c7ff;--on:#102d4f;--acb:#223f5d;--ok:#7fdec4;--okb:#153f37;--er:#ffb0be;--erb:#49232d;--wn:#f0d28b;--wnb:#40351e;--bd:#364b64;--rh-shadow:none;color-scheme:dark;
}
html{background:var(--bg);scroll-padding-block:88px}
html body,html body.rh-dashboard,html body .rh-activity,html body #pilot,html body #portal,html body #pg-app,html body #app{font-family:Vazirmatn,Tahoma,Arial,sans-serif;font-size:16px;line-height:1.8;letter-spacing:normal;color:var(--tx);background:var(--bg);margin:0}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
a,button,input,textarea,select{-webkit-tap-highlight-color:transparent}
button,input,textarea,select{font:inherit}
button,a{touch-action:manipulation}
:focus-visible{outline:3px solid var(--ac);outline-offset:4px}
body[data-rh-shell]{min-height:100dvh;padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
html body[data-rh-shell] #portal,html body[data-rh-shell] .rh-activity{display:flex;flex-direction:column;min-height:calc(100dvh - 158px);padding-top:0}
html body[data-rh-shell] #pilot{min-height:auto;padding-bottom:16px}
html body[data-rh-shell] main{width:100%;min-width:0;padding:24px 20px 36px}
html body.rh-dashboard main{max-width:1200px;margin-inline:auto}
html body .rh-activity main,html body #portal main{max-width:780px;margin-inline:auto}
html body #pilot main{padding-top:28px}
html body #pilot .shell{max-width:480px}
html body #pg-main{padding-top:28px}
html body[data-rh-shell] h1{font-size:clamp(23px,2.1vw,30px);font-weight:800;line-height:1.6;letter-spacing:normal}
html body h2{font-weight:700;line-height:1.7}
html body .rh-card,html body .card,html body .pg-card{border-radius:20px;box-shadow:var(--rh-shadow);padding:24px;border-color:var(--bd)}
html body.rh-dashboard .rh-card{margin:0}
html body.rh-dashboard .rh-card--intro{margin-bottom:24px;padding:28px;border:1px solid var(--bd);background:linear-gradient(115deg,var(--sf),var(--acb));position:relative;overflow:hidden}
html body.rh-dashboard .rh-card--intro::after{content:"";position:absolute;inset-inline-end:-28px;inset-block-start:-52px;width:160px;height:160px;border:24px solid var(--ac);border-radius:50%;opacity:.04;pointer-events:none}
html body.rh-dashboard .rh-card--activity{border-block-start:1px solid var(--bd);border-inline-start:4px solid var(--ac)}
html body.rh-dashboard .rh-card--stat{text-align:start;align-items:stretch}
html body.rh-dashboard .rh-number{font-variant-numeric:tabular-nums;font-size:34px}
html body.rh-dashboard .rh-stat .rh-number{font-size:24px}
html body.rh-dashboard .rh-week{gap:5px;margin-block:12px}
html body.rh-dashboard .rh-week li{display:flex;flex-direction:column;justify-content:center;min-height:96px;font-size:11px;border-radius:12px}
html body.rh-dashboard .rh-week .participated{border-color:var(--ok);position:relative}
html body.rh-dashboard .rh-week .participated::after{content:"";width:5px;height:5px;background:currentColor;border-radius:50%;margin:4px auto 0}
html body.rh-dashboard .rh-stat{background:var(--bg);border:1px solid var(--bd)}
html body .btn,html body .pg-btn,html body .rh-button{border-radius:12px;min-height:48px;font-weight:600;transition:background-color 140ms ease,box-shadow 140ms ease}
html body .rh-button:not(.rh-button--secondary):not(.rh-button--quiet):hover,html body .btn:not(.sec):hover,html body .pg-btn:not(.pg-sec):hover{box-shadow:0 3px 10px rgba(16,63,112,.15)}
html body .btn.sec,html body .rh-button--secondary,html body .pg-btn.pg-sec{background:var(--sf);border-color:var(--bd);color:var(--ac)}
html body input:not([type=checkbox]):not([type=radio]),html body select,html body textarea{background:var(--bg);border-color:var(--bd)}
html body .rh-options button,html body .pg-opt{line-height:1.9;padding:14px 16px}
html body .content{line-height:2}
html body .hero{padding:28px;border:1px solid var(--bd);border-radius:20px;background:linear-gradient(115deg,var(--sf),var(--acb))}
html body .band{background:var(--sf);padding:20px max(20px,calc((100vw - 1080px)/2))}
html body .band .brand{font-size:20px;font-weight:800}
html body .rh-subnav{gap:8px;padding:4px;border:1px solid var(--bd);border-radius:14px;background:var(--sf);width:fit-content}
html body .rh-subnav a{padding:8px 16px;min-height:44px;border-radius:10px}
html body .rh-subnav [aria-current]{background:var(--acb);text-decoration:none;color:var(--ac)}
html body .rh-tabs{position:static;min-height:48px;border:0;background:transparent}
.rh-app-header{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:76px;padding:12px 24px;background:var(--sf);border-block-end:1px solid var(--bd)}
html body .rh-app-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;color:var(--tx);text-decoration:none;white-space:nowrap;line-height:1.4}
.rh-app-brand small{font-weight:500;font-size:13px;color:var(--mu);display:block}
.rh-brand-mark{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:var(--ac);color:var(--on)}
.rh-header-tools{display:flex;gap:8px;align-items:center}
html body .rh-tool{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;padding:8px 12px;border:1px solid var(--bd);border-radius:12px;background:var(--sf);color:var(--tx);font:inherit;font-size:13px;cursor:pointer;text-decoration:none;white-space:nowrap}
html body .rh-tool:hover{background:var(--acb)}
html body nav.rh-primary-nav{position:fixed;inset:auto 0 0;z-index:12;display:block;width:auto;height:auto;min-height:76px;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));border:0;border-block-start:1px solid var(--bd);background:var(--sf);font-family:Vazirmatn,Tahoma,sans-serif;box-shadow:0 -4px 16px rgba(20,40,65,.035)}
.rh-primary-links{display:flex;gap:4px;width:100%}
html body nav.rh-primary-nav .rh-primary-links a{display:flex;flex:1;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;min-height:58px;padding:6px 2px;border:0;border-radius:12px;font-size:12px;line-height:1.6;font-weight:500;color:var(--mu);text-decoration:none}
html body nav.rh-primary-nav .rh-primary-links a[aria-current]{background:var(--acb);color:var(--ac);font-weight:700;position:relative}
html body nav.rh-primary-nav .rh-primary-links a[aria-current]::after{content:"";width:4px;height:4px;background:currentColor;border-radius:50%;position:absolute;inset-block-start:3px}
.rh-nav-heading,.rh-nav-foot{display:none}
html body .rh-primary-nav .rh-icon{width:22px;height:22px}
.rh-more-dialog{inset:0;margin:auto;max-width:620px;width:calc(100% - 32px);max-height:calc(100dvh - 48px);overflow:auto;padding:24px;border:1px solid var(--bd);border-radius:24px;background:var(--sf);color:var(--tx);font-family:Vazirmatn,Tahoma,sans-serif;box-shadow:0 20px 70px rgba(0,0,0,.2)}
.rh-more-dialog::backdrop{background:rgba(8,24,44,.5)}
.rh-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
html body .rh-dialog-heading h2{font-size:20px;margin:0}
.rh-dialog-note{color:var(--mu);font-size:14px;margin:8px 0 20px}
.rh-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html body .rh-more-link{display:flex;gap:12px;align-items:center;padding:16px;border:1px solid var(--bd);border-radius:14px;color:var(--tx);background:var(--bg);text-decoration:none;min-width:0;font-weight:600;font-size:15px}
.rh-more-link .rh-icon{color:var(--ac)}
.rh-more-link small{display:block;color:var(--mu);font-size:12px;font-weight:400;margin-top:4px}
html body .rh-privacy-link{display:inline-flex;align-items:center;min-height:44px;margin-top:16px;color:var(--ac);font-size:13px}
.rh-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
html body .rh-quick-link{display:flex;align-items:center;gap:8px;min-height:44px;background:var(--sf);color:var(--ac);padding:8px 14px;border:1px solid var(--bd);border-radius:12px;font-size:14px;font-weight:600;text-decoration:none}
html body .rh-quick-link:hover{border-color:var(--ac)}
.rh-quick-link .rh-icon{width:18px;height:18px}
.rh-section-kicker{font-size:13px;font-weight:600;color:var(--ok);display:flex;gap:8px;align-items:center;margin-bottom:8px}
.rh-section-kicker::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
@media(min-width:1100px){
 html{--rh-sidebar:240px}
 html[data-rh-collapsed="true"]{--rh-sidebar:88px}
 html body[data-rh-shell]{padding-inline-start:var(--rh-sidebar);padding-bottom:0;--rh-sidebar:inherit}
 html body nav.rh-primary-nav{inset-block:0;inset-inline:0 auto;width:var(--rh-sidebar);height:100dvh;min-height:0;padding:24px 14px;border-block-start:0;border-inline-end:1px solid var(--bd);display:flex;flex-direction:column;gap:20px;box-shadow:none}
 .rh-primary-links{flex-direction:column;gap:8px}
 html body nav.rh-primary-nav .rh-primary-links a{flex:none;flex-direction:row;justify-content:flex-start;min-height:52px;padding:12px 16px;gap:14px;font-size:15px;border-radius:12px}
 html body nav.rh-primary-nav .rh-primary-links a[aria-current]::after{width:3px;height:auto;border-radius:3px;inset-block:14px;inset-inline:0 auto}
 .rh-nav-heading{display:flex;justify-content:space-between;align-items:center;gap:6px;color:var(--mu);font-size:12px;min-height:44px;padding-inline:4px}
 html body .rh-nav-collapse{border:0;padding:8px;background:var(--bg)}
 .rh-nav-foot{display:flex;align-items:center;gap:8px;color:var(--mu);font-size:11px;margin-top:auto;padding:16px 8px;border-block-start:1px solid var(--bd)}
 .rh-nav-dot{width:6px;height:6px;border-radius:50%;background:var(--ok);flex:none}
 html[data-rh-collapsed="true"] .rh-nav-heading>span,html[data-rh-collapsed="true"] .rh-primary-links a>span,html[data-rh-collapsed="true"] .rh-nav-foot{display:none}
 html[data-rh-collapsed="true"] .rh-nav-heading{justify-content:center;padding:0}
 html[data-rh-collapsed="true"] body nav.rh-primary-nav .rh-primary-links a{padding:12px;justify-content:center}
 html[data-rh-collapsed="true"] body .rh-nav-collapse .rh-icon{transform:scaleX(-1)}
 html body[data-rh-shell] .rh-activity,html body[data-rh-shell] #portal{min-height:calc(100dvh - 77px)}
 html body[data-rh-shell] .rh-activity main{padding-bottom:40px}
 html body .rh-activity .rh-cta-row{bottom:0}
}
@media(max-width:1099px){html body .rh-activity .rh-cta-row{bottom:calc(76px + env(safe-area-inset-bottom,0px))}html body[data-rh-shell] main{padding-bottom:36px}}
@media(max-width:700px){html body.rh-dashboard .rh-grid{gap:16px}html body.rh-dashboard .rh-stack{gap:16px}html body.rh-dashboard .rh-card,html body .card,html body .pg-card{padding:20px}html body[data-rh-shell] main{padding:20px 16px 32px}.rh-app-header{padding:12px 16px}.rh-header-tools{gap:6px}html body .rh-tool{padding:8px}.rh-theme-label{display:none}.rh-more-grid{grid-template-columns:1fr}.rh-more-dialog{padding:20px}.rh-more-link small{font-size:13px}html body.rh-dashboard .rh-card--intro{padding:24px 20px}html body.rh-dashboard .rh-week li{font-size:10px;min-height:90px}.rh-quick-actions{gap:6px}html body .rh-quick-link{font-size:13px;padding:8px 10px}}
@media(max-width:359px){.rh-app-brand .rh-brand-mark{display:none}html body .rh-app-brand{font-size:20px}html body.rh-dashboard .rh-card{padding:16px}html body[data-rh-shell] main{padding-inline:12px}html body.rh-dashboard .rh-week{gap:2px}html body.rh-dashboard .rh-week li{font-size:9px}}
@media(prefers-reduced-motion:reduce){html *,html *::before,html *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Successful refresh announcements stay available to screen readers. */
#rh-status:not(:has(.rh-error)){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Metadata is a line of copy, not an empty-state panel. */
html body.rh-dashboard p.rh-empty{padding:0;margin:6px 0}
html body.rh-dashboard .rh-card>.rh-status{align-self:flex-start}
.rh-day-short{display:none}
@media(max-width:400px){
 html body.rh-dashboard .rh-week .rh-day-full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .rh-day-short{display:block}
}
