/*!
 * LostVision.org — public site stylesheet
 * --------------------------------------------------------------------------
 * Framework-free rebuild of the Protostar look. Loads with no Bootstrap and
 * no third-party CSS. Class names mirror the legacy markup so existing views
 * (and migrated content) render correctly.
 *
 * Colour tokens are kept in :root so a theme change is a one-line edit.
 */

:root {
  /* Brand */
  --brand: #eb0c2d;
  --brand-dark: #c00924;
  --brand-darker: #940719;
  --brand-tint: #fdecef;

  /* Surfaces and text */
  --page-bg: #bdc5c9;
  --surface: #ffffff;
  --surface-alt: #f4f6f7;
  --ink: #202b31;
  --ink-soft: #414d54;
  --muted: #66727a;
  --line: #d9e0e3;
  --focus: #1668b3;

  /* Typography */
  --font-heading: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --text-base: 16px;
  --line-height: 1.65;

  /* Shape and motion */
  --radius: 4px;
  --radius-lg: 7px;
  --shadow: 0 1px 2px rgba(24, 39, 47, .12), 0 8px 22px rgba(24, 39, 47, .08);
  --transition: 150ms ease;
  --container: 1160px;
  --gutter: 1.5rem;
}

/* --------------------------------------------------------------------------
 * 1. Reset and base
 * -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--ink);
  background-color: var(--page-bg);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* The signature three-pixel red rule across the top of the page. */
body.site { border-top: 3px solid var(--brand); }

img, svg, video { max-width: 100%; height: auto; vertical-align: middle; }
img { border: 0; }

h1, h2, h3, h4, h5, h6, .site-title {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 .65em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
h5, h6 { font-size: 1rem; }

p { margin: 0 0 1em; }
ul, ol, dl { margin: 0 0 1em; padding-left: 1.4em; }
dt { font-weight: 600; }
dd { margin-left: 0; }
hr { height: 1px; border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

blockquote {
  margin: 1.25rem 0;
  padding: .6rem 1.2rem;
  border-left: 4px solid var(--brand);
  background: var(--surface-alt);
  color: var(--ink-soft);
}

pre, code { font-family: 'Consolas', 'Courier New', monospace; font-size: .9em; }
pre { background: var(--surface-alt); padding: .9rem; overflow-x: auto; border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; margin-bottom: 1.2rem; }
th, td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-alt); font-family: var(--font-heading); }

/* Links ------------------------------------------------------------------ */
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); text-decoration: underline; }
a:active { color: var(--brand-darker); }

/* Keyboard users always get a clear, high-contrast indicator. */
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible),
input:focus:not(:focus-visible), select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible), [tabindex]:focus:not(:focus-visible) { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
 * 2. Helpers and utility classes
 * -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.clearfix::after, .row-fluid::after, .items-leading::after {
  content: '';
  display: table;
  clear: both;
}

.pull-left { float: left; }
.pull-right { float: right; }
.element-invisible, .sr-only, .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;
}
.muted { color: var(--muted); }
.red, .required, label .star { color: var(--brand-dark); }
.hidden { display: none !important; }

