/* The one stylesheet for euchreshowdown.com and brightideaapps.dev. build.sh copies it into each site's
   public/assets/. No web fonts, no framework: the system font stack, sizes in rem, light and dark. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf5;          /* the cards' ivory */
  --surface: #ffffff;
  --text: #15181c;        /* the cards' ink */
  --muted: #4a5257;
  --link: #0b6141;
  --link-hover: #074a31;
  --border: #ddd5c3;      /* the cards' edge */
  --felt: #13654a;        /* the icon's felt */
  --felt-deep: #0c3f2c;
  --felt-light: #187250;   /* the felt's highlight, dark enough for every text on it to pass 4.5:1 */
  --on-felt: #ffffff;
  --on-felt-muted: #d8ebe1;
  --red: #b0231b;         /* hearts and diamonds */
  --focus: #0b57d0;
  --code-bg: #f1eee4;
  --good: #146c3c;
  --bad: #a3221a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1813;
    --surface: #12241b;
    --text: #edf1ec;
    --muted: #b2bfb7;
    --link: #8bdcb1;
    --link-hover: #b4ecce;
    --border: #2b4136;
    --felt: #0f4a35;
    --felt-deep: #08281c;
    --felt-light: #145c42;
    --on-felt: #ffffff;
    --on-felt-muted: #cfe4d9;
    --red: #ff8a80;
    --focus: #8ab4ff;
    --code-bg: #0a1510;
    --good: #7fd8a4;
    --bad: #ff9a90;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.3);
  }
}

*, *::before, *::after { 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, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: 0.5rem;
}
.skip:focus { top: 0.75rem; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; hyphens: auto; }
h1 { font-size: 2rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }

code, kbd, pre, samp {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  padding: 0 0.3em;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  line-height: 1.45;
  margin: 0 0 1rem;
}
pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }

