:root {
	--rd-paper: #f4f0e7;
	--rd-paper-deep: #ebe5d8;
	--rd-surface: #fffdf8;
	--rd-ink: #1b2430;
	--rd-muted: #69675f;
	--rd-line: #d7d0c3;
	--rd-navy: #172033;
	--rd-blue: #3157d5;
	--rd-blue-dark: #2443ab;
	--rd-blue-soft: #e9edfb;
	--rd-green: #168478;
	--rd-red: #c34e45;
	--rd-gold: #ad7b0c;
	--rd-radius-sm: 12px;
	--rd-radius: 18px;
	--rd-radius-lg: 28px;
	--rd-shadow-sm: 0 12px 30px rgba(23, 32, 51, .07);
	--rd-shadow: 0 24px 65px rgba(23, 32, 51, .1);
	--rd-font-sans: "RankDaily Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--rd-font-display: Iowan Old Style, Baskerville, "Times New Roman", Georgia, serif;
	--rd-page-width: 1120px;
	--rd-reading-width: 780px;
}

html { min-width: 320px; background: var(--rd-navy); scroll-behavior: smooth; }
body.rdm-v1 { min-width: 320px; min-height: 100vh; margin: 0; background: var(--rd-paper); color: var(--rd-ink); font-family: var(--rd-font-sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
.rdm-v1 *, .rdm-v1 *::before, .rdm-v1 *::after { box-sizing: border-box; }
.rdm-v1 button, .rdm-v1 input { font: inherit; }
.rdm-v1 a { color: inherit; text-decoration: none; }
.rdm-v1 h1, .rdm-v1 h2, .rdm-v1 h3 { margin-top: 0; color: var(--rd-ink); font-family: var(--rd-font-display); font-weight: 650; letter-spacing: -.035em; line-height: 1.04; }
.rdm-v1 p, .rdm-v1 ul, .rdm-v1 ol { margin-top: 0; }
.rdm-v1 button:focus-visible, .rdm-v1 a:focus-visible, .rdm-v1 input:focus-visible, .rdm-v1 summary:focus-visible { outline: 3px solid rgba(49, 87, 213, .45); outline-offset: 4px; }
.rdm-v1 [hidden] { display: none !important; }
.rdm-v1 .screen-reader-text, .rdm-v1 .skip-link { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rdm-v1 .skip-link:focus { z-index: 1000; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 10px 14px; border-radius: 8px; background: #fff; }

.rdm-shell { min-height: calc(100vh - 72px); background: var(--rd-paper); }
.rdm-page { width: min(calc(100% - 48px), var(--rd-page-width)); padding: clamp(48px, 7vw, 92px) 0 clamp(80px, 9vw, 128px); margin: 0 auto; }

.rd-global-header { position: sticky; z-index: 100; top: 0; width: 100%; border-bottom: 1px solid rgba(27, 36, 48, .12); background: rgba(244, 240, 231, .94); backdrop-filter: blur(16px); }
.rd-global-header__inner { display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 48px), var(--rd-page-width)); height: 72px; margin: 0 auto; }
.rd-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--rd-navy); font-family: var(--rd-font-display); font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.rd-brand > span { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 14px; }
.rd-global-nav { display: flex; align-items: stretch; gap: 28px; height: 100%; }
.rd-global-nav a { position: relative; display: flex; align-items: center; color: #454640; font-size: 14px; font-weight: 700; }
.rd-global-nav a::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--rd-blue); content: ""; transform: scaleX(0); transition: transform .2s ease; }
.rd-global-nav a:hover::after, .rd-global-nav a[aria-current="page"]::after { transform: scaleX(1); }
.rd-menu-toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 0; background: transparent; cursor: pointer; }
.rd-menu-toggle > span:not(.screen-reader-text) { display: block; height: 1.5px; margin: 5px 0; background: var(--rd-navy); }

.rdm-eyebrow { margin-bottom: 13px; color: var(--rd-blue); font-size: 11px; font-weight: 800; letter-spacing: .16em; line-height: 1.2; text-transform: uppercase; }
.rdm-daily-label { display: flex; justify-content: space-between; width: min(100%, 900px); padding: 0 4px 18px; margin: 0 auto 28px; border-bottom: 1px solid var(--rd-line); color: var(--rd-muted); font-size: 13px; }
.rdm-daily-label span { color: var(--rd-blue); font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }

