/* static/css/styles.css */

:root {
  --font1: 'Onest', sans-serif;
  --font2: 'EB Garamond', serif;

  --circle: 50%;
  --smallcorner: 16px;
  --bigcorner: 32px;
  --blur: 10px;
  --trans: 0.7;
  --padding: 0.75rem;
  --lightcolor:       #fef5ed;
  --darkcolor:        #192e4c;
  --highlight:        #4d00ff;
  --accent:           #ff8300;
  --lowlight:         #fef351;
  --lightgrey:        #90D5FF;
  --beige:            #cfc8c1;
  --darkgrey:         #8a9282;
  --darkergreen:      #53544f;
  --darkergrey:       #192e4c;
  --buttonfont:       #FFFFFF;
  --buttonbackground: #4d00ff;
  --buttontransparency: 0.05;
  --border-color:     #FFFFFF;
  --color-error:      #de1529;

  --white:      255, 255, 255;
  --white2:     255, 255, 255;
  --black:      0, 0, 0;

  --map-base-weight: 0.5;
  --map-base-opacity: 0.8;
  --map-base-fill-opacity: 0.2;
  --map-base-fill-blur: 0px;
  
  --map-highlight-weight: 3;
  --map-highlight-opacity: 0;
  --map-highlight-fill-opacity: 0.2;
  --map-highlight-fill-blur: 3px;
}

html {background: transparent;}

/* Utility class for transparent backgrounds */
.bg-transparent {
  background: transparent !important;}

/* ---------- Icon Buttons ---------- */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--black), var(--buttontransparency));
  border: none;
  border-radius: var(--smallcorner);
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--buttonfont);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 0;}
.icon-btn:hover {
  background: rgba(var(--black), calc(var(--buttontransparency) * 2));}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;}
/* Container for view toggle and controls */
.view-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;}
.view-toggle-container h3 {
  margin: 0;
  color: var(--darkcolor);
  font-family: var(--font2);
  font-weight: 600;
  font-size: 1.3rem;
  flex: 1;
  text-align: center;}

/* ---------- Action Category Page ---------- */
.category-page-container {
  padding: 1rem 10px 0 10px;
  max-width: 1100px;
  margin: 0 auto;}
.category-page-container.list-view-active {
  max-width: 100%;}
.category-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;}
.category-controls h3 {
  margin: 0;
  color: var(--darkcolor);
  font-family: var(--font2);
  font-weight: 700;
  font-size: 1.5rem;
  flex: 1;
  text-align: center;}

/* Card grid - action stories */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;}

.card-list .card {
  background: rgb(var(--white));
  border-radius: var(--bigcorner);
  border: 1px solid #d4d4d4;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;}

.card-list .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(var(--black), 0.15);}

.card-list .card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;}

.card-list .thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;}

.story-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;}

.story-info strong {
  color: var(--darkcolor);
  font-family: var(--font2);
  font-size: 1rem;
  font-weight: 700;}

.story-info span {
  color: var(--darkgrey);
  font-size: 0.85rem;
  font-weight: 300;}

/* Card title and meta (used in actions, inputs, category pages) */
.card-list .card .title {
  color: var(--darkcolor);
  font-family: var(--font2);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;}
.card-list .card .meta {
  color: var(--darkgrey);
  font-size: 0.85rem;
  font-weight: 300;}

/* Card list - list view */
.card-list.list-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 0.5rem;}
.card-list.list-view .card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0;
  display: flex;
  text-align: left;}
.card-list.list-view .card-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0.5rem;}
.card-list.list-view .thumbnail,
.card-list.list-view .thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  margin: 0 0.5rem 0 0;
  flex-shrink: 0;}

.card-list.list-view .card-link > div {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
  text-align: left;}
.card-list.list-view .card .title {
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;}
.card-list.list-view .card .meta {
  white-space: nowrap;
  flex-shrink: 0;}
.card-list.list-view .story-info {
  padding: 0;
  flex: 1;}

.card-list.list-view .story-info strong {
  color: var(--darkcolor);
  font-family: var(--font2);
  font-weight: 700;
  font-size: 1rem;}

