/* =================================================================
   vfeo.ru — Премиум дизайн-система
   Городской портал Феодосии
   ================================================================= */

/* --- 0. Дизайн-токены --- */
:root {
  /* Palette */
  --bg: #f2f0ea;
  --bg-warm: #eee9df;
  --white: #ffffff;
  --ink: #10262e;
  --ink-light: #1e3d48;
  --muted: #6f7d80;
  --muted-light: #8a9a9e;
  --sea: #0a5367;
  --sea-light: #0d6a84;
  --deep: #082f3a;
  --deep-rgb: 8, 47, 58;
  --soft: #dcecef;
  --blue: #197f98;
  --coral: #e86f4b;
  --coral-soft: #fdf0eb;
  --sun: #f1c861;
  --sun-soft: #fdf6e0;
  --green: #2e9e6a;
  --green-soft: #e6f5ee;
  --line: #d9dfdd;
  --line-light: #e8ecea;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(8, 47, 58, 0.06);
  --shadow: 0 8px 30px rgba(8, 47, 58, 0.08);
  --shadow-lg: 0 20px 60px rgba(8, 47, 58, 0.11);
  --shadow-glow: 0 0 40px rgba(10, 83, 103, 0.15);

  /* Radii */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-full: 999px;

  /* Layout */
  --max: 1320px;
  --header-h: 78px;
  --utility-h: 36px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.22s;
  --duration-slow: 0.4s;

  /* Font */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
}

/* --- 1. Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.locked {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--duration) var(--ease);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

::selection {
  background: var(--soft);
  color: var(--deep);
}

/* --- 2. Typography --- */
.display {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.light-kicker {
  color: #95cdd8;
}

/* --- 3. Buttons --- */
.primary,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--sea);
  color: var(--white);
  border: 0;
  border-radius: var(--r);
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 12px rgba(10, 83, 103, 0.25);
}

.primary:hover,
.primary-link:hover {
  background: var(--sea-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(10, 83, 103, 0.35);
}

.primary:active,
.primary-link:active {
  transform: translateY(0);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r);
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #f4fafb;
}

/* --- 4. Utility Bar --- */
.utility {
  background: var(--deep);
  color: #b7cbd0;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.utility-inner {
  min-height: var(--utility-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.utility-links {
  display: flex;
  gap: 18px;
}

.utility-links a:hover {
  color: var(--white);
}

.city-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
  margin-right: 8px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- 5. Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 240, 234, 0.88);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(16, 38, 46, 0.06);
  transition: box-shadow var(--duration) var(--ease);
}

.header.scrolled {
  box-shadow: 0 1px 20px rgba(8, 47, 58, 0.08);
}

.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  transition: opacity var(--duration) var(--ease);
}

.brand:hover {
  opacity: 0.8;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--deep);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.07em;
  box-shadow: 0 2px 8px rgba(8, 47, 58, 0.25);
  transition: transform var(--duration) var(--ease);
}

.brand:hover .brand-mark {
  transform: scale(1.05);
}

.brand b {
  display: block;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

/* Nav */
.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav a {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--duration) var(--ease);
  position: relative;
}

.nav a:hover {
  color: var(--blue);
  background: rgba(10, 83, 103, 0.06);
}

/* Actions */
.actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.iconbtn,
.textbtn,
.menubtn {
  border: 1px solid rgba(16, 38, 46, 0.1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--r);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.iconbtn {
  width: 40px;
  font-size: 18px;
}

.iconbtn:hover,
.textbtn:hover,
.menubtn:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.textbtn,
.menubtn {
  padding: 0 12px;
}

.menubtn {
  display: none;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* --- 6. Drawer --- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(8, 47, 58, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-slow) var(--ease);
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, 92vw);
  padding: 82px 28px 28px;
  background: var(--white);
  transform: translateX(102%);
  transition: transform var(--duration-slow) var(--ease);
  box-shadow: -20px 0 70px rgba(7, 38, 47, 0.15);
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-light);
  font-weight: 750;
  font-size: 14px;
  transition: all var(--duration) var(--ease);
}

.drawer a:hover {
  color: var(--blue);
  padding-left: 6px;
}

.drawer-close {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--duration) var(--ease);
}

.drawer-close:hover {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral);
}

/* --- 7. Messages --- */
.messages {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  padding: 14px 20px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  animation: message-in 0.3s var(--ease);
}

@keyframes message-in {
  from {
  opacity: 0;
  transform: translateY(-8px);
  }
}

.message.success {
  background: var(--green-soft);
  border: 1px solid var(--green);
  color: #1a5e3f;
}

.message.error {
  background: var(--coral-soft);
  border: 1px solid var(--coral);
  color: #8b3a24;
}

.message.warning {
  background: var(--sun-soft);
  border: 1px solid var(--sun);
  color: #6b5518;
}

