:root {
  --ink-900: #eaf4ff;
  --ink-700: #b9d3ef;
  --teal-700: #83c2ff;
  --teal-500: #a8d5ff;
  --orange-600: #2bb6ff;
  --sky-100: rgba(55, 115, 180, 0.22);
  --sky-200: rgba(88, 145, 209, 0.24);
  --sand-100: rgba(17, 44, 83, 0.68);
  --surface-900: #071a33;
  --surface-800: #0b2244;
  --border-blue: rgba(123, 178, 239, 0.34);
  --white: #ffffff;
  --shadow: 0 18px 36px rgba(2, 8, 22, 0.5);
  --radius: 16px;
  --container: min(1240px, 94vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Chivo", "Segoe UI", sans-serif;
  color: var(--ink-900);
  background-color: #020a1a;
  background:
    linear-gradient(180deg, rgba(3, 11, 29, 0.72) 0%, rgba(2, 8, 22, 0.9) 100%),
    url("../bg/blueprint.PNG") center / cover no-repeat;
  line-height: 1.5;
}

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

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

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-blue);
  background: rgba(6, 20, 42, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(1, 5, 14, 0.45);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  font-family: "Archivo Black", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.3px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(9, 52, 97, 0.18));
}

.brand-text {
  color: var(--ink-900);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
  padding: 0.28rem;
  border-radius: 999px;
  border: 1px solid rgba(123, 178, 239, 0.24);
  background: rgba(8, 28, 53, 0.74);
}

.site-nav a {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  background: rgba(66, 146, 236, 0.3);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(123, 178, 239, 0.45);
  background: rgba(16, 59, 109, 0.45);
}

.cart-count {
  min-width: 1.4rem;
  text-align: center;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--white);
  background: #2a91f0;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-blue);
  background: rgba(13, 42, 78, 0.78);
  color: var(--ink-900);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
}

.hero {
  padding: 4.7rem 0 2.9rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
}

.kicker {
  margin: 0 0 0.6rem;
  color: var(--teal-700);
  letter-spacing: 0.12em;
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 4.3vw, 3.2rem);
  letter-spacing: 0.2px;
}

.lead {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--ink-700);
  font-size: 1.03rem;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, #1479d9 0%, #31beff 100%);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(3, 20, 47, 0.42);
}

.btn-secondary {
  background: rgba(15, 45, 83, 0.76);
  border-color: var(--border-blue);
  color: var(--ink-900);
}

.hero-panel {
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(9, 32, 62, 0.86) 0%, rgba(10, 38, 73, 0.92) 100%);
  border: 1px solid var(--border-blue);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 165, 255, 0.24) 0%, transparent 70%);
  pointer-events: none;
}

.hero-panel h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.1rem;
}

.hero-panel ul {
  margin: 0.8rem 0 0;
  padding: 0 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}

.page-hero {
  padding: 3.4rem 0 1.2rem;
}

.page-hero .container {
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(123, 178, 239, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(7, 25, 48, 0.64) 0%, rgba(7, 25, 48, 0.4) 100%);
  box-shadow: 0 12px 24px rgba(2, 8, 22, 0.34);
}

.section {
  padding: 2rem 0 3.2rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(6, 24, 48, 0.2) 0%, rgba(16, 58, 103, 0.34) 100%);
}

.section-title {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.inline-link {
  color: var(--teal-700);
  font-weight: 700;
}

.inline-link:hover {
  color: var(--teal-500);
}

.value-grid {
  margin-top: 1.1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.value-card {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.94) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 12px 22px rgba(2, 8, 22, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.value-card h3 {
  font-size: 1rem;
}

.value-card p {
  margin: 0.65rem 0 0;
  color: var(--ink-700);
}

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

.product-card {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.96) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 13px 24px rgba(2, 8, 22, 0.46);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-image-wrap {
  position: relative;
}

.product-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #133a66;
}

.card-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--orange-600);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
}

.card-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card-title {
  font-size: 1rem;
  font-weight: 800;
}

.card-copy {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.92rem;
}

.card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

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

.add-cart-btn {
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-blue);
  background: var(--sand-100);
  color: var(--ink-900);
  font-weight: 700;
  cursor: pointer;
}

.add-cart-btn:hover {
  background: rgba(42, 100, 170, 0.55);
}

.cart-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.5fr 0.8fr;
}