.card-list.list-view .story-info span {
  font-size: 0.8rem;
  margin-top: 0.25rem;}

.header-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;}

/* ---------- Dropdown Menus (unified style for all dropdowns) ---------- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 100;}
.dropdown-menu.open {
  display: block;}
.view-selector {
  position: relative;}
.view-menu {
  min-width: 140px;}
.lang-selector {
  position: relative;}
.lang-menu {
  min-width: 180px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;}
.lang-flag {
  font-size: 1.3rem;}
.dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.85rem;}
.dropdown-option:hover {
  background: #f0f0f0;}
.dropdown-option.active {
  background: #e8f0fe;
  font-weight: 600;}
.dropdown-option svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;}

.prose {
  color: var(--darkergrey);
  font-weight: 300;
  text-align: left;
  margin: 20px;}
.prose :is(h1,h2,h3,h4,h5,h6) {
  color: var(--darkcolor);
  text-align: center;
  font-weight: 700;}

body {
    font-family: var(--font1);

    background-color: var(--lightcolor);
    color: var(--darkergrey);
    text-align: center;
    font-weight: 300;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;}

a {text-decoration: none;}
b, strong {font-weight: 400;}
h1 {color: var(--darkcolor); font-weight: 600;    font-family:    var(--font2)}
h2 {color: var(--darkcolor); font-weight: 500;    font-family:    var(--font2)}
h3 {color: var(--darkcolor); font-weight: 400;    font-family:    var(--font2)}

.search-bar {
    flex-grow: 1;
    font-size: 16px;
    background-color: rgb(var(--white));
    border: 1px solid transparent;
    border-radius: var(--smallcorner);
    padding: 8px;
    width: 250px;
    text-align: left;}
.search-bar:focus {
  border: 1px solid var(--highlight);
  outline: none;
  transition: border-color 0.2s ease-in-out;}
.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 8px;
  font-size: 12px;}
.user-email {
  color: var(--darkergrey);
  font-weight: 400;}
.logout-btn {
  color: var(--darkergrey);
  font-size: 11px;
  text-decoration: none;
  padding: 2px 8px;
  margin-top: 4px;
  border: 1px solid var(--darkergrey);
  border-radius: var(--smallcorner);
  transition: all 0.2s ease-in-out;
  background: none;
  cursor: pointer;
  font-family: inherit;}
.logout-btn:hover {
  background-color: var(--highlight);
  color: rgb(var(--white));}
::selection {
  color: rgba(var(--black));
  background-color: var(--lowlight);}
a {color: var(--darkgrey);}
a:hover { color: var(--darkcolor);}

/* Menu */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--darkcolor);
    transition: background 0.3s;}
.logo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;}
.menu {
    align-items: center;
    left: 0;
    width: 100%;
    margin: 0 auto;
    border-bottom: 1px solid rgba(var(--white), 0.1);}
.menu-icon {
    height: auto;
    max-width: 100%;
    display: block;
    vertical-align: middle;
    fill: var(--lightcolor);
    stroke: none;
    transition: transform 0.2s ease-in-out;}
.menu a {
    color: var(--lightcolor);
    position: relative;}
.menu a .menu-label {
    color: var(--lightcolor);
    transition: opacity 0.2s;}
.menu a:hover .menu-label {
    opacity: 0.7;}
.menu a.active .menu-label {
    color: var(--lightcolor);
    font-weight: 600;}
.menu a.active .menu-icon svg {
    fill: var(--lightcolor);}
.menu a.active .menu-icon {
    fill: var(--lightcolor);}
.menu a:hover .menu-icon {
    fill: var(--lightcolor);}
/* Active page indicator — location pin above active nav item */
.menu a.active::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 15 22' fill='%23fef5ed' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 0C3.36 0 0 3.36 0 7.5C0 13.13 7.5 22 7.5 22S15 13.13 15 7.5C15 3.36 11.64 0 7.5 0ZM7.5 10.5C5.84 10.5 4.5 9.16 4.5 7.5C4.5 5.84 5.84 4.5 7.5 4.5C9.16 4.5 10.5 5.84 10.5 7.5C10.5 9.16 9.16 10.5 7.5 10.5Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;}
.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 2rem;}