.message.info {
  background: var(--soft);
  border: 1px solid var(--blue);
  color: var(--sea);
}

/* --- 8. Hero --- */
.hero {
  padding: 22px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, 0.75fr);
  gap: 18px;
}

.hero-main {
  min-height: 580px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 38, 47, 0.05), rgba(7, 38, 47, 0.82)),
    var(--hero, url('https://images.unsplash.com/photo-1568454536839-2535b6dc0630?w=1200&q=80'))
    center / cover no-repeat;
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--duration-slow) var(--ease);
}

.hero-main:hover {
  box-shadow: var(--shadow-lg), 0 0 60px rgba(10, 83, 103, 0.12);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px;
  color: var(--white);
}

.pill {
  display: inline-flex;
  background: var(--sun);
  color: #3d321c;
  border-radius: var(--r-full);
  padding: 7px 14px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(241, 200, 97, 0.4);
}

.hero h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.97;
  letter-spacing: -0.05em;
  margin: 14px 0;
}

.hero p {
  max-width: 640px;
  color: #d9e6e9;
  line-height: 1.55;
  font-size: 14px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 900;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 4px;
  transition: all var(--duration) var(--ease);
}

.hero-link:hover {
  border-bottom-color: var(--white);
  transform: translateX(4px);
}

/* Hero Side */
.hero-side {
  display: grid;
  gap: 16px;
}

.dark-card,
.paper-card {
  border-radius: var(--r-xl);
  padding: 24px;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.dark-card:hover,
.paper-card:hover {
  transform: translateY(-2px);
}

.dark-card {
  background: var(--deep);
  color: var(--white);
  box-shadow: 0 8px 30px rgba(8, 47, 58, 0.2);
}

.paper-card {
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.06);
  box-shadow: var(--shadow-sm);
}

.dark-card h2,
.paper-card h2 {
  font-size: 26px;
  margin: 6px 0 16px;
}

.soft {
  color: #9fb8be;
}

.now-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: padding-left var(--duration) var(--ease);
}

.now-row:hover {
  padding-left: 6px;
}

.now-row b {
  color: var(--sun);
  font-size: 12px;
  font-weight: 800;
}

.now-row span {
  font-size: 13px;
  font-weight: 600;
}

.now-row small {
  display: block;
  color: #94b0b7;
  margin-top: 3px;
  font-weight: 400;
  font-size: 11px;
}

.mini-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-links a {
  background: var(--soft);
  padding: 14px;
  border-radius: var(--r);
  font-size: 11px;
  font-weight: 800;
  transition: all var(--duration) var(--ease);
}

.mini-links a:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 127, 152, 0.3);
}

/* --- 9. Sections --- */
.section {
  padding: 36px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 38px;
  margin: 5px 0 0;
  letter-spacing: -0.04em;
}

.section-head > a {
  font-size: 12px;
  font-weight: 900;
  border-bottom: 1px solid #abb6b8;
  padding-bottom: 4px;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.section-head > a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.section-head.inverted > a {
  border-color: #69838a;
}

/* --- 10. Service Grid --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.service-grid.big {
  grid-template-columns: repeat(4, 1fr);
}

.service-card {
  min-height: 128px;
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.05);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  background: linear-gradient(135deg, rgba(10, 83, 103, 0.03), transparent);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(8, 47, 58, 0.1);
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--sea);
  font-weight: 900;
  font-size: 16px;
  transition: all var(--duration) var(--ease);
}

.service-card:hover .service-icon {
  background: var(--blue);
  color: var(--white);
  transform: scale(1.08);
}

.service-card b {
  font-size: 12px;
  font-weight: 800;
}

.service-card small {
  color: var(--muted);
   font-size: 9px;
  line-height: 1.4;
}

/* --- 11. Cards (News, Content) --- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.content-card {
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.05);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.visual {
  height: 195px;
  background:
    linear-gradient(135deg, #dce8e7, #eee5dc);
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 47, 58, 0.15));
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.content-card:hover .visual::after {
  opacity: 1;
}

.card-body {
  padding: 20px;
}

.card-body small,
.market-card small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.card-body h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: 10px 0;
  letter-spacing: -0.02em;
  transition: color var(--duration) var(--ease);
}

.content-card:hover .card-body h3 {
  color: var(--sea);
}

.card-body p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* --- 12. Dark Section (Forum/Community) --- */
.dark-section {
  background: var(--deep);
  color: var(--white);
  margin: 36px 0;
  padding: 36px 0;
  border-radius: 28px;
  overflow: hidden;
}

.topic-list {
  background: #123f4c;
  border-radius: var(--r-xl);
  padding: 4px 22px;
}

.topic-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: padding-left var(--duration) var(--ease);
}

.topic-row:hover {
  padding-left: 6px;
}

.topic-row:last-child {
  border-bottom: 0;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sun);
  color: #342d1f;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

