/* GNextLab — a quiet shelf for useful little things. */
:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #292b25;
  --muted: #72736a;
  --rule: #dedfd6;
  --orange: #c74f2c;
  --project-accent: #c74f2c;
  --project-tint: #f4ede6;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: var(--orange); content: ""; z-index: 5; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; border-radius: 3px; }
::selection { color: var(--paper); background: var(--orange); }
img, svg { display: block; }
button, h1, h2, h3, p { margin: 0; }
.page-shell { max-width: 1360px; margin: 0 auto; padding: 0 64px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; padding: 12px 18px; background: var(--ink); color: white; z-index: 10; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 25px; letter-spacing: -1.2px; }
.brand-mark { width: 29px; height: 29px; color: var(--orange); }
.brand-period { color: var(--orange); }
.header-note { font-size: 12px; color: var(--muted); margin-right: auto; margin-left: 20px; }
.header-link { display: inline-flex; gap: 24px; align-items: center; font-size: 13px; font-weight: 500; padding: 10px 0; }
.arrow { font-size: 23px; line-height: 1; }
.header-link:hover { color: var(--orange); }

.intro { display: grid; grid-template-columns: 1fr 290px; gap: 50px; align-items: end; padding: 16px 0 28px; }
.eyebrow { display: flex; gap: 10px; align-items: center; font-size: 10px; font-weight: 500; letter-spacing: 1.65px; line-height: 1.6; text-transform: uppercase; }
.little-line { width: 19px; height: 1px; background: var(--orange); }
h1 { margin: 23px 0 0 -5px; font-size: clamp(66px, 7.3vw, 100px); font-weight: 500; letter-spacing: -5.5px; line-height: 0.97; }
h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -5px; }
.title-period { display: inline-block; color: var(--orange); font-family: var(--sans); font-size: 0.78em; font-weight: 400; line-height: 0; vertical-align: 0.06em; margin-left: 9px; }
.intro-aside { padding-bottom: 7px; }
.intro-aside > p { max-width: 290px; font-size: 17px; font-weight: 400; line-height: 1.65; letter-spacing: -0.18px; }
.text-link { display: inline-flex; gap: 22px; align-items: center; margin-top: 23px; font-size: 11px; color: var(--muted); }
.text-link span { font-size: 18px; transition: transform 180ms ease; }
.text-link:hover { color: var(--orange); }
.text-link:hover span { transform: translateY(3px); }

