/*
Theme Name: Rules by Country
Description: Child theme of Kadence for rulesbycountry.com. Layout only: all rule content comes from the rbc-rules plugin and wp-content/rbc-data. Managed in /opt/webstack/themes/kadence-child-rbc.
Template: kadence
Version: 1.1.0
Requires at least: 6.5
Text Domain: kadence-child-rbc
*/

/* ---------------------------------------------------------------- font: Inter (SIL OFL, assets/fonts/OFL.txt), hosted here: no request to any third party */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------------------------------------------------------------- design tokens
   Calm and businesslike: white, deep blue, one teal for e-scooters. System fonts (no external requests). */
:root {
	--rbc-primary: #1D4E89;
	--rbc-primary-dark: #153A66;
	--rbc-teal: #0F766E;
	--rbc-ink: #0F172A;
	--rbc-text: #1F2937;
	--rbc-muted: #5B6572;
	--rbc-line: #DCE2EA;
	--rbc-soft: #F4F7FA;
	--rbc-radius: 12px;
	--global-content-width: 1120px;
	--rbc-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--global-body-font-family: var(--rbc-font);
	--global-heading-font-family: var(--rbc-font);
}

body, button, input, select, textarea {
	font-family: var(--rbc-font);
	font-feature-settings: "cv11", "ss03";
}
body {
	background: #fff;
	color: var(--rbc-text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid #7FB0E6; outline-offset: 2px; border-radius: 3px; }

/* ---------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--rbc-line); background: #fff; }
.site-header .site-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; color: var(--rbc-ink); display: flex; align-items: center; gap: .6rem; margin: 0; }
.site-header .site-title::before {
	content: ""; width: 30px; height: 30px; flex: none; border-radius: 7px;
	background: url("assets/mark.svg") center / contain no-repeat;
}
.site-header .brand:hover .site-title { color: var(--rbc-primary); }
.header-navigation .header-menu-container ul li.menu-item > a { font-size: .98rem; font-weight: 500; color: var(--rbc-text); margin: 0 .5rem; }
.header-navigation .header-menu-container ul li.menu-item > a .nav-drop-title-wrap { display: inline-block; padding: .65rem 0; box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .15s; }
.header-navigation .header-menu-container ul li.menu-item > a:hover { color: var(--rbc-primary); }
.header-navigation .header-menu-container ul li.menu-item > a:hover .nav-drop-title-wrap { box-shadow: inset 0 -2px 0 var(--rbc-line); }
.header-navigation .header-menu-container ul li.menu-item.current-menu-item > a { color: var(--rbc-primary); font-weight: 600; }
.header-navigation .header-menu-container ul li.menu-item.current-menu-item > a .nav-drop-title-wrap { box-shadow: inset 0 -2px 0 var(--rbc-primary); }
.mobile-toggle-open-container .menu-toggle-open { color: var(--rbc-ink); }
#mobile-drawer .mobile-navigation a { font-weight: 500; }

/* ---------------------------------------------------------------- page frame */
.content-area { margin-top: 2.2rem; margin-bottom: 4rem; }
.entry-header { margin: 0 0 .4rem; padding: 0; text-align: left; }
.entry-header .entry-title, h1.entry-title {
	font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); line-height: 1.15; font-weight: 700; letter-spacing: -.022em;
	color: var(--rbc-ink); margin: 0 0 .6rem; text-wrap: balance;
}
.entry-content h2, .entry-content .rbc-topic h2 { font-size: 1.45rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--rbc-ink); margin: 2.4rem 0 .8rem; }
.entry-content p, .entry-content li { max-width: 70ch; line-height: 1.65; }
.entry-content .rbc-reviewed { max-width: none; line-height: 1.4; }
.entry-content > * + * { margin-top: 1rem; }
.entry-content { font-size: 1.04rem; }

.rbc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .88rem; color: var(--rbc-muted); margin: 0 0 .9rem; }
.rbc-crumbs a { color: var(--rbc-primary); text-decoration: none; font-weight: 500; }
.rbc-crumbs a:hover { text-decoration: underline; }
.rbc-crumbs .sep { opacity: .55; }

