/* =========================================================
   Article Design System
   Reusable stylesheet for editorial, review, news, and resource pages
   Load this AFTER the site's existing stylesheet.
   ========================================================= */

:root {
  --brand-primary: #002529;
  --brand-text: #002529;
  --brand-text-subtle: #4a5667;
  --brand-bg: #ffffff;
  --brand-page-bg: #f7fbfc;
  --brand-tint: #c7f5f9;
  --brand-fill: #0e9cad;
  --brand-accent: #9aedf7;
  --brand-border: #e5eef0;
  --font-heading: "Satoshi Variable", Satoshi, Inter, sans-serif;
  --font-body: "Inter Variable", Inter, sans-serif;
  --measure: 1120px;
  --reading-measure: 760px;
  --space-1: 0.4rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --shadow-soft: 0 12px 36px rgba(0, 37, 41, 0.08);
  --shadow-lift: 0 20px 60px rgba(0, 37, 41, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 01. Base type and document canvas */
html {
  scroll-behavior: smooth;
  background: var(--brand-page-bg);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(154, 237, 247, 0.28), transparent 28rem),
    var(--brand-page-bg);
  color: var(--brand-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand-primary);
  color: var(--brand-bg);
}

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

a {
  color: var(--brand-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color 180ms var(--ease), opacity 180ms var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--brand-fill);
}

/* 02. Article shell: supports common CMS wrappers and plain unclassed pages */
main,
#body-wrap,
#content-wrap,
article,
#content {
  box-sizing: border-box;
}

#body-wrap,
#content-wrap,
main {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
}

#body-wrap,
main {
  padding-block: var(--space-7);
}

article#content,
main article,
.article-content,
.post-content,
.entry-content {
  width: min(100%, var(--reading-measure));
  margin-inline: auto;
}

article#content::before,
main article::before,
.article-content::before,
.post-content::before,
.entry-content::before {
  content: "ARTICLE / 2026";
  display: block;
  margin-bottom: var(--space-3);
  color: var(--brand-fill);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* 03. Editorial hierarchy
   Width + centring is applied directly on each element (not via a
   parent wrapper selector), so headings and text are styled correctly
   no matter how deeply they are nested in the page markup. */
:where(h1, h2, h3, h4, p, ul, ol, table, blockquote, figure) {
  box-sizing: border-box;
  width: min(100% - 2rem, var(--reading-measure));
  margin-inline: auto;
}

table {
  width: min(100% - 2rem, var(--measure));
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  max-width: 900px;
  margin-bottom: var(--space-5);
  padding-top: var(--space-7);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
}

h2 {
  position: relative;
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  padding-top: var(--space-4);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3.25rem;
  height: 0.24rem;
  border-radius: 999px;
  background: var(--brand-fill);
}

h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

h4 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--brand-text-subtle);
}

article#content > p:first-of-type,
main article > p:first-of-type,
.article-content > p:first-of-type,
.post-content > p:first-of-type,
.entry-content > p:first-of-type {
  color: var(--brand-text);
  font-size: 1.15rem;
  line-height: 1.62;
}

strong {
  color: var(--brand-text);
  font-weight: 750;
}

/* 04. Lists and quotes */
ul,
ol {
  margin-top: 0;
  margin-bottom: var(--space-5);
  padding-left: 1.35rem;
  color: var(--brand-text-subtle);
}

li {
  margin-block: 0.45rem;
  padding-left: 0.25rem;
}

li::marker {
  color: var(--brand-fill);
  font-weight: 800;
}

blockquote {
  position: relative;
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--brand-border);
  border-left: 0.35rem solid var(--brand-fill);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--brand-bg);
  box-shadow: var(--shadow-soft);
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-size: 1.18rem;
  line-height: 1.5;
}

/* 05. Comparison tables */
table {
  margin-top: var(--space-5);
  margin-bottom: var(--space-6);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  background: var(--brand-bg);
  box-shadow: var(--shadow-soft);
  color: var(--brand-text-subtle);
  font-size: 0.94rem;
  line-height: 1.45;
}

caption {
  padding: var(--space-3);
  color: var(--brand-text-subtle);
  font-size: 0.9rem;
  text-align: left;
}

th,
td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--brand-border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--brand-primary);
  color: var(--brand-bg);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: rgba(199, 245, 249, 0.22);
}

tbody tr:hover td {
  background: var(--brand-tint);
  color: var(--brand-text);
}

/* 06. Media and interactive elements */
figure {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

figcaption {
  margin-top: var(--space-2);
  color: var(--brand-text-subtle);
  font-size: 0.85rem;
}

hr {
  margin: var(--space-6) 0;
  border: 0;
  border-top: 1px solid var(--brand-border);
}

input,
textarea,
select,
button {
  box-sizing: border-box;
  max-width: 100%;
  font: inherit;
}

button,
input[type="submit"],
.button,
.cta,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  background: var(--brand-primary);
  color: var(--brand-bg);
  font-family: var(--font-heading);
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

button:hover,
input[type="submit"]:hover,
.button:hover,
.cta:hover,
a.button:hover {
  background: var(--brand-fill);
  color: var(--brand-bg);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

/* 08. Responsive behaviour */
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  #body-wrap,
  #content-wrap,
  main {
    width: min(100% - 1.25rem, var(--measure));
    padding-block: var(--space-5);
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  h2 {
    margin-top: var(--space-6);
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  th,
  td {
    min-width: 11rem;
  }

  blockquote {
    padding: var(--space-4);
  }

  :where(h1, h2, h3, h4, p, ul, ol, table, blockquote, figure) {
    width: min(100% - 1.25rem, var(--reading-measure));
  }
}

/* 09. Reduced motion and print */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  html,
  body {
    background: var(--brand-bg);
  }

  #body-wrap,
  #content-wrap,
  main {
    width: 100%;
    padding: 0;
  }

  nav,
  aside,
  button,
  .button,
  .cta {
    display: none !important;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    break-after: avoid;
  }

  p,
  li {
    color: var(--brand-text);
  }
}