/*
 * Oriel themes — shared components.
 * Each concept stylesheet (oriel-*/css/*.css) sets the custom properties below
 * and adds its own layout. Everything here reads from those properties.
 */

/* ---------- Fonts (OFL, self-hosted; see ../fonts/README.md) ---------- */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-600.woff") format("woff"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Atlas Serif"; src: url("../fonts/atlas-serif-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Atlas Serif"; src: url("../fonts/atlas-serif-700.woff") format("woff"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Journal Serif"; src: url("../fonts/journal-serif-600.woff") format("woff"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Journal Serif"; src: url("../fonts/journal-serif-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Sans"; src: url("../fonts/journal-sans-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Oriel Sans"; src: url("../fonts/journal-sans-600.woff") format("woff"); font-weight: 500 700; font-style: normal; font-display: swap; }

/* ---------- Defaults (overridden per concept) ---------- */
:root {
	--o-canvas: #f6f0e4;
	--o-surface: #fffcf6;
	--o-surface-2: #f1e8d8;
	--o-text: #302821;
	--o-text-2: #655b50;
	--o-heading: #302821;
	--o-border: #d8c7ae;
	--o-input-border: #9d8c74;
	--o-input-bg: #ffffff;
	--o-accent: #b8863f;
	--o-action: #8a571f;
	--o-action-hover: #744816;
	--o-on-action: #fffaf0;
	--o-outline: #8a571f;
	--o-link: #45417d;
	--o-link-hover: #2f2b5e;
	--o-focus: #45417d;
	--o-error: #a32d1f;
	--o-error-bg: #fbe9e4;
	--o-success: #2f6b3c;
	--o-success-bg: #e8f2e6;
	--o-warning: #7a5410;
	--o-warning-bg: #fbf0d6;
	--o-info-bg: #efeaf8;
	--o-table-head: #f1e8d8;
	--o-table-stripe: rgba(0, 0, 0, 0.025);
	--o-shadow: 0 1px 2px rgba(48, 40, 33, 0.06), 0 6px 20px rgba(48, 40, 33, 0.05);
	--o-radius: 12px;
	--o-radius-sm: 8px;
	--o-font-body: "Oriel Sans", "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--o-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--o-wrap: 1360px;
	--o-gutter: 48px;
	--o-control-h: 48px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--o-canvas);
	color: var(--o-text);
	font-family: var(--o-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, picture, video { max-width: 100%; }
img { height: auto; }
picture { display: block; }
a { color: var(--o-link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--o-link-hover); text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible {
	outline: 3px solid var(--o-focus);
	outline-offset: 2px;
	border-radius: 4px;
}
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--o-border); margin: 24px 0; }
::selection { background: color-mix(in srgb, var(--o-accent) 35%, transparent); }

.o-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.o-wrap { width: 100%; max-width: var(--o-wrap); margin-inline: auto; padding-inline: var(--o-gutter); }
.o-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.o-skip {
	position: absolute; left: 16px; top: -100px; z-index: 100;
	padding: 10px 16px; border-radius: var(--o-radius-sm);
	background: var(--o-action); color: var(--o-on-action); font-weight: 600; text-decoration: none;
}
.o-skip:focus { top: 12px; color: var(--o-on-action); }

/* ---------- Buttons and links ---------- */
.o-btn,
.o-content a.button,
.o-content input[type="submit"],
.o-content button[type="submit"],
.o-content input[type="button"],
.o-content input[type="reset"],
.o-content button:not([class]) {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: var(--o-control-h);
	padding: 10px 22px;
	border: 1px solid transparent;
	border-radius: var(--o-radius-sm);
	font-family: var(--o-font-body);
	font-size: 16px; font-weight: 600; line-height: 1.2;
	text-decoration: none; text-align: center;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.o-btn--primary,
.o-content a.button,
.o-content input[type="submit"],
.o-content button[type="submit"],
.o-content button:not([class]) {
	background: var(--o-action); color: var(--o-on-action); border-color: var(--o-action);
}
.o-btn--primary:hover,
.o-content a.button:hover,
.o-content input[type="submit"]:hover,
.o-content button[type="submit"]:hover,
.o-content button:not([class]):hover {
	background: var(--o-action-hover); border-color: var(--o-action-hover); color: var(--o-on-action);
}
.o-btn--outline,
.o-content .button.secondary,
.o-content input[type="button"],
.o-content input[type="reset"] {
	background: transparent; color: var(--o-outline); border-color: var(--o-outline);
}
.o-btn--outline:hover,
.o-content .button.secondary:hover,
.o-content input[type="button"]:hover,
.o-content input[type="reset"]:hover {
	background: color-mix(in srgb, var(--o-outline) 10%, transparent); color: var(--o-outline);
}
.o-btn--compact { min-height: 44px; padding: 8px 18px; }
.o-btn--block { width: 100%; }
.o-btn__icon { width: 18px; height: 18px; }
.o-btn:active { transform: translateY(1px); }
.o-btn[disabled], .o-btn[aria-disabled="true"],
.o-content input[type="submit"][disabled], .o-content button[disabled] {
	opacity: .55; cursor: not-allowed; transform: none;
}

.o-link { color: var(--o-link); font-weight: 500; }
.o-link--arrow { display: inline-flex; align-items: center; gap: 6px; }
.o-link__arrow { width: 18px; height: 18px; transition: transform .15s ease; }
.o-link--arrow:hover .o-link__arrow { transform: translateX(3px); }

/* ---------- Form fields ---------- */
.o-help { margin: 0; font-size: 14px; color: var(--o-text-2); }

.o-content input[type="text"], .o-content input[type="password"], .o-content input[type="email"],
.o-content input[type="number"], .o-content input[type="search"], .o-content input[type="url"],
.o-content input[type="tel"], .o-content input[type="date"], .o-content input:not([type]),
.o-content select, .o-content textarea,
.o-footer select {
	min-height: var(--o-control-h);
	max-width: 100%;
	padding: 9px 14px;
	border: 1px solid var(--o-input-border);
	border-radius: var(--o-radius-sm);
	background: var(--o-input-bg);
	color: var(--o-text);
	font-family: var(--o-font-body);
	font-size: 16px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.o-content textarea { min-height: 120px; width: 100%; }
.o-content select, .o-footer select { padding-right: 32px; }
.o-content input::placeholder { color: var(--o-text-2); opacity: 1; }
.o-content input:focus-visible, .o-content select:focus-visible, .o-content textarea:focus-visible,
.o-footer select:focus-visible {
	outline: none;
	border-color: var(--o-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--o-focus) 35%, transparent);
}
.o-content input[disabled], .o-content select[disabled], .o-content textarea[disabled] {
	opacity: .6; cursor: not-allowed;
}
.o-content input[aria-invalid="true"] {
	border-color: var(--o-error);
	box-shadow: 0 0 0 1px var(--o-error);
}
.o-content input[type="checkbox"], .o-content input[type="radio"] {
	width: 20px; height: 20px; accent-color: var(--o-action); vertical-align: -4px; margin: 0 6px 0 0;
}


/* ---------- Page content (FluxCP views) ---------- */
.o-content { min-width: 0; }
.o-content > :first-child { margin-top: 0; }
.o-content h2 {
	margin: 0 0 16px;
	font-family: var(--o-font-display);
	font-size: clamp(28px, 3vw, 36px);
	line-height: 1.15;
	color: var(--o-heading);
	font-weight: 600;
}
.o-content h3 { margin: 28px 0 12px; font-family: var(--o-font-display); font-size: 24px; line-height: 1.25; color: var(--o-heading); font-weight: 600; }
.o-content h4 { margin: 24px 0 8px; font-size: 17px; color: var(--o-heading); }
.o-content p { margin: 0 0 14px; }
.o-content ul, .o-content ol { padding-left: 1.4em; }
.o-content small { font-size: 14px; }
.o-content strong { font-weight: 600; }
.o-content code, .o-content pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.o-content pre { overflow-x: auto; padding: 12px 16px; border-radius: var(--o-radius-sm); background: var(--o-surface-2); }

/* Messages */
.message, .o-content .green, .notice, .o-content .red, .o-notice {
	display: flex; gap: 10px; align-items: flex-start;
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid;
	border-left-width: 4px;
	border-radius: var(--o-radius-sm);
	font-size: 15px; line-height: 1.5;
}
.o-content .green { color: var(--o-success); background: var(--o-success-bg); border-color: color-mix(in srgb, var(--o-success) 45%, transparent); }
.message { color: var(--o-text); background: var(--o-info-bg); border-color: color-mix(in srgb, var(--o-link) 40%, transparent); font-weight: 500; }
.o-content .red { color: var(--o-error); background: var(--o-error-bg); border-color: color-mix(in srgb, var(--o-error) 45%, transparent); font-weight: 500; }
.notice, .o-notice--warning { color: var(--o-warning); background: var(--o-warning-bg); border-color: color-mix(in srgb, var(--o-warning) 40%, transparent); }
.o-notice--info { color: var(--o-text); background: var(--o-info-bg); border-color: color-mix(in srgb, var(--o-link) 35%, transparent); }
.o-content p.green::before { content: "✓"; font-weight: 700; }
.o-content p.red::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--o-error); color: var(--o-error-bg); font-size: 13px; font-weight: 700; line-height: 1; margin-top: 1px; }
/* Inline status words inside tables stay inline. */
.o-content td .red, .o-content td .green, .o-content span.red, .o-content span.green,
.o-content td.red, .o-content td.green, .o-content strong.red, .o-content strong.green {
	display: inline; margin: 0; padding: 0; border: 0; background: none; font-size: inherit;
}
.o-content td .red::before, .o-content td .green::before, .o-content span.red::before, .o-content span.green::before { content: none; }

/* Emphasis used by stock views (not a message box). */
.o-content .important { font-size: 1.08em; font-weight: 600; color: var(--o-heading); }

/* Sub-menu and page actions */
.o-subnav { margin: 0 0 24px; border-bottom: 1px solid var(--o-border); }
.o-subnav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.o-subnav a {
	display: inline-flex; align-items: center; min-height: 44px;
	color: var(--o-text-2); font-size: 15px; font-weight: 500; text-decoration: none;
	border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.o-subnav a:hover { color: var(--o-text); border-bottom-color: var(--o-border); }
.o-subnav a[aria-current="page"] { color: var(--o-heading); border-bottom-color: var(--o-accent); font-weight: 600; }
.o-pagemenu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 20px; font-size: 14px; color: var(--o-text-2); }
.o-pagemenu ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.o-pagemenu a {
	display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
	border: 1px solid var(--o-border); border-radius: 999px;
	color: var(--o-link); text-decoration: none; font-weight: 500; background: var(--o-surface);
}
.o-pagemenu a:hover { border-color: var(--o-link); }

.credit-balance {
	display: inline-flex; gap: 12px; align-items: baseline;
	margin: 0 0 20px; padding: 10px 16px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); background: var(--o-surface);
}
.credit-balance .balance-text { color: var(--o-text-2); font-size: 14px; }
.credit-balance .balance-amount { font-weight: 600; font-size: 18px; }

/* Tables */
.o-table-scroll {
	position: relative; /* keeps visually-hidden labels inside the scroller */
	width: 100%; overflow-x: auto; margin: 0 0 24px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface);
	-webkit-overflow-scrolling: touch;
}
.o-table-scroll:focus-visible { outline-offset: 2px; }
.o-table-scroll > table { margin: 0; border: 0; border-radius: 0; }
.no-js .o-content .horizontal-table, .no-js .o-content .vertical-table { display: block; overflow-x: auto; }

