/* EmGee.dev. Dark, system fonts, no web fonts or images from elsewhere. */
:root {
  --bg: #0e1216; --raise: #171d23; --raise-2: #212a31; --line: #2c3841;
  --text: #e9eef2; --muted: #93a4b0; --accent: #f0ab3d; --accent-soft: #d68f2c;
  --good: #6fbf8f; --warn: #d9a94f; --info: #7fb3e0;
  --wrap: 68rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ffc56a; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .6rem; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin: .25rem 0; }
.small { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--raise); padding: .5rem 1rem; z-index: 9; }

.top, main, .foot { max-width: var(--wrap); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.top { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: space-between; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: .55rem; }
.brand .dot { color: var(--accent); }
.mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--accent); color: #1a1205; font-size: .85rem; font-weight: 800; }
.top nav { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--text); }

main { padding-bottom: 3rem; }
.hero { padding: 2.5rem 0 1rem; }
.lede { font-size: 1.2rem; color: #c9d4dc; max-width: 46rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 1rem 0 .4rem; }
.crumbs a { color: var(--muted); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.card { background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: " →"; color: var(--accent); }
.card p { margin: 0; color: #c9d4dc; font-size: .97rem; }
.card .meta { font-size: .85rem; color: var(--muted); margin-top: auto; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent-soft); }

.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.live { color: var(--good); }
.pill.beta { color: var(--info); }
.pill.build { color: var(--warn); }
.pill.kind { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }

.panel { background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin: 1rem 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.cols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1rem; }
th, td { text-align: left; vertical-align: top; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.wide { overflow-x: auto; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .95rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.prose { max-width: 48rem; }
.foot { border-top: 1px solid var(--line); padding-top: 1.5rem; padding-bottom: 2.5rem; display: grid; gap: .5rem; color: var(--muted); font-size: .95rem; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.foot a { color: var(--muted); }
@media (max-width: 30rem) { body { font-size: 16px; } .facts { grid-template-columns: 1fr; } .facts dt { margin-top: .4rem; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Calls to action, featured products, screenshots (2026-11-04) */
.cta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; background: var(--accent); color: #1a1205; font-weight: 700; text-decoration: none; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid var(--accent); }
.btn:hover { background: #ffc56a; color: #1a1205; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 600; }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
.thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.card .thumb { margin: -.2rem -.25rem .3rem; }
.features { display: grid; gap: 1.2rem; margin-bottom: 1.5rem; }
.feature { display: grid; gap: 1.2rem; grid-template-columns: 1fr; background: var(--raise); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; }
.feature h3 { margin: .2rem 0 .3rem; font-size: 1.5rem; }
.feature h3 a { color: var(--text); text-decoration: none; }
.feature p { color: #c9d4dc; }
.feature .meta { color: var(--muted); font-size: .9rem; }
.feature .thumb img { aspect-ratio: 16 / 9; }
@media (min-width: 52rem) {
  .feature { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 1.3rem; }
  .feature:nth-child(even) .thumb { order: 2; }
}
.callout { border-color: var(--accent-soft); background: linear-gradient(135deg, rgba(240,171,61,.10), var(--raise) 60%); }
.shots { display: grid; gap: 1rem; margin: .5rem 0 1.5rem; }
.shots.two { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
figure { margin: 0; }
figure img { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* Phones (2026-11-04, Michael: "Mobile look terrible", "still not great"): grouped lists like iOS Settings,
   one status label per row, two-line summaries, no stacked boxes. */
@media (max-width: 40rem) {
  body { font-size: 16px; line-height: 1.5; }
  .top, main, .foot { padding-left: 1rem; padding-right: 1rem; }
  .top { padding-top: .8rem; padding-bottom: .2rem; gap: .4rem; }
  .brand { font-size: 1.1rem; }
  .mark { width: 1.8rem; height: 1.8rem; border-radius: 8px; font-size: .78rem; }
  .top nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem; padding-bottom: .3rem; scrollbar-width: none; }
  .top nav a { font-size: .92rem; white-space: nowrap; }

  .hero { padding: 1.4rem 0 0; }
  #work-h { margin-top: 1.4rem; }
  h1 { font-size: 1.85rem; line-height: 1.15; }
  .lede { font-size: 1.02rem; line-height: 1.5; }
  .cta { margin: 1.1rem 0 .9rem; gap: .5rem; }
  .cta .btn { flex: 1; text-align: center; }
  .btn { padding: .65rem 1rem; font-size: .97rem; }
  .pill { font-size: .7rem; padding: .02rem .5rem; }
  .muted { font-size: .9rem; }

  h2 { font-size: 1.35rem; margin: 2.2rem 0 .4rem; }
  section > h3, #work > h3 {
    font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
    margin: 1.6rem 0 .45rem .2rem;
  }
  #work > p.muted:not(:first-of-type) { display: none; }   /* group blurbs: the heading says enough on a phone */

  /* Works: one rounded group per section, rows divided by a hairline */
  .grid, .features { display: block; background: var(--raise); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; }
  .card, .feature {
    display: grid; grid-template-columns: 60px 1fr 12px; column-gap: .85rem; row-gap: .1rem; align-items: center;
    background: none; border: 0; border-radius: 0; padding: .7rem .8rem; position: relative;
  }
  .feature { padding: .7rem .8rem; }
  .card + .card, .feature + .feature { border-top: 1px solid var(--line); }
  .card::after, .feature::after { content: "›"; grid-column: 3; grid-row: 1 / span 3; color: var(--muted); font-size: 1.4rem; justify-self: end; }
  .card:has(.thumb) > :not(.thumb), .feature-text { grid-column: 2; }
  .card .thumb, .feature .thumb { grid-column: 1; grid-row: 1 / span 3; margin: 0; border-radius: 8px; order: 0 !important; }
  .card .thumb img, .feature .thumb img { aspect-ratio: 3 / 4; object-position: top; }
  .feature-text { display: grid; gap: .1rem; }
  .card .pills, .feature .pills { order: 2; }
  .card .pills .kind, .feature .pills .kind { display: none; }
  .card h3, .feature h3 { font-size: 1.02rem; font-weight: 600; margin: 0; }
  .card h3 a, .feature h3 a { color: var(--text); }
  .card h3 a::after { content: ""; }
  .card h3 a::before, .feature h3 a::before { content: ""; position: absolute; inset: 0; }
  .card p, .feature p { font-size: .88rem; line-height: 1.35; margin: 0; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card .meta, .feature .meta, .feature .links { display: none; }
  /* Row order: title, summary, status */
  .card h3 { grid-row: 1; } .card > p:not(.meta) { grid-row: 2; } .card .pills { grid-row: 3; }
  .feature-text h3 { order: 1; } .feature-text > p:not(.meta):not(.links) { order: 2; } .feature-text .pills { order: 3; }
  .card .pills, .feature .pills { margin-top: .25rem; }

  /* Panels in a grid become one grouped list too */
  .cols:not(.about) { display: block; background: var(--raise); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .cols.about { display: block; }
  .cols:not(.about) .panel { margin: 0; border: 0; border-radius: 0; background: none; padding: .75rem .9rem; }
  .cols:not(.about) .panel + .panel { border-top: 1px solid var(--line); }
  .panel { padding: .85rem .95rem; border-radius: 14px; margin: .8rem 0; }
  .panel h3 { font-size: .98rem; font-weight: 600; margin: 0 0 .15rem; }
  .panel p { font-size: .9rem; line-height: 1.45; color: #c9d4dc; }
  .callout .cta { margin-bottom: 0; }

  .shots { margin: .4rem 0 1rem; }
  .crumbs { margin-top: .4rem; font-size: .82rem; }
  .facts { font-size: .92rem; }
  th, td { padding: .4rem .45rem; font-size: .88rem; }
  .foot { font-size: .88rem; }
}

/* A tile for works with no screenshot (household apps, platform) */
.tile { display: grid; place-items: center; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #2a2110, #14181c); color: var(--accent); font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.card .tile { width: auto; aspect-ratio: 16 / 10; font-size: 2.2rem; }
@media (max-width: 40rem) { .card .tile { aspect-ratio: 3 / 4; font-size: .95rem; } }