.topic-row b {
  display: block;
  font-size: 13px;
}

.topic-row small {
  display: block;
  color: #90acb3;
  margin-top: 3px;
  font-size: 10px;
}

/* --- 13. Page Layout --- */
.page {
  padding: 36px 0 60px;
}

.page-title {
  margin-bottom: 26px;
}

.page-title h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.97;
  letter-spacing: -0.05em;
  margin: 6px 0 10px;
}

.page-title p {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.55;
  font-size: 14px;
}

.with-action {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

/* --- 14. Chips / Filters --- */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chip.active,
.chip:hover {
  background: var(--deep);
  color: var(--white);
  border-color: var(--deep);
}

/* --- 15. Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 800;
  transition: all var(--duration) var(--ease);
}

.pagination a {
  background: var(--white);
  border: 1px solid var(--line);
}

.pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(10, 83, 103, 0.04);
}

.pagination span {
  background: var(--deep);
  color: var(--white);
}

/* --- 16. Article Detail --- */
.article {
  padding: 38px 0 60px;
}

.article-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
}

.article-head h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.99;
  letter-spacing: -0.05em;
  margin: 8px 0 14px;
}

.article-head > p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 680px;
}

.article-head small {
  color: var(--muted);
  font-size: 12px;
}

.article-cover {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--r-xl);
  margin: 26px 0;
  box-shadow: var(--shadow);
}

.prose {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink-light);
}

.prose p {
  margin: 0 0 1.2em;
}

.article-aside,
.detail-grid aside {
  padding-top: 40px;
}

.article-aside .paper-card {
  padding: 24px;
}

/* --- 17. Events Grid --- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.event-card {
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.05);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding-right: 18px;
  min-height: 195px;
  transition: all var(--duration) var(--ease);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.date-box {
  background: linear-gradient(135deg, #e8eeec, #dce8e7);
  padding: 20px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.date-box b {
  display: block;
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--deep);
  line-height: 1;
}

.date-box span {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.event-card > div:last-child {
  padding: 18px 0;
}

.event-card small {
  font-size: 9px;
  color: var(--coral);
  text-transform: uppercase;
  font-weight: 900;
}

.event-card h3 {
  font-size: 17px;
  line-height: 1.2;
  margin: 7px 0;
  transition: color var(--duration) var(--ease);
}

.event-card:hover h3 {
  color: var(--sea);
}

.event-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.place {
  font-size: 10px;
  color: var(--sea);
  font-weight: 700;
  margin-top: 4px;
  display: block;
}

/* --- 18. Search --- */
.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--white);
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  margin-bottom: 22px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.search-form:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 127, 152, 0.12);
}

.search-form.compact {
  max-width: 760px;
}

.search-form input {
  width: 100%;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  padding: 12px 14px;
  outline: 0;
  font-size: 14px;
}

.search-form button {
  border: 0;
  border-radius: var(--r);
  padding: 0 20px;
  background: var(--sea);
  color: var(--white);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.search-form button:hover {
  background: var(--sea-light);
}

/* --- 19. Directory Grid --- */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.directory-card {
  min-height: 165px;
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.05);
  border-radius: 18px;
  padding: 18px;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
}

.directory-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.directory-card h3 {
  margin: 16px 0 5px;
  font-size: 15px;
  line-height: 1.25;
  transition: color var(--duration) var(--ease);
}

.directory-card:hover h3 {
  color: var(--sea);
}

.directory-card p,
.directory-card small {
  color: var(--muted);
  font-size: 11px;
}

.verified {
  color: var(--blue);
  font-size: 18px;
}

.directory-rating {
  display: block;
  margin-top: 8px;
  color: var(--sea) !important;
  font-weight: 900;
}

/* --- 20. Forum --- */
.forum-list {
  background: var(--white);
  border: 1px solid rgba(16, 38, 46, 0.05);
  border-radius: var(--r-xl);
  padding: 4px 20px;
}

.forum-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-light);
  transition: background var(--duration) var(--ease);
  border-radius: var(--r-sm);
}

.forum-row:hover {
  background: rgba(10, 83, 103, 0.02);
}

.forum-row:last-child {
  border-bottom: 0;
}

.forum-main b {
  display: block;
  font-size: 14px;
  transition: color var(--duration) var(--ease);
}

.forum-row:hover .forum-main b {
  color: var(--sea);
}

.forum-main small {
  color: var(--coral);
  font-size: 9px;
}

