/* The Royal Game of Ur. Copyright (C) 2026 MrSuttonmann. GNU AGPL-3.0 or later; see LICENSE. */

/* The Rules window: rules text, route diagram and dice odds. */

/* rules */
details { border: 1.5px solid var(--ink-soft); border-radius: var(--hand); padding: 12px 18px; background: rgba(246,236,210,.55); }
summary { cursor: pointer; font-family: var(--f-display); font-size: 21px; }
summary:focus-visible { outline: 2px dashed var(--vermilion); outline-offset: 4px; }
.rules { max-width: 62ch; }
.rules li { margin-bottom: 6px; }
.rules li::marker { color: var(--vermilion); }
.rules h4 { font-family: var(--f-display); font-weight: 400; font-size: 18px; margin: 16px 0 4px; }
.rules p { margin: 0 0 6px; }
/* the first heading in a window sits flush with the top; the odds table follows its intro closely */
.rules .first-heading { margin-top: 0; }
.rules .odds-intro { margin-bottom: 0; }
.variant-now { padding: 6px 12px; border: 1.5px dashed var(--vermilion); border-radius: var(--hand); }

.rules .route { display: block; width: 100%; max-width: 340px; height: auto; margin: 6px 0 2px; }
.rules .sun { color: var(--c-sun); font-weight: 600; }
.rules .moon { color: var(--c-moon); font-weight: 600; }
/* the route diagram: the board's squares (safe roses ringed in gold), and each side's route as an arrow */
.diagram-square { fill: var(--bone); stroke: var(--ink-soft); stroke-width: 1; }
.diagram-square.diagram-rose { fill: var(--ochre); fill-opacity: .55; }
.diagram-rose.safe-sq { stroke: var(--ochre); stroke-width: 2.5; }
.diagram-rose-dot { fill: var(--vermilion); fill-opacity: .8; }
.diagram-gate { font: italic 9px var(--f-note); fill: var(--ink-soft); }
.route-line { fill: none; stroke-width: 3; stroke-linejoin: round; }
.route-line-sun { stroke: var(--c-sun); }
.route-line-moon { stroke: var(--c-moon); stroke-dasharray: 6 3; }
.route-arrowhead-sun { fill: var(--c-sun); }
.route-arrowhead-moon { fill: var(--c-moon); }
.odds { display: grid; grid-template-columns: auto 1fr auto; gap: 5px 10px; align-items: center; font-variant-numeric: tabular-nums; max-width: 360px; margin-top: 8px; }
.odds .bar { height: 11px; background: var(--vermilion); opacity: .75; border-radius: 6px 2px 7px 3px; }
.odds .n { font-family: var(--f-display); font-size: 18px; }
.odds .p { font-family: var(--f-note); color: var(--ink-soft); }