/* Logo on dark navbar */
.sticky-header .logo {
    filter: brightness(0) invert(1);}

/* ---------- Dark hero pages (surveys, etc.) ---------- */
.page-hero-dark {
    background-color: var(--darkcolor);}
.page-hero-dark .sticky-header {
    background: transparent;}

/* Map */
#map {
  height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;}

/* Buttons */
.button {
    padding: 12px 25px;
    border: none;
    border-radius: 100px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    margin-top: 10px;
    align-self: center;
    width: fit-content;
    background-color: var(--highlight);
    color: var(--buttonfont);
    text-decoration: none;}
.button:hover {
    background-color: var(--darkcolor);
    color: var(--buttonfont)}
.button:active {
  color: var(--lowlight);}

.sheet {
    background: white !important;
    border-radius: 50px;
    padding: 20px;
    max-width: calc(100% - 50px);
      width: min(90vw, 800px);
    margin: 0 auto;
    box-shadow: 0 4px 14px rgba(var(--black), 0.15);}

/* ---------- Sheets (Action, Input) ---------- */
.sheet.prose {
    margin-top: 0;
    margin-bottom: 0;}
.sheet-controls {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: calc(100% - 50px);
    width: min(90vw, 800px);
    margin: 0 auto 0.5rem auto;
    padding: 0.5rem 10px 0 10px;
    min-height: 36px;}
.sheet-controls .back-btn {
    position: absolute;
    left: 10px;
    top: 8px;}
.sheet-controls .header-controls {
    position: absolute;
    right: 10px;
    top: 8px;}
.sheet-header {
    text-align: center;
    margin-bottom: 1.5rem;}
.sheet-header h2 {
    color: var(--darkcolor);
    margin: 0;
    font-weight: 700;}
.sheet-content {
    margin-bottom: 1.5rem;}
.sheet-meta {
    text-align: center;
    color: var(--darkgrey);
    margin: 0.5rem 0 1rem 0;
    font-size: 0.9rem;}
.sheet-description {
    text-align: left;
    line-height: 1.6;
    color: var(--darkergrey);
    margin-bottom: 1.5rem;}
.lang-dropdown {
    font-size: 1.1rem;}
.lang-dropdown span:not(.lang-flag) {
    display: none;}
.lang-menu {
    min-width: 160px;}
.intro-thumbnail {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    border-radius: 8px;
    object-fit: cover;}
main.sheet-page {
    display: block;
    min-height: 100%;
    padding: 1rem 0;}
.label {
    color: var(--darkcolor);
    font-weight: 400;}
.content {
    font-weight: 200;
    color: var(--darkgrey);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.hidden-img {
  display: none;}
.gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--black), var(--buttontransparency));
    border: none;
    border-radius: var(--smallcorner);
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--buttonfont);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    padding: 0;
    font-size: 20px;}
.nav-btn.left {
    left: 10px;}
.nav-btn.right {
    right: 10px;}
.nav-btn:hover {
    background: rgba(var(--black), calc(var(--buttontransparency) * 2));}
.thumbnail {
    width: calc(100% - 20px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--smallcorner);
    display: block;
    margin: 10px auto; }
.card {
    max-width: 320px;
    min-height: auto;
    background-color: rgb(var(--white));
    width: calc(100% - 10px);
    justify-content: space-between;
    color: var(--darkgrey);
    padding: 5px;
    text-align: center;
    border-radius: var(--bigcorner);
    border: 1px solid #d4d4d4;
    text-decoration: none;
    font-size: 18px;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: none;
    transition: 0.2s ease-in-out;}
.card img,
.gallery img {
    max-width: 1024px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: var(--smallcorner);}
.action-meta {
    text-align: center;
    color: rgb(var(--darkergrey));
    margin-bottom: 1rem;}
.action-category {
    background: rgba(var(--black), 0.08);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;}