.forum-main em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.forum-row > span:last-child {
  text-align: right;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

/* --- 21. Marketplace --- */
.market-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.market-links a {
  min-height: 225px;
  border-radius: var(--r-xl);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.market-links a:nth-child(1) {
  background: linear-gradient(135deg, var(--soft), #c5e4e8);
  }

.market-links a:nth-child(2) {
  background: linear-gradient(135deg, #eee1d5, #f5e6d0);
  }

.market-links a:nth-child(3) {
  background: linear-gradient(135deg, #dde3ca, #e8edc8);
  }

.market-links a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.market-links small {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--muted);
}

.market-links b {
  font-size: 28px;
  line-height: 1.1;
}

.market-cards .market-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
}

.market-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.market-card > div:last-child {
  padding: 18px;
}

.market-card h3 {
  margin: 8px 0;
  font-size: 16px;
  transition: color var(--duration) var(--ease);
}

.market-card:hover h3 {
  color: var(--sea);
}

.market-card p {
  color: var(--muted);
  font-size: 11px;
}

.jobs-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 4px 22px;
}

.job-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-light);
  transition: background var(--duration) var(--ease);
}

.job-row:hover {
  background: rgba(10, 83, 103, 0.02);
}

.job-row:last-child {
  border-bottom: 0;
}

.job-row small,
.job-row em {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-style: normal;
}

.job-row b {
  display: block;
  font-size: 16px;
  margin: 5px 0;
  transition: color var(--duration) var(--ease);
}

.job-row:hover b {
  color: var(--sea);
}

.price {
  font-size: 24px !important;
  color: var(--ink) !important;
  font-weight: 900;
}

/* --- 22. Forms --- */
.narrow {
  max-width: 720px;
}

.narrow-wide {
  max-width: 930px;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
}

.form-card p {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.form-card ul {
  font-size: 11px;
  color: var(--muted);
  padding-left: 18px;
  list-style: disc;
}

.form-card .helptext {
  font-size: 10px;
  color: var(--muted);
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  padding: 13px 16px;
  outline: 0;
  font-size: 14px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 127, 152, 0.1);
}

.form-card input[type='file'] {
  background: var(--white);
  padding: 12px;
}

/* --- 23. Engagement / Account --- */
.account-link {
  position: relative;
}

.notification-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: var(--r-full);
  background: var(--coral);
  color: var(--white);
  font-size: 8px;
  font-weight: 900;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.engagement-block {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.engagement-block .section-head h2 {
  font-size: 30px;
}

.comment {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 10px 0;
  transition: box-shadow var(--duration) var(--ease);
}

.comment:hover {
  box-shadow: var(--shadow-sm);
}

.comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.comment-head b {
  font-size: 12px;
}

.comment-head small {
  font-size: 9px;
  color: var(--muted);
}

.comment p {
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0 0;
}

.compact-form {
  margin-top: 18px;
}

.compact-form p {
  margin: 12px 0;
}

.rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.rating-line b {
  font-size: 22px;
  color: var(--sea);
}

.rating-line span {
  font-size: 11px;
  color: var(--muted);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
}

.saved-list,
.notification-list {
  display: grid;
  gap: 10px;
}

.saved-item,
.notification-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: all var(--duration) var(--ease);
}

.saved-item:hover,
.notification-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.saved-item small,
.notification-item small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 850;
}

.saved-item h3,
.notification-item h3 {
  margin: 5px 0 0;
  font-size: 14px;
}

.notification-item {
  display: block;
}

.notification-item.unread {
  border-left: 4px solid var(--coral);
  background: #fffdf9;
}

.notification-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: all var(--duration) var(--ease);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(8, 47, 58, 0.08);
}

.dashboard-card b {
  display: block;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: var(--sea);
}

.dashboard-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 36px;
}

/* --- 24. Map --- */
.map-toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.map-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 9px 14px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.map-toolbar label:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.map-toolbar label b {
  color: var(--muted);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.city-map {
  height: min(68vh, 720px);
  min-height: 520px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #dce8e7;
  z-index: 1;
}

.map-layout aside {
  min-width: 0;
}

.map-list {
  max-height: 600px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.map-list a {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
  transition: padding-left var(--duration) var(--ease);
}

.map-list a:hover {
  padding-left: 6px;
}

.map-list a:last-child {
  border-bottom: 0;
}

.map-list small {
  font-size: 8px;
  color: var(--coral);
  text-transform: uppercase;
  font-weight: 900;
}

.map-list b {
  font-size: 12px;
  line-height: 1.4;
}

.leaflet-popup-content b {
  margin: 3px 0 5px;
}

.leaflet-popup-content a {
  color: var(--blue);
  font-weight: 800;
}

.leaflet-control-attribution {
  font-size: 8px !important;
}

/* --- 25. Account Status & Misc --- */
.account-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin: 0 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}

.account-status b,
.account-status span {
  display: block;
}

.account-status b {
  font-size: 12px;
}

.account-status span {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.account-status.success {
  border-left: 4px solid var(--green);
}

.account-status.warning {
  border-left: 4px solid var(--sun);
}

.danger-link {
  color: #a84937;
}

.report-link {
  display: inline-block;
  margin-top: 10px;
  color: #9a5a4b;
  font-size: 9px;
  font-weight: 800;
  border-bottom: 1px solid #d8b2aa;
  transition: color var(--duration) var(--ease);
}

.report-link:hover {
  color: var(--coral);
}

.category-follow {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px;
}

.category-follow form {
  margin: 0;
}

/* Live search */
.live-results {
  max-width: 820px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 6px 18px;
  margin: -12px 0 22px;
  box-shadow: var(--shadow);
  z-index: 10;
  position: relative;
}

.live-results a {
  display: grid;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-light);
  transition: padding-left var(--duration) var(--ease);
}

.live-results a:hover {
  padding-left: 6px;
}

.live-results a:last-child {
  border-bottom: 0;
}

.live-results small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  font-weight: 900;
}