.o-content table { border-collapse: collapse; }
.horizontal-table, .vertical-table {
	width: 100%; margin: 0 0 24px;
	font-size: 15px; line-height: 1.45;
	background: var(--o-surface);
}
.horizontal-table th, .horizontal-table td, .vertical-table th, .vertical-table td {
	padding: 11px 14px; text-align: left; vertical-align: top;
	border-bottom: 1px solid var(--o-border);
}
.horizontal-table th {
	background: var(--o-table-head); color: var(--o-heading);
	font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
.horizontal-table th a { color: inherit; text-decoration: none; }
.horizontal-table th a:hover { text-decoration: underline; }
.horizontal-table tr:nth-child(even) td { background: var(--o-table-stripe); }
.horizontal-table tbody tr:hover td, .horizontal-table tr:hover td { background: color-mix(in srgb, var(--o-accent) 8%, transparent); }
.horizontal-table tr:last-child td, .vertical-table tr:last-child th, .vertical-table tr:last-child td { border-bottom: 0; }
.horizontal-table img { vertical-align: middle; }
.vertical-table th { width: 1%; white-space: nowrap; background: var(--o-table-head); color: var(--o-heading); font-weight: 600; font-size: 14px; }
.vertical-table td { color: var(--o-text); }
.vertical-table .vertical-table, .vertical-table .horizontal-table { margin: 0; }
.o-content .not-applicable { color: var(--o-text-2); font-style: italic; }
.o-content .empty-row { display: none; }
.o-content .top-ranked td { font-weight: 600; }
.o-content .online { color: var(--o-success); font-weight: 600; }
.o-content .offline { color: var(--o-error); font-weight: 600; }

/* Forms rendered by FluxCP views */
.generic-form, .generic-form-div {
	max-width: 760px; margin: 0 0 28px; padding: 28px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius);
	background: var(--o-surface); box-shadow: var(--o-shadow);
}
.generic-form-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.generic-form-table th, .generic-form-table td { padding: 8px 0; vertical-align: top; text-align: left; border: 0; }
.generic-form-table th { width: 200px; padding-right: 20px; padding-top: 18px; font-weight: 500; color: var(--o-text); font-size: 15px; }
.generic-form-table th label { font-weight: 500; }
.generic-form-table td input[type="text"], .generic-form-table td input[type="password"],
.generic-form-table td input[type="email"], .generic-form-table td input:not([type]) { width: 100%; max-width: 420px; }
.generic-form-table td p { margin: 6px 0; }
.generic-form-table td label { margin-right: 18px; display: inline-flex; align-items: center; min-height: 44px; }
.generic-form-table td div { margin: 4px 0; }
.generic-form-table td select + select { margin-left: 6px; }
.security-code { margin: 0 0 8px; }
.security-code img { border-radius: var(--o-radius-sm); border: 1px solid var(--o-border); }

