/* ==========================================================================
   Writask — legal pages (/privacy, /terms and their /en/ twins).

   Deliberately standalone rather than an add-on to styles.css: that sheet is
   667 lines of landing-page scaffolding and phone mockups, none of which a
   policy page needs. Only the tokens used here are mirrored, from the same
   single source of truth as styles.css — frontend/lib/features/
   sector_experience/presentation/widgets/sector_ui_theme.dart. Change the
   Dart tokens first, then mirror.

   The page must also survive being printed and being read on a phone: these
   are the two ways anyone actually reads a privacy policy.
   ========================================================================== */

@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/nunito-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/nunito-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fafaf8;
  --surface: #fff;
  --line: #eceae4;
  --ink: #16181d;
  --ink-2: #6e7278;
  --ink-3: #7e8085;
  --accent: #0f5d4e;
  --accent-tint: #eaf3ef;
  --r-card: 18px;
  --measure: 42rem;
}

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

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

body.legal {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* Long legal prose is read, not skimmed; let the browser hyphenate rather
     than leave rivers of space in justified Turkish compounds. */
  overflow-wrap: break-word;
}

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

.legal-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 22px 20px 0;
}

.brand-wordmark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.legal-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.legal-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

/* --- document ----------------------------------------------------------- */

.legal-main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px 32px 40px;
  margin-top: 26px;
}

.legal-doc h1 {
  font-size: clamp(26px, 5vw, 33px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.legal-stamp {
  margin: 0 0 4px;
  color: var(--ink-3);
  font-size: 14.5px;
}

.legal-doc h2 {
  /* The section number sits in its own column so the headings line up even
     when they wrap — 10) is wider than 1). */
  display: grid;
  grid-template-columns: 2.1em 1fr;
  align-items: baseline;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
  scroll-margin-top: 20px;
}

.legal-doc h2 .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal-contact-heading {
  grid-template-columns: 1fr;
}

.legal-doc p {
  margin: 0 0 14px;
  color: var(--ink);
}

.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 1.15em;
  list-style: none;
}

.legal-doc li {
  position: relative;
  margin-bottom: 9px;
}

.legal-doc li::before {
  content: '·';
  position: absolute;
  left: -1.15em;
  color: var(--accent);
  font-weight: 800;
}

.legal-doc a {
  color: var(--accent);
}

.legal-doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0 28px;
}

.legal-note {
  color: var(--ink-3);
  font-size: 14.5px;
}

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

.legal-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px 48px;
  font-size: 15px;
}

.legal-footer a {
  color: var(--ink-2);
}

/* --- narrow screens ----------------------------------------------------- */

@media (max-width: 560px) {
  body.legal {
    font-size: 16.5px;
  }

  .legal-doc {
    /* Edge-to-edge on a phone: a card inset wastes the little width there is
       and the border stops earning its keep. */
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: -20px;
    margin-right: -20px;
    padding: 28px 20px 32px;
  }

  .legal-doc h2 {
    /* A 2.1em gutter reads as a gap on a 390px screen. Two digits still fit;
       the numbers stay aligned, they just sit closer to the title. */
    grid-template-columns: 1.5em 1fr;
    font-size: 18px;
    margin-top: 30px;
  }
}

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

@media print {
  body.legal {
    background: #fff;
    font-size: 11.5pt;
  }

  .legal-header,
  .legal-footer {
    display: none;
  }

  .legal-doc {
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  .legal-doc h2 {
    break-after: avoid;
  }

  .legal-doc li,
  .legal-doc p {
    break-inside: avoid;
  }
}