.live-results b {
  font-size: 12px;
}

/* Generic card/list/page components */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin: 18px 0;
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card__body {
  padding: 22px;
}

.card__body h3 {
  margin-top: 0;
}

.card__body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.page-hero {
  padding: 36px 0 10px;
}

.page-hero__box {
  max-width: 760px;
}

.page-hero__box h1 {
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 8px 0;
}

.page-hero__box p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.hint {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.hint a {
  font-weight: 800;
  color: var(--sea);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all var(--duration) var(--ease);
}

.list__item:hover {
  box-shadow: var(--shadow-sm);
}

.list__item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.list__item h3 {
  margin: 5px 0;
  font-size: 16px;
  line-height: 1.3;
  flex: 1 1 260px;
}

.list__item form {
  margin: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.more {
  display: inline-block;
  font-size: 12px;
  font-weight: 850;
  color: var(--sea);
  transition: color var(--duration) var(--ease);
}

.more:hover {
  color: var(--blue);
}

.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 30px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  transition: all var(--duration) var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat b {
  display: block;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.stat span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.iconbox {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--soft);
  color: var(--sea);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-brand {
  margin-bottom: 12px;
}

/* --- 26. Notice --- */
.notice {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* --- 27. Forum posts --- */
.forum-post {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin: 12px 0;
  transition: box-shadow var(--duration) var(--ease);
}

.forum-post:hover {
  box-shadow: var(--shadow-sm);
}

.forum-post.original {
  border-left: 4px solid var(--sun);
}

.forum-post small {
  color: var(--muted);
  margin-left: 10px;
}

.reply-form {
  margin-top: 24px;
}

/* --- 28. Search results --- */
.result-title {
  margin-top: 30px;
}

.search-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 12px 0;
}

.search-group h3 {
  margin-top: 0;
}

.search-group a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line-light);
  font-size: 13px;
  font-weight: 600;
  transition: color var(--duration) var(--ease);
}

.search-group a:hover {
  color: var(--sea);
}

/* --- 29. Footer --- */
.footer {
  background: var(--deep);
  color: #d4e2e5;
  padding: 52px 0 26px;
  margin-top: 40px;
  border-radius: 28px 28px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 0.7fr);
  gap: 32px;
}

.footer .brand b {
  color: var(--white);
}

.footer .brand small {
  color: #8faab1;
}

.brand-mark.light {
  background: var(--white);
  color: var(--deep);
}

.footer > .container > p {
  max-width: 360px;
  color: #8ea9b0;
  font-size: 12px;
  line-height: 1.6;
}

.footer h4 {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  color: #95cdd8;
}

.footer a {
  display: block;
  color: #9ab1b7;
  font-size: 12px;
  margin: 8px 0;
  transition: color var(--duration) var(--ease), padding-left var(--duration) var(--ease);
}

.footer a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 36px;
  padding-top: 18px;
  color: #6e8a92;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* --- 30. Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 80;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--white);
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 4px 20px rgba(8, 47, 58, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--duration-slow) var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--sea);
  transform: translateY(-3px);
}

