:root {
  --ink: #17323a;
  --ink-strong: #0b1f24;
  --muted: #587178;
  --paper: #fbfaf5;
  --shell: #f2eee3;
  --foam: #d9f0ea;
  --teal: #0e7c73;
  --teal-dark: #085c56;
  --coral: #d95844;
  --gold: #e5b84f;
  --line: rgba(23, 50, 58, 0.16);
  --shadow: 0 18px 45px rgba(11, 31, 36, 0.16);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.has-modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--ink-strong);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding: 14px clamp(18px, 4vw, 52px);
  color: #fff;
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(251, 250, 245, 0.96);
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(11, 31, 36, 0.08);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(410px, 40vw);
  min-height: 72px;
}

.brand img {
  width: min(390px, 40vw);
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.28));
}

.site-header.is-scrolled .brand img,
.site-header.is-open .brand img {
  filter: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  border-radius: 4px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.admin-header {
  position: sticky;
}

.admin-header .brand img {
  filter: none;
}

.admin-main {
  padding: 54px 0 86px;
}

.admin-hero {
  padding: clamp(34px, 6vw, 72px) 0 30px;
}

.admin-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.6rem);
}

.admin-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.admin-hero .admin-warning {
  display: inline-block;
  max-width: 780px;
  padding: 12px 14px;
  border-left: 4px solid var(--coral);
  background: #fff3ea;
  color: var(--ink-strong);
  font-weight: 900;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.generator-form,
.generator-preview,
.saved-post {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 31, 36, 0.08);
}

.generator-form,
.generator-preview {
  padding: clamp(18px, 3vw, 28px);
}

.generator-form label,
.draft-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.generator-form span,
.draft-editor span {
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 900;
}

.generator-form input,
.generator-form select,
.generator-form textarea,
.draft-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

.image-fieldset {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-fieldset legend {
  padding: 0 8px;
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 900;
}

.image-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 152px;
  margin: 10px 0 16px;
  border: 2px dashed rgba(14, 124, 115, 0.38);
  border-radius: 8px;
  background: var(--foam);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.image-dropzone.is-dragging {
  border-color: var(--coral);
  background: #fff3ea;
}

.image-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-dropzone label {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 18px;
  pointer-events: none;
}

.image-dropzone strong {
  color: var(--ink-strong);
  font-size: 1.08rem;
}

.image-dropzone span {
  color: var(--muted);
  font-weight: 700;
}

.image-preview {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.image-preview img {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
}

.image-preview figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  word-break: break-word;
}

.generator-form textarea,
.draft-editor textarea {
  resize: vertical;
}

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

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.button.utility:hover,
.button.utility:focus-visible {
  background: var(--foam);
}

.button.utility.danger {
  color: #a8392c;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.preview-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.preview-toolbar h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  margin-bottom: 18px;
  padding: 18px;
}

.preview-card img {
  width: calc(100% + 36px);
  max-width: none;
  height: 260px;
  object-fit: cover;
  margin: -18px -18px 18px;
}

.preview-card h3 {
  margin-top: 18px;
}

.status-message {
  min-height: 28px;
  margin: 14px 0 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.saved-posts-section {
  padding-top: 54px;
}

.button.secondary-on-light {
  color: var(--teal-dark);
  border-color: var(--teal);
  background: transparent;
}

.saved-posts {
  display: grid;
  gap: 14px;
}

.saved-post {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.saved-post h3,
.saved-post p {
  margin: 0;
}

.saved-post p:not(.article-date) {
  color: var(--muted);
}

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

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a:focus-visible,
.site-header.is-open .site-nav a:hover,
.site-header.is-open .site-nav a:focus-visible {
  background: var(--foam);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: currentColor;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: clamp(480px, 64svh, 620px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink-strong);
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(11, 31, 36, 0.84), rgba(11, 31, 36, 0.52) 42%, rgba(11, 31, 36, 0.12)),
    linear-gradient(0deg, rgba(11, 31, 36, 0.38), rgba(11, 31, 36, 0));
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0 clamp(32px, 6vh, 52px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.79rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd16a;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-strong);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  color: #fff;
  max-width: 760px;
  font-size: clamp(3.2rem, 8.4vw, 6.6rem);
  line-height: 0.94;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 16px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 900;
}

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

.button.primary:hover,
.button.primary:focus-visible {
  background: #bd4434;
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.section-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.promise-section,
.articles-section,
.privacy-section {
  padding: clamp(54px, 8vw, 94px) 0;
}

.promise-section {
  padding-top: clamp(38px, 6vw, 72px);
}

.mission-section,
.about-section {
  padding: clamp(62px, 9vw, 106px) 0;
  background: var(--shell);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) 1.28fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.2rem);
}

h3 {
  font-size: 1.35rem;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.promise-item {
  min-height: 148px;
  padding: clamp(18px, 3vw, 28px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.promise-item span {
  display: block;
  color: var(--teal);
  font-weight: 900;
  margin-bottom: 14px;
}

.promise-item p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.mission-layout,
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: center;
}

.mission-copy p,
.about-copy p,
.legal-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: 1.06rem;
}

.focus-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  box-shadow: var(--shadow);
}

.focus-panel ul,
.check-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.focus-panel li,
.check-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  margin: 12px 0;
}

