:root {
  color-scheme: light;
  --paper: #fdfaf3;
  --card: #f3f3e7;
  --ink: #111810;
  --green: #124b30;
  --rule: #b7beaa;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.4; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
::selection { background: #d4e2bc; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 10; padding: 12px 20px; background: var(--green); color: white; }
.skip-link:focus { top: 16px; }
.page-frame { position: relative; max-width: 1067px; margin: 24px auto; padding: 0 36px; border: 1px solid #789182; background: radial-gradient(ellipse at 40% 20%, #fffefa 0, #fdfbf5 60%, #f9f8ee 100%); box-shadow: 0 0 0 2px #e8e9df; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 63px; margin-right: 44px; border-bottom: 1px solid #a7b2a5; }
.identity { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-size: 18px; font-weight: 700; }
nav { display: flex; align-items: center; gap: 24px; padding-right: 80px; font-size: 17px; }
nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px 0; white-space: nowrap; }
[data-icon="work"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
[data-icon="blog"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E"); }
[data-icon="resume"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5M9 13h7M9 17h7'/%3E%3C/svg%3E"); }
[data-icon="shop"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='M4 7.5l8 4.5 8-4.5M12 12v9'/%3E%3C/svg%3E"); }
[data-icon="moto"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='16' r='3'/%3E%3Ccircle cx='19' cy='16' r='3'/%3E%3Cpath d='M7.5 14h5l4-4H6m1.5 4 4-4'/%3E%3Cpath d='M13 6h2l1.5 3 2 4'/%3E%3C/svg%3E"); }
[data-icon="github"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 19c-4 1.3-4-2-6-2.5m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12 12 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21'/%3E%3C/svg%3E"); }
button:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
/* The vertical line under the corner mark runs beside the hero only, so the grid below never crosses it. */
.hero::after { content: ""; position: absolute; right: 5px; top: 4px; bottom: 0; border-left: 1px solid #789182; pointer-events: none; }
/* The corner mark: a wrench growing out of grass, drawn as inline SVG line art, linking to
   Zen and the Art of Motorcycle Maintenance. The frame's vertical line reads as its stem. */
.site-mark { --mark-line: #203222; --mark-back: #cfe0bd; --mark-front: #dbe9c9; --mark-steel: #f1f2e8; position: absolute; top: 14px; right: 11px; width: 62px; height: 57px; border-radius: 6px; }
/* A larger tap area than the drawing, for phones where the mark is small. */
.site-mark::after { content: ""; position: absolute; inset: -5px; }
.site-mark:focus-visible { outline-offset: 2px; }
.site-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.site-mark path { stroke: var(--mark-line); stroke-width: 4.2; stroke-linejoin: round; stroke-linecap: round; }
.site-mark .mark-back { fill: var(--mark-back); }
.site-mark .mark-mid, .site-mark .mark-front { fill: var(--mark-front); }
.site-mark .mark-steel { fill: var(--mark-steel); }
.site-mark .mark-groove { fill: none; stroke-width: 3.2; }
/* Hover: the outline redraws in green from the roots up, then retracts when the pointer leaves. Each shape is
   followed by a trace copy (so shapes in front still cover it) whose dash is the length of that path. */
.site-mark { --mark-trace: #2f9460; }
.site-mark .mark-trace { fill: none; stroke: var(--mark-trace); transition: stroke-dashoffset .35s ease-in; }
.site-mark .mark-groove + .mark-trace { stroke-width: 3.2; }
.site-mark .mark-steel + .mark-trace { --trace-delay: .2s; }
.site-mark .mark-groove + .mark-trace { --trace-delay: .3s; }
.site-mark .mark-mid + .mark-trace { --trace-delay: .1s; }
.site-mark .mark-front + .mark-trace { --trace-delay: .25s; }
.site-mark:focus-visible .mark-trace { stroke-dashoffset: 0; transition: stroke-dashoffset .9s ease-out var(--trace-delay, 0s); }
@media (hover: hover) {
  .site-mark:hover .mark-trace { stroke-dashoffset: 0; transition: stroke-dashoffset .9s ease-out var(--trace-delay, 0s); }
}
/* With reduced motion the outline still turns green, without drawing. */
@media (prefers-reduced-motion: reduce) { .site-mark .mark-trace, .site-mark:hover .mark-trace, .site-mark:focus-visible .mark-trace { transition: none; } }
.hero { position: relative; display: grid; grid-template-columns: 56.5% 43.5%; align-items: center; padding: 39px 0 35px; }
/* Below this width the illustration fills its column, so keep it clear of the frame's vertical line. */
@media (max-width: 1100px) { .hero { padding-right: 28px; } }
.hero-copy { position: relative; z-index: 1; }
h1 { font-size: 64px; line-height: 1.12; letter-spacing: -2.3px; margin: 0 0 27px; font-weight: 750; }
.hero-description { max-width: 480px; margin: 0; font-size: 18px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 26px; border: 1.5px solid var(--green); border-radius: 4px; background: var(--green); color: #fff; font-size: 17px; font-weight: 700; }
.button:hover { background: #1c6240; color: #fff; }
.button-outline { min-width: 112px; background: transparent; color: var(--green); font-weight: 700; }
.button-outline:hover { color: var(--green); background: #e9efdf; }
/* The hero art sits in a <picture> so browsers that read AVIF get the smaller file. */
.hero picture { display: block; }
.hero-illustration { display: block; width: 100%; max-width: 390px; height: auto; margin-top: 6px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 1fr; gap: 9px; }
.project { min-width: 0; display: flex; flex-direction: column; border: 1px solid #d0d4b9; border-radius: 6px; padding: 17px 17px 0; background: linear-gradient(110deg, #f6f6eb, var(--card) 55%, #f4f4e9); box-shadow: inset 0 0 0 3px #f8f8ef, 0 1px 3px #59684a0d; }
.project:nth-child(odd of .project:not([hidden])):nth-last-child(1 of .project:not([hidden])) { grid-column: 1 / -1; }
.project-main { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 16px; flex: 1; padding-bottom: 17px; }
.project:nth-child(even) .project-main { grid-template-columns: 156px minmax(0,1fr); }
.project-art { display: flex; align-items: flex-start; justify-content: flex-start; padding-top: 1px; }
.project-illustration { display: block; max-width: 100%; width: var(--art-width); height: auto; object-fit: contain; }
.featured-pick > img[src$="ai-usage-widget-menubar-600.webp"], .project-illustration[src$="ai-usage-widget-menubar-600.webp"] { filter: none; }
/* Art drawn on a white square rather than transparency; multiply lets the card show through. */
.art-on-white { mix-blend-mode: multiply; }
.project-copy { min-width: 0; }
.project h2 { margin: 0 0 9px; font-size: 17px; line-height: 1.25; font-weight: 700; letter-spacing: -.15px; }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 9px; }
.project-title h2 { margin-bottom: 0; }
/* Project names link to each project's home; the padding enlarges the tap area without moving the layout. */
.project-name { display: inline-block; padding: 6px 0; margin: -6px 0; }
.star-count { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; color: var(--green); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.star-count-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid #b7c3a5; border-radius: 4px; background: #e9eedf; }
.star-count:hover .star-count-badge { background: #dce7cf; }
.project-benefit { margin: 0 0 12px; font-size: 20px; line-height: 1.28; font-weight: 500; letter-spacing: -.3px; text-wrap: pretty; }
.category { display: inline-block; padding: 3px 7px; color: #fffef6; background: #455f3d; border-radius: 4px; font-size: 13px; line-height: 1.2; }
.project.featured { padding-top: 31px; }
.project.featured .project-main { grid-template-columns: 184px minmax(0,1fr); gap: 16px; padding-bottom: 25px; }
.featured .project-art { padding-top: 9px; justify-content: center; }
.featured .project-illustration { max-width: 174px; max-height: 180px; }
.featured .project-benefit { font-size: 22px; }
.featured h2 { font-size: 19px; margin-bottom: 14px; }
.project-footer { min-height: 44px; display: flex; align-items: center; border-top: 1px solid #ccd1ba; }
.project-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; width: 100%; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.project-link span { min-width: 0; }
.project-link:hover span, .profile-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.link-icon { flex: 0 0 auto; width: 14px; height: 14px; object-fit: contain; }
.store-icon { flex: 0 0 auto; width: 25.2px; height: 25.2px; object-fit: contain; }
/* Optically center the visible letterforms within each store link. */
.project-link .store-icon + span { transform: translateY(.09em); }
.featured-link .store-icon + span { transform: translateY(-.05em); }
.project-preview { padding-left: 24px; font-size: 13px; color: #516047; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 0 18px; margin-top: 15px; border-top: 1px solid #a7b2a5; font-size: 16px; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.profile-link { display: inline-flex; gap: 6px; align-items: center; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 1123px) {
  .page-frame { margin: 24px 28px; }
  h1 { font-size: clamp(42px, 5.7vw, 64px); }
  .project-main { grid-template-columns: min(145px, 32%) minmax(0,1fr); }
  .project:nth-child(even) .project-main { grid-template-columns: min(156px, 34%) minmax(0,1fr); }
  .project.featured .project-main { grid-template-columns: min(184px, 40%) minmax(0,1fr); }
  .featured .project-illustration { max-width: 100%; }
}
@media (max-width: 850px) {
  .page-frame { margin: 18px; padding: 0 24px; }
  .site-header { margin-right: 40px; min-height: 60px; }
  nav { padding-right: 30px; gap: 20px; font-size: 15px; }
  .site-mark { right: 4px; width: 52px; height: 48px; top: 11px; }
  .hero::after { top: -5px; }
  .hero { padding: 34px 24px 34px 0; grid-template-columns: 61% 39%; }
  h1 { font-size: 43px; letter-spacing: -1.7px; margin-bottom: 20px; }
  .hero-description { font-size: 16px; }
  .hero-actions { gap: 12px; margin-top: 24px; }
  .button { min-height: 42px; font-size: 14px; padding: 9px 12px; }
  .button-outline { min-width: 86px; }
  .project { padding: 16px 13px 0; }
  .project .project-main, .project:nth-child(even) .project-main, .project.featured .project-main { grid-template-columns: 29% minmax(0,1fr); gap: 12px; }
  .project:nth-child(odd of .project:not([hidden])):nth-last-child(1 of .project:not([hidden])) .project-main { grid-template-columns: min(145px, 29%) minmax(0,1fr); }
  .project.featured { padding-top: 21px; }
  .project h2, .featured h2 { font-size: 16px; }
  .project-benefit, .featured .project-benefit { font-size: 18px; }
  .category { font-size: 12px; }
  .project-link { font-size: 12px; }
  .site-footer { font-size: 12px; }
}
/* Narrow screens and the phone dock show short labels (Shop, Rentals); the full names stay in aria-label. */
@media (max-width: 720px) {
  .site-header nav .nav-extra { display: none; }
}
@media (max-width: 620px) {
  html { scroll-padding-top: 16px; }
  .page-frame { margin: 12px; padding: 0 18px; }
  .site-header { min-height: 60px; margin-right: 0; padding: 6px 0; }
  .identity { font-size: 16px; }
  /* Phones: the main navigation becomes a floating dock at the bottom of the screen. */
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .page-frame .site-header nav { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%); gap: 2px; padding: 5px; width: max-content; max-width: calc(100vw - 16px); font-size: 14px; background: rgba(18, 75, 48, .95); border-radius: 22px; box-shadow: 0 10px 30px -8px rgba(17, 24, 16, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .site-header nav a { flex-direction: column; gap: 3px; min-height: 54px; padding: 6px 8px; border-radius: 17px; color: #e7efe2; line-height: 1.1; }
  .site-header nav a:hover { color: #fff; }
  .site-header nav a:focus-visible { outline-color: #fdfaf3; outline-offset: -3px; }
  .site-header nav a[aria-current="page"] { background: var(--paper); color: var(--green); text-decoration: none; }
  .site-header nav a::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
  .site-mark { top: 12px; width: 37px; height: 34px; right: 1px; }
  .hero::after { display: none; }
  .hero { display: flex; flex-direction: column; align-items: stretch; padding: 30px 0 25px; }
  h1 { font-size: clamp(32px, 8.8vw, 49px); letter-spacing: -1.5px; }
  .hero-description { max-width: 420px; font-size: 16px; }
  .hero-actions { gap: 12px; margin-top: 22px; }
  .button { font-size: 13px; min-height: 40px; padding: 9px 13px; }
  .hero-illustration { width: 240px; max-width: 82%; margin: 27px auto 0; }
  .project-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 10px; }
  .project, .project.featured { padding: 20px 14px 0; }
  .project .project-main, .project:nth-child(even) .project-main, .project.featured .project-main { grid-template-columns: 28% minmax(0,1fr); gap: 17px; padding-bottom: 18px; }
  .project-art, .featured .project-art { padding-top: 2px; }
  .project-benefit, .featured .project-benefit { font-size: 20px; }
  .project h2, .featured h2 { font-size: 17px; margin-bottom: 10px; }
  .category { font-size: 12px; }
  .project-link { font-size: 12px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 9px; font-size: 12px; padding: 15px 0 18px; }
}
@media (max-width: 360px) {
  .page-frame { padding: 0 13px; }
  h1 { font-size: 30px; }
  .hero-actions { gap: 10px; }
  .button { font-size: 12px; padding: 9px 10px; }
  .button-outline { min-width: 74px; }
  .project .project-main, .project:nth-child(even) .project-main, .project.featured .project-main { gap: 12px; grid-template-columns: 25% minmax(0,1fr); }
  .project-benefit, .featured .project-benefit { font-size: 18px; }
  .project h2, .featured h2 { font-size: 16px; }
  .featured-lead .featured-link { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.writing { margin: 42px 0 30px; }
.writing > h2 { margin: 0 0 20px; font-size: 27px; letter-spacing: -.6px; }
/* Two columns, like the project grid, so four posts fill even rows. */
.writing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.writing-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid #d0d4b9; border-radius: 6px; background: var(--card); }
.writing-card h3 { margin: 0 0 14px; font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
.writing-card p { flex: 1; margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
.writing-card a:hover { text-decoration: underline; text-underline-offset: 4px; }
.writing-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 0 6px; border: 1px solid #d0d4b9; border-radius: 6px; background: #f1f3e8; }
.writing-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); font-size: 15px; font-weight: 700; }
@media (max-width: 620px) { .writing-grid { grid-template-columns: 1fr; } .writing-card { padding: 22px 18px; } }
/* A third card spans both columns, with its picture beside the text. */
@media (min-width: 621px) {
  .writing-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr auto; column-gap: 28px; }
  .writing-card-wide h3, .writing-card-wide p, .writing-card-wide .writing-link { grid-column: 1; }
  .writing-card-wide .writing-thumb { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
}

/* Keep the content below the hero right-aligned with the header rule, so the
   vertical line under the tree sits in its own gutter at every width. */
:root { --rail: 44px; }
@media (max-width: 850px) { :root { --rail: 40px; } }
@media (max-width: 620px) { :root { --rail: 0px; } }
body:not(.blog-page) .project-grid, body:not(.blog-page) .writing, body:not(.blog-page) .site-footer { margin-right: var(--rail); }

/* Project discovery */
[hidden] { display: none !important; }
.section-title { margin: 0 0 18px; font-size: 27px; letter-spacing: -.6px; }
.featured-projects, .other-projects-title, .project-filters, .filter-count { margin-right: var(--rail); }
.featured-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.featured-pick { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 18px; padding: 24px; border: 1px solid #a7b2a5; border-radius: 6px; background: #edf1e3; }
.featured-pick > img { grid-column: 2; grid-row: 1; display: block; width: 100%; height: 190px; object-fit: contain; }
.featured-copy { grid-column: 1; grid-row: 1; min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.featured-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.featured-heading--metadata { row-gap: 0; }
.featured-heading--metadata h3 { flex-basis: 100%; }
.open-source-tag, .free-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--chip-line, #b7c3a5); border-radius: 4px; background: var(--chip, #e9eedf); color: var(--green); font-size: 11px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.open-source-tag svg, .free-tag svg { width: 13px; height: 13px; flex: none; }
.featured-pick h3 { font-size: 18px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.featured-pick p { margin: 0 0 18px; font-size: 16px; line-height: 1.4; }
.featured-link { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; min-height: 44px; margin-top: auto; font-size: 14px; font-weight: 700; color: var(--green); }
.featured-lead { grid-row: span 2; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.featured-lead > img { align-self: center; width: min(100%, 330px); height: 310px; }
.featured-lead .featured-copy { flex: 1; }
.featured-lead h3 { font-size: 28px; letter-spacing: -.4px; }
.featured-lead p { font-size: 18px; }
@media (min-width: 901px) and (max-width: 1123px) {
  .featured-pick { grid-template-columns: minmax(0, 1fr) 125px; gap: 14px; padding: 20px; }
}
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-lead { grid-row: auto; }
  .featured-pick { grid-template-columns: minmax(0, 1fr) 180px; }
  .featured-pick > img { height: 180px; }
  .featured-lead > img { width: min(100%, 260px); height: 250px; }
}
.other-projects-title { margin-top: 36px; }
.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.project-filters button { min-height: 44px; padding: 9px 14px; border: 1px solid #a7b2a5; border-radius: 5px; background: transparent; color: var(--green); font: inherit; font-size: 14px; cursor: pointer; }
.project-filters button:hover { background: #e9efdf; }
.project-filters button[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.filter-count { margin-top: 0; margin-bottom: 16px; font-size: 13px; color: #516047; }
.project-copy .open-source-tag, .project-copy .free-tag { vertical-align: bottom; margin-top: 5px; }
.project-status { display: inline-block; padding: 3px 7px; border: 1px solid #b7beaa; border-radius: 4px; font-size: 12px; line-height: 1.2; color: #455f3d; margin-top: 5px; }
.all-writing { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; font-weight: 700; color: var(--green); }
.all-writing:hover { text-decoration: underline; }

/* Whole-tile links: a click anywhere on a project or writing tile opens its title link, whose ::after
   stretches over the tile (z-index 1, above art that dark mode filters into its own layer). The tile's
   other links (store, GitHub, stars, Read article) sit above that and keep their own destinations.
   Keyboard focus stays on the title link but rings the whole tile. */
.featured-pick, .project, .writing-card { position: relative; transition: border-color .15s; }
.featured-pick .project-name::after, .project .project-name::after, .writing-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 5px; }
.featured-link, .star-count, .project-link, .writing-link { position: relative; z-index: 2; }
.project .project-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.featured-pick .project-name:focus-visible, .project .project-name:focus-visible, .writing-card h3 a:focus-visible { outline: none; }
.featured-pick .project-name:focus-visible::after, .project .project-name:focus-visible::after, .writing-card h3 a:focus-visible::after { outline: 2px solid var(--green); outline-offset: 3px; }
@media (hover: hover) {
  .featured-pick:has(.project-name:hover), .project:has(.project-name:hover), .writing-card:has(h3 a:hover) { border-color: #789182; }
}
@media (max-width: 620px) {
  .featured-grid { gap: 10px; }
  .featured-pick { grid-template-columns: minmax(0, 1fr) clamp(84px, 24vw, 140px); gap: 14px; padding: 18px; }
  .featured-pick > img { height: 140px; }
  .featured-pick h3 { font-size: 17px; }
  .featured-pick p { font-size: 15px; margin-bottom: 12px; }
  .featured-lead > img { width: min(100%, 220px); height: 210px; }
  .featured-lead h3 { font-size: 23px; }
  .featured-lead p { font-size: 17px; }
  .project-filters button { font-size: 13px; padding: 9px 11px; }
}

/* Email sign-up under Featured projects. The form posts to the /api/subscribe/ function on Vercel. */
.signup { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 30px; margin: 22px var(--rail) 0 0; padding: 26px 24px; border: 1px solid #a7b2a5; border-radius: 6px; background: linear-gradient(110deg, #f6f6eb, var(--card) 55%, #f4f4e9); }
.signup h2 { margin: 0 0 10px; font-size: 25px; line-height: 1.2; letter-spacing: -.5px; }
.signup-intro p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.signup-intro .signup-privacy { margin: 0; font-size: 13px; line-height: 1.45; color: #516047; }
.signup-form { min-width: 0; }
.signup-topics { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.signup-topics legend { margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 700; color: #455f3d; }
.signup-topic { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid #c9d0bd; border-radius: 5px; background: #fdfbf5; cursor: pointer; }
.signup-topic:hover { border-color: #789182; }
.signup-topic:has(input:checked) { border-color: var(--green); background: #e9efdf; }
.signup-topic:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.signup-topic input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); cursor: pointer; }
.signup-topic-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.signup-topic-name { display: block; font-size: 16px; line-height: 1.25; }
/* "Get the app free for life!" badge on the beta option. */
.signup-free { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
/* Beta tester invites stands out in violet, on purpose off the green palette. */
.signup-topic-beta { border: 1.5px solid #8b5cf6; background: #f5f0ff; }
.signup-topic-beta:hover { border-color: #6d28d9; }
.signup-topic-beta:has(input:checked) { border-color: #5b21b6; background: #ebe2ff; }
.signup-topic-beta:has(input:focus-visible) { outline-color: #6d28d9; }
.signup-topic-beta input { accent-color: #6d28d9; }
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; margin-top: 16px; }
.signup-email-label { grid-column: 1 / -1; font-size: 14px; font-weight: 700; color: #455f3d; }
.signup-email { min-width: 0; min-height: 46px; padding: 10px 14px; border: 1.5px solid #789182; border-radius: 4px; background: #fffefa; color: var(--ink); font: inherit; font-size: 16px; }
.signup-email::placeholder { color: #7b8775; }
.signup-email:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-color: var(--green); }
.signup-button { min-width: 116px; min-height: 46px; padding: 10px 22px; font-family: inherit; font-size: 16px; cursor: pointer; }
.signup-button:disabled { opacity: .7; cursor: progress; }
.signup-status { margin: 10px 0 0; font-size: 14px; line-height: 1.45; }
.signup-status:empty { margin: 0; }
.signup-status[data-kind="error"], .signup-result-error { color: #9a2a1c; }
.signup-status[data-kind="success"], .signup-result { color: var(--green); font-weight: 700; }
.signup-status a, .signup-result a { text-decoration: underline; text-underline-offset: 3px; }
/* After signing up, the card shrinks to one line with a way back to the form. */
.signup.is-done { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 12px 16px 12px 24px; }
.signup.is-done .signup-intro { display: none; }
.signup-done { display: contents; }
.signup-done-text { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 700; color: var(--green); }
.signup-done-check { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fffef6; font-size: 15px; line-height: 1; }
.signup-edit { min-height: 44px; padding: 8px 18px; font-family: inherit; font-size: 15px; cursor: pointer; }
/* Without JavaScript the form posts away and comes back to one of these. */
.signup-result { display: none; margin: 10px 0 0; font-size: 14px; line-height: 1.45; }
.signup-result:target { display: block; }
.signup-result-error { font-weight: 400; }
@media (min-width: 901px) and (max-width: 1123px) {
  .signup { gap: 22px; padding: 22px 20px; }
}
@media (max-width: 900px) {
  .signup { grid-template-columns: 1fr; gap: 18px; }
  .signup-intro p:not(.signup-privacy) { margin-bottom: 8px; }
}
@media (max-width: 620px) {
  .signup { margin-top: 16px; padding: 20px 16px; }
  .signup.is-done { gap: 10px 12px; padding: 10px 10px 10px 14px; }
  .signup-done-text { gap: 8px; font-size: 16px; }
  .signup-done-check { width: 22px; height: 22px; font-size: 13px; }
  .signup-edit { padding: 8px 14px; }
  .signup h2 { font-size: 22px; }
  .signup-intro p { font-size: 15px; }
  .signup-topic { padding: 11px 12px; }
  .signup-row { grid-template-columns: 1fr; }
  .signup-button { width: 100%; }
}
@media (max-width: 360px) {
  .signup { padding: 18px 13px; }
  .signup-topic { gap: 10px; padding: 10px; }
}

/* Dark mode follows the visitor's system setting: a forest-night page with cream text and mint links.
   Light colors above stay the source of truth; this block only swaps them on screens (print stays light). */
@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0e1511;
    --card: #17221b;
    --ink: #ebe8da;
    --green: #98d4a8;
    --rule: #3a4a3e;
    /* Dark-only tokens. --green is the text accent here; filled controls use --fill. */
    --fill: #2a6b47;
    --fill-hover: #33805a;
    --on-fill: #f6f3e6;
    --frame: #4f6656;
    --card-line: #2d3b31;
    --soft: #a9b5a3;
    --soft-strong: #c3ccbb;
    --hover: #213326;
    --field: #111a14;
    --chip: #1f3326;
    --chip-line: #3a5a44;
    --tag: #2a4733;
    --tag-ink: #dcecd9;
    /* Turns the dark-outlined, cream-filled artwork into quiet sage line art. */
    --line-art: invert(.734) sepia(1) saturate(.486) hue-rotate(57.9deg) brightness(.743) contrast(1.479);
  }
  ::selection { background: #2f5a3d; }
  .skip-link { background: var(--fill); color: var(--on-fill); }
  .page-frame { border-color: var(--frame); background: radial-gradient(ellipse at 40% 20%, #18231c 0, #141e18 60%, #111a15 100%); box-shadow: 0 0 0 2px #18211b; }
  .site-header, .site-footer { border-color: var(--rule); }
  .hero::after { border-color: var(--frame); }
  .button, .button:hover, .skip-link:focus { color: var(--on-fill); }
  .button { background: var(--fill); border-color: var(--fill); }
  .button:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
  .button-outline { background: transparent; border-color: #5f8a6c; color: var(--green); }
  .button-outline:hover { background: var(--hover); color: var(--green); }
  .project { border-color: var(--card-line); background: linear-gradient(110deg, #16201a, #19251d 55%, #17211b); box-shadow: inset 0 0 0 3px #1a261e, 0 1px 3px #0006; }
  .star-count-badge { border-color: var(--chip-line); background: var(--chip); }
  .star-count:hover .star-count-badge { background: var(--hover); }
  .category { color: var(--tag-ink); background: var(--tag); }
  .project-footer { border-color: var(--card-line); }
  .project-preview, .filter-count { color: var(--soft); }
  .writing-card { border-color: var(--card-line); }
  @media (hover: hover) {
    .featured-pick:has(.project-name:hover), .project:has(.project-name:hover), .writing-card:has(h3 a:hover) { border-color: #5f8a6c; }
  }
  .writing-thumb { border-color: var(--card-line); background: var(--card); }
  .featured-pick { border-color: var(--rule); background: #1a281f; }
  .project-filters button { border-color: var(--rule); }
  .project-filters button:hover { background: var(--hover); }
  .project-filters button[aria-pressed="true"] { color: var(--on-fill); background: var(--fill); border-color: var(--fill); }
  .project-status { border-color: var(--rule); color: var(--soft); }
  .signup { border-color: var(--rule); background: linear-gradient(110deg, #16201a, #19251d 55%, #17211b); }
  .signup-intro .signup-privacy { color: var(--soft); }
  .signup-topics legend, .signup-email-label { color: var(--soft-strong); }
  .signup-topic { border-color: var(--card-line); background: var(--field); }
  .signup-topic:hover, .signup-email { border-color: var(--frame); }
  .signup-topic:has(input:checked) { border-color: var(--green); background: var(--hover); }
  .signup-topic-beta { border-color: #7c5cd6; background: #201a33; }
  .signup-topic-beta:hover { border-color: #a78bfa; }
  .signup-topic-beta:has(input:checked) { border-color: #a78bfa; background: #2b2245; }
  .signup-topic-beta:has(input:focus-visible) { outline-color: #a78bfa; }
  .signup-topic-beta input { accent-color: #a78bfa; }
  .signup-free { background: var(--fill); color: var(--on-fill); }
  .signup-email { background: var(--field); }
  .signup-email::placeholder { color: #7d8a78; }
  .signup-status[data-kind="error"], .signup-result-error { color: #f1a395; }
  .signup-done-check { background: var(--fill); color: var(--on-fill); }
  /* Artwork and the dark-green Tabler icons. */
  .hero-illustration, .featured-pick > img, .project-illustration, .line-art { filter: var(--line-art); }
  /* The corner mark draws with the colors that filter gives the other art. */
  .site-mark { --mark-line: #94a98b; --mark-back: #2f3b2b; --mark-front: #293425; --mark-steel: #202a1c; --mark-trace: #98d4a8; }
  /* Art drawn on white: after the filter the white is darker than the card, so lighten drops it. */
  .art-on-white { mix-blend-mode: lighten; }
  .link-icon, .store-icon { filter: invert(1) hue-rotate(180deg) brightness(1.05); }
}
@media screen and (prefers-color-scheme: dark) and (max-width: 620px) {
  .page-frame .site-header nav { background: rgba(26, 44, 33, .94); box-shadow: 0 10px 30px -8px #000c, inset 0 0 0 1px #3c5c46; }
  .site-header nav a { color: #d5e3d2; }
  .site-header nav a:hover { color: #fff; }
  .site-header nav a:focus-visible { outline-color: var(--green); }
  .site-header nav a[aria-current="page"] { background: var(--fill); color: var(--on-fill); }
}

/* Cloud Media Shrinker download count on its featured tile, in the same chip style as the GitHub star badge. The number comes from cloud-media-shrinker/downloads.json (cloud-media-shrinker/downloads-count.js). */
.download-count { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #b7c3a5; border-radius: 4px; background: #e9eedf; color: var(--green); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.download-count svg { flex: none; width: 12px; height: 12px; }
@media screen and (prefers-color-scheme: dark) { .download-count { border-color: var(--chip-line); background: var(--chip); } }

/* Keep the widget and provider meters unchanged while its monitor follows the artwork palette. */
@media screen and (prefers-color-scheme: dark) {
  .featured-pick > img[src$="ai-usage-widget-menubar-600.webp"], .project-illustration[src$="ai-usage-widget-menubar-600.webp"] { content: url("assets/illustrations/ai-usage-widget-menubar-dark-600.webp"); }
}