.btn {
  display: inline-block;
  padding: .5rem 1rem;
  font-family: var(--font-heading);
  font-size: .95rem;
  line-height: 1.4;
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { background: var(--surface-alt); border-color: #bcc7cc; color: var(--ink); text-decoration: none; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-primary:active { background: var(--brand-darker); }
.btn-small, .btn-mini { padding: .3rem .6rem; font-size: .85rem; }

.well {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.well > :last-child { margin-bottom: 0; }
.well .page-header { margin-top: 0; }

/* --------------------------------------------------------------------------
 * 3. Page shell, header and navigation
 * -------------------------------------------------------------------------- */

.body {
  padding: 1.25rem 0 2.5rem;
  min-height: 60vh;
}
.body > .container {
  background: var(--surface);
  border: 1px solid #cdd6da;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
}

.header { border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 0 .9rem;
}
.brand { display: inline-flex; align-items: center; line-height: 1; }
.brand img { display: block; max-height: 72px; width: auto; }
.site-title { font-size: 1.8rem; margin: 0; color: var(--ink); }
.header-search { display: flex; align-items: center; gap: .5rem; }
.header-search input { min-width: 12rem; }

.navigation { background: var(--surface-alt); border-radius: var(--radius); margin-bottom: 1.5rem; }
.navbar { display: none; }
.btn-navbar, .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  padding: .55rem .75rem;
  background: var(--surface);
}
.icon-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.nav-collapse { display: block; }
ul.nav, ul.menu { list-style: none; margin: 0; padding: 0; }

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  padding: .45rem;
}
.nav-pills > li { position: relative; }
.nav-pills > li > a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: .93rem;
  color: var(--ink-soft);
  line-height: 1.3;
  text-decoration: none;
}
.nav-pills > li > a:hover { background: #e7ecef; color: var(--brand-dark); text-decoration: none; }
.nav-pills > li.active > a,
.nav-pills > li.current > a,
.nav-pills > .active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.current > a:hover {
  background: var(--brand);
  color: #fff;
}
.nav-pills > li.deeper > a::after,
.nav-pills > li.parent > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: .4rem;
  vertical-align: middle;
  border: 4px solid transparent;
  border-top-color: currentColor;
}
.nav-pills > li.active > a::after { border-top-color: #fff; }

/* Dropdown / nested menu -------------------------------------------------- */
.nav-child, .dropdown-menu, .nav-pills .nav-child {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  display: none;
  min-width: 230px;
  margin: 0;
  padding: .35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brand);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 20px rgba(24, 39, 47, .16);
}
.nav-child li a, .dropdown-menu li a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 3px;
  color: var(--ink-soft);
  font-size: .93rem;
}
.nav-child li a:hover, .dropdown-menu li > a:hover,
.dropdown-menu .active > a, .dropdown-menu .active > a:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.nav-list > .active > a, .nav-list > .active > a:hover { background: var(--brand); color: #fff; }
.nav-pills > li:hover > .nav-child,
.nav-pills > li:focus-within > .nav-child,
.nav-pills > li.open > .nav-child { display: block; }

/* --------------------------------------------------------------------------
 * 4. Two-column layout
 * -------------------------------------------------------------------------- */

.row-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-left: calc(var(--gutter) / -2);
  margin-right: calc(var(--gutter) / -2);
}
.row-fluid > [class*='span'] {
  min-width: 0;
  padding-left: calc(var(--gutter) / 2);
  padding-right: calc(var(--gutter) / 2);
}
.span12 { flex: 0 0 100%; max-width: 100%; }
.span9 { flex: 0 0 75%; max-width: 75%; }
.span3 { flex: 0 0 25%; max-width: 25%; }
main#content { min-width: 0; }
#aside { font-size: .95rem; }
#aside .well { position: sticky; top: 1rem; }

.page-header {
  padding-bottom: .6rem;
  margin: 0 0 1.4rem;
  border-bottom: 1px solid var(--line);
}
.page-header h1, .page-header h2, .page-header h3 {
  margin: 0;
  font-size: 1.9rem;
  word-wrap: break-word;
}
#aside .page-header h3 { font-size: 1.15rem; }

/* --------------------------------------------------------------------------
 * 5. Blog / featured article lists
 * -------------------------------------------------------------------------- */

