/* The one stylesheet of sweekly.app. Strawberry tokens from apps/app/src/theme/tokens/colors.ts,
   layout from docs/design/kit/13-legal-pages. Fonts are self-hosted: no third-party request. */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Fredoka_600SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Nunito_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Nunito_700Bold.ttf') format('truetype');
}

:root {
  --bg: #fff5ef;
  --surface: #ffffff;
  --sunken: #fbe8e0;
  --border: #f0d8cd;
  --text: #2b1520;
  --muted: #6c5059;
  --accent: #d41c59;
  --accent-soft: #ffe1ea;
  --on-accent-soft: #9a0f41;
  --font-title: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a0f15;
    --surface: #26161f;
    --sunken: #130a0f;
    --border: #432d38;
    --text: #fff0f4;
    --muted: #cfb5bf;
    --accent: #ff5c8f;
    --accent-soft: #4b1a2f;
    --on-accent-soft: #ffc5d7;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Top bar */
.bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 20px;
}
.brand img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Column */
main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

h1 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  margin: 20px 0 6px;
  text-wrap: balance;
}
@media (min-width: 600px) {
  h1 {
    font-size: 40px;
  }
}

.meta {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 16px;
}

h2 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  margin: 32px 0 10px;
  padding: 2px 0;
  scroll-margin-top: 8px;
  border-radius: 8px;
}

p {
  margin: 0 0 12px;
}
ul,
ol {
  padding-left: 22px;
  margin: 0 0 12px;
}
li {
  margin: 0 0 4px;
}
ul li::marker {
  color: var(--accent);
}
strong {
  font-weight: 700;
}

/* Section opened by an anchor: the title shows briefly on accentSoft, then fades (1 s). */
@keyframes anchor-flash {
  from {
    background: var(--accent-soft);
    box-shadow: 0 0 0 6px var(--accent-soft);
  }
  to {
    background: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}
h2:target {
  animation: anchor-flash 1s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  h2:target {
    animation: none;
  }
}

/* In short card */
.short {
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  border-radius: 18px;
  padding: 16px;
  font-size: 16px;
  line-height: 1.45;
}
.short h2 {
  font-size: 17px;
  margin: 0 0 4px;
  padding: 0;
}
.short ul {
  margin: 0;
}
.short li {
  margin: 6px 0;
}
.short ul li::marker {
  color: var(--on-accent-soft);
}

/* On this page */
.toc {
  margin: 20px 0 4px;
  display: flex;
  flex-direction: column;
}
.toc-title {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

/* Tables: a real table from 600 px; under it each row is a card. */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  margin: 4px 0 16px;
  font-size: 15px;
  line-height: 1.4;
}
th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
td:first-child {
  font-weight: 700;
}
tbody tr:first-child td {
  border-top: 0;
}

@media (max-width: 599px) {
  table,
  tbody,
  tr,
  td {
    display: block;
  }
  table {
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  thead {
    /* Hidden by sight, still there for screen readers. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 0 10px;
  }
  td {
    padding: 0;
    border: 0;
    font-size: 15px;
    line-height: 1.4;
  }
  td:first-child {
    font-size: 16px;
    margin-bottom: 6px;
  }
  td + td {
    margin-top: 6px;
  }
  td + td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
  }
}

/* Footer */
footer {
  background: var(--sunken);
  padding: 24px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
footer ul {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 20px;
}
footer li {
  margin: 0;
}
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
footer p {
  margin: 0;
}
footer .mail {
  margin-bottom: 4px;
}