.collection { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.collection:focus { outline: none; }
.collection-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 0; }
.section-number { color: var(--muted); margin-right: 6px; letter-spacing: 0; }
.collection-count { color: var(--muted); font-size: 11px; }
.collection-count [data-project-count] { color: var(--ink); font-variant-numeric: tabular-nums; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); padding-bottom: 24px; gap: 28px; }
.app-shelf { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 23px 8px 16px 0; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.app-link { position: relative; min-width: 0; display: flex; align-items: center; flex-direction: column; text-align: center; cursor: pointer; padding: 8px 4px 16px; color: var(--ink); border: 0; background: transparent; }
.app-serial { align-self: flex-start; margin-left: 12px; margin-bottom: 16px; color: #888a7f; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 9px; line-height: 1; transition: color 180ms ease; }
.app-icon-wrap { position: relative; isolation: isolate; display: flex; justify-content: center; max-width: 100%; margin-bottom: 10px; }
.app-icon { position: relative; width: clamp(112px, 12vw, 144px); max-width: 100%; height: auto; border-radius: 6.25%; transition: transform 220ms cubic-bezier(.2,.65,.25,1); }
.app-name { display: flex; align-items: center; justify-content: center; min-height: 2.8em; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: -0.2px; }
.app-caption { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.selection-marker { position: absolute; bottom: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--app-accent); opacity: 0; transform: scale(.5); transition: opacity 180ms ease, transform 180ms ease; }
.app-link.is-active .app-name { color: var(--app-accent); }
.app-link.is-active .app-serial { color: var(--app-accent); }
.app-link.is-active .selection-marker { opacity: 1; transform: scale(1); }
.app-link.is-active .app-icon { transform: translateY(-3px); }
.shelf-caption { display: flex; align-items: center; gap: 7px; margin: 20px 12px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.cursor-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.shelf-line { flex: 1; height: 1px; margin-left: 12px; background: var(--rule); }
.touch-hint { display: none; }

.project-detail { display: flex; flex-direction: column; min-width: 0; padding: 26px 27px 22px; background: var(--project-tint); border: 1px solid #262a2010; border-radius: 3px; transition: background-color 240ms ease; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.detail-category { font-size: 9px; color: var(--project-accent); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.detail-counter { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-counter > span:first-child { color: var(--ink); }
.detail-copy { flex: 1; }
.detail-copy h3 { font-size: 29px; font-weight: 500; line-height: 1.15; letter-spacing: -1.2px; }
.project-description { min-height: 94px; margin-top: 14px; color: #64675d; font-size: 13px; line-height: 1.8; }
.project-features { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 17px 0 24px; list-style: none; }
.project-features li { padding: 5px 7px; border: 1px solid #343b2520; border-radius: 3px; color: #63665c; font-size: 10px; line-height: 1.2; }
.detail-bottom { margin-top: auto; }
.launch-link { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 3px; font-size: 11px; transition: background 180ms ease, border-color 180ms ease; }
.launch-arrow { font-size: 21px; line-height: 1; transition: transform 180ms ease; }
.launch-link:hover { background: var(--project-accent); border-color: var(--project-accent); }
.launch-link:hover .launch-arrow { transform: translate(2px, -2px); }
.project-domain { display: block; margin-top: 10px; text-align: center; color: var(--muted); font-size: 9px; letter-spacing: .25px; }
.no-script-tools { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 24px; font-size: 14px; }
.no-script-tools a { text-decoration: underline; text-underline-offset: 4px; }

.community { display: flex; align-items: center; gap: 23px; padding: 36px 0 37px; }
.community-symbol { width: 55px; flex: 0 0 55px; color: var(--orange); transform: rotate(-9deg); }
.community-symbol svg { width: 100%; }
.community-copy { flex: 1; }
.community-copy h2 { font-size: 16px; font-weight: 500; letter-spacing: -.35px; line-height: 1.4; }
.community-copy p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.community-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 33px; padding: 13px 16px; border: 1px solid #cccdc3; border-radius: 3px; font-size: 11px; white-space: nowrap; transition: border-color 180ms ease, background 180ms ease; }
.community-link > span[aria-hidden] { font-size: 20px; line-height: 1; }
.community-link:hover { border-color: var(--orange); background: #eee9dd; }
.site-footer { padding: 22px 0 27px; border-top: 1px solid var(--rule); font-size: 9px; color: var(--muted); }

@media (hover: hover) {
  .app-link:hover .app-name { color: var(--app-accent); }
}

@media (min-width: 1600px) {
  .page-shell { padding: 0 48px; }
  .app-shelf { padding-top: 35px; padding-bottom: 27px; }
  .app-grid { gap: 18px; }
}

@media (max-width: 1100px) {
  .page-shell { padding: 0 38px; }
  .intro { grid-template-columns: 1fr 260px; gap: 28px; }
  h1 { font-size: 83px; }
  .workbench { gap: 20px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .app-shelf { padding-right: 0; }
  .app-grid { gap: 5px; }
  .project-detail { padding: 23px 22px 20px; }
  .detail-copy h3 { font-size: 25px; }
  .app-name { font-size: 12px; }
  .app-caption { font-size: 9px; }
}

@media (max-width: 850px) {
  .page-shell { padding: 0 28px; }
  .header-note { display: none; }
  .intro { padding: 16px 0 28px; grid-template-columns: 1fr 225px; gap: 20px; }
  h1 { font-size: 66px; letter-spacing: -4px; }
  h1 em { letter-spacing: -4px; }
  .intro-aside > p { font-size: 14px; }
  .text-link { gap: 12px; font-size: 10px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.2px; }
  .workbench { grid-template-columns: 1fr; gap: 18px; }
  .app-shelf { padding: 8px 0 0; }
  .app-grid { gap: 16px; }
  .app-link { padding: 12px 8px 23px; }
  .app-serial { margin-bottom: 12px; }
  .app-icon { width: 128px; }
  .app-name { font-size: 14px; }
  .app-caption { font-size: 10px; }
  .shelf-caption { margin-top: 15px; }
  .project-detail { padding: 24px; }
  .detail-topline { margin-bottom: 18px; }
  .detail-copy h3 { font-size: 29px; }
  .project-description { min-height: 0; max-width: 530px; font-size: 13px; }
  .project-features { margin: 15px 0 20px; }
  .project-features li { font-size: 10px; }
  .detail-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
  .launch-link { min-width: 195px; }
  .project-domain { margin: 0; }
  .community { gap: 18px; }
  .community-symbol { width: 44px; flex-basis: 44px; }
  .community-copy h2 { font-size: 14px; }
  .community-link { gap: 20px; }
}

@media (max-width: 700px) {
  .page-shell { padding: 0 22px; }
  .site-header { gap: 12px; }
  .brand { font-size: 23px; gap: 8px; }
  .brand-mark { width: 25px; height: 25px; }
  .header-link { font-size: 11px; gap: 12px; }
  .header-link .arrow { font-size: 20px; }
  .intro { grid-template-columns: 1fr; padding: 16px 0 28px; gap: 24px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 1.2px; gap: 8px; }
  .little-line { width: 14px; }
  h1 { margin-top: 22px; margin-left: -2px; font-size: clamp(44px, 13vw, 72px); letter-spacing: -3.7px; line-height: 1; }
  h1 em { letter-spacing: -3.7px; }
  .title-period { margin-left: 7px; }
  .intro-aside { padding-bottom: 0; }
  .intro-aside > p { max-width: 330px; font-size: 14px; line-height: 1.65; }
  .text-link { margin-top: 13px; }
  .collection-heading { padding: 19px 0; }
  .collection-count { font-size: 9px; }
  .collection-heading .eyebrow { font-size: 8px; }
  .section-number { margin-right: 0; }
  .workbench { padding-bottom: 19px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .app-link { padding: 11px 2px 22px; border-radius: 5px; }
  .app-serial { font-size: 8px; margin-left: 7px; margin-bottom: 13px; }
  .app-icon-wrap { margin-bottom: 10px; }
  .app-icon { width: clamp(100px, 29vw, 132px); }
  .app-name { font-size: clamp(10px, 2.7vw, 13px); letter-spacing: -.2px; }
  .app-caption { display: none; }
  .shelf-caption { font-size: 9px; margin-left: 5px; margin-right: 5px; }
  .project-detail { padding: 23px 21px 20px; }
  .detail-category { font-size: 8px; }
  .detail-copy h3 { font-size: 28px; }
  .project-description { min-height: 96px; font-size: 13px; line-height: 1.85; }
  .project-features { min-height: 24px; margin-bottom: 23px; }
  .project-features li { font-size: 10px; }
  .detail-bottom { display: block; }
  .launch-link { min-height: 46px; font-size: 12px; }
  .project-domain { margin-top: 11px; }
  .community { display: grid; grid-template-columns: 34px 1fr; gap: 13px 18px; padding: 29px 0 30px; }
  .community-symbol { width: 37px; align-self: start; margin-top: 3px; }
  .community-copy h2 { max-width: 240px; font-size: 16px; line-height: 1.5; }
  .community-copy p { font-size: 11px; line-height: 1.7; max-width: 280px; }
  .community-link { grid-column: 2; justify-self: start; font-size: 11px; padding: 12px 15px; }
  .site-footer { padding: 21px 0; }
}

/* Fit the four-tool desktop collection to the available viewport height.
   Keep natural document flow for zoom, small screens, and future extra rows. */
@media (min-width: 851px) {
  .page-shell { min-height: 100svh; display: flex; flex-direction: column; }
  .page-shell > main { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
  .site-header { min-height: 44px; flex-shrink: 0; }
  .intro { padding: 10px 0 clamp(12px, 2.5svh, 28px); }
  h1 { margin-top: 14px; font-size: clamp(48px, 9svh, 82px); letter-spacing: -4px; }
  h1 em { letter-spacing: -4px; }
  .intro-aside > p { font-size: 15px; line-height: 1.55; }
  .text-link { margin-top: 14px; }
  .collection-heading { padding: 12px 0; }
  .workbench { padding-bottom: 16px; }
  .app-shelf { padding: 0 8px 0 0; }
  .app-grid { gap: 8px; }
  .app-link { padding: 0 8px 8px; }
  .app-serial { position: absolute; top: 10px; left: 10px; margin: 0; }
  .app-icon { width: clamp(96px, 14.5svh, 136px); }
  .app-icon-wrap { margin-bottom: 6px; }
  .selection-marker { bottom: 0; }
  .app-name { min-height: 1.4em; }
  .app-caption { margin-top: 2px; }
  .shelf-caption { margin-top: 8px; }
  .project-detail { padding: 18px 22px 16px; }
  .detail-topline { margin-bottom: 12px; }
  .detail-copy h3 { font-size: 26px; }
  .project-description { min-height: 66px; margin-top: 10px; line-height: 1.65; }
  .project-features { margin: 12px 0 16px; }
  .launch-link { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .project-domain { margin-top: 8px; }
  .community { padding: clamp(12px, 2svh, 22px) 0; }
  .community-symbol { width: 45px; flex-basis: 45px; }
  .community-copy h2 { font-size: 15px; }
  .community-copy p { margin-top: 5px; }
  .community-link { padding-top: 10px; padding-bottom: 10px; }
  .site-footer { padding: 11px 0; flex-shrink: 0; }
}

@media (min-width: 851px) and (max-height: 720px) {
  .intro { padding: 8px 0 10px; }
  h1 { font-size: clamp(44px, 8svh, 56px); margin-top: 10px; letter-spacing: -2.5px; }
  h1 em { letter-spacing: -2.5px; }
  .intro-aside > p { font-size: 13px; }
  .text-link { margin-top: 8px; }
  .collection-heading { padding: 9px 0; }
  .workbench { padding-bottom: 12px; }
  .project-detail { padding: 14px 20px; }
  .detail-topline { margin-bottom: 10px; }
  .detail-copy h3 { font-size: 24px; }
  .project-description { min-height: 64px; }
  .project-features { margin: 10px 0 12px; }
  .community { padding: 10px 0; }
  .site-footer { padding: 8px 0; }
}

@media (hover: none), (pointer: coarse) {
  .pointer-hint { display: none; }
  .touch-hint { display: inline; }
}

@media (prefers-reduced-motion: no-preference) {
  .intro { animation: settle-in 650ms ease both; }
  .collection { animation: settle-in 650ms 90ms ease both; }
  @keyframes settle-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
