/* ------------------------------------------------------------------
   sjec.my — SJEC Issue and Warranty Tracker
   Brand tokens taken from the app's own theme (lib/core/theme/app_theme.dart)
   so the website and the application cannot drift apart.
   ------------------------------------------------------------------ */

:root {
  --teal: #00AAAC;          /* Verdigris — brand primary */
  --orange: #F26524;        /* Orange Red — brand secondary */
  --navy: #3F4171;          /* Purple Navy — the wordmark colour */

  --ground: #F4F7F7;        /* neutral, biased a touch toward the teal */
  --surface: #FFFFFF;
  --surface-sunk: #EDF2F2;
  --ink: #171C22;
  --ink-soft: #55616B;
  --ink-faint: #7D8A93;
  --rule: #D9E2E2;
  --accent: var(--teal);
  --accent-ink: #00686A;    /* teal dark enough for text on white */
  --focus: #00AAAC;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #10151A;
    --surface: #171D24;
    --surface-sunk: #1E252D;
    --ink: #E7EBEE;
    --ink-soft: #A7B3BC;
    --ink-faint: #7E8B95;
    --rule: #2A333C;
    --accent: #3FC9C9;
    --accent-ink: #5FD6D6;
    --navy: #A5A8DC;
    --focus: #3FC9C9;
  }
}

:root[data-theme="dark"] {
  --ground: #10151A;
  --surface: #171D24;
  --surface-sunk: #1E252D;
  --ink: #E7EBEE;
  --ink-soft: #A7B3BC;
  --ink-faint: #7E8B95;
  --rule: #2A333C;
  --accent: #3FC9C9;
  --accent-ink: #5FD6D6;
  --navy: #A5A8DC;
  --focus: #3FC9C9;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Lato, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------- masthead */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  max-width: 760px;
  margin: 0 auto;
  padding-block: 18px;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.masthead img { height: 34px; width: auto; }

.masthead__rule {
  width: 1px;
  align-self: stretch;
  background: var(--rule);
}

.masthead__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

/* ------------------------------------------------------------ shell */

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding-block: 44px 64px;
  padding-inline: 20px;
}

.doc-title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--navy);
  text-wrap: balance;
}

.doc-sub {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 22px;
  text-wrap: balance;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-block: 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 34px;
}
.doc-meta b { color: var(--ink-soft); font-weight: 700; }

h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
  margin: 46px 0 12px;
  color: var(--navy);
  text-wrap: balance;
}

h2 .num {
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 3px;
}

h3 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 26px 0 8px;
  color: var(--ink);
}

p { margin: 0 0 14px; max-width: 68ch; }

ul { margin: 0 0 16px; padding-left: 20px; max-width: 68ch; }
li { margin-bottom: 7px; }
li::marker { color: var(--accent); }

strong { font-weight: 900; }

/* ------------------------------------------------------- summary box */

.summary {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.summary__row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0 20px;
  padding: 13px 18px;
  border-top: 1px solid var(--rule);
  font-size: 15.5px;
}
.summary__row:first-child { border-top: 0; }

.summary__row dt {
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}
.summary__row dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 560px) {
  .summary__row { grid-template-columns: 1fr; gap: 3px; }
}

/* ------------------------------------------------------------ notes */

.note {
  background: var(--surface-sunk);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 15px 18px;
  margin: 22px 0;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* ------------------------------------------------------- contact box */

.contact {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px;
  margin-top: 14px;
}
.contact address {
  font-style: normal;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.contact .who {
  font-weight: 900;
  color: var(--ink);
  font-style: normal;
  display: block;
  margin-bottom: 3px;
}

/* ------------------------------------------------------------ steps */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 18px;
  max-width: 68ch;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--accent);
  color: #06282A;
  font-weight: 900;
  font-size: 14px;
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------- home */

.hero-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
}
.hero-card img { height: 64px; width: auto; margin-bottom: 18px; }

.links { display: grid; gap: 12px; margin-top: 30px; }

.link-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 17px 20px;
  text-decoration: none;
  color: inherit;
}
.link-card:hover { border-color: var(--accent); }
.link-card b { display: block; font-size: 17px; font-weight: 900; margin-bottom: 2px; }
.link-card span { color: var(--ink-soft); font-size: 15px; }

/* ----------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 54px;
  padding-top: 22px;
  font-size: 14px;
  color: var(--ink-faint);
}
.foot p { margin-bottom: 8px; max-width: 68ch; }
.foot a { color: var(--ink-soft); }

.backlink {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 15px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
