/* HomeTiles — app-specific layer on top of golka-base.css.
   Only the accent tokens and this property's own layout live here; anything
   reusable belongs in assets.golka.org (spec §4). */

:root {
  /* Derived from the app icon, whose gradient runs #FF952A -> #FFC43D.
     The icon amber is far too light for text (1.87:1 on --bg), so --accent is
     that same hue (33deg) darkened until it clears AA on both --bg and --card:
     5.94:1 and 4.84:1. The icon amber itself is kept for decoration only. */
  --accent: #8F4F00;
  --accent-soft: #FFAE34;
  --accent-tint: #FDEBD0;
}

/* ---------- header ---------- */
.ht-header { padding-block: var(--space-6); }
.ht-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ht-header__studio { font-size: var(--text-sm); color: var(--ink-muted); text-decoration: none; }
.ht-header__studio:hover { color: var(--accent); text-decoration: underline; }

.ht-brand { display: inline-flex; align-items: center; gap: var(--space-3); }
.ht-brand img { width: 2rem; height: 2rem; border-radius: 22%; flex: none; }

/* ---------- hero ---------- */
.ht-hero { padding-block: var(--space-12) var(--space-8); }
.ht-hero__inner { display: grid; gap: var(--space-12); }
.ht-hero__copy { max-width: 34rem; }
.ht-hero__sub { font-size: var(--text-lg); color: var(--ink-muted); }
.ht-hero__note { margin-top: calc(-1 * var(--space-2)); color: var(--ink-muted); }

@media (min-width: 62rem) {
  .ht-hero__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-16); }
  .ht-hero__note { grid-column: 1 / -1; margin-top: calc(-1 * var(--space-8)); }
}

/* The hero image is a faithful mock of the real large widget — a real grid,
   not a screenshot (§7.2). The widget itself uses the platform font stack so it
   reads like the native widget on Apple devices; the orange gradient behind it
   stands in for a wallpaper and carries the brand (icon gradient). Sizes are in
   container units so the whole widget scales as one piece. */
.ht-hero__wall {
  /* Container for the widget's own padding/gap/radius (cqi on an element
     resolves against its nearest *ancestor* container, not itself). */
  container-type: inline-size;
  padding: clamp(1rem, 5vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, #FF952A, #FFC43D);
  box-shadow: 0 18px 40px -24px rgba(43, 38, 34, 0.55);
}
.ht-widget {
  --w-tint: #0A7CFF;     /* the app's default tint; users can pick their own */
  --w-good: #2FB150;
  --w-warn: #F08A00;
  --w-bad: #E5483D;
  --w-ink: #1C1C1E;
  --w-muted: #6E6E73;
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.2cqi;
  padding: 3cqi;
  border-radius: 6.5cqi;
  background: #F2F2F4;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
  color: var(--w-ink);
}
.ht-wt {
  position: relative;
  aspect-ratio: 0.86;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6cqi;
  padding: 2cqi;
  border-radius: 4.5cqi;
  background: #E3E3E8;
  text-align: center;
  line-height: 1.1;
  min-width: 0;
}
.ht-wt--stepper { padding-bottom: 6.5cqi; }
.ht-wt__icon { color: var(--w-tint); line-height: 0; }
.ht-wt__icon .ht-icon { width: 5.2cqi; height: 5.2cqi; }
.ht-wt__value { font-size: 4.6cqi; font-weight: 700; white-space: nowrap; }
.ht-wt__value--big { font-size: 6.2cqi; font-weight: 600; }
.ht-wt__value--scene { font-size: 3.7cqi; font-weight: 500; }
.ht-wt__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 2.7cqi;
  color: var(--w-muted);
}
.ht-wt__ring { position: relative; width: 72%; aspect-ratio: 1; }
.ht-wt__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ht-wt__ring circle { fill: none; stroke-width: 3.2; }
.ht-wt__track { stroke: #C7C7CC; }
.ht-wt__fill { stroke: var(--w-band, var(--w-tint)); stroke-linecap: round; }
.ht-wt__ringval {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 3.6cqi; font-weight: 600;
  color: var(--w-band, var(--w-ink));
}
.ht-wt__ringval small { font-size: 2.6cqi; font-weight: 500; }
.ht-wt--bar .ht-wt__value { color: var(--w-band, var(--w-ink)); }
.ht-wt__bar { width: 82%; height: 1.6cqi; border-radius: 1cqi; background: #C7C7CC; overflow: hidden; }
.ht-wt__bar span { display: block; height: 100%; border-radius: inherit; background: var(--w-band, var(--w-tint)); }
.ht-band--good { --w-band: var(--w-good); }
.ht-band--warn { --w-band: var(--w-warn); }
.ht-band--bad { --w-band: var(--w-bad); }
.ht-wt__steps {
  position: absolute; bottom: 1.8cqi; left: 0; right: 0;
  display: flex; justify-content: center; gap: 3.4cqi;
}
.ht-wt__steps i {
  width: 4.4cqi; height: 4.4cqi; border-radius: 50%;
  display: grid; place-items: center;
  background: #8E8E93; color: #fff;
  font-style: normal; font-size: 3.4cqi; font-weight: 700; line-height: 1;
}

.ht-icon { width: 1.1rem; height: 1.1rem; flex: none; }

/* ---------- store link ---------- */
.ht-store { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.ht-store__terms { font-size: var(--text-sm); color: var(--ink-muted); }
.ht-store__soon {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
}

/* ---------- features ---------- */
/* Explicit column counts rather than auto-fit: with four features, auto-fit
   lands on three columns at both desktop and tablet widths and orphans the
   fourth on its own row. 1 / 2 / 4 always divides evenly. */
.ht-features {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 34rem) { .ht-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .ht-features { grid-template-columns: repeat(4, 1fr); } }
.ht-feature .ht-icon { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.ht-feature h3 { margin-top: var(--space-3); }
.ht-feature p { margin-bottom: 0; }

/* ---------- support ---------- */
.ht-support { background: var(--card); }
.ht-faq { border-bottom: 1px solid var(--hairline); }
.ht-faq summary {
  padding-block: var(--space-4);
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
}
.ht-faq summary::-webkit-details-marker { display: none; }
.ht-faq summary::after {
  content: "+"; font-family: var(--font-mono); color: var(--accent); flex: none;
}
.ht-faq[open] summary::after { content: "\2013"; }
.ht-faq__body { padding-bottom: var(--space-4); color: var(--ink-muted); }
.ht-faq__body :last-child { margin-bottom: 0; }
.ht-support__contact { margin-top: var(--space-8); }

/* ---------- privacy ---------- */
.ht-privacy__claim {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
}

.ht-prose h2 { margin-top: var(--space-12); }
.ht-prose h3 { margin-top: var(--space-8); }

/* ---------- footer ---------- */
.ht-footer { padding-block: var(--space-8) var(--space-16); }
.ht-footer__inner { display: grid; gap: var(--space-3); padding-top: var(--space-8); }
.ht-footer__family { display: flex; align-items: center; gap: var(--space-3); margin: 0; }
.ht-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-6); font-size: var(--text-sm); }
.ht-footer p { margin: 0; }