/* Search forms: open above the results on wide screens; on phones the
   "Search..." toggle opens them so results are not pushed far down. */
.o-content .toggler { display: none; }
.o-content .search-form, .o-content .search-form2 {
	display: block;
	margin: 0 0 24px; padding: 20px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius);
	background: var(--o-surface);
}
.o-content .search-form p, .o-content .search-form2 p {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px;
	margin: 0 0 14px; padding: 0; border: 0;
	font-size: 0; /* hides FluxCP's "..." separators without JavaScript */
}
.o-content .search-form p:last-child, .o-content .search-form2 p:last-child { margin-bottom: 0; }
.o-content .search-form p > *, .o-content .search-form2 p > * { font-size: 15px; }
.o-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 140px; font-size: 15px; }
.o-filter > label { flex: 1 0 100%; }
.o-content .search-form label, .o-content .search-form2 label {
	display: block; margin: 0; font-size: 14px; font-style: normal; font-weight: 500; color: var(--o-text);
}
.o-content .search-form input[type="text"], .o-content .search-form2 input[type="text"] { width: 170px; font-size: 15px; }
.o-content .search-form select, .o-content .search-form2 select { font-size: 15px; max-width: 260px; }
.o-content .search-form input[type="checkbox"], .o-content .search-form2 input[type="checkbox"] { margin: 0; }
.o-filter-actions { justify-content: flex-start; }

