/* Shared styling for the standalone pages on plusheat.io — /privacy, /support
   and the 404.

   These three used to carry ~10KB of near-identical CSS inline, three copies
   that had already drifted: the measure was 760px on one and 720px on the
   others, the h1 was a fixed 40px on one and fluid on the others, and only one
   had a media query. Same palette in all three, so the drift was structural
   rather than visual, which is the kind that creeps.

   apps/landing has no build step — deploy-frontends.yml uploads the directory
   as-is — so a plain stylesheet linked with an absolute path is the whole
   mechanism. Absolute, not relative, because /privacy/ and /support/ sit one
   directory deeper than 404.html.

   The marketing homepage (index.html) is deliberately NOT on this: it is a
   different kind of page with its own art direction, and pulling it in here
   would mean this file has to serve two masters. */

:root {
  --orange: #f27b05;
  --ink: #161616;
  --muted: #4d4c47;
  --faint: #706f68;
  --tint: #f8f7f4;
  --line: #ececea;
  --white: #fff;

  --measure: 720px;
  --gutter: 24px;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: the 404 and /support are short enough to leave a gap. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--orange);
}

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

/* One shared width rule rather than three scoped ones. Scoping it per section
   (header .inner, then main .inner, then footer .inner) makes each later rule
   LOWER specificity than the first — the descending-specificity trap the root
   CLAUDE.md warns about, and what Biome flagged on the first support page. */
.inner {
  max-width: var(--measure);
  margin: 0 auto;
  width: 100%;
}

/* ── chrome ─────────────────────────────────────────────────────── */

header.top {
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--line);
}
header.top img {
  height: 26px;
}

main {
  flex: 1;
  padding: 56px var(--gutter) 88px;
}

footer.bottom {
  padding: 28px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  background: var(--tint);
}
footer.bottom .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  font-size: 14px;
  color: var(--faint);
}
footer.bottom p {
  margin: 0;
}
footer.bottom a {
  color: var(--faint);
  text-decoration: none;
}
footer.bottom a:hover {
  text-decoration: underline;
}

/* ── type ───────────────────────────────────────────────────────── */

/* Fluid rather than stepped at one breakpoint: these pages are read on an
   engineer's phone as often as a desktop. */
h1 {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}

h2 {
  font-size: clamp(20px, 3.2vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h3 {
  font-size: 17px;
  margin: 26px 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
}

/* The standfirst under an h1. */
p.lede {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 40px;
  max-width: 56ch;
}

/* A date or status line directly under the h1. */
.updated {
  color: var(--faint);
  font-size: 15px;
  margin: 0 0 40px;
}

/* Small uppercase label — the 404's "Error 404", a section eyebrow. */
.code {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--muted);
}
li {
  margin: 0 0 8px;
}
li:last-child {
  margin-bottom: 0;
}
li strong {
  color: var(--ink);
}

section {
  margin: 0 0 44px;
}
section:last-of-type {
  margin-bottom: 0;
}

/* ── boxes ──────────────────────────────────────────────────────── */

/* Tinted opening panel. */
.intro {
  background: var(--tint);
  border-radius: 20px;
  padding: 24px 28px;
  margin: 0 0 44px;
  font-size: 16px;
}
.intro p:last-child {
  margin-bottom: 0;
}

/* Outlined identity panel — who the data controller is. */
.who {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 28px;
  margin: 0 0 44px;
}
.who strong {
  display: block;
  color: var(--orange);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.who p {
  margin: 0 0 4px;
}
.who p:last-child {
  margin-bottom: 0;
}
.who a {
  text-decoration: none;
}
.who a:hover {
  text-decoration: underline;
}

/* Rule-marked aside for a point that needs to stand out. */
.flag {
  border-left: 3px solid var(--orange);
  padding: 4px 20px;
  margin: 0 0 44px;
}
.flag p {
  margin: 0;
}
.flag strong {
  color: var(--ink);
}

/* ── table ──────────────────────────────────────────────────────── */

/* Wrapped in .scroll so a narrow phone scrolls the TABLE, never the page. */
.scroll {
  overflow-x: auto;
  margin: 0 0 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--faint);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
td {
  color: var(--muted);
}
td:first-child {
  color: var(--ink);
  font-weight: 500;
}

/* ── row lists ──────────────────────────────────────────────────── */

/* Label on the left, value on the right, wrapping to two lines on a phone.
   Used for the support contact rows and the 404's list of real pages. */
ul.rows {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
ul.rows li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
ul.rows .row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 16px 2px;
}
ul.rows a.row {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
ul.rows a.row:hover {
  color: var(--orange);
}
ul.rows .what {
  font-weight: 500;
  color: var(--ink);
}
ul.rows .when {
  font-size: 14px;
  color: var(--faint);
}
ul.rows .value {
  font-weight: 600;
  white-space: nowrap;
  color: var(--orange);
  text-decoration: none;
}
ul.rows .value:hover {
  text-decoration: underline;
}
ul.rows .arrow {
  color: var(--faint);
}


/* Footer nav. All three pages carried a different footer before this — one had
   a logo and "All Rights Reserved", one had two links, one had a sentence —
   and even the entity name disagreed ("PlusHeat" vs "PlusHeat Ltd"). The legal
   name is the one the privacy policy identifies as the data controller. */
footer.bottom .flinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
footer.bottom .flinks a {
  color: var(--faint);
  text-decoration: none;
}
footer.bottom .flinks a:hover {
  color: var(--orange);
  text-decoration: underline;
}

@media (max-width: 600px) {
  main {
    padding: 40px 20px 72px;
  }
  header.top,
  footer.bottom {
    padding-left: 20px;
    padding-right: 20px;
  }
  .intro,
  .who {
    padding: 20px;
    border-radius: 16px;
  }
}
