:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f7;
  --ink: #111318;
  --muted: #667085;
  --line: #dde3ea;
  --accent: #e9553f;
  --accent-2: #0f8b7a;
  --accent-3: #d59a1c;
  --shadow: 0 18px 50px rgba(17, 19, 24, 0.08);
  --radius: 8px;
  --page: min(1180px, calc(100vw - 40px));
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 139, 122, 0.06), transparent 360px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.04) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(180deg, rgba(17, 19, 24, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(221, 227, 234, 0.82);
  background: rgba(247, 248, 251, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(17, 19, 24, 0.18);
}

.brand-name {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  border-radius: 999px;
  padding: 8px 11px;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 5vw, 72px);
  width: var(--page);
  min-height: calc(86vh - 72px);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) 0 42px;
}

.hero-copy {
  align-self: center;
}

.eyebrow,
.section-title small,
.entry-head small,
.editor-card-head small,
.social-card small {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(48px, 7.2vw, 88px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-tagline {
  max-width: 680px;
  margin: 24px 0 0;
  color: #3d4652;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-meta span,
.tags li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.hero-panel {
  align-self: end;
}

.hero-image {
  position: relative;
  display: grid;
  min-height: 430px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(233, 85, 63, 0.22), transparent 44%),
    linear-gradient(315deg, rgba(15, 139, 122, 0.2), transparent 52%),
    #edf2f3;
  box-shadow: var(--shadow);
}

.hero-image::after {
  position: absolute;
  inset: auto 16px 16px 16px;
  height: 1px;
  content: "";
  background: rgba(17, 19, 24, 0.16);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image.is-empty span {
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 860;
  line-height: 1;
}

.hero-image.is-empty small {
  position: absolute;
  right: 18px;
  bottom: 24px;
  color: var(--muted);
}

.hero-panel p {
  margin: 18px 0 0;
  color: var(--muted);
}

.overview {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  width: var(--page);
  margin: 0 auto;
  padding: 40px 0 70px;
}

.index-panel {
  position: sticky;
  top: 100px;
  align-self: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 32px rgba(17, 19, 24, 0.05);
}

.index-panel h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.index-panel p {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.index-panel ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-panel li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.index-panel span {
  color: var(--muted);
  font-size: 12px;
}

.index-panel a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 720;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.search-box,
.token-field,
.field,
.upload-field {
  display: grid;
  gap: 8px;
  width: 100%;
}

.search-box span,
.token-field span,
.field span,
.upload-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  transition:
    border 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input {
  height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 128px;
  resize: vertical;
  padding: 12px 14px;
}

input:focus,
textarea:focus {
  border-color: rgba(15, 139, 122, 0.7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 139, 122, 0.12);
}

.ghost-button,
.primary-button,
.tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border 140ms ease;
}

.ghost-button:hover,
.primary-button:hover,
.tiny-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 19, 24, 0.08);
}

.primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.tiny-button {
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.tiny-button[aria-pressed="true"] {
  border-color: rgba(15, 139, 122, 0.45);
  color: var(--accent-2);
}

.tiny-button.danger {
  color: var(--accent);
}

.content-section {
  scroll-margin-top: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 40px rgba(17, 19, 24, 0.05);
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title h2 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.05;
}

.section-title p {
  grid-column: 1;
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section-title .tags {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  justify-content: flex-end;
  max-width: 230px;
}

.item-list {
  display: grid;
  gap: 14px;
}

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.entry-main {
  min-width: 0;
}

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

.entry h3 {
  margin: 0;
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.12;
}

.entry p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  white-space: normal;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid currentColor;
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: start;
}

.photo-button {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface-soft);
}

.photo-button:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.photo-button:hover img {
  transform: scale(1.04);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
}

.social-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(24px, 5vw, 62px);
  width: var(--page);
  margin: 0 auto;
  padding: 54px 0 84px;
  border-top: 1px solid var(--line);
}

.social-band h2 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 74px);
  line-height: 1;
}

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

.social-card {
  display: grid;
  min-height: 170px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(17, 19, 24, 0.06);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

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

.social-card strong {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.15;
}

.social-card span {
  color: var(--muted);
}

.lightbox {
  width: min(92vw, 1100px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.lightbox img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: #111;
}

.lightbox p {
  margin: 10px 0 0;
  color: #fff;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.admin-body {
  background:
    linear-gradient(180deg, rgba(233, 85, 63, 0.05), transparent 300px),
    var(--bg);
}

.admin-shell {
  width: var(--page);
  margin: 0 auto;
  padding: 44px 0 90px;
}

.admin-top,
.editor-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.admin-top h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1;
}

.admin-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: end;
  gap: 12px;
}

.status-line {
  margin: 18px 0 32px;
  color: var(--muted);
}

.editor-section {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.editor-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.editor-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field:has(textarea),
.field:has([data-path$=".description"]),
.field:has([data-path$=".intro"]),
.field:has([data-path$=".contactNote"]),
.field:has([data-path$=".body"]),
.field:has([data-path$=".images"]) {
  grid-column: 1 / -1;
}

.editor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 38px rgba(17, 19, 24, 0.05);
}

.editor-card-head {
  margin-bottom: 16px;
}

.editor-card-head h3,
.editor-card-head h4 {
  margin: 0;
  line-height: 1.1;
}

.editor-card-head h3 {
  font-size: 26px;
}

.editor-card-head h4 {
  font-size: 21px;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.item-editor-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.item-editor {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.upload-field {
  margin-top: 14px;
}

.checkbox-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.checkbox-field span {
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
}

.editor-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.editor-note code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--surface-soft);
  color: var(--ink);
}

.error-note {
  color: var(--accent);
}

.admin-image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-image-strip figure {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-image-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-soft);
}

@media (max-width: 1040px) {
  .hero,
  .overview,
  .social-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .index-panel {
    position: static;
  }

  .section-title,
  .entry {
    grid-template-columns: 1fr;
  }

  .section-title .tags {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    max-width: none;
  }

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

@media (max-width: 780px) {
  :root {
    --page: min(1180px, calc(100vw - 28px));
  }

  .site-header {
    align-items: center;
    min-height: 66px;
    padding: 12px 14px;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 66px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .nav.nav-open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .admin-header .nav {
    position: static;
    display: flex;
    flex-direction: row;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-header .nav a {
    padding: 6px 8px;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 64px);
  }

  .hero-image {
    min-height: 280px;
  }

  .overview,
  .social-band {
    padding-top: 30px;
  }

  .toolbar,
  .admin-top,
  .editor-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-head {
    display: grid;
  }

  .image-grid,
  .social-grid,
  .form-grid,
  .admin-actions {
    grid-template-columns: 1fr;
  }

  .content-section,
  .entry,
  .editor-card {
    padding: 16px;
  }
}