/* Pagination */
.o-content .pages {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	margin: 0 0 16px; font-size: 0;
}
.o-content .pages a {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; min-height: 40px; padding: 0 12px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface); color: var(--o-link);
	font-size: 15px; font-weight: 500; text-decoration: none;
}
.o-content .pages a:hover { border-color: var(--o-link); }
.o-content .pages .current-page { background: var(--o-action); border-color: var(--o-action); color: var(--o-on-action); }
.o-content .jump-to-page { margin: 0 0 24px; font-size: 14px; color: var(--o-text-2); }
.o-content .jump-to-page input { width: 72px; margin-left: 6px; }

/* News page (news/index) */
.o-content .newsDiv > h2 { margin-top: 32px; font-size: 26px; }
.o-content .newsDiv > h2:first-child, .o-content .newsDiv > h4:first-child { margin-top: 0; }
.o-content .newsCont { max-width: 72ch; margin: 0 0 24px; padding-bottom: 24px; border-bottom: 1px solid var(--o-border); }
.o-content .newsDate { display: block; margin-bottom: 8px; color: var(--o-text-2); }
.o-content .newsCont img { border-radius: var(--o-radius-sm); }

/* ---------- Navigation ---------- */
.o-nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.o-nav__item { position: relative; }
.o-nav__link {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 8px 14px;
	border: 0; background: none;
	color: var(--o-text); font-family: var(--o-font-body); font-size: 16px; font-weight: 500;
	text-decoration: none; cursor: pointer; white-space: nowrap;
}
.o-nav__link:hover { color: var(--o-heading); }
.o-nav__chevron { width: 16px; height: 16px; transition: transform .15s ease; }
.o-nav__toggle[aria-expanded="true"] .o-nav__chevron { transform: rotate(180deg); }

