/* Public policy pages follow the About page's hero and three-card composition. */
.rules-page{max-width:1120px}
.rules-page>.app-heading{margin-bottom:26px}
.rules-hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:35px;padding:28px;border:1px solid var(--ui-line);border-radius:20px;background:var(--surface);box-shadow:0 10px 30px -24px color-mix(in srgb,var(--text-main) 15%,transparent)}
.rules-hero-copy{min-width:0}
.rules-eyebrow{display:block;margin-bottom:12px;color:var(--accent-strong);font-size:11px;line-height:1.9}
.rules-hero h2{font-size:33px;line-height:1.8;color:var(--text-main);margin:0 0 16px;font-weight:700}
.rules-hero-copy>p{font-size:13px;line-height:2.1;color:var(--text-muted);margin:0}
.rules-hero .app-button{display:inline-flex;align-items:center;gap:10px;margin-top:22px;min-height:44px;padding:10px 17px;border:1px solid var(--accent);border-radius:11px;background:var(--accent);color:var(--surface);font-size:12px;font-weight:600}
.rules-hero .app-button>.icon{width:16px;height:16px;transform:rotate(180deg)}
.rules-hero .app-button:hover{filter:brightness(.96)}
.rules-meta{display:flex;flex-wrap:wrap;align-items:center;gap:5px 18px;margin-top:18px;color:var(--text-muted);font-size:10px;line-height:1.9}
.rules-meta>span+span{position:relative}
.rules-meta>span+span::before{content:'';position:absolute;inset-inline-start:-10px;top:50%;width:3px;height:3px;border-radius:50%;background:var(--text-muted);opacity:.4}
.rules-meta time{margin-inline-start:5px}
.rules-hero-art{position:relative;min-width:0;height:360px;overflow:hidden;border:1px solid color-mix(in srgb,var(--accent) 9%,var(--ui-line));border-radius:17px;background:linear-gradient(145deg,var(--surface-soft),color-mix(in srgb,var(--accent) 7%,var(--surface)))}
.rules-art-scene{display:block;width:100%;height:100%}
.rules-art-halo{fill:var(--accent-soft);opacity:.65}
.rules-art-orbit{stroke:color-mix(in srgb,var(--accent) 22%,var(--ui-line))}
.rules-art-back{fill:color-mix(in srgb,var(--accent) 12%,var(--surface));stroke:color-mix(in srgb,var(--accent) 15%,var(--ui-line))}
.rules-art-paper{fill:var(--surface);stroke:var(--ui-line);stroke-width:1.2}
.rules-art-accent{fill:var(--accent)}
.rules-art-white{stroke:var(--surface)}
.rules-art-ink{stroke:var(--text-main);opacity:.65}
.rules-art-line{stroke:var(--ui-line)}
.rules-art-check-bg{fill:var(--accent-pale)}
.rules-art-check{stroke:var(--accent-strong)}
.rules-art-dot{fill:var(--accent);opacity:.35}
.rules-art-spark{stroke:var(--accent);opacity:.35}
.rules-art-symbol{position:absolute;inset-inline-end:13%;bottom:12%;display:grid;place-items:center;width:84px;height:84px;border:6px solid var(--surface);border-radius:24px;background:var(--accent);color:var(--surface);box-shadow:0 10px 24px color-mix(in srgb,var(--accent) 16%,transparent);transform:rotate(-8deg)}
.rules-art-symbol>.icon{width:43px;height:43px;stroke-width:1.5}
.rules-overview{margin:20px 0 30px}
.rules-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.rules-highlights>a{display:block;min-width:0;padding:24px;border:1px solid var(--ui-line);border-radius:20px;background:var(--surface);color:inherit;text-decoration:none;box-shadow:0 8px 26px -24px color-mix(in srgb,var(--text-main) 18%,transparent);transition:border-color .18s,background .18s}
.rules-highlight-heading{display:flex;align-items:center;gap:12px}
.rules-highlight-heading h2{min-width:0;margin:0;font-size:16px;line-height:1.85;font-weight:600;color:var(--text-main)}
.rules-highlight-icon{display:block;flex:0 0 36px;width:36px;height:36px}
.rules-highlight-icon>.icon{display:block;width:100%;height:100%;color:var(--accent-strong);object-fit:contain}
.rules-highlights p{margin:15px 0 0;color:var(--text-muted);font-size:12px;line-height:2}
.rules-highlights>a:hover{border-color:color-mix(in srgb,var(--accent) 35%,var(--ui-line));background:color-mix(in srgb,var(--accent) 2%,var(--surface))}
.rules-highlights>a:focus-visible,.rules-hero .app-button:focus-visible{outline:2px solid var(--accent-strong);outline-offset:4px}
#rules-document{scroll-margin-top:var(--rules-anchor-offset,24px)}
.rules-layout{display:grid;grid-template-columns:216px minmax(0,1fr);gap:26px;align-items:start}
.rules-layout--plain{grid-template-columns:minmax(0,1fr)}
.rules-contents{position:sticky;top:24px;min-width:0;padding:16px 10px 10px;border:1px solid var(--ui-line);border-radius:14px;background:var(--surface);max-height:calc(100dvh - 48px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ui-line) transparent}
.rules-contents-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 6px 12px}
.rules-contents h2{font-size:12px;font-weight:600;margin:0;color:var(--text-main)}
.rules-contents-head>span{font-size:10px;color:var(--text-muted);white-space:nowrap}
.rules-reading{margin:0 6px 13px}
.rules-reading[hidden]{display:none}
.rules-reading>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--text-muted);font-size:9px;margin-bottom:7px}
.rules-reading [data-reading-value]{font-variant-numeric:tabular-nums;color:var(--accent-strong)}
.rules-reading-track{height:3px;border-radius:6px;background:var(--surface-soft);overflow:hidden}
.rules-reading-track>span{display:block;width:var(--reading-progress,0%);height:100%;background:var(--accent);border-radius:inherit;transition:width .15s linear}
.rules-contents ol{display:grid;gap:3px;margin:0;padding:0;list-style:none}
.rules-contents a{position:relative;display:grid;grid-template-columns:23px minmax(0,1fr);align-items:center;gap:6px;padding:8px 7px;border-radius:8px;font-size:12px;line-height:1.85;color:var(--text-muted);text-decoration:none}
.rules-contents-number{font-size:10px;text-align:center;font-variant-numeric:tabular-nums;color:var(--text-muted);opacity:.75}
.rules-contents a:hover{background:var(--surface-soft);color:var(--text-main)}
.rules-contents a[aria-current=location]{background:var(--accent-pale);color:var(--accent-strong);font-weight:600}
.rules-contents a[aria-current=location]::before{content:'';position:absolute;inset-inline-start:0;top:50%;height:16px;width:2px;border-radius:2px;background:var(--accent);transform:translateY(-50%)}
.rules-contents a[aria-current=location] .rules-contents-number{color:var(--accent-strong);opacity:1}
.rules-contents a:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.rules-copy{counter-reset:rules-section;min-width:0;padding:30px 32px;border:1px solid var(--ui-line);border-radius:16px;background:var(--surface);color:var(--text-main);font-size:14px;line-height:2.15;overflow-wrap:anywhere}
.rules-copy>:first-child{margin-top:0}
.rules-copy>p:first-child{font-size:13px;line-height:2.2;color:var(--text-muted);margin-bottom:0}
.rules-copy h2{counter-increment:rules-section;display:flex;align-items:flex-start;gap:12px;font-size:17px;font-weight:600;line-height:1.9;margin:28px 0 16px;padding-top:26px;border-top:1px solid var(--ui-line);scroll-margin-top:var(--rules-anchor-offset,24px)}
.rules-section-number{display:grid;place-items:center;flex:0 0 30px;min-width:30px;height:30px;margin-top:1px;border-radius:8px;background:var(--accent-pale);color:var(--accent-strong);font-size:11px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.rules-section-number:empty::before{content:counter(rules-section,persian)}
.rules-section-title{min-width:0}
.rules-copy h2:target{color:var(--accent-strong)}
.rules-copy h3{font-size:16px;margin:22px 0 12px}
.rules-copy h4{font-size:14px;margin:18px 0 10px}
.rules-copy p{margin:0 0 14px}
.rules-copy ul{list-style:none;padding:0;margin:12px 0;display:grid;gap:10px}
.rules-copy ul>li{position:relative;padding-inline-start:16px}
.rules-copy ul>li::before{content:'';position:absolute;inset-inline-start:1px;top:1em;width:4px;height:4px;border-radius:50%;background:var(--text-muted);opacity:.6}
.rules-copy ol{padding-inline-start:22px;margin:12px 0;display:grid;gap:10px}
.rules-copy strong{font-weight:600}
.rules-copy a{color:var(--accent-strong);text-decoration:underline;text-underline-offset:4px}
.rules-copy blockquote{border-inline-start:3px solid var(--ui-line);padding-inline-start:16px;margin:18px 0;color:var(--text-muted)}
.rules-copy>:last-child{margin-bottom:0}
.rules-help{display:flex;align-items:center;gap:13px;margin-top:24px;padding:18px 20px;border:1px solid var(--ui-line);border-radius:14px;background:var(--surface)}
.rules-help-symbol{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--surface-soft);color:var(--accent-strong)}
.rules-help-symbol>.icon{width:21px;height:21px;stroke-width:1.7}
.rules-help h2{font-size:13px;line-height:1.9;margin:0;color:var(--text-main)}
.rules-help p{font-size:11px;line-height:1.9;color:var(--text-muted);margin:3px 0 0}
.rules-help>a{display:flex;align-items:center;justify-content:center;gap:8px;min-height:38px;margin-inline-start:auto;padding:8px 12px;border:1px solid var(--ui-line);border-radius:9px;background:var(--surface);color:var(--accent-strong);font-size:11px;white-space:nowrap}
.rules-help>a>.icon{width:13px;height:13px;transform:rotate(180deg)}
.rules-help>a:hover{background:var(--accent-pale)}
@media(max-width:1000px){.rules-hero h2{font-size:28px}.rules-layout{grid-template-columns:190px minmax(0,1fr);gap:20px}.rules-copy{padding:24px}.rules-layout--plain{grid-template-columns:minmax(0,1fr)}.rules-highlights>a{padding:20px}.rules-highlight-heading{gap:9px}.rules-highlight-heading h2{font-size:14px}}
@media(max-width:700px){
 .rules-page>.app-heading{margin-bottom:20px}
 .rules-hero{display:flex;flex-direction:column;align-items:stretch;padding:20px;gap:24px;border-radius:18px}
 .rules-hero h2{font-size:27px;line-height:1.85}
 .rules-hero-copy>p{font-size:12px}
 .rules-hero-art{height:250px;border-radius:15px}
 .rules-art-symbol{width:66px;height:66px;border-width:5px;border-radius:20px}
 .rules-art-symbol>.icon{width:33px;height:33px}
 .rules-overview{margin:16px 0 24px}
 .rules-highlights{grid-template-columns:minmax(0,1fr);gap:12px}
 .rules-highlights>a{padding:20px;border-radius:18px}
 .rules-highlight-heading{gap:12px}
 .rules-highlight-heading h2{font-size:16px}
 .rules-highlight-icon{flex-basis:34px;width:34px;height:34px}
 .rules-highlights p{font-size:12px;line-height:2;margin-top:12px}
 .rules-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 .rules-contents{position:sticky;top:8px;z-index:5;padding:12px 10px 6px;max-height:none;overflow:hidden;border-radius:12px;box-shadow:0 5px 16px color-mix(in srgb,var(--text-main) 4%,transparent)}
 .rules-contents-head{margin:0 2px 8px}
 .rules-contents h2{font-size:11px}
 .rules-reading{margin:0 2px 8px}
 .rules-reading>div:first-child{margin-bottom:5px}
 .rules-contents ol{display:flex;overflow-x:auto;gap:6px;padding:2px 2px 7px;scrollbar-width:thin;scrollbar-color:var(--ui-line) transparent}
 .rules-contents li{flex:none}
 .rules-contents a{display:flex;gap:6px;padding:6px 9px;white-space:nowrap;font-size:11px}
 .rules-contents-number{min-width:18px}
 .rules-copy{padding:20px 18px;border-radius:14px;font-size:13px;line-height:2.2}
 .rules-copy h2{gap:10px;font-size:15px;margin-top:24px;padding-top:22px;scroll-margin-top:var(--rules-anchor-offset,150px)}
 .rules-section-number{flex-basis:27px;min-width:27px;height:27px;border-radius:7px;font-size:10px}
 .rules-copy ul{gap:9px}
 .rules-help{flex-wrap:wrap;padding:16px;gap:10px}
 .rules-help>a{margin-inline-start:46px;min-height:36px}
}
@media(prefers-reduced-motion:reduce){.rules-reading-track>span,.rules-highlights>a{transition:none}}