.action-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    text-align: left;}
.gallery {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.card:hover {
    box-shadow: 0px 5px 20px rgba(var(--black), 0.15);}
.likert-scale label {
    margin-right: 10px;}

/* Matrix table (survey questions) */
.matrix-container {
    width: 100%;
    overflow-x: auto;}
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;}
.matrix-table thead th {
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.85rem;
    word-wrap: break-word;}
.matrix-table thead th:first-child {
    width: 25%;
    max-width: 120px;}
.matrix-row-label {
    padding: 0.5rem 0.5rem;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.2;
    word-wrap: break-word;
    width: 25%;
    max-width: 120px;}
.matrix-cell {
    padding: 0.5rem 0.25rem;
    text-align: center;}
.matrix-cell input[type="radio"] {
    margin: 0;}
.matrix-cell label {
    display: block;
    cursor: pointer;}

/* Profile in network  */
.person-marker {
    position: relative;
    width: 40px; 
    height: 40px;
    border-radius: var(--circle);
    overflow: hidden;
    box-shadow: 0 0 0 2px  var(--border-color), 0 2px 8px rgba(0,0,0,.3);
    /* transform: translate(-20px, -20px);  */ 
    background: var(--lightgrey);
    cursor: pointer;
    transition: box-shadow 0.2s ease-in-out;}
.person-marker img {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    display: block;}
.person-marker:hover {
    /* Slightly bigger shadow on hover */
    box-shadow: 0 0 0 3px var(--highlight), 0 4px 12px rgba(0,0,0,.4);}
.person-popup-container {
    min-width: 220px;
    font-size: 0.95rem; /* Standardizing font size */
    color: var(--darkergrey);}
.person-popup-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--lightgrey);}
.person-popup-profile img {
    width: 36px;
    height: 36px;
    border-radius: var(--circle);
    object-fit: cover;}
.person-popup-contact-line {
    /* Styles for email, telephone, website lines */
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    gap: 6px;}
.person-popup-tags-container {
    margin-top: 6px; 
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--lightgrey);}
.person-popup-tag {
    background: var(--lowlight); /* Replaces #E0F2FE */
    color: var(--darkcolor);
    padding: 2px 8px;
    border-radius: var(--smallcorner);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;}

/* Message */
.message-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;}
.message-container p {
    font-size: 1.2rem;}
.message-container .btn {
    margin-top: 1rem;}

/* Error message */
.error-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;}
.error-container p {
    font-size: 1.2rem;
    color: var(--color-error);}
.error-container .btn {
    margin-top: 1rem;}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--darkgrey);
    padding: 2rem;}

/* ---------- Profile page ---------- */
.profile-section {
    margin-top: 1rem;}
.profile-section-bottom {
    margin-bottom: 2rem;}
.profile-card {
    padding: 1rem;
    background: rgb(var(--white));
    border-radius: var(--smallcorner);
    box-shadow: 0 1px 3px rgba(var(--black), 0.1);}
.profile-card-padded {
    padding: 1.5rem;
    background: rgb(var(--white));
    border-radius: var(--smallcorner);
    box-shadow: 0 1px 3px rgba(var(--black), 0.1);}
.profile-welcome {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;}
.profile-details-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;}
.profile-details-table th {
    padding: 0.5rem 1rem 0.5rem 0;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
    color: var(--darkergrey);
    border-bottom: 1px solid rgba(var(--black), 0.06);}
.profile-details-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(var(--black), 0.06);}
.profile-details-table tr:last-child th,
.profile-details-table tr:last-child td {
    border-bottom: none;}
.profile-details-table code {
    background: rgba(var(--black), 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;}
.profile-form-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;}
.profile-logout {
    margin-top: 2rem;
    text-align: center;
    padding-bottom: 2rem;}
.profile-login-prompt {
    text-align: center;
    margin-top: 2rem;}

/* ---------- MY SSN ---------- */
.ssn-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;}
.ssn-card-item {
    padding: 1rem;
    background: rgb(var(--white));
    border-radius: var(--smallcorner);
    box-shadow: 0 1px 3px rgba(var(--black), 0.1);}
.ssn-card-title {
    font-family: var(--font2);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--darkcolor);
    text-align: center;}