.o-submenu {
	display: none;
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
	min-width: 230px; margin: 0; padding: 8px;
	list-style: none;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.o-submenu.is-open { display: block; }
.no-js .has-menu:hover > .o-submenu, .no-js .has-menu:focus-within > .o-submenu,
.no-js .o-account-menu:hover > .o-submenu, .no-js .o-account-menu:focus-within > .o-submenu { display: block; }
.o-submenu ul { margin: 0; padding: 0; list-style: none; }
.o-submenu__link {
	display: flex; align-items: center; gap: 8px;
	min-height: 40px; padding: 8px 12px;
	border-radius: 6px;
	color: var(--o-text); font-size: 15px; text-decoration: none;
}
.o-submenu__link:hover { background: color-mix(in srgb, var(--o-accent) 12%, transparent); color: var(--o-heading); }
.o-submenu__link.is-active { font-weight: 600; color: var(--o-heading); background: color-mix(in srgb, var(--o-accent) 16%, transparent); }
.o-submenu__icon { width: 18px; height: 18px; }
.o-submenu__meta { margin: 4px 12px 8px; font-size: 13px; color: var(--o-text-2); }
.o-submenu__heading { margin: 10px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--o-text-2); }
.o-submenu__footer { margin-top: 6px !important; padding-top: 6px !important; border-top: 1px solid var(--o-border); }
.o-submenu--account { left: auto; right: 0; min-width: 250px; max-height: min(70vh, 560px); overflow-y: auto; }
.o-account-menu { position: relative; }
.o-account-menu__name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }

