/* Colours from ios/MakanLiao/DesignSystem/Signboard.swift: a hawker stall's lightbox sign. */
:root {
  --yellow: #f7c52b;
  --red: #a81e16;
  --plaque: #1f5c4a;
  --ink: #1c1917;

  --bg: #fffdf8;
  --text: #1c1917;
  --muted: #5a524b;
  --rule: #e6dfd3;
  --link: #a81e16;
  --code-bg: #f3eee4;
  /* About 70 characters a line at the body size. */
  --measure: 37rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917;
    --text: #ece7df;
    --muted: #b5ada2;
    --rule: #3a342f;
    --link: #f7c52b;
    --code-bg: #2a2522;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

/* Text pages: quiet and readable. */

.bar {
  background: var(--yellow);
  border-bottom: 3px solid var(--red);
  padding: 0.6rem 1rem;
}

.wordmark {
  display: block;
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--red);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.text {
  max-width: calc(var(--measure) + 2rem);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.text h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.text h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}

.text p, .text ul { margin: 0 0 1rem; }
.text ul { padding-left: 1.25rem; }
.text li { margin-bottom: 0.6rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

blockquote {
  margin: 0 0 1rem;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--rule);
  color: var(--muted);
}

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 1rem 2rem;
}

.foot nav {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

.foot a { color: var(--muted); }
.foot a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: none; }

/* Drafts only: the build refuses to publish a page with these in it. */

.draft-banner {
  margin: 0;
  padding: 0.6rem 1rem;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

mark.todo {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 0.05em 0.3em;
  border-radius: 3px;
  outline: 2px dashed var(--yellow);
  outline-offset: 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Home: the stall's sign. */

.home {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1rem 3rem;
}

.sign {
  position: relative;
  background: var(--yellow) radial-gradient(ellipse at 50% 45%, #ffd95a 0%, rgba(247, 197, 43, 0) 70%);
  border: 10px solid var(--ink);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 4.25rem;
  box-shadow: 0 0.5rem 1.5rem rgba(28, 25, 23, 0.18);
}

.sign h1 {
  margin: 0;
  color: var(--red);
  font-weight: 900;
  font-size: clamp(3.25rem, 17vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sign h1 span { display: block; }

.plaque {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  background: var(--plaque);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.45;
  margin: 2rem 0 1.25rem;
  max-width: 34ch;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.links li { border-bottom: 1px solid var(--rule); }

.links a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
}

.links a::after { content: " \2192"; }
.links a:hover { text-decoration: underline; }

.home + .foot { display: none; }

@media (prefers-color-scheme: dark) {
  .sign {
    border-color: #3a342f;
    box-shadow: 0 0 3rem rgba(247, 197, 43, 0.28);
  }
}
