/* ---------------------------------------------------------------------------
 * GR-Privacy - the single stylesheet for the whole privacy centre.
 *
 * It is local by construction and must stay that way: no @import, no @font-
 * face, no remote url(), no executable mechanism. Every colour and measure is
 * a custom property declared once in this file, so the appearance of the site
 * is changed in one place and no page ever needs an inline style.
 *
 * The colours below are provisional design tokens. Both themes were checked
 * against the WCAG 2 relative-luminance contrast arithmetic before being
 * written down; the numbers are recorded in the project documentation.
 * ------------------------------------------------------------------------- */

:root {
  /* --- brand --------------------------------------------------------- */
  --brand: #172638;
  --brand-deep: #101b28;
  --brand-ink: #f2f6fa;
  --brand-ink-muted: #b7c5d3;

  /* --- light theme surfaces and ink ---------------------------------- */
  --page: #f4f7fa;
  --panel: #ffffff;
  --ink: #16222e;
  --ink-muted: #4e5d6a;
  --edge: #ccd5de;
  --link: #0a5b63;
  --link-wash: #e9f1f0;
  --focus-ring: #0a5b63;
  --focus-wash: #e9f1f0;

  /* --- layout and rhythm --------------------------------------------- */
  --column: 68rem;
  --measure: 42rem;
  --radius: 10px;
  --hairline: 1px;
  --space: 1rem;
  --icon: 3.5rem;

  font-size: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #0d1620;
    --brand-deep: #09101a;
    --brand-ink: #eef3f8;
    --brand-ink-muted: #a9b7c5;
    --page: #0f1922;
    --panel: #162331;
    --ink: #e6ecf3;
    --ink-muted: #aebbc8;
    --edge: #2c3d4e;
    --link: #79c6bf;
    --link-wash: #1d2e3a;
    --focus-ring: #8ed6cf;
    --focus-wash: #24394a;
  }
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Long addresses and email text must wrap rather than widen the page. */
p,
li,
dd,
dt,
h1,
h2,
h3,
h4,
h5,
h6,
a {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

/* --- skip link ------------------------------------------------------- */

.skip-link {
  display: inline;
  padding: 0.25rem 0.5rem;
  color: var(--link);
}

/* --- header band ----------------------------------------------------- */

header {
  background: var(--brand);
  color: var(--brand-ink);
  border-bottom: var(--hairline) solid var(--brand-deep);
}

header > .site-inner {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0.9rem 1.35rem;
}

header > .site-inner > p {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

header > .site-inner > p > a {
  color: var(--brand-ink);
  text-decoration: none;
}

header > .site-inner > p > a:focus {
  color: var(--brand-ink);
  background: var(--focus-wash);
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- navigation ------------------------------------------------------ */

.site-nav {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
}

.site-nav a {
  display: block;
  color: var(--brand-ink);
  padding: 0.35rem 0.6rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-nav a:focus {
  color: var(--brand-ink);
  background: var(--focus-wash);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
  border-radius: 3px;
}

@media (max-width: 29.999rem) {
  .site-nav {
    margin: 0.75rem 0 0;
  }
}

/* --- the content panel ----------------------------------------------- */

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 1.5rem 1.35rem 2rem;
  background: var(--panel);
  color: var(--ink);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
}

main > h1 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
}

main > h2,
main > section > h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
}

main > p,
main > section > p {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

main > ul,
main > ol {
  max-width: var(--measure);
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

main > ul > li,
main > ol > li {
  margin: 0.25rem 0;
}

h3,
h4,
h5,
h6 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.4rem;
  font-weight: 700;
}

/* --- links ----------------------------------------------------------- */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

a:visited {
  color: var(--link);
}

a:focus {
  color: var(--link);
  background: var(--focus-wash);
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

a:focus:not(:focus-visible) {
  outline: none;
  background: none;
}

a:focus-visible {
  color: var(--link);
  background: var(--focus-wash);
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- application directory ------------------------------------------- */

.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space);
  align-items: start;
  margin: 0 0 1.5rem;
}

.app-card {
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
}

.app-card > h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.15rem;
}

.app-card > .app-platforms {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
}

.app-card > p {
  margin: 0.5rem 0 0;
}

.app-icon {
  display: block;
  width: var(--icon);
  height: var(--icon);
  margin: 0 0 0.75rem;
  object-fit: contain;
  background: var(--panel);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
}

.app-icon-fallback {
  display: block;
  width: var(--icon);
  height: var(--icon);
  margin: 0 0 0.75rem;
  background: var(--link-wash);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
}

.empty-state {
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* --- notices and metadata -------------------------------------------- */

.notice {
  padding: 0.85rem 1.1rem;
  background: var(--link-wash);
  border-left: 4px solid var(--link);
  border-radius: 4px;
  max-width: var(--measure);
}

.notice > p {
  margin: 0 0 0.5rem;
}

.policy-meta {
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem 1.1rem;
  background: var(--panel);
  border: var(--hairline) solid var(--edge);
  border-radius: var(--radius);
}

.policy-meta dt {
  font-weight: 700;
}

.policy-meta dd {
  margin: 0 0.35rem;
}

dl {
  margin: 0.75rem 0 1.25rem;
}

dt,
dd {
  margin: 0;
}

address {
  font-style: normal;
}

blockquote {
  margin: 1rem 0 1rem 1.25rem;
  color: var(--ink-muted);
}

code,
var,
samp,
kbd {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.92rem;
}

/* --- history and contact blocks -------------------------------------- */

.history-list {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.history-list > li {
  margin: 0.3rem 0;
}

.contact-entry {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--link);
  border-radius: 4px;
  max-width: var(--measure);
}

.contact-entry > h2 {
  margin: 0 0.4rem;
  font-size: 1.1rem;
}

.contact-entry > dl {
  margin: 0.4rem 0;
  padding: 0;
  border: none;
  background: none;
}

.contact-entry > dl > dd,
.contact-entry > dl > dt {
  margin: 0 0.25rem;
}

.page-nav {
  margin: 1.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.page-nav a {
  display: block;
  margin: 0.35rem 0;
}

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

footer {
  max-width: var(--column);
  margin: 0 auto;
  padding: 1.25rem 1.35rem 1.75rem;
  color: var(--ink-muted);
}

footer > p {
  margin: 0 0 0.5rem;
  max-width: var(--measure);
}

footer > p > a {
  color: var(--link);
}

/* --- wide and narrow refinements ------------------------------------- */

@media (min-width: 60rem) {
  main {
    padding: 2rem 2rem 2.5rem;
  }
}

@media (max-width: 29.999rem) {
  main {
    border: none;
    border-radius: 0;
    padding: 1.25rem 1rem 1.75rem;
  }
  .app-list {
    grid-template-columns: 1fr;
  }
}

/* --- motion ---------------------------------------------------------- */

/* No transition or animation is introduced anywhere in this stylesheet.
   The guard below is defensive: if a future stage adds motion, readers who
   ask for reduced motion still get a page without it. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none;
    animation: none;
  }
}

/* --- print ----------------------------------------------------------- */

@media print {
  :root {
    --page: #ffffff;
    --panel: #ffffff;
    --ink: #111111;
    --ink-muted: #333333;
    --edge: #999999;
    --link: #111111;
    --link-wash: #ffffff;
    --focus-ring: #111111;
    --focus-wash: #ffffff;
  }
  header,
  footer,
  .site-nav,
  .page-nav,
  .skip-link {
    display: none;
  }
  main {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
  }
  .app-card,
  .notice,
  .policy-meta,
  .contact-entry,
  .empty-state {
    border: var(--hairline) solid var(--edge);
    background: none;
  }
  .app-icon,
  .app-icon-fallback {
    display: none;
  }
  main > h1,
  main > h2,
  main > section > h2 {
    page-break-after: avoid;
  }
  p,
  li {
    orphans: 2;
    widows: 2;
  }
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85rem;
  }
}
