/* ==========================================================================
   Northern Facet Theme — canadadiamonds.com
   Design System: Colors, Typography, Layout, Components
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  /* Colors from logo: ice-blue diamond + Canadian red maple leaf */
  --clr-main: #5B8FAF;
  --clr-main-dark: #3D6B8A;
  --clr-main-light: #8BB5CE;
  --c-brand: #C8232C;
  --c-brand-dark: #9E1B22;
  --clr-bg: #F8FAFB;
  --clr-bg-alt: #EDF2F5;
  --clr-text: #2C3E50;
  --clr-text-muted: #6C7A89;
  --clr-diamond: #D4E6F1;
  --clr-border: #D5DDE3;
  --clr-white: #FFFFFF;
  --clr-overlay: rgba(44, 62, 80, 0.65);

  /* Typography */
  --ff-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ff-body: 'Source Sans 3', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.25rem;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Layout */
  --wrap-width: 1140px;
  --gap: 1.5rem;
  --gap-lg: 2.5rem;
  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 6px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.25s;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--clr-main);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--clr-main-dark);
}

ul, ol {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--clr-text);
}

h1 { font-size: var(--fs-4xl); margin-bottom: 1rem; }
h2 { font-size: var(--fs-3xl); margin-bottom: 0.875rem; }
h3 { font-size: var(--fs-2xl); margin-bottom: 0.75rem; }
h4 { font-size: var(--fs-xl); margin-bottom: 0.625rem; }
h5 { font-size: var(--fs-lg); margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.25rem;
}

blockquote {
  border-left: 3px solid var(--clr-main);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--clr-bg-alt);
  font-style: italic;
  color: var(--clr-text-muted);
}

/* --- Layout --- */
.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background-color: var(--clr-bg-alt);
}

.section--dark {
  background-color: var(--clr-main-dark);
  color: var(--clr-white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--clr-white);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Flex */
.flex {
  display: flex;
  gap: var(--gap);
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

/* --- Masthead / Header --- */
.masthead {
  background: var(--clr-white);
  border-bottom: 2px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand__logo {
  height: 48px;
  width: auto;
}

.brand__name {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--clr-main-dark);
  line-height: 1.2;
}

.brand__name span {
  color: var(--c-brand);
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--clr-text);
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--clr-main);
}

/* Dropdown */
.site-nav__item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--duration) var(--ease);
  z-index: 100;
}

.dropdown__link {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--clr-text);
  transition: background var(--duration) var(--ease);
}

.dropdown__link:hover {
  background: var(--clr-bg-alt);
  color: var(--clr-main);
}

/* Hamburger */
.ham-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.ham-btn__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  transition: all var(--duration) var(--ease);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--clr-main-dark);
  color: var(--clr-white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.hero--home .hero__content {
  padding: 6rem 1.25rem;
}

.hero h1 {
  color: var(--clr-white);
  font-size: var(--fs-4xl);
  max-width: 720px;
}

.hero__subtitle {
  font-size: var(--fs-lg);
  max-width: 600px;
  margin-top: 1rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero__cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.875rem 2rem;
  background: var(--c-brand);
  color: var(--clr-white);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease);
}

.hero__cta:hover {
  background: var(--c-brand-dark);
  color: var(--clr-white);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 1rem 0;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.breadcrumbs a {
  color: var(--clr-text-muted);
}

.breadcrumbs a:hover {
  color: var(--clr-main);
}

.breadcrumbs__sep {
  margin: 0 0.4rem;
}

/* --- Cards --- */
.card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--clr-main);
}

.card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem;
}

.card__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-main);
  margin-bottom: 0.5rem;
}

.card__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card__title a {
  color: var(--clr-text);
}

.card__title a:hover {
  color: var(--clr-main);
}