.blog-featured { margin-bottom: 2rem; }
.items-leading { margin-bottom: 1.5rem; }
.items-leading > div[class^='leading-'] {
  padding: 0 0 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.items-leading > div[class^='leading-']:last-child { border-bottom: 0; margin-bottom: 0; }

.item-title, h2.item-title {
  margin: 0 0 .5rem;
  font-size: 1.55rem;
  font-weight: 600;
}
.item-title a { color: var(--brand); }
.item-title a:hover { color: var(--brand-dark); }

.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .6rem;
  margin: 0 0 1rem;
  padding: .55rem .75rem;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface-alt);
  border-radius: var(--radius);
}
.article-info dt, .article-info .article-info-term {
  flex: 0 0 100%;
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-info dd { margin: 0; }
.article-info dd + dd::before { content: '·'; margin-right: .6rem; color: #a3adb2; }
.article-info time { font-variant-numeric: tabular-nums; }

.items-row { margin: 0 0 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.items-row:last-of-type { border-bottom: 0; }
.items-row .item { padding-bottom: .5rem; }
.items-row .item > :last-child { margin-bottom: 0; }

.readmore-link, .jcomments-links a {
  display: inline-block;
  font-weight: 600;
}
.jcomments-links { margin: 1rem 0; font-size: .92rem; }

/* --------------------------------------------------------------------------
 * 6. Single article
 * -------------------------------------------------------------------------- */

.item-page { margin-bottom: 2rem; }
.item-page .page-header h1, .item-page .page-header h2 { font-size: 2rem; }
[itemprop='articleBody'] { font-size: 1.02rem; }
[itemprop='articleBody'] img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
[itemprop='articleBody'] > :last-child { margin-bottom: 0; }

.pager, .pagenav {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-heading);
}
.pager li { max-width: 48%; }
.pager li.next { text-align: right; margin-left: auto; }
.pager a { font-weight: 600; }
.pager .icon-chevron-left::before { content: '←'; }
.pager .icon-chevron-right::before { content: '→'; }

/* Comments (lightweight replacement markup) ------------------------------- */
.comments { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.comment-author { font-weight: 700; font-family: var(--font-heading); }
.comment-meta { font-size: .8rem; color: var(--muted); }

/* --------------------------------------------------------------------------
 * 7. Breadcrumbs and pagination
 * -------------------------------------------------------------------------- */

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  margin: 1rem 0 0;
  padding: .6rem .8rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: .55rem; }
.breadcrumb li + li::before { content: '/'; color: #a3adb2; }
.breadcrumb .active { color: var(--ink-soft); font-weight: 600; }
.breadcrumb .divider { display: none; }
.breadcrumb .divider img { display: none; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1.5rem 0; }
.pagination .counter { margin: 0; color: var(--muted); font-size: .9rem; }
.pagination-list, .pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
}
.pagination-list li { margin: 0; }
.pagination-list a,
.pagination-list li > span {
  display: block;
  min-width: 2.1rem;
  padding: .35rem .6rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--surface);
  font-size: .9rem;
}
.pagination-list a:hover { background: var(--surface-alt); text-decoration: none; }
.pagination-list .active a, .pagination-list .active > span,
.pagination-list li.active a, .pagination-list li.active > span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}
.pagination-list .disabled a, .pagination-list .disabled > span {
  color: #aab4b9;
  background: var(--surface-alt);
  cursor: default;
}
.icon-first::before { content: '«'; }
.icon-previous::before { content: '‹'; }
.icon-next::before { content: '›'; }
.icon-last::before { content: '»'; }

/* --------------------------------------------------------------------------
 * 8. Forms and messages
 * -------------------------------------------------------------------------- */

fieldset { margin: 0 0 1.25rem; padding: 0; border: 0; }
legend { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; padding: 0 0 .5rem; }

label { display: inline-block; margin-bottom: .3rem; font-weight: 600; font-size: .93rem; }
input[type='text'], input[type='email'], input[type='password'], input[type='search'],
input[type='number'], input[type='url'], input[type='tel'], select, textarea {
  width: 100%;
  max-width: 100%;
  padding: .5rem .65rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcc7cc;
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:hover, select:hover, textarea:hover { border-color: #93a2a9; }
input:focus, select:focus, textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(22, 104, 179, .15);
  outline: 0;
}
textarea { min-height: 8rem; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: auto; margin-right: .35rem; accent-color: var(--brand); }
.inputbox { font-family: inherit; }
.input-mini, .input-small { max-width: 7rem; }
.form-horizontal .control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .2rem 1rem;
  margin-bottom: 1rem;
}
.form-horizontal .control-label {
  flex: 0 0 170px;
  padding-top: .45rem;
  text-align: right;
  margin: 0;
}
.form-horizontal .controls { flex: 1 1 260px; min-width: 0; }
.form-horizontal .controls > :last-child { margin-bottom: 0; }
.form-horizontal .controls .help-block, .help-block { display: block; margin-top: .3rem; font-size: .82rem; color: var(--muted); }
label .star, .star { color: var(--brand-dark); font-weight: 700; }
.form-actions { padding-top: 1rem; border-top: 1px solid var(--line); }

