/* Tunestack — shared styles for the public pages.
 *
 * Colours come from DESIGN-PALETTE.md: one neutral ramp, one signal colour, nothing else.
 * If a colour is not in that file it does not belong here. */

:root {
  --n-0:    #FFFFFF;
  --n-25:   #FAFAFA;
  --n-50:   #F2F2F2;
  --n-75:   #EAEAEA;
  --n-100:  #E0E0E0;
  --n-300:  #A6A6A6;
  --n-400:  #8A8A8A;
  --n-500:  #6E6E6E;
  --n-700:  #3E3E3E;
  --n-950:  #0D0D0D;
  --signal: #D93A1E;

  --page:      var(--n-25);
  --surface:   var(--n-0);
  --ink:       var(--n-950);
  --body:      var(--n-500);
  --meta:      var(--n-400);
  --hairline:  rgba(0, 0, 0, 0.10);
  --strong:    rgba(0, 0, 0, 0.20);

  --r-1: 8px;
  --r-2: 14px;
  --r-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:     #0D0D0D;
    --surface:  #1A1A1A;
    --ink:      #FAFAFA;
    --body:     #A6A6A6;
    --meta:     #8A8A8A;
    --hairline: rgba(255, 255, 255, 0.14);
    --strong:   rgba(255, 255, 255, 0.28);
    --signal:   #FF6B4F;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 64px 24px 96px; }

header.site {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 32px; margin-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
header.site .mark {
  width: 34px; height: 34px; border-radius: var(--r-1);
  background: linear-gradient(135deg, #6E6E6E, #242424);
  display: flex; flex-direction: column; justify-content: center;
  gap: 3px; padding: 8px 7px;
  flex: 0 0 auto;
}
header.site .mark i { display: block; height: 3px; border-radius: 2px; background: #fff; }
header.site .mark i:nth-child(1) { width: 100%; opacity: 1; }
header.site .mark i:nth-child(2) { width: 72%;  opacity: .72; }
header.site .mark i:nth-child(3) { width: 46%;  opacity: .46; }
header.site .name { color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
header.site nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
header.site nav a { color: var(--body); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }

h1 {
  color: var(--ink); font-size: 34px; line-height: 1.2;
  letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 650;
}
h2 {
  color: var(--ink); font-size: 20px; line-height: 1.3;
  letter-spacing: -0.01em; margin: 44px 0 12px; font-weight: 620;
}
h3 { color: var(--ink); font-size: 16px; margin: 28px 0 8px; font-weight: 600; }
p { margin: 0 0 16px; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
    text-decoration-color: var(--strong); }
a:hover { text-decoration-color: var(--ink); }

.lede { font-size: 18px; color: var(--body); margin-bottom: 8px; }
.updated { font-size: 13px; color: var(--meta); margin-bottom: 40px; }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-2); padding: 24px 26px; margin: 24px 0;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.headline {
  font-size: 19px; color: var(--ink); font-weight: 600;
  letter-spacing: -0.01em; margin-bottom: 10px;
}

ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }
li::marker { color: var(--n-300); }

dl { margin: 0; }
dt { color: var(--ink); font-weight: 600; margin-top: 24px; }
dd { margin: 6px 0 0; }

table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
th, td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--hairline);
         vertical-align: top; }
th { color: var(--ink); font-weight: 600; }
td:first-child { width: 42%; padding-right: 20px; color: var(--ink); }

code {
  font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--n-75); padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
@media (prefers-color-scheme: dark) { code { background: rgba(255,255,255,0.08); } }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 550; text-decoration: none;
  background: var(--ink); color: var(--page); border: none;
}
.btn.secondary { background: none; color: var(--ink); border: 1px solid var(--strong); }

.note {
  border-left: 2px solid var(--signal); padding-left: 16px;
  color: var(--body); margin: 20px 0;
}

footer.site {
  margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--hairline);
  font-size: 14px; color: var(--meta);
  display: flex; gap: 20px; flex-wrap: wrap;
}
footer.site a { color: var(--meta); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
footer.site .spacer { margin-left: auto; }

@media (max-width: 560px) {
  .wrap { padding: 40px 20px 64px; }
  h1 { font-size: 28px; }
  td:first-child { width: 50%; }
}
