/* /pravila (/rules): the illustrated rules page. Only what site.css has no component for; colours, fonts and spacing are the site's own tokens. */

.rules-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.rules-toc a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); font: 400 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper-2); text-decoration: none; transition: color .15s, border-color .15s; }
.rules-toc a:hover { color: var(--amber); border-color: var(--amber); }
.rules-toc a i { font-style: normal; color: var(--amber); }
.guide-chapters { margin: 28px 0 8px; padding: 18px 20px; border: 1px solid var(--line-strong); background: var(--panel, transparent); }
.guide-chapters[hidden] { display: none; }
.guide-chapters h2 { margin: 0 0 6px; font-size: 22px; }
.guide-chapters p { margin: 0 0 14px; color: var(--muted); }

.rule-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); grid-template-areas: 'text fig'; gap: clamp(20px, 4vw, 48px); align-items: start; }
.rule-text { grid-area: text; min-width: 0; max-width: 68ch; }
.rule-fig { grid-area: fig; margin: 0; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 8px; }
.rule-text p, .rule-text li { color: var(--paper-2); }
.rule-text ul { padding-left: 1.3em; margin: 0 0 1.1em; }
.rule-text li { margin: .5em 0; }
.rule-text li::marker { color: var(--amber); }
.rule-text code { background: rgba(255, 255, 255, .065); padding: 1px 5px; color: var(--paper); word-break: break-word; }
.rule-text .stat-grid { margin: 22px 0 0; }
.rule-text .stat-grid .v { font-size: 30px; }
.rules .section-head h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.rules .section-head { margin-bottom: 20px; }
.rules .section-head .kicker { margin-bottom: 8px; }

b.n { font: 700 .93em var(--mono); color: var(--amber); white-space: nowrap; font-variant-numeric: tabular-nums; }

.rule-table { margin-top: 26px; }
.rule-table.narrow { max-width: 860px; }
.rule-table .tbl td:first-child, .rule-table .tbl th:first-child { padding-left: 0; }
.rule-table .tbl td.num b, .rule-table .tbl td b.n { font-weight: 700; }
.rule-table .tbl td.txt { font-family: var(--text); font-size: 15.5px; white-space: normal; text-align: right; }
.rule-table .tbl td.cry { font-size: 15px; }
.cry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 4vw, 48px); }
.cry-grid .tbl td { padding: 9px 12px; }
.cry-grid .tbl td:first-child { width: 1%; font: 400 12.5px var(--mono); color: var(--amber); }

/* the drawings: inline SVG in the site's colours (classes instead of attributes, so a token change reaches them too) */
.ill { display: block; width: 100%; height: auto; }
.ill text { font: 400 10.5px var(--mono); fill: var(--muted); letter-spacing: .02em; }
.ill .p { fill: var(--paper-2); }
.ill .a { fill: var(--amber); }
.ill .hz { fill: #ff8393; }
.ill .ok { fill: var(--ok); }
.ill .c { text-anchor: middle; }
.ill .e { text-anchor: end; }
.ill .big { font: 900 22px var(--display); fill: var(--paper); letter-spacing: .04em; }
.ill .idx { font: 700 13px var(--mono); fill: var(--ink); text-anchor: middle; }
.ill .ln { stroke: var(--line-strong); fill: none; stroke-width: 1; }
.ill .ax { stroke: var(--dim); fill: none; stroke-width: 1; }
.ill .am { stroke: var(--amber); fill: none; stroke-width: 1.6; }
.ill .amf { fill: var(--amber); }
.ill .amw { fill: var(--amber-wash); }
.ill .hzs { stroke: var(--hazard); fill: none; stroke-width: 1.6; }
.ill .hzf { fill: var(--hazard); }
.ill .hzw { fill: var(--hazard-wash); }
.ill .okf { fill: var(--ok); }
.ill .oks { stroke: var(--ok); fill: none; stroke-width: 1.6; }
.ill .gr { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1; }
.ill .panel { fill: var(--surface-2); stroke: var(--line); }
.ill .rockf { fill: #4a4f58; stroke: #2c3138; stroke-width: 1.5; }
.ill .dash { stroke-dasharray: 4 3; }
.ill .dot { stroke-dasharray: 1.5 3; }
.ill .thin { stroke-width: 1; }

@media (max-width: 880px) {
  .rule-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'fig' 'text'; }
  .rule-text { max-width: none; }
  .cry-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .rule-text .stat-grid > div { border-bottom: 1px solid var(--line); }
  .rule-table .tbl td.txt { font-size: 14.5px; }
}
.tbl th.rowhead { font: 400 15.5px/1.35 var(--text); letter-spacing: 0; text-transform: none; color: var(--paper-2); white-space: normal; padding: 13px 14px 13px 0; }
@media (max-width: 700px) {
  .rule-table .tbl th { letter-spacing: .04em; padding: 9px 5px; white-space: normal; font-size: 10px; }
  .rule-table .tbl td { padding: 10px 5px; }
  .rule-table .tbl td.num { font-size: 13px; }
  .tbl th.rowhead { padding: 10px 6px 10px 0; font-size: 15px; }
}
.rule-table .tbl td.num .txt { display: inline-block; white-space: normal; max-width: 22ch; font-family: var(--text); font-size: 15px; }
