/* Yalla English legal site — one stylesheet, no build step, no dependencies.
   Palette follows the app's default "Maroon" theme: wine ground, gold accent.
   Light is the default because these are documents people read; dark mode
   follows the reader's own system setting. */

:root {
  --ink: #241017;
  --ink-soft: #5c4550;
  --ground: #fdfcfc;
  --card: #ffffff;
  --line: #e6dcdf;
  --accent: #8c2f4a;
  --accent-soft: #f7eef1;
  --wine: #1b0b11;
  --gold: #b47318;
  --focus: #8c2f4a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2e8ea;
    --ink-soft: #bda6ae;
    --ground: #1b0b11;
    --card: #2c141c;
    --line: #43242f;
    --accent: #e8a040;
    --accent-soft: #33161f;
    --wine: #1b0b11;
    --gold: #f7d66a;
    --focus: #f7d66a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border: 2px solid var(--focus);
  z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

.masthead {
  background: var(--wine);
  color: #f7d66a;
  padding: 18px 20px;
}
.masthead-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
}
.masthead a { color: #f7d66a; text-decoration: none; font-weight: 700; }
.masthead a:hover { text-decoration: underline; }
.masthead .by { color: #d9bfae; font-size: 14px; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

h1 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 6px; }
h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.2em 0 0.5em;
  padding-top: 0.6em;
  border-top: 1px solid var(--line);
}
h3 { font-size: 1.02rem; margin: 1.6em 0 0.4em; }

p, li { overflow-wrap: break-word; }
ul { padding-left: 1.25em; }
li { margin: 0.35em 0; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0 0 1.6em;
}
.meta strong { color: var(--ink); }

.lede { font-size: 1.06rem; }

.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  margin: 1.4em 0;
}
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

.cards { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
}
.card h2 {
  border-top: 0;
  padding-top: 0;
  margin: 0 0 6px;
  font-size: 1.12rem;
}
.card p { margin: 0; color: var(--ink-soft); }
.card a { font-weight: 700; text-decoration: none; }
.card a:hover { text-decoration: underline; }
/* The whole card reads as one target without needing script. */
.card a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: 0 0 1em;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ground);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}

.path {
  font-weight: 700;
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer nav { margin-bottom: 6px; }
.footer nav a { margin-right: 14px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  .wrap { padding: 22px 16px 56px; }
}