/* --- 31. Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.06s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.18s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(n+7) { transition-delay: 0.36s; opacity: 1; transform: translateY(0); }

/* --- 32. Skeleton Loaders --- */
.skeleton {
  background: linear-gradient(90deg, var(--line-light) 25%, var(--bg) 50%, var(--line-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 6px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-heading {
  height: 28px;
  width: 80%;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 280px;
  border-radius: var(--r-xl);
}

.skeleton-circle {
  border-radius: 50%;
}

/* --- 33. Error Pages --- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-page h1 {
  font-size: clamp(80px, 15vw, 160px);
  color: var(--line);
  line-height: 1;
  font-weight: 900;
  margin: 0;
}

.error-page h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin: 12px 0 8px;
}

.error-page p {
  color: var(--muted);
  font-size: 14px;
  max-width: 420px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .menubtn {
    display: inline-flex;
  }

  .service-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .article-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-side {
    grid-template-columns: 1fr 1fr;
  }

  .cards-3,
  .events-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-aside,
  .detail-grid aside {
    padding-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .city-map {
    min-height: 480px;
  }

  .map-list {
    max-height: 300px;
  }

  .statbar,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 65px;
  }

  body {
    font-size: 14px;
  }

  .container {
    width: min(var(--max), calc(100% - 20px));
  }

  .utility-links {
    display: none;
  }

  .header-inner {
    min-height: 65px;
    gap: 8px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .brand small {
    display: none;
  }

  .textbtn {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: 10px;
  }

  .hero-main {
    min-height: 420px;
    border-radius: 22px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  /* Grids */
  .service-grid,
  .service-grid.big {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-3,
  .events-grid,
  .market-links {
    grid-template-columns: 1fr;
  }

  /* Sections */
  .section {
    padding: 26px 0;
  }

  .section-head,
  .with-action {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .section-head h2 {
    font-size: 30px;
  }

  /* Page */
  .page {
    padding-top: 20px;
  }

  .page-title h1 {
    font-size: 36px;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  /* Forum */
  .forum-row {
    grid-template-columns: 40px 1fr;
  }

  .forum-row > span:last-child {
    grid-column: 2;
    text-align: left;
  }

  /* Search */
  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form button {
    min-height: 44px;
  }

  /* Article */
  .article-head h1 {
    font-size: 36px;
  }

  .prose {
    font-size: 16px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Comment */
  .comment-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .saved-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions form {
    width: 100%;
  }

  .detail-actions .secondary {
    width: 100%;
  }

  /* Account */
  .account-status {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Map */
  .city-map {
    min-height: 380px;
    height: 50vh;
  }

  /* Stat */
  .statbar {
    grid-template-columns: 1fr 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  /* List items */
  .list__item {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .list__item h3 {
    flex: none;
  }

  .list__item form,
  .list__item .chip {
    width: 100%;
    text-align: center;
  }

  .list__item form button {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
  }

  .list__item .chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Form card chip button */
  .form-card button.chip {
    min-height: 44px;
    padding: 10px 16px;
    margin: 0 6px 8px 0;
  }

  /* Dark section */
  .dark-section {
    border-radius: 22px;
    margin: 24px 0;
  }

  /* Back to top */
  .back-to-top {
  bottom: 18px;
  right: 18px;
    width: 42px;
    height: 42px;
  }
}
/* =================================================================
   vfeo.ru — Дополнение к site.css
   Классы, добавленные 2026-09-02 для устранения техдолга:
   шаблоны geo/ (населённые пункты, климат, погода) использовали
   классы, которых не было в site.css. Покрыто тестом
   apps.core.tests.CssCoverageTests.
   ================================================================= */

/* --- 16. Page header & breadcrumbs --- */
.page-header {
  background: linear-gradient(135deg, var(--soft) 0%, var(--bg-warm) 100%);
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--deep);
  margin: 12px 0 8px;
  letter-spacing: -0.02em;
}
.page-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-light);
  max-width: 720px;
  margin: 12px 0 0;
}
.geo-header {
  background: linear-gradient(135deg, var(--soft) 0%, #e3ebee 100%);
  position: relative;
  overflow: hidden;
}
.geo-header::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(10,83,103,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.breadcrumbs a {
  color: var(--sea);
  transition: color var(--duration) var(--ease);
}
.breadcrumbs a:hover { color: var(--coral); }
.breadcrumbs span { color: var(--muted-light); }

/* --- 17. Section title --- */
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--deep);
  margin: 36px 0 18px;
  letter-spacing: -0.01em;
}

/* --- 18. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  background: var(--sea);
  color: var(--white);
  border: 1px solid var(--sea);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.btn:hover {
  background: var(--sea-light);
  border-color: var(--sea-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn--outline {
  background: transparent;
  color: var(--sea);
  border: 1px solid var(--sea);
}
.btn--outline:hover {
  background: var(--soft);
  color: var(--sea-light);
  border-color: var(--sea-light);
}

/* --- 19. Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--soft);
  color: var(--ink-light);
  letter-spacing: 0.01em;
}
.badge--pop {
  background: var(--coral-soft);
  color: var(--coral);
}
.badge--sea {
  background: var(--soft);
  color: var(--sea);
}

/* --- 20. Links --- */
.link-sea {
  color: var(--sea);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.link-sea:hover { color: var(--sea-light); text-decoration: underline; }

/* --- 21. Stats grid --- */
.geo-stats { padding: 32px 0 8px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-light);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.1;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- 22. Settlements grid & cards --- */
.settlements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 16px 0 32px;
}
.settlements-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.settlement-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.settlement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--sea);
}
.settlement-card--city {
  grid-column: 1 / -1;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
}
.settlement-card--sm { padding: 14px 16px; }

/* Settlement card body & side */
.sc-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.sc-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--deep);
  margin: 0;
  letter-spacing: -0.01em;
}
.settlement-card--city .sc-name { font-size: 26px; }
.settlement-card--sm .sc-name { font-size: 15px; }
.sc-hist {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}
.sc-desc {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.55;
  margin: 6px 0 0;
}
.sc-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
}
.sc-pop {
  color: var(--coral);
  font-size: 13px;
}
.sc-type {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.sc-sea-badge {
  background: var(--soft);
  color: var(--sea);
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
}

/* --- 23. Settlement detail page --- */
.sd-section { padding: 32px 0 48px; }
.sd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .sd-layout { grid-template-columns: 1fr; }
}
.sd-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.sd-block {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.sd-block h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--deep);
  margin: 0 0 12px;
  font-weight: 700;
}
.sd-block p {
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}
.sd-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.sd-title-row h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--deep);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sd-hist {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 4px 0 0;
}
.sd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sd-map {
  width: 100%;
  height: 320px;
  border-radius: var(--r);
  background: var(--bg-warm);
  border: 1px solid var(--line);
}
.sd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.sd-weather-card,
.sd-info-card,
.sd-nav-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.sd-weather-card h3,
.sd-info-card h3,
.sd-nav-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--deep);
  margin: 0 0 12px;
  font-weight: 700;
}
.sd-info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  font-size: 14px;
}
.sd-info-card dt {
  color: var(--muted);
  font-weight: 500;
}
.sd-info-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.sd-nav-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sd-nav-card .btn { width: 100%; }

