:root {
  --navy: #071a33;
  --navy-soft: #0f2d52;
  --sky: #38bdf8;
  --sky-soft: #e0f4ff;
  --ink: #152033;
  --muted: #66768c;
  --line: #d8e5f0;
  --line-strong: #aec4da;
  --paper: #f6fbff;
  --card: #ffffff;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 34rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: #0477b8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: block;
  padding: 28px 24px 22px;
  color: var(--navy);
  text-align: center;
}

.brand span {
  display: block;
  font-size: clamp(3rem, 7vw, 4.55rem);
  font-weight: 800;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 10px;
  color: #0284c7;
  font-size: clamp(1.1rem, 2.5vw, 1.85rem);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-top: 1px solid var(--line);
  background: var(--navy);
}

nav a {
  min-width: 104px;
  padding: 14px 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fbff;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.86rem;
}

nav a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

nav a:hover {
  background: rgba(56, 189, 248, 0.16);
  text-decoration: none;
}

nav a.active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.34), rgba(56, 189, 248, 0.12));
  box-shadow: inset 0 -4px 0 var(--sky);
  color: #ffffff;
}

nav a:active {
  transform: translateY(1px);
}

.page-hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.38), transparent 22rem),
    linear-gradient(135deg, rgba(7, 26, 51, 0.98), rgba(15, 45, 82, 0.95));
  color: #ffffff;
}

.page-hero div,
.content,
.home-grid,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.page-hero div {
  padding: 48px 0;
}

.page-hero p {
  margin: 0 0 8px;
  color: #aee8ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 12px;
  color: #d9efff;
}

.home-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 22%, rgba(56, 189, 248, 0.24), transparent 24rem),
    linear-gradient(115deg, #ffffff 0%, #ffffff 50%, #eaf8ff 50%, #f7fcff 100%);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
  gap: 60px;
  align-items: stretch;
  padding: 72px 0 64px;
}

.home-photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 520px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(7, 26, 51, 0.18);
}

.home-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: #0284c7;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

.home-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(1.05rem, 1.4vw, 1.4rem);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--navy);
}

.home-copy h1 .accent {
  color: #0284c7;
}

.home-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--sky);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky), #0ea5e9);
  color: #041527;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.24);
}

.button.secondary {
  background: #ffffff;
  color: var(--navy);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button:focus-visible,
.row-actions button:focus-visible,
.admin-sidebar button:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.content {
  padding: 54px 0 72px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 52px;
}

.panel {
  border-left: 4px solid var(--sky);
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(7, 26, 51, 0.08);
}

.panel h2,
.post-card h2 {
  margin-top: 0;
}

.check-list,
.link-list {
  padding: 0;
  list-style: none;
}

.check-list li {
  margin: 12px 0;
  padding-left: 26px;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 2px;
  background: var(--sky);
}

.home-quote {
  margin: 0;
  padding: 28px 30px;
  border-left: 4px solid var(--sky);
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(7, 26, 51, 0.08);
}

.home-quote p {
  margin: 0 0 16px;
  font-size: 1.3rem;
  line-height: 1.5;
  font-style: italic;
}

.home-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
}

.home-quote cite span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 2px;
}

.whats-new-standalone {
  width: min(760px, 100%);
  margin: 0 auto;
}

.whats-new-panel {
  background: linear-gradient(165deg, #ffffff 0%, #f2fbff 100%);
  border: 1px solid var(--line);
}

.whats-new-panel-wide {
  padding: 28px 32px;
}

.whats-new-panel-wide h2 {
  justify-content: center;
  margin-bottom: 18px;
}

.whats-new-list-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.whats-new-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.whats-new-dot {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: #0ea5e9;
  flex-shrink: 0;
}

.whats-new-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whats-new-item {
  padding: 0;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3px solid #0ea5e9;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.whats-new-item.whats-new-blog {
  border-left-color: #0284c7;
}

.whats-new-item.whats-new-publication {
  border-left-color: #075985;
}

.whats-new-item:hover {
  border-left-color: var(--navy);
  transform: translateX(2px);
  box-shadow: 0 10px 22px rgba(7, 26, 51, 0.08);
}

.whats-new-link {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  cursor: pointer;
}

.whats-new-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
  font-weight: 700;
  margin-bottom: 3px;
}

.whats-new-title {
  display: block;
  font-weight: 600;
  color: var(--navy);
}

.whats-new-link:hover .whats-new-title {
  text-decoration: underline;
}

.publication-list {
  padding-left: 28px;
}

.publication-list li {
  margin: 0 0 22px;
}

.publication-list a,
.publication-title {
  display: inline;
  font-weight: 700;
  text-transform: uppercase;
}

.publication-list a {
  text-decoration: none;
}

.publication-list a:hover {
  text-decoration: underline;
}