.ssn-card-date {
    font-size: 0.75rem;
    color: var(--darkgrey);
    text-align: center;
    margin-bottom: var(--padding);}

.ssn-card-canvas {
    max-height: 250px;}

/* ---------- MY PULSE ---------- */
.pulse-list {
    list-style: none;
    padding: 0;
    margin: 0;}
.pulse-list li {
    display: flex;
    align-items: center;
    padding: var(--padding) 0;
    border-bottom: 1px solid rgba(var(--black), 0.05);}
.pulse-list li:last-child {
    border-bottom: none;}
.pulse-label {
    flex: 0 0 auto;
    min-width: 150px;
    font-weight: 500;
    color: var(--darkergrey);}
.pulse-icons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;}
.pulse-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    fill: var(--darkgrey);}
.pulse-empty {
    padding: 1rem;
    color: var(--darkgrey);
    font-size: 0.9rem;}

/* Form layout (login, profile, etc.) */
.form-table {
    width: 100%;
    border-collapse: collapse;}

.form-table td.form-label {
    text-align: left;
    padding: 8px 12px 8px 0;
    vertical-align: middle;}
.form-table td.form-field {
    text-align: left;
    padding: 8px 0;}
.form-table td.form-field input,
.form-table td.form-field select {
    width: 100%;}

/* Form */
.auth-forms {
    background-color: rgba(var(--white));
    border-radius: var(--bigcorner);
    padding: 30px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0px 5px 15px rgba(var(--black), 0.1);
    text-align: left;
    color: var(--darkgrey);}
.auth-forms h2 {
    color: var(--darkcolor);
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;}
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;}
form label {
    font-weight: bold;
    color: var(--darkcolor);
    margin-bottom: -10px; }
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form select {
    padding: 12px;
    border: 1px solid var(--lightgrey);
    border-radius: var(--smallcorner);
    font-size: 16px;
    width: calc(100% - 24px);
    box-sizing: border-box;
    background-color: white;
    transition: border-color 0.2s ease-in-out;}
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="date"]:focus,
form select:focus {
    border-color: var(--highlight);
    outline: none;}
form button:hover, {
    background-color: var(--darkcolor);
    transform: translateY(-2px);}
form button:active,  {
    transform: translateY(0);}
.terms-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;}
.terms-checkbox-container {
    margin-top: 10px;
    margin-bottom: 10px;}
.terms-checkbox-container label {
    display: inline;
    vertical-align: top; }
.terms-checkbox-container a {
    text-decoration: none;}
.loginhere {
    text-decoration: none;}

/* Leaflet */
.leaflet-pane.leaflet-popup-pane .leaflet-popup-content-wrapper {
  background: rgba(var(--white2),var(--trans)) !important;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(var(--white),0.22);
  box-shadow: 0 8px 24px rgba(var(--black),0.12) !important;
  border-radius: var(--smallcorner) !important;
  z-index: 10;}
.leaflet-pane.leaflet-popup-pane .leaflet-popup-tip{
  background: rgba(var(--white2),var(--trans)) !important;
  border: 1px solid rgba(var(--white),0.22);}
.leaflet-popup-content .person-card{
  background: transparent;
  border: 0;
  box-shadow: none;}
.leaflet-popup-pane   { z-index: 2000 !important; } /* 1500*/
.leaflet-tooltip {
    line-height: 1.2;
    padding: 0;}
.leaflet-tooltip-label {
    background: transparent !important;
    border: none !important;
    font-weight: 200 !important;
    box-shadow: none !important;
    padding: 0 !important; 
    background: rgba(var(--white2),var(--trans)) !important;
    backdrop-filter: blur(var(--blur)) !important; 
    -webkit-backdrop-filter: blur(var(--blur)) !important; 
    font-family: var(--font1);
    font-weight: normal;
    color: var(--black);
    pointer-events: none;
}

.leaflet-tooltip-pane { z-index: 1500 !important; }
.leaflet-pane.peoplePane { z-index: 1050 !important; } 
.leaflet-pane > svg path.leaflet-interactive {
  pointer-events: auto !important;
  z-index: 10;}
