/* Role.aspx: the resident theme from Default.aspx. */
.public-rules {
    --rules-ink: #0f172a;
    --rules-muted: #64748b;
    --rules-line: rgba(99,102,241,.18);
    --rules-brown: #4f46e5;
    margin: 0;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    color: var(--rules-ink);
    font-family: IRANSans, Tahoma, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(99,102,241,.22), transparent 28%),
        radial-gradient(circle at left 20%, rgba(6,182,212,.16), transparent 22%),
        linear-gradient(180deg, #09111f 0%, #0f1d39 26%, #152853 48%, #edf3ff 100%);
}
.public-rules .rules-site-header,
.public-rules main,
.public-rules .rules-site-footer { width: calc(100% - 36px); max-width: 1184px; margin-inline: auto; }
.public-rules .rules-site-header {
    margin-top: 28px;
    margin-bottom: 18px;
    padding: 20px 24px;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 28px;
    background: linear-gradient(145deg,#f9fbff,#eef6ff);
    box-shadow: 0 18px 45px rgba(6,17,45,.18);
}
.public-rules .rules-brand { min-width: 0; }
.public-rules .rules-brand strong { overflow-wrap: anywhere; line-height: 1.8; }
.public-rules .rules-brand > span {
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg,#4f46e5,#6366f1);
    box-shadow: 0 8px 20px rgba(79,70,229,.2);
}
.public-rules .rules-brand small { color: #64748b; }
.public-rules .rules-site-header > a:last-child {
    flex-shrink: 0;
    padding: 11px 15px;
    border: 1px solid rgba(79,70,229,.15);
    border-radius: 14px;
    color: #4338ca;
    background: #eef2ff;
}
.public-rules main {
    padding: 20px;
    border-radius: 36px;
    border: 1px solid rgba(255,255,255,.62);
    background:
        radial-gradient(circle at 8% 0%,rgba(99,102,241,.10),transparent 24%),
        radial-gradient(circle at 92% 12%,rgba(14,165,233,.10),transparent 25%),
        linear-gradient(145deg,#f9fbff 0%,#f4f7ff 46%,#eef6ff 100%);
    box-shadow: 0 30px 80px rgba(15,23,42,.20), inset 0 1px 0 rgba(255,255,255,.92);
}
.public-rules .rules-hero {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border-radius: 27px;
    border: 1px solid rgba(255,255,255,.08);
    background:
        radial-gradient(circle at 90% 15%,rgba(96,165,250,.22),transparent 24%),
        radial-gradient(circle at 12% 90%,rgba(129,140,248,.18),transparent 28%),
        linear-gradient(135deg,#0b1220 0%,#111d3c 48%,#172554 100%);
    color: #fff;
    box-shadow: 0 18px 45px rgba(15,23,42,.20);
}
.public-rules .rules-hero::before {
    content: ''; position: absolute; top: 0; right: 8%; width: 160px; height: 4px;
    border-radius: 0 0 10px 10px; background: linear-gradient(90deg,#818cf8,#38bdf8);
}
.public-rules .rules-eyebrow { color: #c7d2fe; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); }
.public-rules .rules-hero h1 { font-size: clamp(24px,3.4vw,38px); font-weight: 900; color: #fff; }
.public-rules .rules-hero > p { color: #cbd5e1; }
.public-rules .rules-hero-stat { flex-wrap: wrap; color: #c7d2fe; line-height: 2; }
.public-rules .rules-hero-stat b { color: #7dd3fc; }
.public-rules .rules-hero-stat span { border-color: rgba(165,180,252,.3); color: #e0e7ff; overflow-wrap: anywhere; }
.public-rules .rules-public-content { max-width: none; padding: 26px 0 0; }
.public-rules .rules-public-tools { border-radius: 20px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.public-rules .rules-public-tools label { color: #475569; }
.public-rules .rules-public-tools input { background: #f1f5ff; border: 1px solid #e0e7ff; border-radius: 12px; color: #0f172a; }
.public-rules .rules-public-tools input::placeholder { color: #64748b; opacity: 1; }
.public-rules .rules-category-tabs { gap: 10px; margin: 20px 0 24px; }
.public-rules .rules-category-tabs button { min-height: 44px; color: #475569; background: #fff; border-radius: 14px; }
.public-rules .rules-category-tabs button:hover { border-color: #818cf8; background: #eef2ff; }
.public-rules .rules-category-tabs button.active { color: #fff; border-color: #4f46e5; background: linear-gradient(135deg,#4f46e5,#6366f1); box-shadow: 0 8px 18px rgba(79,70,229,.18); }
.public-rules .rules-public-grid { gap: 20px; }
.public-rules .rule-public-card { min-width: 0; padding: 26px; border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(15,23,42,.06); }
.public-rules .rule-public-card::before { background: linear-gradient(90deg,#38bdf8,#818cf8,#4f46e5); }
.public-rules .rule-card-heading { gap: 14px; }
.public-rules .rule-card-heading > div { min-width: 0; }
.public-rules .rule-card-heading h2 { color: #0f172a; overflow-wrap: anywhere; }
.public-rules .rule-card-heading small { color: #4338ca; }
.public-rules .rule-number { color: #4338ca; background: linear-gradient(145deg,#eef2ff,#e0e7ff); border: 1px solid #dbe4ff; }
.public-rules .rule-body { color: #475569; }
.public-rules .rule-clauses { background: #f1f5ff; border-color: #dbe4ff; border-radius: 16px; }
.public-rules .rule-clauses strong { color: #4338ca; }
.public-rules .rule-clauses p { color: #475569; }
.public-rules .rule-public-card footer { color: #64748b; border-color: #e2e8f0; line-height: 2; }
.public-rules .rules-public-note { border-color: #c7d2fe; background: linear-gradient(135deg,#eef2ff,#eaf6ff); border-radius: 22px; }
.public-rules .rules-public-note strong { color: #312e81; }
.public-rules .rules-public-note p { color: #475569; }
.public-rules .rules-empty { color: #475569; border-color: #a5b4fc; background: #f8faff; line-height: 2; }
.public-rules .rules-site-footer { padding: 24px 16px 32px; color: #334155; background: transparent; line-height: 2; }
.public-rules a:focus-visible,
.public-rules button:focus-visible,
.public-rules input:focus-visible { outline: 3px solid #6366f1; outline-offset: 4px; }
@media (max-width: 800px) {
    .public-rules .rules-public-grid { grid-template-columns: 1fr; }
    .public-rules .rules-public-tools { flex-wrap: wrap; }
    .public-rules .rules-public-tools label { display: block; width: 100%; }
}
@media (max-width: 550px) {
    .public-rules .rules-site-header,
    .public-rules main,
    .public-rules .rules-site-footer { width: calc(100% - 24px); }
    .public-rules .rules-site-header { margin-top: 16px; padding: 14px; border-radius: 22px; flex-wrap: wrap; gap: 14px; }
    .public-rules .rules-site-header > a:last-child { min-height: 44px; display: inline-flex; align-items: center; font-size: 11px; }
    .public-rules main { padding: 12px; border-radius: 28px; }
    .public-rules .rules-hero { padding: 26px 20px; border-radius: 21px; }
    .public-rules .rules-hero h1 { font-size: 24px; }
    .public-rules .rules-hero-stat span { width: 100%; margin: 0; padding: 0; border: 0; }
    .public-rules .rules-public-content { padding-top: 18px; }
    .public-rules .rules-public-tools { padding: 14px; }
    .public-rules .rules-public-tools input { flex-basis: 100%; width: 100%; min-height: 44px; font-size: 16px; }
    .public-rules .rules-category-tabs { gap: 8px; }
    .public-rules .rules-category-tabs button { font-size: 12px; padding: 10px 13px; }
    .public-rules .rule-public-card { padding: 20px; }
    .public-rules .rule-card-heading h2 { font-size: 17px; }
    .public-rules .rules-public-note { padding: 20px; }
}