.cart-table-wrap,
.cart-summary,
.empty-state,
.contact-card,
.contact-form {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.96) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  box-shadow: 0 11px 24px rgba(2, 8, 22, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-table-wrap {
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(123, 178, 239, 0.2);
  text-align: left;
}

.cart-table th {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-controls button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(123, 178, 239, 0.3);
  background: rgba(12, 43, 78, 0.82);
  color: var(--ink-900);
  font-weight: 700;
  cursor: pointer;
}

.remove-link {
  border: 0;
  background: transparent;
  color: #ffae94;
  font-weight: 700;
  cursor: pointer;
}

.cart-summary {
  padding: 1rem;
  height: fit-content;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.summary-total {
  padding-top: 0.6rem;
  border-top: 1px solid rgba(123, 178, 239, 0.24);
  font-weight: 800;
}

.summary-actions {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.value-card:hover,
.product-card:hover,
.cart-summary:hover,
.contact-card:hover,
.contact-form:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 196, 252, 0.46);
  box-shadow: 0 14px 28px rgba(2, 8, 22, 0.52);
}

.summary-actions .btn[disabled] {
  opacity: 0.75;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.checkout-notice {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.checkout-notice-success {
  border-color: #4e9a76;
  background: rgba(18, 82, 52, 0.45);
  color: #b8f0cd;
}

.checkout-notice-info {
  border-color: #5f95c6;
  background: rgba(20, 69, 112, 0.45);
  color: #b9ddff;
}

.checkout-notice-error {
  border-color: #c67c69;
  background: rgba(108, 38, 27, 0.45);
  color: #ffd0c3;
}

.daily-date {
  margin: 0.1rem 0 1rem;
  color: #a3c8ec;
  font-weight: 700;
}

.daily-brief-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.daily-card {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.96) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 11px 24px rgba(2, 8, 22, 0.45);
}

.daily-card h3 {
  margin-bottom: 0.55rem;
}

.daily-card-title {
  margin: 0 0 0.5rem;
  font-weight: 800;
  color: #d5eaff;
}

.daily-ecg-image {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(123, 178, 239, 0.3);
  margin-bottom: 0.6rem;
}

.admin-panel {
  margin-top: 1rem;
  border: 1px solid rgba(123, 178, 239, 0.26);
  border-radius: 14px;
  background: rgba(7, 27, 52, 0.65);
  padding: 0.8rem 0.9rem;
}

.admin-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #c4e0ff;
}

.admin-auth,
.admin-form {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.admin-grid {
  display: grid;
  gap: 0.7rem;
}

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

.admin-auth input,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(123, 178, 239, 0.28);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: rgba(8, 29, 55, 0.82);
  color: var(--ink-900);
  font: inherit;
}

.admin-auth label,
.admin-form label {
  font-weight: 700;
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.quiz-toolbar {
  display: inline-grid;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.quiz-toolbar label {
  font-weight: 700;
  font-size: 0.88rem;
}

.quiz-toolbar input {
  border: 1px solid rgba(123, 178, 239, 0.28);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(8, 29, 55, 0.82);
  color: var(--ink-900);
  font: inherit;
}

.quiz-shell {
  display: grid;
  gap: 0.9rem;
}

.quiz-state {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.96) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 11px 24px rgba(2, 8, 22, 0.45);
}

.quiz-progress {
  margin: 0 0 0.35rem;
  color: #9ac6ee;
  font-weight: 700;
  font-size: 0.86rem;
}

.quiz-options {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.quiz-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  padding: 0.72rem 0.78rem;
  border-radius: 10px;
  border: 1px solid rgba(123, 178, 239, 0.3);
  background: rgba(8, 29, 55, 0.8);
  color: var(--ink-900);
  cursor: pointer;
}

.quiz-option-selected {
  border-color: rgba(143, 196, 252, 0.7);
  background: rgba(37, 97, 167, 0.72);
}

.quiz-option-label {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(123, 178, 239, 0.22);
  font-weight: 800;
}

.quiz-nav {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.quiz-meta {
  margin: 0.65rem 0 0;
  color: #9ac6ee;
  font-size: 0.88rem;
}

.quiz-score {
  margin: 0.45rem 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #c9e6ff;
}

.quiz-review-list {
  display: grid;
  gap: 0.75rem;
}

.quiz-review-item {
  background: linear-gradient(180deg, rgba(8, 29, 55, 0.86) 0%, rgba(9, 34, 64, 0.96) 100%);
  border: 1px solid var(--border-blue);
  border-radius: 12px;
  padding: 0.9rem;
}

.quiz-correct {
  border-color: rgba(90, 185, 132, 0.58);
}

.quiz-incorrect {
  border-color: rgba(198, 124, 105, 0.58);
}

.quiz-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.quiz-editor-head h3 {
  font-size: 1rem;
}

.quiz-editor-list {
  display: grid;
  gap: 0.8rem;
}

.quiz-editor-question {
  border: 1px solid rgba(123, 178, 239, 0.24);
  border-radius: 12px;
  padding: 0.8rem;
  display: grid;
  gap: 0.5rem;
  background: rgba(6, 23, 46, 0.7);
}

.quiz-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.quiz-editor-row h4 {
  font-size: 0.95rem;
}

.quiz-editor-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.empty-state {
  padding: 1.3rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}

.contact-card {
  padding: 1rem;
}

.contact-form {
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(123, 178, 239, 0.28);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: rgba(8, 29, 55, 0.82);
  color: var(--ink-900);
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #95b9df;
}

.contact-form label {
  margin-top: 0.3rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.form-status {
  min-height: 1.4rem;
  margin: 0.25rem 0 0;
  color: #89c8ff;
  font-weight: 700;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(123, 178, 239, 0.22);
  background: linear-gradient(180deg, rgba(6, 21, 41, 0.18) 0%, rgba(6, 21, 41, 0.45) 100%);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #9ec0e4;
  font-size: 0.92rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7fc4ff;
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .site-nav a {
    padding: 0.4rem 0.62rem;
    font-size: 0.82rem;
  }

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    right: 4vw;
    top: 65px;
    width: min(270px, 88vw);
    padding: 0.55rem;
    border-radius: 12px;
    background: rgba(7, 27, 52, 0.95);
    border: 1px solid rgba(123, 178, 239, 0.28);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-grid,
  .daily-brief-grid,
  .cart-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .admin-grid-2,
  .quiz-editor-options {
    grid-template-columns: 1fr;
  }

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

  .footer-wrap {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .product-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .quiz-nav {
    flex-direction: column;
  }
}
