:root {
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Override Pico's aggressive progressive font scaling (131.25% max → 112.5% max) */
@media (min-width: 576px) {
  :root {
    --pico-font-size: 100%;
  }
}

@media (min-width: 768px) {
  :root {
    --pico-font-size: 103.125%;
  }
}

@media (min-width: 1024px) {
  :root {
    --pico-font-size: 106.25%;
  }
}

@media (min-width: 1280px) {
  :root {
    --pico-font-size: 109.375%;
  }
}

@media (min-width: 1536px) {
  :root {
    --pico-font-size: 112.5%;
  }
}

.maplibregl-marker {
  border: none;
  background-color: transparent;
}

html,
body {
  font-family: var(--font);
}

/* Sticky footer: push footer to bottom even with short content */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body>main {
  flex: 1;
}

.row {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.space-between {
  justify-content: space-between;
}

.mt-2 {
  margin-top: .75rem;
}

.mr-1 {
  margin-right: .5rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) 0;
  color: var(--pico-primary-inverse, #fff);
  background:
    linear-gradient(135deg, var(--pico-primary, #1a6fb1) 0%, var(--pico-primary-focus, #104577) 100%);
  background-size: cover;
  background-position: center;
}

.hero--with-image {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, .35)),
    var(--hero-bg, none);
  background-size: cover;
  background-position: center;
}

.hero__title {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero__subtitle {
  opacity: 0.9;
}

body[data-theme="light"] .hero {
  background: linear-gradient(135deg, var(--pico-primary, #1a6fb1) 0%, var(--pico-primary-focus, #0d4a70) 100%);
  color: #fff;
}

body[data-theme="dark"] .hero {
  background: linear-gradient(135deg, var(--pico-primary, #4da3e0) 0%, var(--pico-primary-focus, #2a7ab5) 100%);
  color: #fff;
}

.hero__inner {
  max-width: 1100px;
}

.hero__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 .5rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: .85;
  margin: 0 0 1.25rem;
}

.hero__actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ===== Hero Split Layout (50/50) ===== */
.hero--split {
  display: flex;
  align-items: stretch;
  padding: 0;
  min-height: 500px;
}

.hero--split .hero__image {
  flex: 0 0 50%;
  max-width: 50%;
  overflow: hidden;
}

.hero--split .hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero--split .hero__content {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .hero--split {
    flex-direction: column;
    min-height: auto;
  }

  .hero--split .hero__image,
  .hero--split .hero__content {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .hero--split .hero__image {
    min-height: 300px;
  }
}

/* ===== Header layout ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(4px);
  background: color-mix(in oklab, var(--pico-background-color), transparent 20%);
  box-shadow: 0 4px 16px rgb(0 0 0 / .06);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-left .brand {
  font-weight: 700;
  letter-spacing: .2px;
}

.site-left .brand-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 100;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--pico-primary-hover);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-weight: 500;
  opacity: .8;
  transition: opacity .2s;
}

.site-nav a:hover {
  opacity: 1;
}


/* Site Tools (Language + Theme) */
.site-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Language Dropdown */
.site-tools .dropdown {
  position: relative;
}

.site-tools .dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

/* Hide default Pico dropdown arrow for language dropdown */
.lang-dropdown summary::after {
  display: none !important;
}

.site-tools .dropdown ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--pico-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 100;
}

.site-tools .dropdown li {
  margin: 0;
  padding: 0;
}

.site-tools .dropdown li a {
  color: var(--pico-color);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 4px;
  gap: 0.5rem;
}

.site-tools .dropdown li a:hover {
  background: color-mix(in srgb, var(--pico-primary) 10%, transparent);
  color: var(--pico-color);
}

/* ===== Service Dropdown ===== */

/* Trigger button */
details.service-dropdown>summary {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--md-sys-color-on-surface-variant);
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

details.service-dropdown>summary::after {
  display: none !important;
}

details.service-dropdown>summary:hover {
  color: var(--pico-primary);
}

details.service-dropdown>summary .msr {
  font-size: 1.6rem;
}

/* Dropdown panel — override Pico's left:0 + width:100% */
details.service-dropdown>summary+ul {
  left: auto;
  right: 0;
  width: auto;
  min-width: 200px;
  padding: 0.35rem 0;
  background-color: var(--pico-dropdown-background-color);
  border: 1px solid var(--pico-dropdown-border-color);
  border-radius: var(--pico-border-radius);
  box-shadow: var(--pico-dropdown-box-shadow);
  color: var(--pico-dropdown-color);
}

/* List items — reset Pico's padding on li */
details.service-dropdown>summary+ul li {
  padding: 0;
  margin: 0;
}

details.service-dropdown>summary+ul li:first-of-type {
  margin-top: 0;
}

details.service-dropdown>summary+ul li:last-of-type {
  margin-bottom: 0;
}

/* Links and buttons — override Pico's overflow:hidden + text-overflow:ellipsis */
details.service-dropdown>summary+ul li a,
details.service-dropdown>summary+ul li button {
  display: flex;
  align-items: center;
  /* gap: 0.5rem; */
  margin: 0;
  padding: 0.4rem 1rem;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  color: var(--pico-dropdown-color);
  text-decoration: none;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.15s ease;
}

details.service-dropdown>summary+ul li a:hover,
details.service-dropdown>summary+ul li a:focus,
details.service-dropdown>summary+ul li button:hover,
details.service-dropdown>summary+ul li button:focus {
  background-color: var(--pico-dropdown-hover-background-color);
  color: var(--pico-dropdown-color);
}

details.service-dropdown>summary+ul li a .msr,
details.service-dropdown>summary+ul li button .msr {
  font-size: 1.15rem;
  flex-shrink: 0;
  color: var(--pico-muted-color);
}

/* Separators */
details.service-dropdown>summary+ul hr {
  margin: 0.15rem 0;
  border: none;
  border-top: 1px solid var(--pico-dropdown-border-color);
}

/* Language flags — horizontal row */
details.service-dropdown .lang-flags {
  display: flex;
  justify-content: center;
}

details.service-dropdown .lang-flag {
  font-size: 1.35rem;
  text-decoration: none;
  line-height: 1;
  display: inline-block;
  transition: transform 0.15s ease;
  overflow: visible;
}

details.service-dropdown .lang-flag:hover {
  transform: scale(1.25);
}

/* Logout form — inline, no form chrome */
details.service-dropdown .logout-form {
  display: contents;
}

/* Theme toggle — show opposite mode icon/label */
details.service-dropdown .theme-toggle-item .ico-sun,
details.service-dropdown .theme-toggle-item .theme-label-light {
  display: none;
}

details.service-dropdown .theme-toggle-item .ico-moon,
details.service-dropdown .theme-toggle-item .theme-label-dark {
  display: inline;
}

body[data-theme="dark"] details.service-dropdown .theme-toggle-item .ico-sun,
body[data-theme="dark"] details.service-dropdown .theme-toggle-item .theme-label-light {
  display: inline;
}

body[data-theme="dark"] details.service-dropdown .theme-toggle-item .ico-moon,
body[data-theme="dark"] details.service-dropdown .theme-toggle-item .theme-label-dark {
  display: none;
}

/* Theme Toggle Button */
#themeToggleBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem !important;
  margin: 0;
}

#themeToggleBtn .msr {
  font-size: 1.3rem;
  transition: opacity 0.2s;
}

/* Show sun in dark mode, moon in light mode */
body[data-theme="dark"] #themeToggleBtn .ico-sun {
  display: inline-block;
}

body[data-theme="dark"] #themeToggleBtn .ico-moon {
  display: none;
}

body[data-theme="light"] #themeToggleBtn .ico-sun {
  display: none;
}

body[data-theme="light"] #themeToggleBtn .ico-moon {
  display: inline-block;
}


