:root {
  --farm-red: #c62828;
  --sunny-yellow: #f9c642;
  --pasture-green: #2e7d32;
  --sky-blue: #3fa9f5;
  --eggshell: #f6e6c9;
  --wood-brown: #7a5230;
  --ink: #1d2430;
  --paper: #fffaf2;
  --white: #ffffff;
  --shadow-lg: 0 24px 60px rgba(29, 36, 48, 0.16);
  --shadow-sm: 0 10px 25px rgba(29, 36, 48, 0.1);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 198, 66, 0.25), transparent 24%),
    radial-gradient(circle at top right, rgba(63, 169, 245, 0.24), transparent 26%),
    linear-gradient(180deg, #fffdf8 0%, #fdf2dc 52%, #f1dfba 100%);
}

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

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

main {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0 1rem;
}

.brand-mark,
h1,
h2,
h3 {
  font-family: "Cooper Black", "Bookman Old Style", Georgia, serif;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.03em;
}

.brand-mark span {
  display: grid;
  gap: 0.15rem;
}

.brand-mark small {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(29, 36, 48, 0.68);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-icon {
  width: 62px;
  height: 62px;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.site-nav a {
  padding: 0.8rem 1.05rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(29, 36, 48, 0.08);
  transition: transform 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  transform: translateY(-1px);
  background: var(--white);
}

.ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pasture-green), #0d5a39);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.hero,
.order-layout,
.section-grid,
.admin-grid,
.metrics-grid {
  display: grid;
  gap: 1.5rem;
}

.hero {
  grid-template-columns: 1.2fr 0.9fr;
}

.order-layout {
  grid-template-columns: 1.5fr 0.85fr;
  align-items: start;
}

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

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

.hero-copy,
.card,
.page-intro {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(29, 36, 48, 0.06);
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  padding: clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(circle at top right, rgba(249, 198, 66, 0.34), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 230, 201, 0.92));
  animation: rise-in 420ms ease both;
}

.hero-art {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(63, 169, 245, 0.18), rgba(46, 125, 50, 0.18)),
    var(--paper);
  animation: rise-in 520ms ease both;
}

.hero-logo,
.summary-logo {
  width: min(100%, 420px);
  justify-self: center;
}

.hero-sticker {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.96), rgba(122, 82, 48, 0.96));
  color: var(--white);
}

.sticker-title {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Cooper Black", "Bookman Old Style", Georgia, serif;
  font-size: 1.2rem;
}

.hero-notes,
.hero-actions,
.form-actions,
.section-heading,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-notes {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(29, 36, 48, 0.08);
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--farm-red);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5.5vw, 4.6rem);
  line-height: 0.95;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.04;
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

p,
li,
label,
input,
textarea,
select,
button,
dt,
dd {
  font-size: 1rem;
}

.hero-text,
.article-body p {
  line-height: 1.7;
}

.button,
.text-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.88rem 1.28rem;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover,
.button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--farm-red), #8b1e1e);
  color: var(--white);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(29, 36, 48, 0.12);
}

.text-link,
.text-button {
  padding: 0;
  background: transparent;
  color: var(--pasture-green);
}

.card,
.page-intro {
  padding: 1.4rem;
  background: rgba(255, 255, 255, 0.82);
}

.page-intro {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 230, 201, 0.86));
}

.card-warm {
  background: linear-gradient(135deg, rgba(249, 198, 66, 0.18), rgba(255, 255, 255, 0.86));
}

.card-cool {
  background: linear-gradient(135deg, rgba(63, 169, 245, 0.16), rgba(255, 255, 255, 0.88));
}

.card-illustrated {
  overflow: hidden;
}

.section-illustration {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(63, 169, 245, 0.15), rgba(46, 125, 50, 0.18));
}

.product-picker,
.inventory-list,
.post-list,
.table-stack {
  display: grid;
  gap: 0.9rem;
}

.inventory-card,
.product-row,
.post-card,
.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(246, 230, 201, 0.52);
}

.post-card {
  flex-direction: column;
}

.product-controls,
.inventory-meta {
  display: grid;
  justify-items: end;
  gap: 0.6rem;
}

.stock-pill {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.14);
  color: var(--pasture-green);
  font-weight: 800;
}

.price {
  font-weight: 800;
  font-size: 1.1rem;
}

.summary-note,
.post-date,
.metric-label,
.flash {
  font-size: 0.92rem;
}

.metric-label,
.post-date {
  display: block;
  color: rgba(29, 36, 48, 0.62);
}

.summary-logo {
  max-width: 240px;
  margin-bottom: 1rem;
}

.mini-illustration {
  width: 56px;
  height: 56px;
}

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

label,
fieldset {
  display: grid;
  gap: 0.45rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(29, 36, 48, 0.16);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

fieldset {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(29, 36, 48, 0.12);
  border-radius: var(--radius-md);
}

.payment-choice label,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.payment-choice input,
.checkbox-row input {
  width: auto;
}

.totals {
  display: grid;
  gap: 0.75rem;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.total-row {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(29, 36, 48, 0.12);
  font-weight: 800;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.flash {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.flash-success {
  background: linear-gradient(135deg, var(--pasture-green), #175b33);
  color: var(--white);
}

.flash-error {
  background: linear-gradient(135deg, var(--farm-red), #8b1e1e);
  color: var(--white);
}

.metric-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.metric-card-accent {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.14), rgba(255, 255, 255, 0.92));
}

.metric-value {
  font-family: "Cooper Black", "Bookman Old Style", Georgia, serif;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1;
}

.card-span-2 {
  grid-column: span 2;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 1.4rem;
  align-items: start;
}

.traffic-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: end;
  min-height: 260px;
  padding: 1rem 0.4rem 0;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(63, 169, 245, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(29, 36, 48, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 100% 25%;
}

.chart-column {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.chart-bars {
  width: 100%;
  height: 210px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.2rem;
}

.chart-bar {
  width: min(18px, 40%);
  min-height: 4px;
  border-radius: 999px 999px 6px 6px;
}

.chart-bar-pageviews {
  background: linear-gradient(180deg, var(--sky-blue), #1968a8);
}

.chart-bar-unique {
  background: linear-gradient(180deg, var(--sunny-yellow), #d49411);
}

.chart-label {
  font-size: 0.8rem;
  color: rgba(29, 36, 48, 0.7);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.85rem;
  color: rgba(29, 36, 48, 0.78);
  font-size: 0.92rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-right: 0.35rem;
  border-radius: 999px;
  vertical-align: middle;
}

.legend-pageviews {
  background: var(--sky-blue);
}

.legend-unique {
  background: var(--sunny-yellow);
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.ledger-row {
  align-items: start;
}

.ledger-values {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
}

.admin-row {
  align-items: center;
}

.admin-row form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.message-row {
  align-items: start;
}

.admin-login,
.admin-form {
  max-width: 760px;
  margin: 0 auto;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .hero,
  .order-layout,
  .section-grid,
  .admin-grid,
  .metrics-grid,
  .analytics-layout,
  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .card-span-2 {
    grid-column: auto;
  }

  .site-header {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
  }

  h1 {
    font-size: 2.5rem;
  }

  .ticker {
    border-radius: var(--radius-lg);
  }

  .inventory-card,
  .product-row,
  .admin-row {
    flex-direction: column;
  }

  .product-controls,
  .inventory-meta {
    justify-items: start;
  }
}