.card__excerpt {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* --- Stat Boxes --- */
.stat-box {
  text-align: center;
  padding: 1.5rem;
}

.stat-box__number {
  font-family: var(--ff-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--clr-main);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-box__label {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Highlight Box --- */
.highlight {
  background: var(--clr-diamond);
  border-left: 4px solid var(--clr-main);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.highlight p:last-child {
  margin-bottom: 0;
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.data-table th {
  background: var(--clr-main-dark);
  color: var(--clr-white);
  font-weight: var(--fw-semibold);
  text-align: left;
  padding: 0.75rem 1rem;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--clr-border);
}

.data-table tbody tr:hover {
  background: var(--clr-bg-alt);
}

.data-table--striped tbody tr:nth-child(even) {
  background: var(--clr-bg-alt);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: center;
}

.btn--primary {
  background: var(--clr-main);
  color: var(--clr-white);
}

.btn--primary:hover {
  background: var(--clr-main-dark);
  color: var(--clr-white);
}

.btn--brand {
  background: var(--c-brand);
  color: var(--clr-white);
}

.btn--brand:hover {
  background: var(--c-brand-dark);
  color: var(--clr-white);
}

.btn--outline {
  background: transparent;
  border-color: var(--clr-main);
  color: var(--clr-main);
}

.btn--outline:hover {
  background: var(--clr-main);
  color: var(--clr-white);
}

/* --- Content Area --- */
.content-area {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.content-area h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
  font-size: var(--fs-2xl);
}

.content-area h3 {
  margin-top: 2rem;
  font-size: var(--fs-xl);
}

.content-area ul,
.content-area ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.content-area ul {
  list-style: disc;
}

.content-area ol {
  list-style: decimal;
}

.content-area li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.content-area img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

/* --- FAQ Section --- */
.faq__item {
  border-bottom: 1px solid var(--clr-border);
  padding: 1.25rem 0;
}

.faq__q {
  font-family: var(--ff-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--clr-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq__q::after {
  content: '+';
  font-size: var(--fs-xl);
  color: var(--clr-main);
  flex-shrink: 0;
}

.faq__item--open .faq__q::after {
  content: '\2212';
}

.faq__a {
  display: none;
  padding-top: 0.75rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
}

.faq__item--open .faq__a {
  display: block;
}

/* --- Footer --- */
.site-footer {
  background: var(--clr-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-block__heading {
  font-family: var(--ff-heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  margin-bottom: 1rem;
}

.footer-block p {
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-block__links {
  list-style: none;
}

.footer-block__links li {
  margin-bottom: 0.4rem;
}

.footer-block__links a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--duration) var(--ease);
}

.footer-block__links a:hover {
  color: var(--clr-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  text-align: center;
  font-size: var(--fs-xs);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: var(--clr-white);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--clr-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --fs-4xl: 2.25rem;
    --fs-3xl: 1.875rem;
    --fs-2xl: 1.5rem;
  }

  .masthead__inner { height: 60px; }
  .brand__logo { height: 40px; }

  .ham-btn { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--clr-white);
    border-bottom: 2px solid var(--clr-border);
    padding: 1rem 0;
    flex-direction: column;
  }

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

  .site-nav__list {
    flex-direction: column;
    width: 100%;
  }

  .site-nav__link {
    padding: 0.75rem 1.25rem;
    width: 100%;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    padding: 0 0 0 1rem;
    min-width: 0;
    box-shadow: none;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

  .hero__content { padding: 3.5rem 1.25rem; }
  .section { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  :root {
    --fs-4xl: 1.875rem;
    --fs-3xl: 1.5rem;
  }

  .hero__content { padding: 2.5rem 1rem; }
  .content-area { padding: 1.5rem 1rem 3rem; }
}

/* --- Hamburger Active State --- */
.ham-btn--active .ham-btn__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ham-btn--active .ham-btn__bar:nth-child(2) {
  opacity: 0;
}
.ham-btn--active .ham-btn__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown */
@media (max-width: 768px) {
  .site-nav__item .dropdown {
    display: none;
  }
  .site-nav__item--open .dropdown {
    display: block;
  }
}

/* --- Diamond Price Calculator --- */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calc-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-white);
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236C7A89' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.calc-field select:focus {
  outline: none;
  border-color: var(--clr-main);
}

.calc-field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.calc-hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-top: 0.25rem;
}

.calc-result {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calc-result__inner {
  padding: 2rem;
  text-align: center;
}

.calc-result__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
  margin-bottom: 0.5rem;
}

.calc-result__price {
  font-family: var(--ff-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: var(--clr-main-dark);
  margin-bottom: 0.25rem;
}

.calc-result__ppc {
  font-size: var(--fs-md);
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
}

.calc-result__note {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.calc-dcx {
  background: var(--clr-main-dark);
  color: var(--clr-white);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calc-dcx__title {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 0;
}

.calc-dcx__value {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: 0;
}

.calc-dcx__trend {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: 0;
}

.calc-dcx__trend--up { color: #27ae60; }
.calc-dcx__trend--down { color: #e74c3c; }

.calc-fallback {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem;
}

@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Mine Map --- */
#mine-map {
  width: 100%;
  height: 550px;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  background: var(--clr-bg-alt);
}

.mine-marker {
  background: none !important;
  border: none !important;
}

.mine-popup {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.5;
  max-width: 280px;
}

.mine-popup strong {
  font-size: var(--fs-base);
  color: var(--clr-text);
}

.mine-popup__status {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  margin: 0.25rem 0;
}

.mine-popup__status--active { background: #d5f5e3; color: #1e8449; }
.mine-popup__status--closed { background: #ebedef; color: #5d6d7e; }
.mine-popup__status--exploration { background: #fdebd0; color: #b9770e; }

.mine-popup__notes {
  color: var(--clr-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.map-legend {
  background: var(--clr-white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  line-height: 1.8;
  border: 1px solid var(--clr-border);
}

.map-legend strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--fs-sm);
}

.map-legend div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-stats {
  display: flex;
  gap: var(--gap-lg);
  justify-content: center;
  padding: 1rem 0;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  flex-wrap: wrap;
}

.map-fallback {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.map-fallback ul {
  list-style: disc;
  margin: 0.75rem 0 0.75rem 1.5rem;
}

@media (max-width: 768px) {
  #mine-map { height: 400px; }
}

/* --- Charts --- */
.chart-container {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
}

.chart-container--line,
.chart-container--bar {
  height: 380px;
}

.chart-container--doughnut {
  height: 340px;
}

.chart-container--horizontal {
  height: 420px;
}

@media (max-width: 768px) {
  .chart-container--line,
  .chart-container--bar {
    height: 300px;
  }
  .chart-container--doughnut {
    height: 300px;
  }
  .chart-container--horizontal {
    height: 380px;
  }
}

/* --- News Feed --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--clr-border);
}

.news-item:first-child {
  padding-top: 0;
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
}

.news-item__source {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--clr-main);
}

.news-item__date {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

.news-item__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  margin-bottom: 0.375rem;
}

.news-item__title a {
  color: var(--clr-text);
  transition: color var(--duration) var(--ease);
}

.news-item__title a:hover {
  color: var(--clr-main);
}

.news-item__excerpt {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.news-attribution {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  text-align: center;
  margin-top: 1.5rem;
  font-style: italic;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-main);
  color: var(--clr-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration) var(--ease);
  z-index: 999;
  font-size: 1.25rem;
  line-height: 1;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--clr-main-dark);
}

/* --- Homepage Sections --- */
.hp-section-heading {
  font-size: var(--fs-3xl);
  margin-bottom: 0.5rem;
}

.hp-section-sub {
  font-size: var(--fs-md);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.hp-stats .stat-box__number {
  color: var(--clr-white);
  font-size: var(--fs-4xl);
}

.hp-stats .stat-box__label {
  color: rgba(255, 255, 255, 0.75);
}

/* Price Teaser */
.hp-price-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: center;
}

.hp-price-teaser__text h2 {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 768px) {
  .hp-price-teaser {
    grid-template-columns: 1fr;
  }
}

/* Homepage cards as links */
.card[href] {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card[href]:hover {
  color: inherit;
}

/* --- 4Cs Widgets --- */
.cw-clarity, .cw-color, .cw-cut, .cw-carat {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

/* Slider */
.cw-slider-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  margin-bottom: 0.5rem;
}

.cw-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--clr-bg-alt);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.cw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--clr-main);
  border: 2px solid var(--clr-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.cw-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--clr-main);
  border: 2px solid var(--clr-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.cw-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-top: 0.375rem;
}

/* Clarity Widget */
.cw-clarity__loupe {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 35%, #fff 0%, #e8f0f8 50%, #c5d9e8 100%);
  border: 3px solid var(--clr-main-light);
  overflow: hidden;
}

.cw-clarity__diamond {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
}

.cw-inclusion {
  position: absolute;
  border-radius: 50%;
  background: #555;
  pointer-events: none;
}

.cw-clarity__label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--clr-main-dark);
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.cw-clarity__controls { margin-bottom: 1.5rem; }

.cw-clarity__info h4 {
  font-family: var(--ff-heading);
  color: var(--clr-main-dark);
  margin-bottom: 0.5rem;
}

.cw-price-indicator {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

/* Color Widget */
.cw-color__preview {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cw-color__diamond-shape {
  width: 140px;
  height: 140px;
  clip-path: polygon(50% 0%, 100% 35%, 85% 100%, 15% 100%, 0% 35%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  position: relative;
}

.cw-color__grade-label {
  font-family: var(--ff-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: rgba(0,0,0,0.15);
}

.cw-color__swatches {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cw-color-swatch {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 2px solid var(--clr-border);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--duration) var(--ease);
  font-family: var(--ff-body);
}

.cw-color-swatch:hover {
  border-color: var(--clr-main);
}

.cw-color-swatch--active {
  border-color: var(--clr-main-dark);
  border-width: 3px;
}

.cw-color__info h4 {
  font-family: var(--ff-heading);
  color: var(--clr-main-dark);
  margin-bottom: 0.5rem;
}

/* Cut Widget */
.cw-cut__visual {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cw-cut__svg {
  width: 200px;
  height: 160px;
  flex-shrink: 0;
}

.cw-cut__meter {
  flex: 1;
  min-width: 180px;
}

.cw-cut__meter-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  margin-bottom: 0.375rem;
}

.cw-cut__meter-bar {
  height: 12px;
  background: var(--clr-bg-alt);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--clr-border);
}

.cw-cut__meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-brand), var(--clr-main));
  border-radius: 6px;
  transition: width 0.4s var(--ease);
}

.cw-cut__meter-value {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--clr-main-dark);
  margin-top: 0.25rem;
}

.cw-cut__buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cw-cut-btn {
  padding: 0.5rem 1rem;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-white);
  color: var(--clr-text);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.cw-cut-btn:hover {
  border-color: var(--clr-main);
  color: var(--clr-main);
}

.cw-cut-btn--active {
  background: var(--clr-main);
  color: var(--clr-white);
  border-color: var(--clr-main);
}

.cw-cut__info h4 {
  font-family: var(--ff-heading);
  color: var(--clr-main-dark);
  margin-bottom: 0.5rem;
}

.cw-cut__angles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

/* Carat Widget */
.cw-carat__visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  min-height: 140px;
  flex-wrap: wrap;
}

.cw-carat-circle {
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 35%, #fff 0%, var(--clr-diamond) 60%, var(--clr-main-light) 100%);
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  flex-shrink: 0;
}

.cw-carat-circle span {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.cw-carat-circle:hover {
  border-color: var(--clr-main);
}

.cw-carat-circle--active {
  border-color: var(--clr-main-dark);
  border-width: 3px;
  background: radial-gradient(ellipse at 35% 35%, #fff 0%, #D4E6F1 50%, var(--clr-main) 100%);
}

.cw-carat-circle--active span {
  color: var(--clr-white);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cw-carat__controls { margin-bottom: 1.5rem; }

.cw-carat__info h4 {
  font-family: var(--ff-heading);
  color: var(--clr-main-dark);
  margin-bottom: 0.5rem;
}

/* Guide page cross-links */
.guide-crosslinks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin: 2rem 0;
}

.guide-crosslink {
  display: block;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--duration) var(--ease);
}

.guide-crosslink:hover {
  border-color: var(--clr-main);
}

.guide-crosslink--active {
  background: var(--clr-main);
  color: var(--clr-white);
  border-color: var(--clr-main);
}

.guide-crosslink--active:hover {
  color: var(--clr-white);
}

.guide-crosslink__icon {
  font-size: var(--fs-2xl);
  margin-bottom: 0.25rem;
}

.guide-crosslink__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

@media (max-width: 600px) {
  .guide-crosslinks {
    grid-template-columns: repeat(2, 1fr);
  }
  .cw-carat__visual {
    gap: 0.375rem;
  }
  .cw-color-swatch {
    width: 36px;
    height: 36px;
  }
}

/* --- Print --- */
@media print {
  .masthead, .site-footer, .ham-btn, .back-to-top { display: none; }
  body { font-size: 12pt; }
  a { color: var(--clr-text); }
  #mine-map { display: none; }
}