.publication-link-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e6f6ff;
  color: #0284c7;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.publication-list span,
.publication-list em {
  display: inline;
  color: var(--muted);
  margin-left: 5px;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 12px 30px rgba(7, 26, 51, 0.06);
}

.news-image {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.news-body h2 {
  margin: 4px 0 8px;
  font-size: 1.15rem;
}

.news-body h2 a {
  text-decoration: none;
}

.news-body h2 a:hover {
  text-decoration: underline;
}

.news-meta {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.news-body p {
  margin: 0;
}

.post-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(7, 26, 51, 0.08);
}

.post-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin: -24px -24px 20px;
  width: calc(100% + 48px);
  border-bottom: 1px solid var(--line);
}

.post-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: -24px -24px 20px;
  padding: 10px;
  background: #eef8ff;
  border-bottom: 1px solid var(--line);
}

.post-media-grid .post-image {
  margin: 0;
  width: 100%;
  border: 0;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
}

.slideshow {
  margin: -24px -24px 20px;
  border-bottom: 1px solid var(--line);
  background: #eef8ff;
}

.slideshow-stage {
  padding: 10px;
}

.media-open-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #dff4ff;
  cursor: zoom-in;
}

.media-open-button img,
.media-open-button video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 12px;
}

.slideshow-controls button,
.slideshow-thumbs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 6px 12px;
}

.slideshow-controls span {
  color: var(--muted);
  font-weight: 800;
}

.slideshow-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 12px;
}

.slideshow-thumbs button {
  min-width: 64px;
  width: 64px;
  height: 50px;
  padding: 2px;
  border-radius: 12px;
}

.slideshow-thumbs button.active {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.slideshow-thumbs img,
.slideshow-thumbs video {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 13, 28, 0.88);
  backdrop-filter: blur(10px);
}

.lightbox-stage {
  width: min(1100px, 100%);
}

.lightbox-stage img,
.lightbox-stage video {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  color: #ffffff;
}

.lightbox-caption a {
  color: #aee8ff;
  font-weight: 900;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 101;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 8px 14px;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
}

.lightbox-next {
  right: 20px;
  top: 50%;
}

.post-card span {
  color: #0284c7;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.link-group {
  margin-bottom: 34px;
}

.link-list li {
  margin: 9px 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

input,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
}

input:focus,
textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
  outline: none;
}

textarea {
  min-height: 140px;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 72px;
}

.login-shell {
  width: min(520px, calc(100% - 32px));
}

.admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.admin-card,
.admin-sidebar,
.admin-editor {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(7, 26, 51, 0.1);
}

.admin-card h2 {
  margin: 0 0 12px;
}

.admin-card label {
  display: grid;
  gap: 8px;
}

.admin-card .field {
  display: grid;
  gap: 8px;
}

.admin-input,
.admin-textarea {
  min-height: 48px;
  font-size: 0.96rem;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.admin-input:focus,
.admin-textarea:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
  border-color: var(--sky);
}

.admin-textarea {
  min-height: 128px;
  max-height: 260px;
  resize: vertical;
}

.admin-textarea.short {
  min-height: 92px;
  max-height: 160px;
}

.admin-textarea.tall {
  min-height: 190px;
  max-height: 360px;
}

.admin-input.compact {
  min-width: 180px;
}

.field-hint {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 2px 0 6px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 12px;
}

.upload-card {
  gap: 16px;
}

.upload-card .admin-actions {
  margin-top: 4px;
}

.admin-sidebar button {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #faf8f2;
  text-align: left;
  cursor: pointer;
}

.admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-button {
  width: auto;
  min-width: 150px;
  min-height: 46px;
  justify-content: center;
  padding: 10px 20px;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 172px;
  padding: 18px;
  border: 1.5px dashed rgba(14, 165, 233, 0.55);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.86), rgba(255, 255, 255, 0.94));
  color: var(--navy);
  text-align: center;
  cursor: pointer;
}

