/* Sharp Pencil Apps — site styles.
   One quiet dark frame for every app (the look of the LancerPad App Store screenshots), with each
   app bringing its own accent color. Apple's system font: no font files, nothing loaded from elsewhere. */

:root {
  --bg: #121419;            /* page */
  --bg-top: #1e222c;        /* top of the hero gradient (App Store screenshots) */
  --panel: #1a1d24;         /* boxes on the page */
  --line: #2c313b;          /* hairlines and borders */
  --text: #d3d6db;          /* body text */
  --text-soft: #9ba1aa;     /* secondary text */
  --white: #ffffff;         /* headlines */
  --link: #5aa8ff;

  /* LancerPad's colors: Apple system blue, and the editor's value colors (dark mode) */
  --lancerpad: #0a84ff;
  --button: #0071e3;        /* white text passes contrast on this blue */
  --button-hover: #0062c4;
  --lp-fixed: #4195ff;
  --lp-entry: #60d0e0;
  --lp-answer: #68d068;
  --editor: #1e1e1e;
  --editor-comment: #8b9098;
  --editor-text: #d6d6d6;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--panel); color: var(--white); padding: 0.5rem 0.75rem; z-index: 10; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header and footer */

.site-head { background: var(--bg-top); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }

.wordmark { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--white); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1; }
.wordmark svg { width: 3rem; height: auto; flex: none; }

.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 1rem; }
.site-nav a:hover { color: var(--white); }
.site-nav a[aria-current="page"] { color: var(--white); text-decoration: underline; text-decoration-thickness: 2px; }

.site-foot { border-top: 1px solid var(--line); margin-top: 6rem; }
.site-foot .wrap { padding-top: 1.75rem; padding-bottom: 2.5rem; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1rem 2rem; font-size: 0.95rem; color: var(--text-soft); }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--text); }

/* ---------- type */

h1, h2, h3 { font-family: var(--display); color: var(--white); margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.75rem); line-height: 1.05; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
h3 { font-weight: 600; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
strong { color: var(--white); font-weight: 600; }
.lead { font-size: 1.3rem; line-height: 1.5; max-width: 34em; color: var(--text); }
.small { font-size: 0.95rem; color: var(--text-soft); }

/* ---------- page sections */

.hero { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%); }
.hero .wrap { padding-top: 4.5rem; padding-bottom: 3rem; }
.hero h1 { max-width: 16ch; margin-bottom: 1.25rem; }

.section { padding-top: 4.5rem; }
.measure { max-width: 40rem; }
.measure > h2, .section > h2 { margin-bottom: 1rem; }