.o-menu-toggle {
	display: none; align-items: center; gap: 8px;
	min-height: 44px; padding: 8px 14px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface); color: var(--o-text); font-weight: 600; cursor: pointer;
}
.o-menu-toggle .o-icon { width: 20px; height: 20px; }
/* Without JavaScript the navigation is always shown, so the toggles are hidden. */
.no-js .o-menu-toggle, .no-js .o-drawer__close, .no-js .o-brand--compact { display: none !important; }
@media (max-width: 640px) {
	/* Icon-only on phones; the label stays available to assistive technology. */
	.o-menu-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Cards ---------- */
.o-card {
	padding: 28px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius);
	background: var(--o-surface); box-shadow: var(--o-shadow);
}
.o-card__title {
	display: flex; align-items: center; gap: 12px;
	margin: 0 0 18px;
	font-family: var(--o-font-display); font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--o-heading);
}
.o-card__icon { width: 26px; height: 26px; color: var(--o-accent); }
.o-card__links { margin: 4px 0 0; text-align: center; font-size: 15px; }
.o-card__sep { margin: 0 10px; color: var(--o-border); }
.o-card__actions { display: grid; gap: 12px; }
.o-account-summary__who { margin: 0 0 12px; color: var(--o-text-2); }
.o-account-summary { display: grid; gap: 10px; margin: 0 0 20px; }
.o-account-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--o-border); }
.o-account-summary dt { color: var(--o-text-2); }
.o-account-summary dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- News previews ---------- */
.o-news-list { margin: 0; padding: 0; list-style: none; }
.o-news-item__inner { display: flex; gap: 20px; }
.o-news-item__media { flex: none; }
.o-news-item__img { display: block; object-fit: cover; border-radius: var(--o-radius-sm); }
.o-news-item__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.o-news-item__title { margin: 0 0 8px; font-family: var(--o-font-display); font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--o-heading); }
.o-news-item__text { margin: 0 0 12px; color: var(--o-text-2); font-size: 15px; }
.o-news-item__meta { margin: 0 0 10px; color: var(--o-text-2); font-size: 14px; }
.o-news-item__link { margin-top: auto; }
.o-tag {
	display: inline-block; margin: 0 0 8px; padding: 2px 8px; border-radius: 4px;
	background: var(--o-tag-bg, var(--o-action)); color: var(--o-tag-fg, var(--o-on-action));
	font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6;
}

/* ---------- Empty states ---------- */
.o-empty {
	display: grid; justify-items: center; gap: 8px;
	padding: 40px 24px; text-align: center; color: var(--o-text-2);
}
.o-empty h3 { margin: 4px 0 0; font-family: var(--o-font-display); font-size: 24px; color: var(--o-heading); }
.o-empty p { margin: 0; max-width: 46ch; }
.o-empty__icon { width: 40px; height: 40px; color: var(--o-accent); }
.o-empty--compact { padding: 24px; border: 1px dashed var(--o-border); border-radius: var(--o-radius); }

/* ---------- Auth forms (login, register) ---------- */
.o-auth { max-width: 520px; margin-inline: auto; }
.o-auth--wide { max-width: 720px; }
.o-auth .o-page-head { margin-bottom: 20px; }
.o-auth-form {
	padding: 28px; border: 1px solid var(--o-border); border-radius: var(--o-radius);
	background: var(--o-surface); box-shadow: var(--o-shadow);
}
.o-rules { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }
.o-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.o-fieldset legend { padding: 0; margin-bottom: 6px; }
.o-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.o-choice { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 16px; cursor: pointer; }
.o-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0; }