.leaflet-control-layers {
  background: rgba(var(--white2),var(--trans)) !important;
  backdrop-filter: blur(var(--blur)) !important; 
  -webkit-backdrop-filter: blur(var(--blur)) !important; 
  border: 0px solid rgba(var(--white),0.22) !important;
  box-shadow: 0 8px 24px rgba(var(--black),0.12) !important;
  font-family: var(--font1);
  border-radius: var(--smallcorner) !important;
  z-index: 10;
}
.leaflet-control-layers-base, .leaflet-control-layers-overlays {
  color: var(--white); }
.leaflet-control-layers-expanded {
  background: rgba(var(--white), var(--trans));
    text-align: left;}
.leaflet-control-layers-expanded label {
  color: rgb(var(--black));}
.leaflet-top {
  top: 120px !important;}

/* Central page container */
.page-container {
    padding: 0 10px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;}
.section-toggle-btn {
  cursor: pointer;}
.section-toggle-btn svg {
  stroke: currentColor;
  fill: none;}
.profile-container {
    margin-top: 0;
    margin-bottom: 10px;
    padding-top: 1rem;}

/* Mobile */
@media (max-width: 768px) {
    .logo {
        width: 19.5%;
        margin-right: 10px;}
    .search-bar {
        font-size: 16px;}
    .menu {
        padding: 5px;
        display: flex;
        justify-content: space-evenly;
        gap: 0;
        align-items: center; }
    .menu a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 10%;
        padding: 8px 0;
        margin: 0;
        text-decoration: none;
        color: inherit;
        flex-direction: column; }
    .menu-icon {
        fill: var(--darkgrey);
        filter: brightness(1);
        max-height: none;
        width: 100%;
        height: auto;
        margin: 0;
        flex-grow: 0;}
    .menu-icon svg {
        width: 90%;
        height: auto;
        display: block;}
    .menu a.active::before {
        display: none;}
    .menu-label {
    font-size: 12px;
    margin-top: 2px;
    color: var(--darkgrey);
    text-align: center;
    font-size: 3vw;
    font-weight: 500; }
    .page-hero-dark .menu-icon {
        fill: var(--lightcolor);}
    .page-hero-dark .menu-label {
        color: var(--lightcolor);}
    form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form input[type="date"] {
        padding: 10px;
        font-size: 14px;}
    form button {
        padding: 10px 20px;
        font-size: 16px;}
    .leaflet-top {
        top: 180px !important;
    }
    .page-container {
        padding: 0 1rem;
    }
    .card-list {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .card {
        max-width: 100%;
    }
    .view-toggle-container h3 {
        text-align: left;
        flex: 0 0 auto;
        order: 2;
    }
    .view-toggle-container .header-controls {
        order: 1;
    }
    .view-toggle-container {
        justify-content: flex-start;
        gap: 0.5rem;
    }
    .profile-container {
        padding-top: 2rem;
    }
}

/* Inputs page - always left-aligned (two-column layout) */
.inputs-split .view-toggle-container {
    justify-content: flex-start;
    gap: 0.5rem;
}
.inputs-split .view-toggle-container h3 {
    text-align: left;
    flex: 0 0 auto;
    order: 2;
}
.inputs-split .view-toggle-container .header-controls {
    order: 1;
}

/* Desktop */
@media (min-width: 769px) {
    .logo {
        max-height: 35px;
        width: auto;
        margin-right: 15px;}
    .search-bar {
        max-width: 400px; }
    .menu {
        padding: 10px 10px 10px 0;
        display: flex;
        justify-content: center;
        align-items: center;}
    .menu a {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-decoration: none;
        color: inherit;
        margin: 0 20px;
        position: relative;
        padding-top: 8px;}
    .menu-icon {
        display: none;}
    .menu-label {
        color: var(--highlight);
        font-family: var(--font1);
        font-size: 18px;
        font-weight: 400;
        transition: opacity 0.2s;}
    .menu a.active .menu-label {
        font-size: 20px;
        font-weight: 600;}
}

#registration-message,
#login-message,
#profile-message {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;}
hr {
    border: none;
    border-top: 1px solid var(--lightcolor);
    margin: 40px 0;}