/* Icon Button (e.g. hero action) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.icon-btn .material-symbols-outlined {
  font-size: 1.3rem;
}

/* Material Symbols global size tweaks */
.msr {
  font-family: 'Material Symbols Rounded';
  font-size: 1.3rem;
}

button .msr {
  margin-right: .4rem;
}

/* ===== Gallery grid ===== */
.gallery-grid {
  --min-w: clamp(250px, 28vw, 350px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min-w), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.gallery-item {
  position: relative;
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(0 0 0 / .1);
  transition: transform .2s, box-shadow .2s;
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / .15);
}

.gallery-item a {
  display: block;
  cursor: zoom-in;
}

.gallery-item img,
.ph-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  background-size: cover;
  background-color: var(--pico-muted-border-color);
}


/* ===== Portfolio Preview Section ===== */
.portfolio-preview {
  background: linear-gradient(180deg, var(--pico-secondary-background, #1a1a2e) 0%, var(--pico-card-background-color, #16162a) 100%);
  padding: clamp(2rem, 5vw, 4rem) 1rem;
  margin: 2rem 0;
  border-radius: var(--pico-border-radius);
}

body[data-theme="light"] .portfolio-preview {
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface-container) 100%);
}

body[data-theme="dark"] .portfolio-preview {
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface-container) 100%);
}