/* ---------- Server information ---------- */
.o-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.o-fact {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
	padding: 14px 16px; border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); background: var(--o-surface);
}
.o-fact__icon { grid-row: 1 / span 2; width: 30px; height: 30px; color: var(--o-accent); }
.o-fact__label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--o-text-2); }
.o-fact__value { font-size: 17px; font-weight: 600; color: var(--o-heading); }
.o-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 32px; }
.o-stat { padding: 16px 18px; border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); background: var(--o-surface); }
.o-stat dt { font-size: 14px; color: var(--o-text-2); }
.o-stat dd { margin: 4px 0 0; font-family: var(--o-font-display); font-size: 32px; line-height: 1.1; font-weight: 600; color: var(--o-heading); font-variant-numeric: lining-nums tabular-nums; }
.o-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.o-class-grid li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); background: var(--o-surface); }
.o-class-grid__count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--o-heading); }

/* ---------- Page heads ---------- */
.o-page-head { margin: 0 0 24px; }
.o-page-head .o-kicker { margin: 0 0 6px; }
.o-kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--o-accent-text, var(--o-text-2)); }
.o-lead { font-size: 18px; color: var(--o-text-2); max-width: 60ch; }

/* ---------- Theme menu and appearance (header) ---------- */
.o-prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.o-prefs__field { display: flex; align-items: center; gap: 8px; }
.o-prefs__label { font-size: 14px; font-weight: 600; color: inherit; white-space: nowrap; }
.o-prefs--inline .o-prefs__field--theme .o-prefs__label::after { content: ":"; }
.o-prefs--inline .o-mode .o-prefs__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.o-prefs--stacked .o-prefs__field { flex-direction: column; align-items: center; gap: 4px; }

.o-theme-menu { position: relative; }
.o-theme-menu__button {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 40px; padding: 6px 12px 6px 14px;
	border: 1px solid var(--o-prefs-line, var(--o-input-border)); border-radius: var(--o-radius-sm);
	background: var(--o-prefs-bg, var(--o-surface)); color: var(--o-prefs-ink, var(--o-text));
	font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap;
	cursor: pointer; list-style: none;
}
.o-theme-menu__button::-webkit-details-marker { display: none; }
.o-theme-menu__button::marker { content: ""; }
.o-theme-menu__chevron { width: 16px; height: 16px; transition: transform .15s ease; }
.o-theme-menu[open] .o-theme-menu__chevron { transform: rotate(180deg); }
.o-theme-menu__panel {
	position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
	min-width: 240px; margin: 0; padding: 8px;
	border: 1px solid var(--o-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface); color: var(--o-text);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
	text-align: left;
}
.o-theme-menu__heading { margin: 4px 10px 6px; font-size: 13px; font-weight: 600; color: var(--o-text-2); }
.o-theme-menu__list { margin: 0; padding: 0; list-style: none; }
.o-theme-menu__option {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
	min-height: 44px; padding: 8px 10px;
	border: 0; border-radius: 6px; background: none; color: var(--o-text);
	font-family: var(--o-font-body); font-size: 15px; text-align: left; cursor: pointer;
}
.o-theme-menu__option:hover { background: color-mix(in srgb, var(--o-accent) 14%, transparent); }
.o-theme-menu__option[aria-current="true"] { font-weight: 600; }
.o-theme-menu__check { width: 18px; height: 18px; color: var(--o-action); }

.no-js .o-mode { display: none; }
.o-mode__options {
	display: inline-flex; padding: 3px; gap: 2px;
	border: 1px solid var(--o-prefs-line, var(--o-input-border)); border-radius: 999px;
	background: var(--o-prefs-bg, var(--o-surface));
}
.o-mode__btn {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 34px; padding: 4px 14px;
	border: 0; border-radius: 999px; background: transparent; color: var(--o-prefs-ink, var(--o-text));
	font-family: var(--o-font-body); font-size: 15px; font-weight: 500; line-height: 1; cursor: pointer;
}
.o-mode__btn[aria-pressed="true"] { background: var(--o-prefs-on-bg, var(--o-action)); color: var(--o-prefs-on-ink, var(--o-on-action)); font-weight: 600; }
.o-mode__btn:not([aria-pressed="true"]):hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.o-mode__icon { width: 17px; height: 17px; }

