/* Δευτερεύουσες σελίδες του πρωτοτύπου (απόρρητο κ.λπ.): ίδια tokens με την αρχική, λιτή διάταξη άρθρου.
   Στη Φάση 1 γίνεται Astro layout με το κοινό tokens.css. */
@layer reset, tokens, base, layout, components;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  img, svg { display: block; max-width: 100%; }
}

@layer tokens {
  :root {
    --red: #961B1E; --red-field: #A41E22; --red-deep: #76151A;
    --cream: #FFE3A6; --cream-soft: #FDF1D6; --green: #186433;
    --paper: #FCFBF8; --ink: #171515; --ink-2: #5A524F;
    --display: "Noto Serif Display", Georgia, serif;
    --text: "Noto Serif", Georgia, serif;
    --wrap: 820px; --gutter: 16px;
  }
  @media (min-width: 760px) { :root { --gutter: 24px; } }
}

@layer base {
  html { -webkit-text-size-adjust: 100%; }
  body { background: var(--paper); color: var(--ink); font: 17px/1.65 var(--text); }
  a { color: var(--red); text-underline-offset: 3px; }
  :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
  .on-red :focus-visible { outline-color: var(--cream); }
}

@layer layout {
  .wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
  .skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--ink); color: var(--paper); padding: 10px 14px; }
  .skip:focus { top: 12px; }
}

@layer components {

  .mast { background: var(--red-field); color: var(--cream); }
  .mast__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; max-width: 1320px; }
  .mast__logo { display: block; width: 168px; height: auto; }
  .lang { display: flex; }
  .lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: color-mix(in srgb, var(--cream) 75%, transparent); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-decoration: none; }
  .lang a + a { border-left: 1px solid color-mix(in srgb, var(--cream) 35%, transparent); }
  .lang a[aria-current] { color: var(--cream); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
  .drule { display: block; height: 8px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }

  .crumbs { font-size: 14px; color: var(--ink-2); padding-top: 22px; }
  .crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  .crumbs li + li::before { content: "›"; margin-right: 6px; }

  .doc { padding-block: 10px 64px; }
  .doc h1 { font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-size: clamp(40px, 22px + 4.6vw, 64px); line-height: 1.02; margin-top: 10px; text-wrap: balance; }
  .doc .meta { color: var(--ink-2); font-size: 15px; margin-top: 10px; }
  .doc .summary { font-size: 19px; line-height: 1.55; margin-top: 18px; padding: 16px 18px; background: var(--cream-soft); border-left: 3px solid var(--red); }
  .doc h2 { font-family: var(--display); font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: 27px; line-height: 1.05; letter-spacing: .02em; margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--ink); }
  .doc h3 { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 21px; margin-top: 22px; }
  .doc p, .doc ul { margin-top: 10px; max-width: 66ch; }
  .doc ul { padding-left: 1.2em; }
  .doc li + li { margin-top: 6px; }
  .doc table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15.5px; }
  .doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
  .doc th { font-weight: 600; }
  .doc thead th { font-family: var(--display); font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: 15px; letter-spacing: .04em; border-bottom: 1px solid var(--ink); }
  @media (max-width: 640px) {
    .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; }
    .doc thead { display: none; }
    .doc tr { padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
    .doc td, .doc th { border: 0; padding: 2px 0; }
  }
  .todo { background: #FFF1B8; color: #3d3320; padding: 0 4px; font-family: system-ui, sans-serif; font-size: .82em; font-weight: 600; }

  .foot { background: var(--red-field); color: var(--cream); }
  .foot a { color: inherit; }
  .foot__in { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding-block: 20px 28px; font-size: 14.5px; max-width: 1320px; }
  .foot__logo { width: 120px; height: auto; margin-right: auto; }
}