.portfolio-preview h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--pico-contrast);
}

.portfolio-preview .grid {
  gap: 1.5rem;
}

.portfolio-preview article {
  background: var(--pico-card-background-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--pico-muted-border-color);
}

.portfolio-preview article:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.portfolio-preview article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-preview article:hover img {
  transform: scale(1.03);
}

.portfolio-preview article footer {
  padding: 1rem;
  text-align: center;
  background: var(--pico-card-background-color);
}

/* ===== Blog Preview Section ===== */
.blog-preview {
  padding: clamp(2rem, 5vw, 4rem) 1rem;
  margin: 2rem 0;
}

.blog-preview h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.blog-preview__subtitle {
  text-align: center;
  color: var(--pico-muted-color);
  margin-bottom: 2rem;
}

.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-preview__card {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--pico-card-background-color);
}

.blog-preview__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.blog-preview__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-preview__card:hover .blog-preview__image img {
  transform: scale(1.03);
}

.blog-preview__content {
  padding: 1.25rem;
}

.blog-preview__content small {
  color: var(--pico-muted-color);
}

.blog-preview__content h3 {
  margin: 0.5rem 0;
  font-size: 1.15rem;
}

.blog-preview__content h3 a {
  text-decoration: none;
  color: inherit;
}

.blog-preview__content h3 a:hover {
  color: var(--pico-primary);
}

.blog-preview__content p {
  color: var(--pico-muted-color);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.blog-preview__footer {
  text-align: center;
  margin-top: 2rem;
}

/* ===== General ===== */
.container-narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.content-block {
  margin-bottom: 3rem;
}

/* ===== Layout Components ===== */
.page-section {
  /* padding-top: 2rem; */
  padding-bottom: 2rem;
}

.prose {
  max-width: 65ch;
  line-height: 1.8;
}

.prose p {
  margin-bottom: 1.25em;
}

/* Headings */
.prose h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.4;
}

.prose h4 {
  font-size: 1.125rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.4;
}

.prose h5 {
  font-size: 1rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.5;
}

.prose h6 {
  font-size: 0.875rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.5;
}

/* Lists */
.prose ul,
.prose ol {
  padding-left: 2em;
  margin: 1em 0;
}

.prose li {
  margin-bottom: 0.5em;
}