/* --- 24. Weather widget --- */
.weather-widget {
  background: linear-gradient(135deg, var(--soft) 0%, var(--bg-warm) 100%);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: 14px;
}
.weather-box {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.weather-box--large {
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
}
.weather-current {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.weather-temp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.weather-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1;
}
.weather-desc {
  font-size: 14px;
  color: var(--ink-light);
  margin-top: 4px;
}
.weather-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  text-align: center;
}
.forecast-date {
  color: var(--muted);
  font-weight: 500;
}
.forecast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}
.forecast-temps {
  font-weight: 600;
  color: var(--ink);
}
.weather-error {
  color: var(--coral);
  font-size: 14px;
  padding: 12px 0;
  text-align: center;
}

/* --- 25. Climate page --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  border: 1px solid var(--line-light);
  -webkit-overflow-scrolling: touch;
}
.climate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.climate-table thead {
  background: var(--sea);
  color: var(--white);
}
.climate-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.climate-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--line-light);
  color: var(--ink);
}
.climate-table tbody tr:hover {
  background: var(--bg-warm);
}
.month-cell {
  font-weight: 600;
  color: var(--deep);
}
.climate-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.fact-card {
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
  border-radius: var(--r);
  padding: 22px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.fact-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.1;
}
.fact-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}
.climate-description {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  color: var(--ink-light);
  line-height: 1.7;
  margin: 16px 0;
}
.climate-description h3 {
  font-family: var(--font-display);
  color: var(--deep);
  margin: 0 0 12px;
}

/* --- 26. Text utilities --- */
.text-block {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  color: var(--ink-light);
  line-height: 1.7;
  margin: 16px 0;
}
.text-center { text-align: center; }
/* =================================================================
   vfeo.ru — Дополнение к site.css
   Классы, добавленные 2026-09-02 для устранения техдолга:
   шаблоны geo/ (населённые пункты, климат, погода) использовали
   классы, которых не было в site.css. Покрыто тестом
   apps.core.tests.CssCoverageTests.
   ================================================================= */

/* --- 16. Page header & breadcrumbs --- */
.page-header {
  background: linear-gradient(135deg, var(--soft) 0%, var(--bg-warm) 100%);
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--deep);
  margin: 12px 0 8px;
  letter-spacing: -0.02em;
}
.page-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-light);
  max-width: 720px;
  margin: 12px 0 0;
}
.geo-header {
  background: linear-gradient(135deg, var(--soft) 0%, #e3ebee 100%);
  position: relative;
  overflow: hidden;
}
.geo-header::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(10,83,103,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.breadcrumbs a {
  color: var(--sea);
  transition: color var(--duration) var(--ease);
}
.breadcrumbs a:hover { color: var(--coral); }
.breadcrumbs span { color: var(--muted-light); }

/* --- 17. Section title --- */
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--deep);
  margin: 36px 0 18px;
  letter-spacing: -0.01em;
}

