@font-face {
  font-family: 'Sofia Sans';
  src: url('fonts/SofiaSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans';
  src: url('fonts/SofiaSans_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  src: url('fonts/SofiaSansExtraCondensed_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  src: url('fonts/SofiaSansExtraCondensed_900Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F1E4;
  --paper-shade: #ECE5D0;
  --ink: #161A3A;
  --ink-soft: #5A5F82;
  --rule: #C7CCE4;
  --stamp: #3B33E6;
  --copy: #EC3F8C;
  --copy-deep: #C22A6E;
  --body: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sofia Sans Extra Condensed', 'Sofia Sans', system-ui, sans-serif;
  color-scheme: light;
}

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

html {
  background-color: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: url('textures/paper-grain@2x.png');
  background-size: 160px 160px;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* One column, left-aligned like a form: 36rem holds about 65 characters of body text. Set in
   rem, not ch, so that the header, the page and the foot (each its own type size) line up. */
.column {
  width: 100%;
  max-width: calc(36rem + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

main.column { flex: 1; padding-bottom: 48px; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--stamp);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: var(--copy); }
a:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 800; }

/* The header of an inner page: the name, and a hairline under it. */
.top { border-bottom: 1px solid var(--rule); }
.top .column { display: flex; align-items: center; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 {
  font-weight: 900;
  font-size: clamp(2.75rem, 11vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
}
h2 {
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 40px 0 12px;
}
h3 { font-weight: 800; font-size: 1.375rem; line-height: 1.15; margin: 28px 0 8px; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.25em; }
li { margin: 0 0 8px; padding-left: 0.2em; }
li::marker { color: var(--ink-soft); }

.updated { color: var(--ink-soft); font-size: 1rem; }

/* A blockquote of the documents: a plain note in a well of shaded paper. */
.note {
  background: var(--paper-shade);
  border-radius: 6px;
  padding: 16px;
  margin: 0 0 24px;
  font-size: 1rem;
}
.note p:last-child { margin-bottom: 0; }

/* A blank still open (only in a --draft build): a dashed slot, the way the app marks what is still to change. */
.blank {
  border: 1.5px dashed var(--ink);
  background: var(--paper-shade);
  border-radius: 4px;
  padding: 0 0.25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* The home page: the picture, the name as the one large thing, the tagline, a few lines. */
.hero { padding-top: 32px; }
.hero img { display: block; width: 168px; height: 168px; margin: 0 0 8px -12px; }
.hero h1 {
  font-size: clamp(3.75rem, 19vw, 5.5rem);
  line-height: 0.88;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.tagline {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 0 0 24px;
}
.lead { max-width: 34em; }

/* The stores: keys lying on the desk, ink border and a hard shadow, pressed onto it. */
.stores { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 16px 24px; }
.stores li { margin: 0; padding: 0; }
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 168px;
  padding: 0 24px;
  background: var(--stamp);
  color: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}
.key:hover { color: var(--paper); }
.key:active { transform: translate(5px, 5px); box-shadow: none; }
.key:focus-visible { outline-offset: 6px; }

/* The pages, as the rows of Ρυθμίσεις: a name a thumb can hit, printed form lines between. */
.rows { list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid var(--rule); }
.rows li { margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.rows a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  text-decoration: none;
}
.rows a::after { content: '→'; font-family: var(--body); font-weight: 400; color: var(--ink-soft); }
.rows a:hover { color: var(--stamp); }
.rows a:hover::after { color: var(--stamp); }

/* The support page: the address first, then a question and its answer to a group. */
.contact { font-size: 1.25rem; margin-bottom: 8px; }
.faq h2 { font-size: 1.625rem; }

/* The foot of every page: the other pages and who publishes the app. */
.foot { border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 1rem; }
.foot .column { padding-top: 16px; padding-bottom: 32px; }
.foot ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot li { margin: 0; padding: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); }
.foot a[aria-current='page'] { text-decoration: none; font-weight: 800; }
.foot p { margin: 0; }

/* A --draft build: a band of shaded paper with a dashed edge, and the stamp on it. */
.draft { background: var(--paper-shade); border-bottom: 2px dashed var(--ink); }
.draft .column { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.draft-stamp {
  display: inline-block;
  transform: rotate(-7deg);
  border: 3px solid var(--copy-deep);
  border-radius: 6px;
  padding: 2px 10px 0;
  color: var(--copy-deep);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
}
.draft p { margin: 0; font-size: 1rem; }

.missing { padding-top: 24px; }
.back { display: inline-flex; align-items: center; min-height: 48px; }

@media (prefers-reduced-motion: reduce) {
  .key:active { transform: none; box-shadow: 5px 5px 0 var(--ink); }
}

@media print {
  body { background-image: none; }
  .top, .foot, .draft { display: none; }
}