.upload-zone input {
  width: min(100%, 420px);
  min-height: auto;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.upload-zone strong {
  font-size: 1rem;
}

.upload-zone span {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-zone em {
  margin-top: 8px;
  color: #0369a1;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(7, 26, 51, 0.06);
}

.admin-tabs a,
.admin-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 8px 18px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-tabs a:hover,
.admin-tabs button:hover {
  background: var(--sky-soft);
  text-decoration: none;
}

.admin-tabs a.active,
.admin-tabs button.active {
  border-color: var(--sky);
  background: var(--navy);
  color: #ffffff;
}

.notice {
  margin: 0;
  padding: 12px;
  background: var(--sky-soft);
  border-left: 4px solid var(--sky);
  border-radius: 12px;
}

.notice.error {
  background: #fff1f1;
  border-left-color: var(--danger);
}

.toast {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 60;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  background: #f0f9ff;
  color: var(--navy);
  box-shadow: 0 22px 60px rgba(7, 26, 51, 0.18);
  font-weight: 700;
}

.toast.error {
  border-color: rgba(180, 35, 24, 0.35);
  background: #fff1f1;
  color: var(--danger);
}

.mini-feed {
  display: grid;
  gap: 14px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.mini-feed article {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.mini-feed article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mini-feed-text article {
  grid-template-columns: 1fr;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbff 100%);
}

.mini-feed-text article:last-child {
  padding: 14px 16px;
  border: 1px solid var(--line);
}

.mini-feed img,
.image-placeholder {
  width: 82px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-soft), #ffffff);
}

.mini-feed span,
.mini-feed strong {
  display: block;
}

.mini-feed span {
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.row-actions button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
  padding: 6px 12px;
}

.row-actions button:last-child {
  color: var(--danger);
  border-color: #f0c6c1;
}

.current-image {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sky-soft);
}

.current-image img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.collection-list {
  display: grid;
  gap: 34px;
}

.collection-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(7, 26, 51, 0.08);
}

.collection-head h2 {
  margin: 0 0 6px;
}

.collection-head p {
  color: var(--muted);
  margin-top: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.media-tile {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  position: relative;
}

.download-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(7, 26, 51, 0.76);
  color: transparent;
  box-shadow: 0 10px 24px rgba(7, 26, 51, 0.24);
  backdrop-filter: blur(8px);
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 9px;
  height: 15px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: translateX(-50%) rotate(-45deg);
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 9px;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
}

.download-icon:hover {
  background: var(--sky);
}

.media-tile .media-open-button {
  border-radius: 0;
}

.media-tile img,
.media-tile video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sky-soft);
}

.media-tile figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  font-weight: 700;
}

.media-tile figcaption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-tile figcaption a {
  flex: 0 0 auto;
  color: #0369a1;
}

.collection-admin {
  display: grid;
  gap: 18px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.collection-admin section {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.media-admin-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #edf4fb;
  border-radius: 14px;
  background: #fbfdff;
}

.media-admin-item img,
.media-admin-item video {
  width: 90px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--sky-soft);
}

.media-admin-item button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
  padding: 6px 12px;
}

.site-footer {
  padding: 28px 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--navy);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.social-icon:hover {
  background: var(--sky);
  border-color: var(--sky);
  color: #041527;
}

.footer-admin-row {
  text-align: right;
  margin-top: 10px;
}

.admin-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  opacity: 0.35;
  border-style: dashed;
}

.admin-icon:hover {
  opacity: 1;
}

@media (max-width: 820px) {
  .home-grid,
  .two-column,
  .admin-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero {
    background: #ffffff;
  }

  nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 8px 10px;
  }

  nav a {
    min-width: auto;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 10px 14px;
  }

  nav a.active {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  }

  .brand {
    padding: 22px 18px 18px;
  }

  .home-grid,
  .content {
    width: min(100% - 28px, 1120px);
    padding-top: 36px;
    padding-bottom: 44px;
  }

  .page-hero div {
    width: min(100% - 28px, 1120px);
    padding: 34px 0;
  }

  .admin-top {
    display: grid;
  }

  .admin-actions,
  .button-row,
  .admin-tabs {
    display: grid;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .button {
    justify-content: center;
    width: 100%;
  }

  .admin-button {
    width: 100%;
  }

  .upload-zone {
    min-height: 132px;
  }

  .current-image {
    grid-template-columns: 1fr;
  }

  .media-admin-item {
    grid-template-columns: 1fr;
  }

  .media-admin-item img,
  .media-admin-item video {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 18px;
  }
}

/* Rich text content saved from the admin panel's WYSIWYG editor */
.rich-text p,
.post-body p {
  margin: 0 0 16px;
}
.rich-text ul,
.rich-text ol,
.post-body ul,
.post-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.rich-text li,
.post-body li {
  margin-bottom: 6px;
}
.rich-text a,
.post-body a {
  color: var(--sky, #38bdf8);
  text-decoration: underline;
}
.rich-text blockquote,
.post-body blockquote {
  margin: 16px 0;
  padding: 8px 18px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.rich-text h2,
.rich-text h3,
.rich-text h4,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 22px 0 10px;
}
.rich-text p:last-child,
.post-body p:last-child {
  margin-bottom: 0;
}

/* Rich text coming from the News / Blog excerpt editor (a lighter
   "compact" toolbar than the full post editor above, but it can still
   include bold/italic/underline, colour, and font size/family). */
.news-body a,
.post-card a {
  color: var(--sky, #38bdf8);
  text-decoration: underline;
}
.news-body span[style*="font-size"],
.post-card span[style*="font-size"],
.rich-text span[style*="font-size"],
.post-body span[style*="font-size"] {
  line-height: 1.4;
}