.rbc-reviewed {
	display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1.6rem; padding: .25rem .7rem .25rem .55rem;
	font-size: .85rem; line-height: 1.4; color: var(--rbc-muted); background: var(--rbc-soft); border: 1px solid var(--rbc-line); border-radius: 999px; opacity: 1;
}
.rbc-reviewed::before {
	content: ""; width: 1em; height: 1em; background: no-repeat center / contain
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
}
.rbc-reviewed-missing { color: #9a3412; border-color: #f3c9b0; background: #fff6f0; }

.rbc-disclaimer {
	margin-top: 3rem; padding: .9rem 1.1rem; border: 0; border-left: 4px solid var(--rbc-line); border-radius: 0 8px 8px 0;
	background: var(--rbc-soft); color: var(--rbc-muted); font-size: .9rem; max-width: none;
}

/* ---------------------------------------------------------------- home */
.home .entry-header .entry-title { font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 1rem; max-width: 18ch; }
.home .entry-content { display: flex; flex-direction: column; }
.home .entry-content > .rbc-reviewed { order: 8; align-self: flex-start; margin-top: 2.2rem; }
.home .entry-content > .rbc-disclaimer { order: 9; }
.home .entry-content > p:not(.rbc-reviewed):not(.rbc-disclaimer) { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.55; color: var(--rbc-muted); max-width: 52ch; }
.home .entry-content > .wp-block-heading ~ p:not(.rbc-reviewed):not(.rbc-disclaimer) { font-size: 1.05rem; line-height: 1.65; color: var(--rbc-text); max-width: 68ch; }
.home .content-area { margin-top: 3rem; }

.rbc-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.4rem; margin: 2.2rem 0 0; }
.rbc-topic {
	--c: var(--rbc-primary); position: relative; background: #fff; border: 1px solid var(--rbc-line); border-top: 4px solid var(--c);
	border-radius: var(--rbc-radius); padding: 1.6rem 1.6rem 1.4rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, transform .15s;
}
.rbc-topic:hover { box-shadow: 0 8px 24px rgba(15,23,42,.08); transform: translateY(-1px); }
.rbc-topic--e-scooters { --c: var(--rbc-teal); }
.rbc-topic-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); margin-bottom: 1rem; }
.rbc-topic-icon svg { width: 26px; height: 26px; }
.entry-content .rbc-topic h2 { font-size: 1.4rem; margin: 0 0 .5rem; font-weight: 700; }
.rbc-topic h2 a { color: var(--rbc-ink); text-decoration: none; }
.rbc-topic h2 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.rbc-topic p { color: var(--rbc-muted); margin: 0 0 1.1rem; }
.entry-content .rbc-topic ul.rbc-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.2rem; padding: 0; position: relative; z-index: 1; }
.rbc-topic ul.rbc-chips li { margin: 0; max-width: none; }
.rbc-topic ul.rbc-chips a {
	display: inline-block; padding: .3rem .85rem; border: 1px solid var(--rbc-line); border-radius: 999px; background: var(--rbc-soft);
	color: var(--rbc-text); font-size: .93rem; font-weight: 500; text-decoration: none;
}
.rbc-topic ul.rbc-chips a:hover { border-color: var(--c); color: var(--c); background: #fff; }
.entry-content .rbc-topic .rbc-topic-more { margin: 0; font-weight: 650; color: var(--c); }

.entry-content ul.rbc-trust { list-style: none; margin: 3rem 0 0; padding: 2rem 0 0; border-top: 1px solid var(--rbc-line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.6rem; }
.rbc-trust li { margin: 0; max-width: none; }
.rbc-trust strong { display: block; color: var(--rbc-ink); margin-bottom: .25rem; }
.rbc-trust span { color: var(--rbc-muted); font-size: .95rem; line-height: 1.55; }

/* ---------------------------------------------------------------- tables (country + comparison) */
.rbc-table { margin: 1.4rem 0 0; overflow-x: auto; }
.rbc-table table {
	width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: .97rem; line-height: 1.5;
	border: 1px solid var(--rbc-line); border-radius: var(--rbc-radius); overflow: hidden;
}
.rbc-table th, .rbc-table td { border: 0; border-bottom: 1px solid var(--rbc-line); padding: .85rem 1.1rem; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.rbc-comparison tbody th { white-space: nowrap; }
.rbc-comparison thead th { white-space: normal; line-height: 1.3; }
.rbc-comparison thead th:first-child { white-space: nowrap; }
.rbc-comparison th, .rbc-comparison td { padding-left: .85rem; padding-right: .85rem; }
.rbc-comparison td { min-width: 5.6rem; }
.rbc-table tbody tr:last-child > * { border-bottom: 0; }
.rbc-table thead th { background: var(--rbc-soft); color: var(--rbc-muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: bottom; }
.rbc-table tbody th { font-weight: 650; color: var(--rbc-ink); background: #fff; }
.rbc-table tbody tr:hover > * { background: #fafcfe; }
.rbc-table a { font-weight: 600; text-decoration: none; }
.rbc-table a:hover { text-decoration: underline; }
.rbc-scope { display: block; margin-top: .15rem; font-size: .8rem; font-weight: 500; color: var(--rbc-muted); opacity: 1; }
td .rbc-scope { display: inline; margin: 0 .25rem 0 0; font-size: .78rem; }
.rbc-row-unverified td, .rbc-row-unverified th { background: #fff6f0; }
.rbc-fn { font-size: .7em; }
.rbc-fn a { font-weight: 500; color: var(--rbc-primary); }

.rbc-country .rbc-table th[scope="row"] { width: 30%; }
.rbc-summary {
	margin: 1.4rem 0 0; padding: 1.1rem 1.3rem; border: 1px solid #cfe0f3; border-left: 5px solid var(--rbc-primary); border-radius: 0 var(--rbc-radius) var(--rbc-radius) 0;
	background: #f2f7fd; font-size: 1.08rem; line-height: 1.6; max-width: none;
}
.rbc-summary strong { color: var(--rbc-primary-dark); }

.entry-content ul.rbc-notes { list-style: none; padding: 0; margin: 0; }
.rbc-notes li { position: relative; margin: 0 0 .6rem; padding: .75rem 1rem .75rem 2.6rem; background: #fffaf0; border: 1px solid #f1e0b8; border-radius: 10px; max-width: none; font-size: .96rem; }
.rbc-notes li::before {
	content: "i"; position: absolute; left: .85rem; top: .8rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #b45309; color: #fff;
	font: 700 .78rem/1.15rem Georgia, serif; text-align: center;
}
.entry-content ol.rbc-sources { margin: 0; padding-left: 1.4rem; font-size: .92rem; color: var(--rbc-muted); }
ol.rbc-sources li { margin: 0 0 .5rem; max-width: 80ch; }
.rbc-sources a { overflow-wrap: anywhere; }
.entry-content ul.rbc-related { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.entry-content ul.rbc-related li { margin: 0; max-width: none; }
.entry-content ul.rbc-related a {
	display: inline-block; padding: .35rem .9rem; border: 1px solid var(--rbc-line); border-radius: 999px; background: var(--rbc-soft);
	color: var(--rbc-text); font-size: .93rem; font-weight: 500; text-decoration: none;
}
.entry-content ul.rbc-related a:hover { border-color: var(--rbc-primary); color: var(--rbc-primary); background: #fff; }
.rbc-compare { margin-top: 2rem; }
.rbc-compare a {
	display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 999px; background: var(--rbc-primary); color: #fff;
	font-weight: 600; text-decoration: none; transition: background .15s;
}
.rbc-compare a:hover { background: var(--rbc-primary-dark); color: #fff; }

/* Sources page */
/* sources page */
.entry-content ul.rbc-sources { padding-left: 1.2rem; }
ul.rbc-sources li { margin: 0 0 .55rem; }

/* ---------------------------------------------------------------- comparison on small screens: one card per country */
@media (max-width: 960px) {
	.rbc-comparison { overflow: visible; }
	.rbc-comparison table, .rbc-comparison tbody { display: block; border: 0; background: none; }
	.rbc-comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.rbc-comparison tbody tr { display: block; margin: 0 0 1.1rem; border: 1px solid var(--rbc-line); border-radius: var(--rbc-radius); overflow: hidden; background: #fff; }
	.rbc-comparison tbody tr > * { display: block; border-bottom: 1px solid var(--rbc-line); }
	.rbc-comparison tbody tr:hover > * { background: #fff; }
	.rbc-comparison tbody th { background: var(--rbc-soft); font-size: 1.1rem; padding: .8rem 1rem; }
	.rbc-comparison tbody td { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .8rem; padding: .65rem 1rem; overflow-wrap: break-word; }
	.rbc-comparison .rbc-cell { min-width: 0; }
	.rbc-comparison tbody td::before { content: attr(data-label); font-size: .8rem; font-weight: 650; color: var(--rbc-muted); padding-top: .12rem; }
	.rbc-comparison tbody tr > *:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
	.rbc-country .rbc-table th[scope="row"] { width: 42%; }
	.rbc-country .rbc-table td, .rbc-country .rbc-table th { overflow-wrap: anywhere; }
	.rbc-comparison tbody th, .rbc-comparison thead th { white-space: normal; }
	.rbc-table th, .rbc-table td { padding: .7rem .8rem; }
}

/* Kadence hides the site title on tablet widths by default; keep the brand visible. */
@media (min-width: 768px) and (max-width: 1024px) { .site-header .site-title.vs-md-false { display: flex !important; } }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--rbc-soft); border-top: 1px solid var(--rbc-line); }
.site-footer .site-info, .site-footer .footer-html { color: var(--rbc-muted); font-size: .92rem; padding: .6rem 0; }
.site-footer a { color: var(--rbc-text); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--rbc-primary); text-decoration: underline; }
