/* Land Nav 2 design site. Pico 2.1.1 in dark, the house tweak sheet, then the
   pieces the design pages draw with. */

:root[data-theme="dark"] {
  --pico-primary: #ffd60a;
  --pico-primary-background: #ffd60a;
  --pico-primary-border: #ffd60a;
  --pico-primary-underline: rgba(255, 214, 10, 0.5);
  --pico-primary-hover: #ffe45c;
  --pico-primary-hover-background: #ffe45c;
  --pico-primary-hover-border: #ffe45c;
  --pico-primary-inverse: #000;
  --pico-primary-focus: rgba(255, 214, 10, 0.35);
  --pico-background-color: #000;
  --pico-card-background-color: #17171a;
  --pico-card-sectioning-background-color: #1f1f23;
}

/* House tweak sheet: see Workshop Web/house-style.md. */
h1,
h2,
h3,
h4 {
  margin-bottom: 0.2em;
}
hgroup h1,
hgroup h2,
hgroup h3,
hgroup h4 {
  margin-bottom: 0;
}
table td {
  vertical-align: top;
}
table th {
  font-weight: bold;
}

h2 {
  margin-top: 2.5rem;
}
.lede {
  font-size: 1.2rem;
}
.muted {
  color: var(--pico-muted-color);
}
.site-title img {
  border-radius: 10%;
  vertical-align: middle;
}
.feedback {
  border-left: 4px solid var(--pico-primary);
  background: var(--pico-card-background-color);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
}