/* --- 18. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  background: var(--sea);
  color: var(--white);
  border: 1px solid var(--sea);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.btn:hover {
  background: var(--sea-light);
  border-color: var(--sea-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn--outline {
  background: transparent;
  color: var(--sea);
  border: 1px solid var(--sea);
}
.btn--outline:hover {
  background: var(--soft);
  color: var(--sea-light);
  border-color: var(--sea-light);
}

/* --- 19. Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--soft);
  color: var(--ink-light);
  letter-spacing: 0.01em;
}
.badge--pop {
  background: var(--coral-soft);
  color: var(--coral);
}
.badge--sea {
  background: var(--soft);
  color: var(--sea);
}

/* --- 20. Links --- */
.link-sea {
  color: var(--sea);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.link-sea:hover { color: var(--sea-light); text-decoration: underline; }

/* --- 21. Stats grid --- */
.geo-stats { padding: 32px 0 8px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-light);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.1;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- 22. Settlements grid & cards --- */
.settlements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 16px 0 32px;
}
.settlements-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.settlement-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.settlement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--sea);
}
.settlement-card--city {
  grid-column: 1 / -1;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
}
.settlement-card--sm { padding: 14px 16px; }

/* Settlement card body & side */
.sc-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.sc-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--deep);
  margin: 0;
  letter-spacing: -0.01em;
}
.settlement-card--city .sc-name { font-size: 26px; }
.settlement-card--sm .sc-name { font-size: 15px; }
.sc-hist {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}
.sc-desc {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.55;
  margin: 6px 0 0;
}
.sc-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
}
.sc-pop {
  color: var(--coral);
  font-size: 13px;
}
.sc-type {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.sc-sea-badge {
  background: var(--soft);
  color: var(--sea);
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
}

/* --- 23. Settlement detail page --- */
.sd-section { padding: 32px 0 48px; }
.sd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .sd-layout { grid-template-columns: 1fr; }
}
.sd-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.sd-block {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.sd-block h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--deep);
  margin: 0 0 12px;
  font-weight: 700;
}
.sd-block p {
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}
.sd-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.sd-title-row h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--deep);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sd-hist {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 4px 0 0;
}
.sd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sd-map {
  width: 100%;
  height: 320px;
  border-radius: var(--r);
  background: var(--bg-warm);
  border: 1px solid var(--line);
}
.sd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.sd-weather-card,
.sd-info-card,
.sd-nav-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.sd-weather-card h3,
.sd-info-card h3,
.sd-nav-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--deep);
  margin: 0 0 12px;
  font-weight: 700;
}
.sd-info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  font-size: 14px;
}
.sd-info-card dt {
  color: var(--muted);
  font-weight: 500;
}
.sd-info-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.sd-nav-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sd-nav-card .btn { width: 100%; }

/* --- 24. Weather widget --- */
.weather-widget {
  background: linear-gradient(135deg, var(--soft) 0%, var(--bg-warm) 100%);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: 14px;
}
.weather-box {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.weather-box--large {
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
}
.weather-current {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.weather-temp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.weather-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1;
}
.weather-desc {
  font-size: 14px;
  color: var(--ink-light);
  margin-top: 4px;
}
.weather-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  text-align: center;
}
.forecast-date {
  color: var(--muted);
  font-weight: 500;
}
.forecast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}
.forecast-temps {
  font-weight: 600;
  color: var(--ink);
}
.weather-error {
  color: var(--coral);
  font-size: 14px;
  padding: 12px 0;
  text-align: center;
}

/* --- 25. Climate page --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  border: 1px solid var(--line-light);
  -webkit-overflow-scrolling: touch;
}
.climate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.climate-table thead {
  background: var(--sea);
  color: var(--white);
}
.climate-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.climate-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--line-light);
  color: var(--ink);
}
.climate-table tbody tr:hover {
  background: var(--bg-warm);
}
.month-cell {
  font-weight: 600;
  color: var(--deep);
}
.climate-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.fact-card {
  background: linear-gradient(135deg, var(--white) 0%, var(--soft) 100%);
  border-radius: var(--r);
  padding: 22px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
}
.fact-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--sea);
  line-height: 1.1;
}
.fact-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}
.climate-description {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  color: var(--ink-light);
  line-height: 1.7;
  margin: 16px 0;
}
.climate-description h3 {
  font-family: var(--font-display);
  color: var(--deep);
  margin: 0 0 12px;
}

/* --- 26. Text utilities --- */
.text-block {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  color: var(--ink-light);
  line-height: 1.7;
  margin: 16px 0;
}
.text-center { text-align: center; }
/* === Погодный блок на главной (wave 5) === */
.weather-card-home {
  background: linear-gradient(135deg, var(--soft) 0%, var(--bg-warm) 100%);
}
.weather-home-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.weather-home-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 140px;
}
.weather-home-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.weather-home-temp {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--sea);
  display: block;
  line-height: 1.1;
}
.weather-card-home small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* === Дополнительные badge для climate (был .temp-warm/.temp-mid/.temp-cold в шаблоне, добавим) === */
.climate-table .temp-warm { color: var(--coral); font-weight: 600; }
.climate-table .temp-mid { color: var(--sea); font-weight: 600; }
.climate-table .temp-cold { color: var(--muted); font-weight: 600; }