/* The list of apps on the home page: one row per app */
.apps { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.app-row { display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .app-row { grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 2rem; } }
.app-row img { width: 100%; max-width: 7.5rem; }
.app-row h3 { font-size: 1.6rem; margin-bottom: 0.15rem; }
.app-row .app-line { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.app-row .app-about { margin: 0 0 0.5rem; max-width: 34em; }
.app-row .app-meta { margin: 0; font-size: 0.95rem; color: var(--text-soft); }
.app-row .links { grid-column: 1 / -1; align-items: center; }
@media (min-width: 52rem) { .app-row .links { grid-column: auto; flex-direction: column; align-items: flex-start; } }

.lancerpad-accent { color: var(--lancerpad); }

.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.button { display: inline-block; background: var(--button); color: var(--white); text-decoration: none;
  font-weight: 600; font-size: 1rem; line-height: 1; padding: 0.75rem 1.25rem; border-radius: 8px; }
.button:hover { background: var(--button-hover); }

/* What you can count on */
.promises { display: grid; gap: 1.75rem 3rem; margin: 1.5rem 0 0; }
@media (min-width: 48rem) { .promises { grid-template-columns: 1fr 1fr; } }
.promises dt { color: var(--white); font-weight: 600; margin-bottom: 0.25rem; }
.promises dd { margin: 0; }

/* ---------- LancerPad page */

.product-hero { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%); text-align: center; }
.product-hero .wrap { padding-top: 3.5rem; padding-bottom: 1rem; }
.product-hero h1 { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.product-hero .app-name { display: inline-flex; align-items: center; gap: 0.75rem; font-size: 1.4rem; letter-spacing: -0.01em; color: var(--text); }
.product-hero .app-name img { width: 56px; height: 56px; }
.product-hero .hero-line { font-size: clamp(2.8rem, 6.5vw, 4.75rem); line-height: 1; }
.product-hero .hero-sub { font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  color: var(--lancerpad); letter-spacing: -0.01em; margin: 1rem 0 0.5rem; }
.product-hero .availability { color: var(--text-soft); margin: 0 0 2.25rem; }
.product-hero .sheet { text-align: left; max-width: 46rem; margin: 0 auto; }

.kinds { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: 1rem; }
.kinds li { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; align-items: baseline; }
.kinds code { font-family: var(--mono); font-size: 1rem; }
.fixed { color: var(--lp-fixed); }
.entry { color: var(--lp-entry); }
.answer { color: var(--lp-answer); }

.library { display: grid; gap: 1.25rem 3rem; margin: 1.5rem 0; }
@media (min-width: 48rem) { .library { grid-template-columns: 1fr 1fr; } }
.library div { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.library dt { color: var(--white); font-weight: 600; }
.library dt span { font-weight: 400; color: var(--text-soft); }
.library dd { margin: 0.2rem 0 0; }

.plain-list { margin: 1rem 0; padding-left: 1.25rem; }
.plain-list li { margin-bottom: 0.5rem; }

.plans { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
@media (min-width: 48rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plans > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; }
.plans > div:last-child { border-color: var(--lancerpad); }
.plans h3 { margin-bottom: 0.4rem; }
.plans p { margin: 0; }

.story { border-left: 3px solid var(--lancerpad); padding: 0.25rem 0 0.25rem 1.5rem; max-width: 40rem; }
.story h2 { margin-bottom: 1rem; }
.signature { color: var(--white); font-size: 1.2rem; font-style: italic; margin: 0.25rem 0 0; }

/* ---------- support and privacy */

.doc { max-width: 42rem; padding-top: 3.5rem; }
.doc h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.doc h2 { font-size: 1.45rem; margin: 2.25rem 0 0.5rem; }
.doc .contact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.doc .contact p:last-child { margin-bottom: 0; }
.email { font-weight: 600; font-size: 1.15rem; }
.path { color: var(--white); font-weight: 600; }

/* ---------- the live pad: a LancerPad editor window */

.sheet { background: var(--editor); border: 1px solid #34373d; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1rem; background: #2a2a2c; border-bottom: 1px solid #38383b; }
.sheet-title { margin: 0; color: var(--white); font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.sheet-tools { display: flex; align-items: center; gap: 0.5rem; }
.pad { margin: 0; padding: 1rem 1.25rem 0.5rem; overflow-x: auto; font-family: var(--mono); font-size: 0.98rem;
  line-height: 1.6; color: var(--editor-text); }
.pl { display: block; white-space: pre; min-height: 1.6em; }
.pl .c { color: var(--editor-comment); }
.pad label { cursor: text; }
.pad input { font: inherit; background: transparent; border: 0;
  border-bottom: 1px dashed currentColor; padding: 0 0.15ch; margin: 0; border-radius: 0; min-width: 2ch; }
.pad output { font-weight: 600; }

.just-solved { animation: solved-flash 1.6s ease-out; }
@keyframes solved-flash { from { background-color: rgba(96, 208, 224, 0.45); } to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .just-solved { animation: none; background-color: rgba(96, 208, 224, 0.3); }
}

.btn { font: 600 0.95rem/1 var(--sans); color: var(--white); background: var(--button); border: 0;
  border-radius: 7px; padding: 0.55rem 1.1rem; cursor: pointer; }
.btn:hover { background: var(--button-hover); }
.btn-quiet { font: 400 0.95rem/1 var(--sans); color: var(--text); background: none; border: 0; padding: 0.4rem 0.25rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.btn-quiet:hover { color: var(--white); }
.pad-status { margin: 0; padding: 0.55rem 1.25rem 0.7rem; border-top: 1px solid #2c2c2e; font-size: 0.9rem;
  color: var(--text-soft); min-height: 2.6em; }
.sheet noscript p { padding: 0 1.25rem 0.75rem; margin: 0; }

@media (max-width: 30rem) {
  .pad { font-size: 0.82rem; padding-left: 0.9rem; padding-right: 0.9rem; }
  .kinds li { grid-template-columns: 1fr; gap: 0.25rem; }
  .app-row { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
}

/* A narrow text column that still lines up with the page's left edge */
.wrap.measure { max-width: 68rem; }
.wrap.measure > * { max-width: 40rem; }