.rdm-game { width: min(100%, 900px); margin: 0 auto; }
.rdm-game__header { max-width: 820px; margin: 0 auto 42px; text-align: center; }
.rdm-meta { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.rdm-meta span { padding: 5px 10px; border: 1px solid var(--rd-line); border-radius: 999px; background: rgba(255, 255, 255, .45); color: var(--rd-muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.rdm-game__header h1 { margin-bottom: 22px; font-size: clamp(2.8rem, 6vw, 5rem); }
.rdm-story { max-width: 750px; margin: 0 auto; color: var(--rd-muted); font-size: clamp(1.04rem, 1.8vw, 1.2rem); line-height: 1.75; }

.rdm-case { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; padding: clamp(26px, 5vw, 48px); border: 1px solid var(--rd-line); border-radius: var(--rd-radius-lg); background: var(--rd-surface); box-shadow: var(--rd-shadow-sm); }
.rdm-case h2 { max-width: 660px; margin-bottom: 28px; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.14; }
.rdm-clues { display: grid; gap: 12px; padding: 0; margin-bottom: 0; list-style: none; }
.rdm-clues li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; align-items: start; padding: 14px 16px; border: 1px solid #e1dbcf; border-radius: var(--rd-radius-sm); background: #fffdfa; }
.rdm-clues li > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--rd-blue-soft); color: var(--rd-blue-dark); font-size: 12px; font-weight: 900; }
.rdm-clues p { margin: 1px 0 0; color: #333a43; line-height: 1.55; }
.rdm-case__notes { align-self: start; padding: 20px; border-radius: var(--rd-radius); background: var(--rd-navy); color: #fff; }
.rdm-case__notes strong { display: block; margin-bottom: 10px; font-family: var(--rd-font-display); font-size: 19px; }
.rdm-case__notes p { margin-bottom: 11px; color: rgba(255, 255, 255, .72); font-size: 13px; line-height: 1.55; }
.rdm-case__notes p:last-child { margin-bottom: 0; }

.rdm-answer { padding: clamp(26px, 5vw, 44px); margin-top: 24px; border: 1px solid var(--rd-line); border-radius: var(--rd-radius-lg); background: rgba(255, 253, 248, .72); }
.rdm-answer fieldset { padding: 0; border: 0; }
.rdm-answer legend { margin-bottom: 18px; font-family: var(--rd-font-display); font-size: 24px; font-weight: 700; }
.rdm-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rdm-choices label { position: relative; display: block; cursor: pointer; }
.rdm-choices input { position: absolute; opacity: 0; pointer-events: none; }
.rdm-choices label > span { display: flex; min-height: 76px; flex-direction: column; justify-content: center; padding: 15px 18px; border: 1px solid var(--rd-line); border-radius: var(--rd-radius-sm); background: var(--rd-surface); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.rdm-choices label:hover > span { border-color: #aeb9dc; transform: translateY(-1px); }
.rdm-choices input:checked + span { border-color: var(--rd-blue); box-shadow: 0 0 0 3px rgba(49, 87, 213, .13); }
.rdm-choices input:focus-visible + span { outline: 3px solid rgba(49, 87, 213, .4); outline-offset: 3px; }
.rdm-choices b { font-size: 16px; }
.rdm-choices small { margin-top: 2px; color: var(--rd-muted); }
.rdm-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.rdm-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 20px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 1.2; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.rdm-button:hover { transform: translateY(-1px); }
.rdm-button--primary { border-color: var(--rd-navy); background: var(--rd-navy); color: #fff; box-shadow: 0 10px 24px rgba(23, 32, 51, .15); }
.rdm-button--primary:hover { background: #26334c; }
body.rdm-v2 .rdm-button--primary { border-color: #172033 !important; background: #172033 !important; color: #fff !important; -webkit-text-fill-color: #fff; }
body.rdm-v2 .rdm-button--primary:hover, body.rdm-v2 .rdm-button--primary:focus-visible { border-color: #26334c !important; background: #26334c !important; color: #fff !important; }
.rdm-button--secondary { border-color: var(--rd-line); background: var(--rd-surface); color: var(--rd-navy); }
.rdm-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.rdm-hints { display: grid; gap: 8px; margin-top: 18px; }
.rdm-hints p { padding: 11px 14px; margin: 0; border-left: 3px solid var(--rd-gold); background: #fbf3dc; color: #594719; font-size: 14px; }
.rdm-status { min-height: 26px; margin: 16px 0 0; color: var(--rd-muted); font-weight: 700; text-align: right; }
.rdm-status.is-wrong { color: var(--rd-red); }

.rdm-result { padding: clamp(34px, 6vw, 58px); margin-top: 30px; border-radius: var(--rd-radius-lg); background: var(--rd-navy); color: #fff; box-shadow: var(--rd-shadow); }
.rdm-result h2 { margin-bottom: 14px; color: #fff; font-size: clamp(2.2rem, 4vw, 3.5rem); }
.rdm-result p { max-width: 720px; color: rgba(255, 255, 255, .78); }
.rdm-result p strong { color: #fff; }
.rdm-result .rdm-eyebrow { color: #9eb0ff; }
.rdm-result__score { display: flex; align-items: baseline; gap: 8px; margin-bottom: 26px; }
.rdm-result__score strong { font-family: var(--rd-font-display); font-size: clamp(3.5rem, 8vw, 6rem); line-height: .9; }
.rdm-result__score span { color: rgba(255, 255, 255, .64); }
.rdm-result__actions { display: flex; gap: 12px; margin-top: 28px; }
body.rdm-v2 .rdm-result .rdm-button--primary { border-color: #fff !important; background: #fff !important; color: var(--rd-navy) !important; -webkit-text-fill-color: var(--rd-navy); }
.rdm-result .rdm-button--secondary { border-color: rgba(255, 255, 255, .28); background: transparent; color: #fff; }

.rdm-editorial-solution { max-width: var(--rd-reading-width); margin: 72px auto 0; border-top: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line); }
.rdm-editorial-solution summary { padding: 20px 4px; color: var(--rd-navy); font-weight: 800; cursor: pointer; }
.rdm-editorial-solution summary span { color: var(--rd-muted); font-weight: 500; }
.rdm-editorial-solution > div { padding: 2px 4px 28px; }
.rdm-editorial-solution h2 { margin-bottom: 14px; font-size: 28px; }
.rdm-editorial-solution p { color: var(--rd-muted); }
.rdm-review-note { padding-top: 16px; border-top: 1px solid var(--rd-line); font-size: 13px; }
.rdm-ad-zone { min-height: 90px; padding-top: 40px; margin-top: 160px; border-top: 1px solid var(--rd-line); text-align: center; }

.rdm-page-header { max-width: 860px; margin-bottom: 56px; }
.rdm-page-header h1 { margin-bottom: 20px; font-size: clamp(3.5rem, 7vw, 6rem); }
.rdm-page-header > p:not(.rdm-eyebrow) { max-width: 700px; margin-bottom: 28px; color: var(--rd-muted); font-size: 19px; }
.rdm-today-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 38px); margin: -20px 0 36px; border: 1px solid #bfc8e6; border-radius: var(--rd-radius-lg); background: linear-gradient(135deg, var(--rd-blue-soft), var(--rd-surface) 72%); box-shadow: var(--rd-shadow-sm); }
.rdm-today-card h2 { margin-bottom: 10px; font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
.rdm-today-card p:not(.rdm-eyebrow) { max-width: 690px; margin-bottom: 8px; color: var(--rd-muted); }
.rdm-today-card small { color: var(--rd-muted); font-weight: 700; }
.rdm-empty { padding: 28px; border: 1px dashed var(--rd-line); border-radius: var(--rd-radius); color: var(--rd-muted); text-align: center; }
.rdm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.rdm-filters button { padding: 8px 13px; border: 1px solid var(--rd-line); border-radius: 999px; background: transparent; color: var(--rd-muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.rdm-filters button.is-active { border-color: var(--rd-navy); background: var(--rd-navy); color: #fff; }
.rdm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rdm-card { position: relative; display: flex; min-height: 300px; flex-direction: column; padding: 26px; overflow: hidden; border: 1px solid var(--rd-line); border-radius: var(--rd-radius); background: var(--rd-surface); box-shadow: var(--rd-shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.rdm-card:hover { transform: translateY(-4px); box-shadow: var(--rd-shadow); }
.rdm-card__number { position: absolute; top: 16px; right: 18px; color: #d6d0c5; font-family: var(--rd-font-display); font-size: 38px; }
.rdm-card__topic { padding-right: 46px; margin-bottom: 30px; color: var(--rd-blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rdm-card h2 { margin-bottom: 12px; font-size: 27px; line-height: 1.08; }
.rdm-card p { margin-bottom: 22px; color: var(--rd-muted); font-size: 14px; line-height: 1.55; }
.rdm-card__cta { margin-top: auto; color: var(--rd-navy); font-size: 13px; font-weight: 900; }
.rdm-card__complete { position: absolute; right: 18px; bottom: 19px; color: var(--rd-green); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.rdm-card.is-filtered { display: none; }

.rdm-legal article { width: min(100%, var(--rd-reading-width)); margin: 0 auto; }
.rdm-legal h1 { margin-bottom: 34px; font-size: clamp(3.2rem, 7vw, 5.4rem); }
.rdm-prose { padding: clamp(26px, 5vw, 46px); border: 1px solid var(--rd-line); border-radius: var(--rd-radius-lg); background: var(--rd-surface); }
.rdm-prose h2 { margin: 34px 0 12px; font-size: 27px; }
.rdm-prose p { color: var(--rd-muted); }
.rdm-prose a { color: var(--rd-blue-dark); text-decoration: underline; }

.rdm-footer { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; padding: 54px max(24px, calc((100vw - var(--rd-page-width)) / 2)); background: var(--rd-navy); color: #fff; }
.rdm-footer .rd-brand { color: #fff; }
.rdm-footer p { margin: 10px 0 0; color: rgba(255, 255, 255, .6); }
.rdm-footer nav { display: flex; flex-wrap: wrap; align-content: start; gap: 10px 22px; }
.rdm-footer nav a { color: rgba(255, 255, 255, .78); font-size: 13px; font-weight: 700; }
.rdm-copyright { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; }

@media (max-width: 880px) {
	.rdm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rdm-case { grid-template-columns: 1fr; }
	.rdm-case__notes { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: start; }
	.rdm-case__notes p { margin: 0; }
}

@media (max-width: 720px) {
	.rdm-today-card { grid-template-columns: 1fr; margin-top: 0; }
	.rd-global-header__inner { width: min(calc(100% - 28px), var(--rd-page-width)); height: 64px; }
	.rd-menu-toggle { display: block; }
	.rd-global-nav { position: absolute; top: 64px; right: 0; left: 0; display: none; height: auto; flex-direction: column; gap: 0; padding: 10px 20px 18px; border-bottom: 1px solid var(--rd-line); background: var(--rd-paper); }
	.rd-global-nav.is-open { display: flex; }
	.rd-global-nav a { min-height: 46px; justify-content: center; }
	.rdm-page { width: min(calc(100% - 28px), var(--rd-page-width)); padding-top: 38px; }
	.rdm-daily-label { display: grid; gap: 4px; }
	.rdm-game__header { text-align: left; }
	.rdm-meta { justify-content: flex-start; flex-wrap: wrap; }
	.rdm-game__header h1 { font-size: clamp(2.55rem, 13vw, 4.2rem); }
	.rdm-case, .rdm-answer, .rdm-result { padding: 24px 18px; border-radius: var(--rd-radius); }
	.rdm-case__notes { display: block; }
	.rdm-case__notes p { margin-bottom: 8px; }
	.rdm-choices { grid-template-columns: 1fr; }
	.rdm-actions, .rdm-result__actions { flex-direction: column-reverse; }
	.rdm-button { width: 100%; }
	.rdm-status { text-align: left; }
	.rdm-grid { grid-template-columns: 1fr; }
	.rdm-card { min-height: 270px; }
	.rdm-footer { grid-template-columns: 1fr; padding: 44px 22px; }
	.rdm-footer nav { gap: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.rdm-v1 *, .rdm-v1 *::before, .rdm-v1 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
