/* Protasis site styles. Fonts are served from /fonts (SIL Open Font License). */

/* EB Garamond 500, greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ebgaramond/ebgaramond-500-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* EB Garamond 500, greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ebgaramond/ebgaramond-500-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* EB Garamond 500, latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ebgaramond/ebgaramond-500-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* EB Garamond 500, latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ebgaramond/ebgaramond-500-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;
}
/* Fira Sans 400 italic, greek-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-italic-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Sans 400 italic, greek */
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-italic-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Sans 400 italic, latin-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Sans 400 italic, latin */
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-italic-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;
}
/* Fira Sans 400, greek-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Sans 400, greek */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Sans 400, latin-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Sans 400, latin */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firasans/firasans-400-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;
}
/* Fira Sans 500, greek-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firasans/firasans-500-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Sans 500, greek */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firasans/firasans-500-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Sans 500, latin-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firasans/firasans-500-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Sans 500, latin */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firasans/firasans-500-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;
}
/* Fira Sans 600, greek-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/firasans/firasans-600-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Sans 600, greek */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/firasans/firasans-600-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Sans 600, latin-ext */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/firasans/firasans-600-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Sans 600, latin */
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/firasans/firasans-600-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;
}
/* Fira Mono 400, greek-ext */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firamono/firamono-400-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Mono 400, greek */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firamono/firamono-400-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Mono 400, latin-ext */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firamono/firamono-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Mono 400, latin */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/firamono/firamono-400-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;
}
/* Fira Mono 500, greek-ext */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firamono/firamono-500-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Fira Mono 500, greek */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firamono/firamono-500-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Fira Mono 500, latin-ext */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firamono/firamono-500-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fira Mono 500, latin */
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/firamono/firamono-500-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;
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --ink: #16181B;
  --text: #2E3237;
  --muted: #5A5F66;
  --line: #E3E5E8;
  --line-strong: #D9DCE0;
  --line-soft: #E8EAED;
  --surface: #FAFAFA;
  --accent: #C23B22;
  --error: #B3261E;
  --code-bg: #16181B;
  --code-text: #F2F3F5;
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Fira Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Fira Mono', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--ink); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; color: var(--ink); }
p { margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: #FFFFFF;
}

.wrap { max-width: 1100px; margin: 0 auto; padding-inline: var(--gutter); }
.num { color: var(--accent); }

/* ── Header and footer ──────────────────────────────────────────────── */
.site-header { border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { width: 231px; height: 22px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav .nav-contact { color: var(--accent); font-weight: 500; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px 36px;
  font-size: 15px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.site-footer nav a { display: flex; align-items: center; min-height: 44px; }

/* ── Home: opening ──────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 56px;
  padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px);
}
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-text h1 { font-size: clamp(38px, 4.2vw, 56px); line-height: 1.08; text-wrap: balance; }
.hero-text p { font-size: 18px; color: var(--text); text-wrap: pretty; }
.hero .figure { flex: 1 1 400px; min-width: 0; }

/* ── Home: numbered sections ────────────────────────────────────────── */
.section { border-top: 1px solid var(--line); }
.section > .wrap {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-block: clamp(48px, 6vw, 88px);
}
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.15;
}
.section-head p, .split-text p { font-size: 18px; color: var(--text); text-wrap: pretty; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 28px;
}
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 32px 28px;
}
.steps h3, .principles h3 { font-size: 23px; }
.steps p, .principles p { margin-top: 8px; color: var(--text); }

.section > .wrap.split { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.split-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.split .figure { flex: 1 1 520px; min-width: 0; }

.section > .wrap.name-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px 64px; }
.name-row .split-text { flex: 1 1 420px; }
.name-greek {
  flex: 1 1 340px;
  min-width: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
}

/* ── Figures ────────────────────────────────────────────────────────── */
.figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.figure figcaption { font-size: 14px; color: var(--muted); text-wrap: pretty; }
.figure figcaption strong { color: var(--accent); font-weight: 600; }
.card { padding: 24px 26px; border: 1px solid var(--line-strong); border-radius: 8px; }
.card-tint { background: var(--surface); }
.example { margin-bottom: 16px; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.2; }

.readings { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #E4E6E9; }
.readings li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: 1px solid #E4E6E9;
}
.readings .n { width: 20px; flex: 0 0 auto; font-family: var(--mono); color: var(--muted); }
.readings .text { flex: 1 1 220px; min-width: 0; }
.readings .weight { flex: 0 0 auto; font-family: var(--mono); font-size: 14px; font-weight: 500; }

.table-scroll { overflow-x: auto; }
.chains { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.chains th, .chains td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.chains tr > :first-child { width: 30%; padding-left: 0; }
.chains tr > :last-child { padding-right: 0; }
.chains thead th {
  padding-block: 10px;
  border-bottom-color: var(--line-strong);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.chains tbody th { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.chains .stopped { color: var(--muted); }
.chains .last-step > * { border-bottom-color: var(--line-strong); }
.chains .result > * { padding-bottom: 4px; border-bottom: 0; font-weight: 600; }
.chains .result th { font-family: var(--sans); font-size: 16px; font-weight: 600; }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}
.lang {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.lang-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.structure {
  margin: 0;
  padding: 18px 22px;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Inner pages: contact, privacy, thanks, not found ───────────────── */
.page { padding-block: clamp(48px, 7vw, 96px); }
.page .wrap > * { max-width: 720px; }
.page-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.page-head h1 { font-size: clamp(36px, 3.8vw, 50px); line-height: 1.1; }
.page-head p { font-size: 18px; color: var(--text); text-wrap: pretty; }

.prose h2 { margin: 36px 0 10px; font-size: 26px; }
.prose p, .prose li { font-size: 17px; color: var(--text); text-wrap: pretty; }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 10px 0 0; padding-left: 1.2em; }
.prose li + li { margin-top: 4px; }
.prose address { margin-top: 12px; font-style: normal; font-size: 17px; color: var(--text); }

/* ── Contact form ───────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #8A9099;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 200px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { font-size: 15px; color: var(--error); }
.form-error {
  padding: 14px 16px;
  border: 1px solid var(--error);
  border-radius: 6px;
  color: var(--error);
}
.form-note { font-size: 15px; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #FFFFFF;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.button:hover { background: var(--accent); }