.filters, .btn-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.btn-group { display: inline-flex; gap: .25rem; }
.filters .inputbox { max-width: 16rem; }
label.filter-search-lbl { margin: 0; }

#system-message-container:empty { display: none; }
.alert, .message, .flash {
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--focus);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--ink);
}
.alert-success, .message.success, .flash-success { border-left-color: #2e8b57; background: #eef8f1; }
.alert-warning, .message.warning, .flash-warning { border-left-color: #c77f00; background: #fff8e8; }
.alert-error, .alert-danger, .message.error, .flash-error { border-left-color: var(--brand); background: var(--brand-tint); }

/* --------------------------------------------------------------------------
 * 9. Footer and back-to-top
 * -------------------------------------------------------------------------- */

.footer {
  color: var(--ink-soft);
  padding: .25rem 0 2rem;
  font-size: .9rem;
}
.footer .container { padding-top: .25rem; }
.footer hr { margin-top: 0; border-top-color: #a7b1b6; }
.footer p { margin-bottom: .4rem; }
.footer a { color: #9c0620; }
.footer a:hover { color: var(--brand-darker); }
#back-top { font-weight: 600; }

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  padding: .55rem .8rem;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 40px;
  box-shadow: 0 4px 14px rgba(24, 39, 47, .25);
  font-size: .85rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.back-to-top:hover { color: #fff; background: var(--brand-dark); text-decoration: none; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* Lazy images ------------------------------------------------------------- */
img[data-src] { opacity: 0; transition: opacity 250ms ease; }
img.lazy-loaded, img.loaded { opacity: 1; }
img.lazy-error { opacity: .6; }

/* --------------------------------------------------------------------------
 * 10. Responsive behaviour
 * -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  :root { --gutter: 1.15rem; }
  .span9, .span3, .span12 { flex: 0 0 100%; max-width: 100%; }
  #aside .well { position: static; }
  #aside { margin-top: .5rem; }
  .body { padding: .75rem 0 1.5rem; }
}

@media (max-width: 767px) {
  :root { --gutter: 1rem; --text-base: 15.5px; }
  .navbar { display: block; }
  .nav-collapse { display: none; }
  .nav-collapse.open { display: block; }
  .nav-pills { flex-direction: column; padding: .35rem; }
  .nav-pills > li > a { padding: .6rem .75rem; }
  .nav-child, .dropdown-menu, .nav-pills .nav-child {
    position: static;
    display: none;
    min-width: 0;
    margin: .15rem 0 .35rem .5rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    box-shadow: none;
  }
  .nav-pills > li.open > .nav-child,
  .nav-pills > li:hover > .nav-child,
  .nav-pills > li:focus-within > .nav-child { display: block; }
  .form-horizontal .control-label { flex: 0 0 100%; padding-top: 0; text-align: left; }
  .form-horizontal .controls { flex: 0 0 100%; }
  h1, .page-header h1, .page-header h2 { font-size: 1.65rem; }
  .item-title, h2.item-title { font-size: 1.35rem; }
  .header-inner { padding-bottom: .6rem; }
  .brand img { max-height: 60px; }
  .pagination .counter { flex: 0 0 100%; }
  .pull-right { float: none; }
  .footer .pull-right { text-align: left; }
  .table-responsive { overflow-x: auto; }
}

@media (max-width: 420px) {
  .nav-pills > li > a { font-size: .9rem; }
  h1, .page-header h1, .page-header h2 { font-size: 1.4rem; }
  .article-info { font-size: .8rem; }
  .btn { padding: .45rem .7rem; }
}

/* --------------------------------------------------------------------------
 * 11. Reduced motion and print
 * -------------------------------------------------------------------------- */

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

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  body.site { border-top: 0; }
  .body { padding: 0; }
  .body > .container { border: 0; box-shadow: none; padding: 0; }
  .header-search, .navigation, #aside, .footer, .pagination, .back-to-top, .skip-link,
  .jcomments-links, .form-actions { display: none !important; }
  .span9, .span3, .span12 { width: 100%; max-width: 100%; }
  a { color: #000; text-decoration: underline; }
  h1, h2, h3, h4, h5, h6 { break-after: avoid; }
  p, blockquote, li { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
 * 12. Account avatar and home banner
 * -------------------------------------------------------------------------- */

.header-account { display: flex; align-items: center; }

.user-menu { position: relative; }
.user-menu > summary.avatar {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  cursor: pointer;
  list-style: none;
  padding: .25rem .4rem;
  border-radius: 999px;
  transition: background-color .15s ease;
}
.user-menu > summary.avatar::-webkit-details-marker { display: none; }
.user-menu > summary.avatar:hover,
.user-menu > summary.avatar:focus-visible { background: rgba(235, 12, 45, .08); }

.avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--brand, #eb0c2d);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  flex: 0 0 auto;
}
.avatar-letter.guest { background: #6b7780; font-size: 1.15rem; }
.avatar-name { font-weight: 600; color: var(--ink); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar-dropdown {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  z-index: 50;
  min-width: 13rem;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #ccd2d6);
  border-radius: var(--radius, 6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  padding: .35rem 0;
  overflow: hidden;
}
.avatar-dropdown a {
  display: block;
  padding: .6rem .9rem;
  color: var(--ink, #222);
  text-decoration: none;
  white-space: nowrap;
}
.avatar-dropdown a:hover,
.avatar-dropdown a:focus-visible { background: var(--brand, #eb0c2d); color: #fff; }

.site-banner {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.75rem;
  padding: 2.4rem 2rem;
  border-radius: var(--radius, 6px);
  background: linear-gradient(115deg, #b30924 0%, var(--brand, #eb0c2d) 55%, #f2546a 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.site-banner::after {
  content: "";
  position: absolute;
  right: -3rem;
  top: -3rem;
  width: 13rem;
  height: 13rem;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  pointer-events: none;
}
.site-banner h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #fff;
}
.site-banner p {
  margin: 0;
  max-width: 48rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .95);
}

@media (max-width: 600px) {
  .avatar-name { display: none; }
  .site-banner { padding: 1.6rem 1.2rem; }
}

@media print {
  .user-menu, .avatar-dropdown { display: none !important; }
  .site-banner { background: #fff; color: #000; border: 1px solid #000; box-shadow: none; }
  .site-banner h1, .site-banner p { color: #000; }
}

/* --------------------------------------------------------------------------
 * 13. Header banner + menu-line account (replaces eye image banner)
 * -------------------------------------------------------------------------- */

.header { margin-bottom: 0; border-bottom: 0; }
.header .site-banner { margin-bottom: 1rem; }
.site-banner .site-title,
.site-banner .site-title:visited {
  display: inline-block;
  margin: 0 0 .4rem;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-banner .site-title:hover,
.site-banner .site-title:focus-visible { text-decoration: underline; color: #fff; }

.navigation .nav-collapse { display: block; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem .9rem;
}
.nav-inner > ul.nav { flex: 1 1 auto; margin: 0; }
.nav-inner > .header-account { margin-left: auto; flex: 0 0 auto; }

.menu-search > a { font-weight: 600; white-space: nowrap; }
.menu-search > a:hover,
.menu-search > a:focus-visible { color: #fff; }

@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; gap: .5rem; padding: .5rem .7rem; }
  .nav-inner > ul.nav { flex-basis: 100%; }
  .nav-inner > .header-account { margin-left: 0; }
}

@media print {
  .navigation .nav-inner { display: none; }
}

/* --------------------------------------------------------------------------
 * 14. Themed SVG banner background
 * -------------------------------------------------------------------------- */

.site-banner {
  min-height: 170px;
  background: linear-gradient(90deg, rgba(55, 3, 13, .62) 0%, rgba(55, 3, 13, .28) 48%, rgba(55, 3, 13, 0) 78%),
              url('../images/site-banner.svg') center center / cover no-repeat;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.site-banner::after { display: none; }

@media (max-width: 760px) {
  .site-banner {
    background-position: 68% center;
    background-image: linear-gradient(90deg, rgba(55, 3, 13, .72) 0%, rgba(55, 3, 13, .35) 70%, rgba(55, 3, 13, .1) 100%),
                      url('../images/site-banner.svg');
  }
}

@media print {
  .site-banner { background: #fff !important; text-shadow: none; }
  .site-banner .site-title, .site-banner p { color: #000 !important; }
}

/* --------------------------------------------------------------------------
 * 15. Language captcha widget
 * -------------------------------------------------------------------------- */

.captcha-widget {
  max-width: 100%;
  margin: .25rem 0;
  padding: .9rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 1px solid var(--line, #d9e0e3);
  border-radius: var(--radius, 6px);
  font-size: .85rem;
  color: var(--ink, #202b31);
}
.captcha-header { text-align: center; color: #505a62; font-size: .8rem; font-weight: 600; margin-bottom: .6rem; }
.captcha-challenge {
  background: #fff;
  border: 2px dashed #c4ccd1;
  border-radius: 6px;
  padding: .7rem;
  text-align: center;
  margin-bottom: .6rem;
  line-height: 1.8;
}
.captcha-challenge img, .option-row img { vertical-align: middle; }
.options-list { margin: .5rem 0; }
.option-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .6rem;
  margin: .3rem 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  flex-wrap: wrap;
}
.option-row:hover { border-color: var(--brand, #eb0c2d); background: #fffafb; }
.option-row.disabled { opacity: .5; cursor: not-allowed; }
.option-row label { flex: 1; margin: 0; cursor: pointer; }
.option-row.captcha-correct { background: #eaf8e6; border-color: #4e9b36; }
.captcha-status {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .5rem;
  padding: .35rem .6rem;
  background: rgba(0, 0, 0, .05);
  border-radius: 4px;
  font-size: .75rem;
}
.block-alert { background: #eb0c2d; color: #fff; padding: .5rem; border-radius: 4px; text-align: center; margin: .5rem 0; }
.captcha-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.captcha-refresh { background: none; border: 0; padding: 0; color: var(--brand, #eb0c2d); cursor: pointer; font-size: .78rem; text-decoration: underline; }
.captcha-feedback { font-size: .78rem; }
.captcha-feedback.ok { color: #2f7d21; font-weight: 600; }
.captcha-feedback.error { color: #b00020; font-weight: 600; }
.captcha-blocked .option-row { pointer-events: none; opacity: .5; }
.captcha-group .controls { max-width: 42rem; }

@media print { .captcha-widget, .captcha-group { display: none !important; } }

/* Captcha script selector */
.captcha-script-group { margin-bottom: .4rem; }
.captcha-script { min-width: 12rem; max-width: 100%; }
.captcha-loading { padding: 1rem; text-align: center; color: var(--muted, #66727a); font-size: .85rem; }

/* Email validation feedback */
.email-check-feedback { display: block; margin-top: .25rem; font-size: .78rem; }
.email-check-feedback.checking { color: var(--muted, #66727a); }
.email-check-feedback.ok { color: #2f7d21; font-weight: 600; }
.email-check-feedback.error { color: #b00020; font-weight: 600; }

/* Hamburger toggle is only for narrow screens */
.btn-navbar, .nav-toggle { display: none; }
@media (max-width: 767px) {
  .btn-navbar, .nav-toggle { display: inline-flex; }
}

/* Prevent long legacy URLs and images from breaking narrow layouts */
img { max-width: 100%; height: auto; }
.article-body, .item-body, .search-result, .comment, .category-desc,
.weblink-list, .contact-card, .blog-featured, .content {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-body a, .item-body a, .search-result a, .comment a { overflow-wrap: anywhere; }

/* Submit-your-story page */
.story-invite p { font-size: 1rem; line-height: 1.7; }
.story-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.my-articles ul { list-style: none; padding: 0; margin: 0; }
.my-articles li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line, #d9e0e3); }
.badge.state-pending { background: #fff0d2; color: #8a5a00; }
.badge.state-published { background: #d9f0e2; color: #17693f; }
.badge.state-draft { background: #e6ebee; color: #66727a; }
.badge.state-trash, .badge.state-archived { background: #f9dbe0; color: #940719; }
