/* Layout matches spec/index.html .pg web mocks, sized with DESIGN.md tokens. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  font-weight: var(--weight-label);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: var(--space-1);
}

.top {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--weight-title);
  font-size: var(--fs-headline);
  min-height: 44px;
}

.brand img {
  width: var(--space-6);
  height: var(--space-6);
  border-radius: var(--radius-sm);
}

.pg {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-5);
}

.pg h1 {
  font-size: var(--fs-title);
  line-height: 1.15;
  font-weight: var(--weight-title);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}

.lede {
  color: var(--muted);
  font-size: var(--fs-body);
  margin: 0 0 var(--space-4);
}

.pg h2 {
  font-size: var(--fs-headline);
  margin: var(--space-5) 0 var(--space-1);
  font-weight: var(--weight-label);
}

.pg p,
.pg li {
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0 0 var(--space-2);
}

.pg ul {
  padding-left: 18px;
  margin: var(--space-1) 0 var(--space-2);
}

.cta {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  font-size: 13px;
  margin: var(--space-1) 0 var(--space-3);
  text-decoration: none;
  min-height: 44px;
}

.cta:focus-visible {
  outline-color: var(--cta-fg);
}

.feat {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.feat div {
  background: var(--surface);
  border-radius: 14px;
  padding: var(--space-3);
}

.feat b {
  display: block;
  font-size: 14px;
  margin-bottom: var(--space-1);
  font-weight: var(--weight-label);
}

.feat span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: var(--weight-body);
}

.hero-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
  justify-content: center;
  margin: var(--space-4) 0 var(--space-5);
}

.w {
  border-radius: var(--widget-radius);
  overflow: hidden;
  position: relative;
  color: var(--widget-on-color);
  flex: 0 0 auto;
  text-align: left;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--text) 14%, transparent);
}

.w.small {
  width: var(--widget-small);
  height: var(--widget-small);
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.w.medium {
  width: var(--widget-medium-w);
  height: var(--widget-small);
  padding: 11px 16px;
}

.w.large {
  width: var(--widget-medium-w);
  height: var(--widget-large-h);
  padding: var(--space-4);
}

.w .wt {
  font-size: var(--fs-body);
  font-weight: var(--weight-title);
  line-height: 1.15;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  min-width: 0;
}

.w.small .wt span:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.w .wn {
  font-size: var(--fs-display);
  font-weight: var(--weight-title);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}

.w .wu {
  font-size: var(--fs-caption);
  font-weight: var(--weight-label);
  opacity: 0.92;
  margin-top: 5px;
}

.w .hdr {
  font-size: var(--fs-caption);
  font-weight: var(--weight-title);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.w .lst {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.w.medium .lst {
  gap: var(--space-1);
}

.w .li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w.medium .li {
  height: 34px;
}

.w .li .lb {
  width: 4px;
  height: 34px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.w.medium .li .lb {
  height: 28px;
}

.w .li .lt {
  flex: 1;
  min-width: 0;
}

.w .li .lt b {
  display: block;
  font-size: 15px;
  font-weight: var(--weight-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.w.medium .li .lt b {
  font-size: 14px;
}

.w .li .lt span {
  font-size: var(--fs-caption);
  opacity: 0.7;
  font-weight: 700;
}

.w .li .ln {
  font-size: var(--fs-headline);
  font-weight: var(--weight-title);
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.w.medium .li .ln {
  font-size: 18px;
}

.w .li .ln small {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  font-weight: var(--weight-label);
}

.paper {
  background: var(--bg);
  color: var(--text);
}

.midnight {
  background: var(--widget-midnight);
  color: var(--widget-on-color);
}

.sky {
  background: var(--event-sky);
}

.mint-bar { background: var(--event-mint); }
.berry-bar { background: var(--event-berry); }
.tangerine-bar { background: var(--event-tangerine); }
.violet-bar { background: var(--event-violet); }
.sun-bar { background: var(--event-sun); }
.sky-bar { background: var(--event-sky); }

.mint-num { color: var(--event-mint); }
.berry-num { color: var(--event-berry); }
.tangerine-num { color: var(--event-tangerine); }
.violet-num { color: var(--event-violet); }
.sun-num { color: var(--event-sun); }
.sky-num { color: var(--event-sky); }

.share {
  border-radius: 28px;
  aspect-ratio: 1 / 1;
  padding: var(--space-5);
  color: var(--widget-on-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(290px, 100%);
  margin: 0 auto var(--space-4);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--text) 16%, transparent);
}

.share.sun {
  color: var(--event-sun-ink);
}

.share .e {
  font-size: 44px;
  line-height: 1;
}

.share .n {
  font-size: calc(var(--fs-display) * 1.6);
  font-weight: var(--weight-title);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.share .u {
  font-size: var(--fs-headline);
  font-weight: var(--weight-label);
}

.share .t {
  font-size: var(--fs-headline);
  font-weight: var(--weight-title);
}

.share .via {
  font-size: var(--fs-caption);
  font-weight: var(--weight-label);
  opacity: 0.88;
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-1);
}

.share-states .is-broken,
.share-states.is-invalid .is-ok {
  display: none;
}

.share-states.is-invalid .is-broken {
  display: block;
}

.foot {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: var(--space-3) var(--space-5) var(--space-5);
  font-size: var(--fs-caption);
  color: var(--muted);
}

.foot p {
  margin: 0;
  line-height: 1.5;
}

.foot a {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 640px) {
  .feat {
    grid-template-columns: 1fr;
  }

  .w.medium,
  .w.large {
    transform: scale(0.92);
    transform-origin: top center;
  }
}
