/* Systems Luke — one mobile-width column, on every screen size. */

:root {
  --bg: #101011;
  --bg-raised: #161719;
  --bg-hover: #151618;
  --line: #232529;
  --line-2: #2e3238;
  --text: #fafafb;
  --text-2: #8f98a7;
  --text-3: #636b78;
  --focus: #5b8def;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  font-feature-settings: "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── The column: phone-width everywhere, hairlines either side on bigger screens ── */
.page {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
@media (min-width: 442px) {
  .page { border-inline: 1px solid var(--line); }
}

.block { padding: 24px var(--gutter); border-bottom: 1px solid var(--line); }

/* ── Profile ── */
.profile { padding-top: 32px; }

.who { display: flex; align-items: center; gap: 16px; }

.avatar {
  flex: none;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--bg-raised);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-2);
}

h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.bio { margin-top: 16px; color: var(--text-2); text-wrap: pretty; }

.socials { display: flex; gap: 8px; margin-top: 18px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-raised); border-color: #3a3f47; }
.icon-btn svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn svg .solid { fill: currentColor; stroke: none; }

/* ── Section text ── */
h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.desc { margin-top: 2px; font-size: 14px; color: var(--text-2); }

/* ── Newsletter ── */
.signup { display: flex; gap: 8px; margin-top: 14px; }

.signup input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  /* 16px stops iOS zooming the page when the field is focused */
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup input::placeholder { color: var(--text-3); }
.signup input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.22);
}

.btn {
  flex: none;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: var(--text);
  color: #1c1d1f;
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: #e6e7ea; border-color: #e6e7ea; }
.signup.is-busy .btn { opacity: 0.6; pointer-events: none; }

.signup-msg { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.signup-msg:empty { display: none; }
.signup-msg.is-ok { color: #6fcf97; }
.signup-msg.is-error { color: #f08a8a; }

/* ── Guides list ── */
.list { border-bottom: 1px solid var(--line); }
.list-title { padding: 24px var(--gutter) 12px; }

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px var(--gutter);
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.row:hover { background: var(--bg-hover); }

/* The drawing tile. Background must match TILE in tools/visuals.py */
.vis {
  flex: none;
  width: 96px; height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #141517;
  transition: border-color 0.15s;
}
.vis svg { width: 100%; height: 100%; overflow: visible; }
.vis svg * { vector-effect: non-scaling-stroke; }
.row:hover .vis { border-color: var(--line-2); }

.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-title { line-height: 1.35; text-wrap: balance; }
.row-desc { font-size: 14px; line-height: 1.4; color: var(--text-2); text-wrap: pretty; }

.row-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.kind { font-size: 13px; color: var(--text-3); }
.soon {
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-2);
}
.price { font-size: 14px; color: var(--text); }

/* ── Footer ── */
.foot {
  margin-top: auto;
  padding: 20px var(--gutter) 24px;
  font-size: 13px;
  color: var(--text-3);
}

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