.focus-panel li::before,
.check-list li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 900;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.article-grid {
  display: grid;
  gap: 20px;
}

.blog-archive {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) 1fr;
  gap: clamp(24px, 5vw, 56px);
  margin-top: clamp(42px, 7vw, 78px);
  padding-top: clamp(30px, 5vw, 48px);
  border-top: 1px solid var(--line);
}

.blog-archive h3 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.archive-list {
  display: grid;
  gap: 12px;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(180px, 0.42fr) 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item h4,
.archive-item p {
  margin: 0;
}

.archive-item h4 {
  color: var(--ink-strong);
  font-size: 1.08rem;
  line-height: 1.2;
}

.archive-item a {
  text-decoration: none;
}

.archive-item a:hover,
.archive-item a:focus-visible {
  color: var(--coral);
  text-decoration: underline;
}

.archive-item p:not(.article-date) {
  color: var(--muted);
}

.article-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 31, 36, 0.08);
}

.article-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.article-card-content {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: clamp(20px, 3vw, 30px);
}

.article-date {
  margin: 0;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 900;
}

.article-card h3 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.article-card a {
  align-self: end;
  color: var(--coral);
  font-weight: 900;
  text-decoration: none;
}

.article-card a:hover,
.article-card a:focus-visible {
  text-decoration: underline;
}

.article-detail-section {
  padding: 34px 0 clamp(62px, 9vw, 106px);
}

.article-detail {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  border-top: 4px solid var(--teal);
  background: #fff;
  box-shadow: var(--shadow);
}

.article-detail figure {
  margin: 0;
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

.article-detail figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-detail-body {
  padding: clamp(24px, 5vw, 52px);
}

.article-detail-body h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 12px;
}

.article-detail-body p {
  margin: 18px 0 0;
}

.article-detail-body .article-excerpt {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 700;
}

.article-detail-body ul,
.article-detail-body ol {
  margin: 18px 0 0;
  padding-left: 22px;
}

.article-detail-body li {
  margin: 8px 0;
}

.article-detail-body .button {
  margin-top: 28px;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.article-actions .button {
  margin-top: 0;
}

.promo-modal[hidden] {
  display: none;
}

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.promo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 36, 0.58);
  backdrop-filter: blur(8px);
}

.promo-modal-panel {
  position: relative;
  width: min(660px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(11, 31, 36, 0.34);
}

.promo-modal-panel img {
  width: 100%;
  height: auto;
  background: #fff;
  object-fit: contain;
}

.promo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-strong);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(11, 31, 36, 0.18);
}

.promo-modal-close:hover,
.promo-modal-close:focus-visible {
  background: #fff;
  outline: 3px solid rgba(217, 88, 68, 0.42);
}

.promo-modal-copy {
  padding: clamp(22px, 4vw, 36px);
}

.promo-modal-copy h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.promo-modal-copy p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.promo-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.about-layout {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.about-image {
  margin: 0;
  aspect-ratio: 4 / 4.2;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--foam);
}

.about-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

.legal-copy {
  max-width: 860px;
}

.legal-copy address {
  margin-top: 22px;
  font-style: normal;
  font-weight: 800;
}

.site-footer {
  padding: 34px 0;
  background: var(--ink-strong);
  color: rgba(255, 255, 255, 0.82);
}

.footer-layout {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 22px;
  align-items: center;
}

.footer-layout img {
  width: 160px;
  filter: brightness(1.25);
}

.footer-layout p {
  margin: 0;
}

.footer-layout a {
  color: #fff;
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 88px;
  }

  .brand {
    width: min(310px, 40vw);
    min-height: 64px;
  }

  .brand img {
    width: min(290px, 40vw);
  }

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

  .mission-layout,
  .about-layout,
  .two-column,
  .generator-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 10px;
    min-height: 82px;
  }

  .brand {
    width: min(250px, 64vw);
    min-height: 56px;
  }

  .brand img {
    width: min(230px, 64vw);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% - 4px);
    display: none;
    padding: 8px;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: grid;
  }

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

  .site-nav a {
    padding: 12px;
  }

  .hero {
    min-height: clamp(480px, 72svh, 600px);
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(11, 31, 36, 0.86), rgba(11, 31, 36, 0.46)),
      linear-gradient(90deg, rgba(11, 31, 36, 0.62), rgba(11, 31, 36, 0.12));
  }

  .hero-content {
    padding-top: 88px;
    padding-bottom: 34px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .promise-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .blog-archive,
  .archive-item {
    grid-template-columns: 1fr;
  }

  .archive-item {
    gap: 8px;
  }

  .article-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .article-card img {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

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

  .two-fields,
  .saved-post {
    grid-template-columns: 1fr;
  }

  .preview-toolbar {
    display: grid;
  }

  .saved-post-actions {
    justify-content: start;
  }
}

@media (max-width: 440px) {
  .hero h1 {
    font-size: 3.25rem;
  }

  .brand img {
    width: min(210px, 58vw);
  }

  .brand {
    width: min(230px, 58vw);
  }

  .button {
    width: 100%;
  }
}