/* The header: a band of the icon's felt. */
.site-header {
  background: radial-gradient(ellipse at 30% 0%, var(--felt-light) 0%, var(--felt) 45%, var(--felt-deep) 100%);
  color: var(--on-felt);
}
.site-header .bar {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-felt);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  margin-right: auto;
}
.brand:hover { color: var(--on-felt); }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 0.55rem; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  color: var(--on-felt);
  text-decoration: none;
  display: inline-block;
  padding: 0.6rem 0;
  min-height: 2.75rem;
}
.site-nav a:hover { text-decoration: underline; color: var(--on-felt); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.site-header :focus-visible { outline-color: #ffffff; }

body { min-height: 100vh; display: flex; flex-direction: column; }
main { display: block; flex: 1 0 auto; width: 100%; min-width: 0; }
.site-header, .site-footer { flex: none; }
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.page.wide { max-width: 64rem; }
.page > h2:first-child { margin-top: 0.5rem; }
.page.wide > p, .page.wide > ul:not(.shots):not(.pillars) { max-width: 46rem; }
.lede { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Home's opening, on the felt. */
.hero {
  background: radial-gradient(ellipse at 30% 0%, var(--felt-light) 0%, var(--felt) 45%, var(--felt-deep) 100%);
  color: var(--on-felt);
  border-top: 1px solid rgb(255 255 255 / 0.12);
}
.hero .inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.hero .inner > * { min-width: 0; }
.hero .icon { width: 7rem; height: 7rem; border-radius: 1.6rem; box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
.hero h1 { font-size: 2.4rem; margin: 0 0 0.25rem; }
.hero .subtitle { font-size: 1.3rem; margin: 0 0 1rem; color: var(--on-felt-muted); }
.hero p { max-width: 36rem; }
.hero a { color: var(--on-felt); }
.hero :focus-visible { outline-color: #ffffff; }
@media (min-width: 48rem) {
  .hero .inner { grid-template-columns: auto 1fr; padding: 3rem 1rem 3.25rem; gap: 2.25rem; }
  .hero .icon { width: 9rem; height: 9rem; border-radius: 2rem; }
  .hero h1 { font-size: 3rem; }
}

/* The App Store badge, or its stand-in until the listing exists. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.7rem;
  background: #000000;
  color: #ffffff;
  border: 1px solid #a6a6a6;
  text-decoration: none;
  font-weight: 600;
}
.store-badge:hover { color: #ffffff; background: #1a1a1a; }
.store-badge svg { width: 1.4rem; height: 1.4rem; fill: currentColor; flex: none; }
.requires { font-size: 0.9375rem; color: var(--on-felt-muted); margin: 0.75rem 0 0; }

/* Screenshots: a row that scrolls sideways on a phone, a grid from tablet width. */
.shots {
  list-style: none;
  margin: 0 -1rem 1rem;
  padding: 0.25rem 1rem 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 64%);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.shots li { scroll-snap-align: center; margin: 0; }
@media (min-width: 48rem) {
  .shots {
    margin: 0 0 1rem;
    padding: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
}
figure { margin: 0; }
figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.6rem; }
.shot img {
  border-radius: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0c3f2c;
}
.shot.ipad img { border-radius: 1rem; }

/* The pillars and other cards. */
.pillars { display: grid; gap: 1rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.pillars li + li { margin-top: 0; }
@media (min-width: 48rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.suit { color: var(--red); }
.suit.black { color: var(--text); }

/* Questions and answers. */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.6rem 0;
  min-height: 2.75rem;
  list-style-position: outside;
  margin-left: 1.1rem;
}
.faq details > :not(summary) { margin-left: 1.1rem; }
.faq details[open] summary { margin-bottom: 0.25rem; }
.toc { columns: 2 12rem; padding-left: 1.25rem; }
.toc li { break-inside: avoid; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.table-wrap { overflow-x: auto; }

dl.facts { display: grid; grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr); gap: 0.4rem 1rem; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.hash {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.note {
  border-left: 4px solid var(--felt);
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: 0 0.6rem 0.6rem 0;
  margin: 0 0 1rem;
}

/* The Fair Dealing checker. */
.checker { margin-top: 1rem; }
.checker label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
.checker .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.9375rem; margin: -0.2rem 0 0.4rem; }
.drop .hint { margin-bottom: 0.5rem; }
.checker textarea, .checker input[type="text"] {
  width: 100%;
  font: inherit;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
}
.checker textarea { min-height: 7.5rem; resize: vertical; }
.checker input[type="file"] { font: inherit; max-width: 100%; }
.drop {
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  margin-top: 1rem;
}
.drop.over { border-color: var(--link); background: var(--surface); }
.drop label { margin-top: 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; align-items: center; }
button {
  font: inherit;
  font-weight: 600;
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border-radius: 0.6rem;
  border: 1px solid var(--felt);
  background: var(--felt);
  color: var(--on-felt);
  cursor: pointer;
}
button:hover { background: var(--felt-deep); }
button.secondary { background: transparent; color: var(--link); border-color: var(--border); }
button.secondary:hover { background: var(--surface); }
button:disabled { opacity: 0.6; cursor: progress; }
.status { margin: 1rem 0 0.75rem; font-weight: 600; }
.verdict { padding: 0.75rem 1rem; border-radius: 0.6rem; border: 1px solid var(--border); background: var(--surface); margin: 0 0 1rem; }
.verdict.good { border-color: var(--good); }
.verdict.bad { border-color: var(--bad); }
.verdict strong.good { color: var(--good); }
.verdict strong.bad { color: var(--bad); }
.output { white-space: pre; max-height: 40rem; }
.output .err { color: var(--bad); }
[hidden] { display: none !important; }

/* The company page's list of apps. */
.apps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.apps li + li { margin-top: 0; }
.app-card { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.app-card > div { min-width: 0; }
.app-card img { width: 4.5rem; height: 4.5rem; border-radius: 1rem; }
.app-card h3 { margin: 0 0 0.25rem; }
.app-card p { margin: 0 0 0.5rem; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9375rem;
}
.site-footer .inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}
.site-footer ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.site-footer li + li { margin-top: 0; }
.site-footer a { display: inline-block; padding: 0.55rem 0; min-height: 2.75rem; }
.site-footer p { margin: 0.25rem 0; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #ffffff; color: #000000; }
}
