/* lylabs.io: one stylesheet for every page. Light and dark follow the visitor's system. */

:root {
  --bg: #F5F4F1;
  --surface: #FFFFFF;
  --ink: #141414;
  --muted: #66625A;
  --line: #E2DFD8;
  --accent: #C98A1E;
  --accent-ink: #8A5C0F;
  --chip: #ECEAE4;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.06);
  --radius: 18px;
  --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", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1C1B19;
    --ink: #F2F1EE;
    --muted: #A39E95;
    --line: #2E2C29;
    --accent: #E0A23A;
    --accent-ink: #F0C674;
    --chip: #262522;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header and footer */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 21px/1 var(--display); letter-spacing: -0.02em; text-decoration: none;
}
.wordmark .mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font: 700 15px/1 var(--display); letter-spacing: -0.03em;
}
.wordmark .ly { color: var(--accent); }

.nav { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.site-footer { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Type */

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(19px, 2.2vw, 22px); color: var(--muted); line-height: 1.45; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

section { margin-top: 88px; }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; }

/* Home */

.hero { padding: 72px 0 8px; display: grid; gap: 22px; max-width: 760px; }

.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.app-card {
  position: relative;
  display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start;
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none;
}
.app-card.featured { grid-column: 1 / -1; grid-template-columns: 112px 1fr; padding: 32px; gap: 28px; align-items: center; }
.app-card.featured .app-icon { width: 112px; height: 112px; }
.app-card.featured h3 { font-size: 28px; }
a.app-card:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.app-card .body { display: grid; gap: 6px; }
.app-card p { color: var(--muted); font-size: 16px; }
.app-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.app-card .more { margin-top: 10px; font-weight: 600; font-size: 15px; color: var(--accent-ink); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--chip); color: var(--muted);
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.chip.soon { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }

/* App icons: real ones carry their own Mac-style margin; drawn tiles match it. */

.app-icon { width: 72px; height: 72px; flex: none; }
.tile {
  position: relative; display: grid; place-items: center;
}
.tile::before {
  content: ""; position: absolute; inset: 9.5%;
  border-radius: 22.5%;
  background: var(--tile-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.tile svg { position: relative; width: 52%; height: 52%; }
.tile-compressly { --tile-bg: linear-gradient(160deg, #3D7BF0, #1A3E9A); }
.tile-textly { --tile-bg: #1E1C1A; }
.tile-drively { --tile-bg: linear-gradient(160deg, #2BB39A, #146B5D); }

/* Product page */

.product-hero { padding: 64px 0 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.product-hero .intro { display: grid; gap: 20px; justify-items: start; }
.product-hero .app-icon { width: 120px; height: 120px; margin-left: -12px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.small { font-size: 14px; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button[aria-disabled="true"] { cursor: default; background: var(--chip); color: var(--ink); }

/* A drawn Passwordly window with a sample password (not a real one). */

.demo {
  justify-self: center; width: 100%; max-width: 380px;
  padding: 22px; border-radius: 22px;
  background: #23395B; color: #F2F1EE;
  box-shadow: 0 24px 60px rgba(20, 30, 50, 0.28);
  display: grid; gap: 16px;
}
.demo .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #AEB9CC; }
.demo .synced { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #F2F1EE; font-weight: 600; }
.demo .pw { font: 600 clamp(17px, 5.2vw, 23px)/1.35 var(--mono); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.demo .counts { font-size: 13px; color: #AEB9CC; }
.demo .counts b { color: #F2F1EE; }
.demo .meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.demo .meter span { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.demo .meter span.on { background: #F2F1EE; }
.demo .strength { display: flex; justify-content: space-between; font-size: 13px; color: #AEB9CC; }
.demo .strength b { color: #F2F1EE; }
.demo .row { display: grid; grid-template-columns: 1fr 48px; gap: 10px; }
.demo .copy { height: 48px; border-radius: 12px; background: #C98A1E; color: #141414; display: grid; place-items: center; font-weight: 700; }
.demo .refresh { height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); display: grid; place-items: center; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.feature p { color: var(--muted); font-size: 16px; }
.feature .glyph { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-ink); margin-bottom: 6px; }
.feature .glyph svg { width: 20px; height: 20px; }
kbd { font: 600 0.9em var(--sans); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--chip); }

.panel { padding: 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; }
.panel.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.panel ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }

.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.specs div { display: grid; gap: 4px; }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; color: var(--muted); }

/* Long-form pages: privacy and support */

.doc { padding-top: 48px; }
.doc header { display: grid; gap: 12px; margin-bottom: 36px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; }
.doc h3 { margin: 28px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.doc p + p { margin-top: 12px; }
.doc ul + p, .doc ol + p, .doc table + p { margin-top: 14px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0 0; }
.callout { padding: 20px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.doc .callout h3 { margin: 0; }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; font-weight: 400; color: var(--muted); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 18px; display: grid; gap: 10px; }
details > div p { color: var(--muted); }

.status-list { list-style: none; padding: 0 !important; }
.status-list li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.status-list b { color: var(--ink); }

/* Phones */

@media (max-width: 820px) {
  .product-hero, .panel.split { grid-template-columns: 1fr; }
  .features, .specs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 12px; }
  .nav { gap: 6px 16px; flex-wrap: wrap; }
  .hero { padding-top: 40px; }
  section { margin-top: 64px; }
  .apps, .features, .specs { grid-template-columns: 1fr; }
  .app-card, .app-card.featured { grid-template-columns: 64px 1fr; padding: 18px; gap: 14px; align-items: start; }
  .app-card .app-icon, .app-card.featured .app-icon { width: 64px; height: 64px; }
  .app-card.featured h3 { font-size: 22px; }
  .panel { padding: 24px; }
  .status-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* Guides (passwordly/guide/) */

.toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; padding: 18px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 0 0 8px; list-style: none; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { text-decoration: underline; }
.doc ol.steps { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0 0; }
.doc .where { color: var(--muted); font-size: 15px; }
.badge-demo { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge-demo.green { background: color-mix(in srgb, #2E9E5B 18%, transparent); color: #1E7A44; }
.status-list.wide li { grid-template-columns: 170px 1fr; }
.keys { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 16px; }
.keys td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys td:first-child { width: 150px; white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  .badge-demo.green { color: #8FE0B5; }
}

@media (max-width: 600px) {
  .toc { grid-template-columns: 1fr; }
  .status-list.wide li { grid-template-columns: 1fr; }
  .keys td:first-child { width: 110px; }
}