/* Feature cards with a picture, and screenshot galleries. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.features article {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.features article img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.features article div {
  padding: 0.9rem 1rem 1rem;
}
.features article h3 {
  font-size: 1.05rem;
}
.features article p {
  font-size: 0.9rem;
  margin: 0;
}
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.shots.wide {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.shots figure,
figure {
  margin: 0;
}
.shots img,
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 1px #777;
}
figcaption {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.4rem;
}

/* Marker sheets. */
.mgrid {
  display: inline-grid;
  border-radius: 9px;
  overflow: hidden;
  padding: 10px 14px;
  max-width: 100%;
  overflow-x: auto;
}
.mgrid .hd,
.mgrid .rl {
  font: 600 12px system-ui, sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  margin: 3px;
  padding: 4px;
  text-align: center;
  line-height: 1.3;
}
.mgrid .rl {
  text-align: left;
  align-self: center;
}
.mgrid span {
  font-weight: 400;
  opacity: 0.8;
}
.mgrid .cell {
  display: grid;
  place-items: center;
  padding: 7px;
}
.mgrid img {
  max-width: none;
}
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.map {
  position: relative;
  width: 590px;
  max-width: 100%;
  height: 320px;
  border-radius: 9px;
  overflow: hidden;
}
.mk {
  position: absolute;
}
.mk img {
  width: 32px;
  height: 32px;
  display: block;
}
.mk span {
  position: absolute;
  left: 36px;
  top: 6px;
  white-space: nowrap;
  font: 700 15px system-ui, sans-serif;
}
.codes td.c {
  font: 700 14px ui-monospace, Menlo, monospace;
  white-space: nowrap;
}
.codes td.grp {
  font-weight: 700;
  color: var(--pico-primary);
  padding-top: 1.2rem;
}
.codes td.src {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}
.codes td {
  vertical-align: middle;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatches div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.swatches i {
  width: 56px;
  height: 56px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Design system page. */
.ds code {
  color: var(--pico-primary);
}

  :root {
    --accent: #FFD60A; --danger: #FF453A; --warning: #FF9F0A; --on-accent: #000; --on-danger: #fff;
    --panel: #17171A; --raised: rgba(118,118,128,.24); --control: #3D3D3D;
    --hairline: rgba(255,255,255,.14); --secondary: rgba(235,235,245,.6); --tertiary: rgba(235,235,245,.3);
    --r-small: 6px; --r-medium: 9px; --r-large: 18px;
    --sans: -apple-system, "SF Pro Text", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, monospace;
  }
  .lede { font-size: 20px; color: #fff; max-width: 760px; }
  .rule { background: var(--panel); border: 1px solid var(--hairline); border-left: 4px solid var(--accent);
          border-radius: var(--r-medium); padding: 14px 18px; margin: 20px 0; max-width: 760px; }
  .rule b { color: var(--accent); }
  .muted { color: var(--secondary); }
  .cols { display: grid; gap: 12px; }
  .g2 { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
  .g3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .g4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .ds .card { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-medium); padding: 16px; }
  .ds .card h3 { margin-top: 0; }
  .ds .card p { font-size: 15px; margin: 6px 0 0; }

  /* Type scale */
  td.role code { white-space: nowrap; }
  td.spec, td.use { font-size: 13px; color: var(--secondary); }
  .t-title { font-size: 22px; font-weight: 700; }
  .t-readout { font: 600 34px/41px var(--mono); }
  .t-value { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .t-valueCode { font: 500 22px var(--mono); }
  .t-headline { font-size: 17px; font-weight: 600; }
  .t-body { font-size: 17px; }
  .t-detail { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--secondary); }
  .t-caption { font-size: 12px; color: var(--secondary); }
  .t-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--secondary); }
  .t-badge { font-size: 13px; font-weight: 600; }
  .t-badgeCode { font: 600 13px var(--mono); }
  .t-tab { font-size: 11px; font-weight: 600; }
  .t-button { font-size: 13px; font-weight: 600; }
  .loud { border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

  /* Colour */
  .swatch { border-radius: var(--r-medium); overflow: hidden; border: 1px solid var(--hairline); background: var(--panel); }
  .chip { height: 96px; display: flex; align-items: flex-end; padding: 10px; font: 600 13px var(--mono); }
  .swatch .meta { padding: 10px 12px 12px; }
  .swatch .meta b { display: block; font: 600 15px var(--mono); color: #fff; }
  .swatch .meta span { font-size: 13px; color: var(--secondary); }
  .checker { background-image: linear-gradient(45deg,#2a2a2a 25%,transparent 25%),linear-gradient(-45deg,#2a2a2a 25%,transparent 25%),
             linear-gradient(45deg,transparent 75%,#2a2a2a 75%),linear-gradient(-45deg,transparent 75%,#2a2a2a 75%);
             background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; background-color: #111; }
  .items { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  .marker { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 22px var(--sans); }

  /* Surfaces */
  .mapbg { background: url(/assets/screens/ipad-library.jpg) 70% 40% / 260% auto; border-radius: var(--r-medium);
           padding: 28px; min-height: 260px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
  .glass { background: rgba(60,60,60,.35); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
           border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
  .solid { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-large); padding: 18px; width: 300px; }
  .cell { background: var(--raised); border-radius: var(--r-medium); padding: 12px; margin-top: 8px; }

  /* Shape and space */
  .radius { height: 90px; background: var(--control); border: 1px solid var(--hairline); display: grid; place-items: center; font: 600 13px var(--mono); }
  .space { display: flex; align-items: center; gap: 14px; margin: 8px 0; font: 13px var(--mono); color: var(--secondary); }
  .space i { display: block; height: 18px; background: var(--accent); border-radius: 2px; }

  /* Box buttons, rendered */
  .boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; }
  .box { height: 64px; border-radius: var(--r-medium); background: var(--control); border: 1px solid var(--hairline);
         display: grid; place-items: center; align-content: center; gap: 4px; font-size: 13px; font-weight: 600; }
  .box.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
  .box.danger { background: var(--danger); color: var(--on-danger); border-color: transparent; }
  .box svg { width: 20px; height: 20px; }

  /* Examples */
  figure { margin: 0; }
  figure img { display: block; max-width: 100%; height: auto; border-radius: var(--r-medium); border: 1px solid var(--hairline); background: #111; }
  figcaption { font-size: 13px; color: var(--secondary); margin-top: 8px; }
  .example { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 20px; align-items: start; padding: 18px 0;
             border-bottom: 1px solid var(--hairline); }
  .example h3 { margin: 0 0 4px; }
  .example p { font-size: 15px; margin: 4px 0; }
  .dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .do, .dont { border-radius: var(--r-medium); padding: 12px 14px; font-size: 14px; border: 1px solid var(--hairline); background: var(--panel); }
  .do b { color: #30D158; } .dont b { color: var(--danger); }
  .do code, .dont code { display: block; margin-top: 6px; white-space: pre; background: none; padding: 0; }
  .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
  .shots.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  @media (max-width: 720px) { .example, .dodont { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } }

/* Picture viewer (gallery.js). */
dialog.lightbox {
  background: rgba(0, 0, 0, 0.92);
  padding: 0;
  display: none;
}
dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
}
dialog.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100vh;
}
dialog.lightbox img {
  max-width: 82vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
}
dialog.lightbox figcaption {
  max-width: 60ch;
  text-align: center;
  font-size: 1rem;
  color: #fff;
  margin-top: 0.6rem;
}
dialog.lightbox button {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 50%;
  flex: none;
}
dialog.lightbox .lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.2rem;
}
dialog.lightbox .lb-count {
  position: fixed;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}