/* ---------- Quick links ---------- */
.o-quick-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.o-quick-link {
	display: flex; align-items: center; gap: 12px;
	min-height: 48px; padding: 8px 14px;
	border: 1px solid var(--o-input-border); border-radius: var(--o-radius-sm);
	background: var(--o-surface); color: var(--o-text);
	font-weight: 600; text-decoration: none;
}
.o-quick-link:hover { border-color: var(--o-action); color: var(--o-text); background: color-mix(in srgb, var(--o-action) 8%, var(--o-surface)); }
.o-quick-link__icon { flex: none; width: 22px; height: 22px; color: var(--o-heading); }
.o-quick-link__label { flex: 1; }
.o-quick-link__next { flex: none; width: 18px; height: 18px; }
.o-quick-links--row { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.o-quick-links--row .o-quick-link { justify-content: center; gap: 8px; min-height: 44px; padding: 6px 10px; font-size: 15px; color: var(--o-link); }
.o-quick-links--row .o-quick-link__icon { width: 20px; height: 20px; color: currentColor; }
.o-quick-links--row .o-quick-link__label { flex: none; }

/* ---------- Footer ---------- */
.o-footer-prefs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 0 0 14px; }
.o-footer-prefs__field { display: inline-flex; align-items: center; gap: 8px; }
.o-footer-prefs label { font-size: 14px; font-weight: 600; color: var(--o-text); }
.o-footer-prefs select { min-height: 40px; font-size: 14px; }
.o-footer-rights { max-width: 70ch; margin-inline: auto !important; }
.o-footer-prefs + .o-footer-rights { margin-top: 0 !important; }

/* ---------- Responsive content ---------- */
@media (max-width: 720px) {
	:root { --o-gutter: 20px; }
	.generic-form, .generic-form-div { padding: 20px; }
	.generic-form-table, .generic-form-table tbody, .generic-form-table tr, .generic-form-table th, .generic-form-table td { display: block; width: 100%; }
	.generic-form-table th { padding: 10px 0 4px; }
	.generic-form-table td { padding: 0 0 8px; }
	.generic-form-table td input[type="text"], .generic-form-table td input[type="password"] { max-width: none; }
	.generic-form-table input[type="submit"], .generic-form-table button[type="submit"] { width: 100%; }
	.vertical-table.o-kv, .vertical-table.o-kv > tbody, .vertical-table.o-kv > tbody > tr, .vertical-table.o-kv > tbody > tr > th, .vertical-table.o-kv > tbody > tr > td { display: block; width: 100%; }
	.vertical-table.o-kv > tbody > tr > th { width: 100%; white-space: normal; border-bottom: 0; padding-bottom: 2px; background: transparent; font-size: 13px; color: var(--o-text-2); text-transform: uppercase; letter-spacing: .04em; }
	.vertical-table.o-kv > tbody > tr > td { padding-top: 0; }
	.vertical-table.o-kv { border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); }
	.o-content .toggler { display: block; margin: 0 0 16px; }
	.o-content .toggler a {
		display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
		border: 1px solid var(--o-outline); border-radius: var(--o-radius-sm);
		color: var(--o-outline); font-weight: 600; text-decoration: none;
	}
	.js .o-content .search-form:not(.is-open) { display: none; }
	.o-content .search-form input[type="text"], .o-content .search-form select, .o-content .search-form2 input[type="text"], .o-content .search-form2 select { width: 100%; max-width: none; }
	.o-filter { flex: 1 1 100%; }
	.o-news-item__inner { gap: 14px; }
	.o-auth-form { padding: 20px 16px; }
}

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

@media print {
	.o-header, .o-masthead, .o-footer, .o-topstrip, .o-hero__art, .o-panorama__art, .o-prefs { display: none !important; }
	body { background: #fff; color: #000; }
}
