:root {
  color-scheme: dark;
  --navy-950: #03101e;
  --navy-900: #061827;
  --navy-850: #092238;
  --navy-800: #0d2a44;
  --border: #1b4c70;
  --text: #f5f8fc;
  --muted: #9db4c9;
  --orange: #ff8517;
  --orange-strong: #ff9a3d;
  --green: #44d18d;
  --red: #ff7a7a;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #123251 0, transparent 30rem),
    linear-gradient(145deg, var(--navy-950), #071d31 62%, #0a2944);
  min-height: 100vh;
}
button,
input,
textarea {
  font: inherit;
}
button,
.preview-link {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}

.intro-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
}
button:hover,
.preview-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #ffb066;
  outline-offset: 3px;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--orange-strong);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-card {
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 5vw, 2.8rem);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: rgb(3 16 30 / 88%);
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 42%);
  backdrop-filter: blur(18px);
}
.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
}
.intro,
.local-note {
  color: var(--muted);
  line-height: 1.65;
}
.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.7rem;
}
label {
  display: grid;
  gap: 0.45rem;
  color: #dce8f3;
  font-size: 0.88rem;
  font-weight: 700;
}
input,
textarea {
  width: 100%;
  border: 1px solid #315b79;
  border-radius: 0.65rem;
  color: var(--text);
  background: #061523;
  padding: 0.78rem 0.88rem;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 20%);
}
input[readonly] {
  color: #b8cad9;
  background: #0b2032;
  cursor: not-allowed;
}
textarea {
  resize: vertical;
  line-height: 1.55;
}
small {
  color: var(--muted);
  font-weight: 450;
  line-height: 1.5;
}
button {
  min-height: 2.85rem;
  border: 1px solid #ff9b42;
  border-radius: 0.65rem;
  color: #130b03;
  background: linear-gradient(135deg, #ff9b3f, var(--orange));
  padding: 0.7rem 1.15rem;
  font-weight: 850;
  cursor: pointer;
}
.local-note {
  margin: 1.35rem 0 0;
  font-size: 0.78rem;
  text-align: center;
}
.alert {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid;
  border-radius: 0.65rem;
  line-height: 1.5;
}
.alert.error {
  border-color: rgb(255 122 122 / 55%);
  color: #ffd0d0;
  background: rgb(122 27 35 / 28%);
}
.alert.success {
  border-color: rgb(68 209 141 / 55%);
  color: #b9f8d9;
  background: rgb(16 93 61 / 32%);
}

.admin-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem max(1rem, calc((100vw - 78rem) / 2));
  border-bottom: 1px solid var(--border);
  background: rgb(3 16 30 / 90%);
  box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 20%);
  backdrop-filter: blur(18px);
}
.header-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.admin-header .eyebrow {
  margin-bottom: 0.15rem;
}
.secondary-button {
  min-height: 2.4rem;
  border-color: #315b79;
  color: var(--text);
  background: #0a2135;
  padding: 0.45rem 0.9rem;
}
.editor-shell {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0 7rem;
}
.editor-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.editor-intro h1 {
  max-width: 50rem;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.editor-intro p:not(.eyebrow) {
  max-width: 52rem;
  color: var(--muted);
  line-height: 1.7;
}
.preview-link {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--text);
  background: #0b2740;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}
.settings-form {
  display: grid;
  gap: 1rem;
}
.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgb(11 40 64 / 92%), rgb(4 20 34 / 94%));
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 18%);
}
.panel.advanced {
  border-color: #7b4d23;
}
.panel-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem clamp(1rem, 3vw, 1.7rem);
  border-bottom: 1px solid rgb(49 91 121 / 65%);
  background: rgb(255 255 255 / 2%);
}
.panel-heading > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid #9f591b;
  border-radius: 0.55rem;
  color: var(--orange-strong);
  background: #151c22;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 850;
}
.panel h2 {
  margin: 0;
  font-size: 1.2rem;
}
.panel-heading p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: clamp(1.1rem, 3vw, 1.7rem);
}
.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.full-width {
  grid-column: 1 / -1;
}
.field-error {
  color: #ffb0b0;
  font-size: 0.78rem;
  font-weight: 650;
}
[aria-invalid='true'] {
  border-color: #de6767;
}
.save-bar {
  position: sticky;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid #80501f;
  border-radius: 0.85rem;
  background: rgb(5 20 33 / 94%);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 40%);
  backdrop-filter: blur(18px);
}
.save-bar div {
  display: grid;
  gap: 0.2rem;
}
.save-bar span {
  color: var(--muted);
  font-size: 0.78rem;
}
.publish-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: center;
  overflow: hidden;
  margin-top: 1.25rem;
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border: 1px solid rgb(255 133 23 / 58%);
  border-radius: 1rem;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgb(255 133 23 / 15%),
      transparent 18rem
    ),
    linear-gradient(135deg, rgb(12 42 66 / 96%), rgb(3 18 31 / 98%));
  box-shadow:
    0 1.2rem 3.5rem rgb(0 0 0 / 24%),
    inset 0 1px rgb(255 255 255 / 5%);
}
.publish-panel::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent 75%);
  content: '';
}
.publish-mark {
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  place-items: center;
  border: 1px solid rgb(255 154 61 / 55%);
  border-radius: 0.9rem;
  color: #ffd3ab;
  background: rgb(255 133 23 / 10%);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.publish-mark span {
  width: 0.65rem;
  height: 0.65rem;
  margin-bottom: -0.65rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 1rem rgb(68 209 141 / 75%);
}
.publish-copy h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}
.publish-copy > p:not(.eyebrow) {
  max-width: 47rem;
  margin: 0.45rem 0 0.35rem;
  color: #c5d6e4;
  line-height: 1.55;
}
.publish-copy small {
  display: block;
  max-width: 50rem;
}
.publish-action {
  display: flex;
  justify-content: flex-end;
}
.publish-action button {
  min-width: 13.5rem;
  box-shadow: 0 0.8rem 2rem rgb(255 102 0 / 18%);
}
code {
  color: #ffc48c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.editorial-editor,
.seo-editor {
  scroll-margin-top: 1rem;
}
.editorial-groups {
  display: grid;
  gap: 0.75rem;
}
.editorial-group {
  overflow: hidden;
  border: 1px solid rgb(55 108 146 / 55%);
  border-radius: 0.85rem;
  background: rgb(2 16 28 / 58%);
}
.editorial-group summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  color: #f5f9fc;
  font-weight: 800;
  list-style-position: inside;
}
.editorial-group[open] summary {
  border-bottom: 1px solid rgb(55 108 146 / 45%);
  color: #ffad61;
}
.editorial-group .field-grid {
  padding: 1rem;
}
.editorial-field span {
  overflow-wrap: anywhere;
}
.build-required-note {
  display: flex;
  gap: 0.4rem 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--orange);
  border-radius: 0.45rem;
  color: #cad9e5;
  background: rgb(255 133 23 / 9%);
}
.build-required-note strong {
  flex: none;
  color: #ffb36d;
}

@media (max-width: 48rem) {
  .editor-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .intro-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .intro-actions form,
  .intro-actions button,
  .intro-actions .preview-link {
    width: 100%;
    text-align: center;
  }
  .field-grid,
  .three-columns {
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: auto;
  }
  .save-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }
  .save-bar button {
    width: 100%;
  }
  .publish-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .publish-action {
    grid-column: 1 / -1;
  }
  .publish-action button {
    width: 100%;
  }
  .build-required-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 32rem) {
  .publish-panel {
    grid-template-columns: 1fr;
  }
  .publish-mark {
    width: 3.6rem;
    height: 3.6rem;
  }
  .publish-action {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