/* Blockquotes */
.prose blockquote {
  border-left: 4px solid var(--pico-muted-border-color);
  padding: 0.5em 1em;
  margin: 1em 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.prose code {
  background: var(--pico-code-background-color);
  color: var(--pico-code-color);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.875em;
}

.prose pre {
  background: var(--pico-code-background-color);
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1em 0;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Links */
.prose a {
  color: var(--pico-primary);
  text-decoration: underline;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--pico-muted-color);
}

/* ===== Card Components ===== */
.card {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  background: var(--pico-card-background-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card__image {
  overflow: hidden;
  background: var(--pico-muted-border-color);
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card__image img {
  transform: scale(1.03);
}

.card__image--hero {
  aspect-ratio: 16 / 9;
  margin-bottom: 2rem;
}

.card .card__image--hero {
  margin-bottom: 0;
}

.card__image--landscape {
  aspect-ratio: 4 / 3;
}

.card__image--square {
  aspect-ratio: 1 / 1;
}

.card__image--square img[onclick] {
  cursor: pointer;
}

.card__body {
  padding: 1.25rem;
}

.card__meta {
  color: var(--pico-muted-color);
  margin-bottom: 1rem;
}

.card__meta small {
  color: inherit;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.card a:hover {
  color: var(--pico-primary);
}

/* ===== Grid Components ===== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.content-grid--wide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* ===== Blog List: Featured Post + Grid ===== */
.blog-featured {
  margin-bottom: 2rem;
}

.blog-featured .card__image--hero {
  aspect-ratio: 16 / 9;
}

.blog-featured .card__body h2 {
  font-size: 1.75rem;
}

.blog-featured .card__body .excerpt {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Blog Detail: Content Padding ===== */
.blog-article__content {
  padding-inline: 1.5rem;
}

.blog-article__content .prose img {
  max-width: 100%;
  height: auto;
}

/* ===== Typography & Utility ===== */
.excerpt {
  font-size: 1.15rem;
  color: var(--pico-muted-color);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.separator {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.text-center {
  text-align: center;
}

.full-width {
  width: 100%;
}

/* Admin button group */
.btn-group button {
  margin-right: .5rem;
}

/* small role-input radio buttons */
.role-input {
  position: absolute;
  left: -9999px;
}

.role-btn {
  cursor: pointer;
  display: inline-block;
  padding: .5rem 1rem;
  border-radius: var(--pico-border-radius);
  border: 1.5px solid var(--pico-muted-border-color);
  font-size: .85rem;
  transition: background .15s, border-color .15s;
  margin: .25rem;
}

.role-btn:hover {
  background: var(--pico-secondary-hover-background);
  border-color: var(--pico-secondary-border);
}

.role-input:checked+.role-btn {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border-color: var(--pico-primary);
}

.role-btn .check {
  display: none;
  font-weight: 700;
  margin-right: .3rem;
}

.role-input:checked+.role-btn .check {
  display: inline;
}

/* ========================================
   QUILL WYSIWYG EDITOR STYLES
   ======================================== */

/* Toolbar */
.ql-toolbar.ql-snow {
  background: var(--pico-card-background-color, white);
  border: 1px solid var(--pico-muted-border-color, #ddd);
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 8px;
  border-bottom: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ql-toolbar.ql-snow .ql-formats {
  margin-right: 8px;
  display: inline-flex;
  gap: 2px;
}

/* Toolbar Buttons & Pickers */
.ql-toolbar.ql-snow button,
.ql-toolbar.ql-snow .ql-picker-label {
  background: var(--pico-background-color, white);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  height: 24px;
  width: auto;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pico-color, #444);
}

.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow .ql-picker-label:hover {
  background: var(--pico-secondary-hover-background, #f0f0f0);
  border-color: var(--pico-muted-border-color, #ccc);
}

.ql-toolbar.ql-snow button.ql-active {
  background: var(--pico-primary, #0066cc);
  color: white;
  border-color: var(--pico-primary, #0066cc);
}

.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: white;
}

.ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: white;
}

/* SVG Icons */
.ql-toolbar.ql-snow button svg,
.ql-toolbar.ql-snow .ql-picker-label svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.ql-toolbar.ql-snow .ql-stroke {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.ql-toolbar.ql-snow .ql-fill {
  fill: currentColor;
  stroke: none;
}

.ql-toolbar.ql-snow .ql-even {
  fill: currentColor;
}

/* Picker Dropdowns */
.ql-toolbar.ql-snow select {
  display: none !important;
}

.ql-toolbar.ql-snow .ql-picker {
  display: inline-block;
  position: relative;
  height: 24px;
}

.ql-toolbar.ql-snow .ql-picker-label {
  width: auto;
  padding-right: 20px;
}

.ql-toolbar.ql-snow .ql-picker-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--pico-background-color, white);
  border: 1px solid var(--pico-muted-border-color, #ddd);
  border-radius: 4px;
  padding: 4px;
  margin-top: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 120px;
}

.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  display: block;
}

.ql-toolbar.ql-snow .ql-picker-item {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
}

.ql-toolbar.ql-snow .ql-picker-item:hover {
  background: var(--pico-secondary-hover-background, #f0f0f0);
}

/* Color picker specific */
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options,
.ql-toolbar.ql-snow .ql-background .ql-picker-options {
  width: 152px;
  padding: 8px;
}

.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item,
.ql-toolbar.ql-snow .ql-background .ql-picker-item {
  height: 16px;
  width: 16px;
  display: inline-block;
  margin: 2px;
  padding: 0;
  border-radius: 2px;
}

/* Editor Container */
.ql-container {
  font-family: var(--pico-font-family, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.6;
}

.ql-container.ql-snow {
  border: 1px solid var(--pico-muted-border-color, #ddd);
  border-radius: 0 0 0.5rem 0.5rem;
  background: var(--pico-background-color, white);
}

.ql-editor {
  min-height: 400px;
  padding: 1rem;
  outline: none;
  tab-size: 4;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--pico-color, #333);
}

.ql-editor.ql-blank::before {
  content: attr(data-placeholder);
  color: var(--pico-muted-color, #999);
  font-style: italic;
  pointer-events: none;
  position: absolute;
}

/* Editor Text Format — .ql-container.ql-snow prefix for specificity (0,3,1)
   to override both Pico CSS (0,0,1) and quill.snow.css (0,2,1) */
.ql-container.ql-snow .ql-editor p {
  margin: 0 0 1em 0;
}

.ql-container.ql-snow .ql-editor h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.ql-container.ql-snow .ql-editor h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.ql-container.ql-snow .ql-editor h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.4;
}

.ql-container.ql-snow .ql-editor h4 {
  font-size: 1.125rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.4;
}

.ql-container.ql-snow .ql-editor h5 {
  font-size: 1rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.5;
}

.ql-container.ql-snow .ql-editor h6 {
  font-size: 0.875rem;
  font-weight: bold;
  margin: 1em 0 0.5em;
  line-height: 1.5;
}

.ql-container.ql-snow .ql-editor strong {
  font-weight: bold;
}

.ql-container.ql-snow .ql-editor em {
  font-style: italic;
}

.ql-container.ql-snow .ql-editor u {
  text-decoration: underline;
}

.ql-container.ql-snow .ql-editor s {
  text-decoration: line-through;
}

.ql-container.ql-snow .ql-editor blockquote {
  border-left: 4px solid var(--pico-muted-border-color, #ccc);
  padding: 0.5em 1em;
  margin: 1em 0;
}

.ql-container.ql-snow .ql-editor code {
  background: var(--pico-code-background-color, #f4f4f4);
  color: var(--pico-code-color);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.875em;
}

.ql-container.ql-snow .ql-editor pre {
  background: var(--pico-code-background-color, #f4f4f4);
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
}

.ql-container.ql-snow .ql-editor ol,
.ql-container.ql-snow .ql-editor ul {
  padding-left: 2em;
  margin: 1em 0;
}

.ql-container.ql-snow .ql-editor li {
  margin-bottom: 0.5em;
}

/* Wrapper */
#editor-wrapper {
  margin: 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Hide default tooltip */
.ql-tooltip {
  position: absolute;
  display: none !important;
}

.ql-clipboard {
  position: absolute;
  left: -100000px;
  height: 1px;
  overflow-y: hidden;
}

/* ===================================
   Authentication Page Styles
   =================================== */

/* Label icon + text alignment */
.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Auth page: full-viewport centered layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%,
      var(--md-sys-color-surface-container, #f0f0f0) 0%,
      var(--md-sys-color-background, #fafafa) 70%);
}

.auth-page>main {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

/* Auth card */
.page-card {
  padding: 2rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  background: var(--pico-card-background-color);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.page-card:hover {
  transform: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.page-card header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.page-card header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* Auth card: icon accent in header */
.page-card header .auth-icon {
  font-size: 2.5rem;
  color: var(--pico-primary);
}

/* Auth form: row with two items on same line */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.auth-row label.checkbox {
  margin: 0;
}

.auth-row a {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Auth form: full-width submit button */
.page-card button[type="submit"],
.page-card .auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Auth form: "— or —" divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--pico-muted-border-color);
}

/* Auth form: cancel / back link */
.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

/* Auth form: full-width outline buttons for OAuth / Passkey */
.page-card .auth-oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Auth form: status messages */
.page-card .flash-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  background: color-mix(in srgb, var(--pico-primary) 10%, transparent);
  color: var(--pico-primary);
  margin-bottom: 1rem;
}

@media (max-width: 639px) {
  .auth-page>main {
    max-width: 100%;
  }
}

/* Password field container */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-field input {
  flex: 1;
  margin: 0;
}

/* Password toggle button - make it compact and properly sized */
.password-field button.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  width: auto;
  min-width: 2.5rem;
  height: 2.5rem;
  margin: 0;
}

/* Form actions container */
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Make all auth buttons same height with centered icons */
.form-actions button,
.form-actions a[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto;
  padding: 0.75rem 1.25rem;
}

/* Icon alignment within buttons */
.btn-icon .msr {
  line-height: 1;
  vertical-align: middle;
}

/* Ensure buttons with icons have proper spacing */
.btn-icon {
  gap: 0.5rem;
}

/* ===================================
   Contact Map
   =================================== */

.contact-map-section {
  margin-top: 2rem;
}

.contact-map {
  width: 100%;
  height: 400px;
  border-radius: var(--pico-border-radius);
  border: 1px solid var(--pico-muted-border-color);
  margin-top: 2rem;
  z-index: 1;
}

/* ===================================
   Site Footer
   =================================== */

.site-footer {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.7em;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h4 {
  color: var(--md-sys-color-on-secondary-container);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--md-sys-color-primary-fixed);
}

.footer-nav h5,
.footer-contact h5 {
  color: var(--md-sys-color-on-secondary-container);
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.3rem;
  list-style: none;
  color: var(--md-sys-color-primary-fixed);
}

.footer-nav a {
  color: var(--md-sys-color-on-sys-container);
  text-decoration: none;
  opacity: 0.8;
}

.footer-nav a:hover {
  color: var(--md-sys-color-on-secondary-container);
  opacity: 1;
}

.footer-contact p {
  margin-bottom: 0.4rem;
  color: var(--md-sys-color-primary-fixed);
}

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--md-sys-color-on-secondary-container) 25%, transparent);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}