/* Kettle Pond Advisory — shared styles for index.html and 404.html */

:root {
  --bg: #FAF8F3;
  --ink: #1B3A5C;
  --muted: #5C6B7A;
  --rule: #E2DDD3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101B24;
    --ink: #EDEAE3;
    --muted: #94A3AE;
    --rule: #22303C;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.575;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px;
}

.mark {
  display: block;
  width: 46px;
  height: 46px;
  color: var(--ink);
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.35;
}

/* Links */

.contact a,
.back a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.contact a:hover,
.back a:hover {
  border-bottom-color: currentColor;
}

.contact a:focus-visible,
.back a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
  border-bottom-color: transparent;
}

/* Home */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.subheader {
  margin: 10px 0 0;
  max-width: 320px;
  /* Break at a phrase boundary rather than dangling "for" at the line end.
     Font-independent, so it holds up on system stacks other than Segoe UI.
     Browsers without support fall back to ordinary wrapping. */
  text-wrap: balance;
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

.contact {
  margin: 32px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.practice + .practice {
  margin-top: 28px;
}

.practice h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.practice p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* 404 */

.note {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.back {
  margin: 40px 0 0;
  font-size: 13px;
}

@media (min-width: 720px) {
  .page { padding: 64px 40px; }
  .grid {
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 88px;
    align-items: start;
  }
  .identity { padding-top: 2px; }
  .practices { max-width: 560px; }
}
