/* ── Sky flavor tokens ───────────────────────────────────────────────────────── */
:root {
  --sk-bg:     #e8f4ff;
  --sk-border: #b0d4f8;
  --sk-text:   #185890;
  --sk-mid:    #2b7fd4;
  --sk-dark:   #0a2a50;
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.app-hero {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem 1.1rem;
}
.app-hero--sky {
  background: var(--sk-bg);
  border-bottom-color: var(--sk-border);
}
.app-hero__inner { margin: 0 auto; }
.app-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--sk-text);
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
  line-height: 1.2;
}
.app-hero__desc {
  font-size: .9rem;
  color: var(--color-text-secondary);
  max-width: 660px;
  line-height: 1.6;
  margin: 0 0 .85rem;
}
.app-hero__chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: .22rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  background: var(--color-surface);
  border: 1.5px solid var(--sk-border);
  border-radius: var(--radius-full);
  color: var(--sk-text);
  white-space: nowrap;
}

/* ── Layout ───────────────────────────────────────────────────────────────────── */
.app-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0 3rem;
}

.pane-in {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pane-out {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Cards ────────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--sk-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sk-text);
  margin: 0 0 .75rem;
}

/* ── Form fields ──────────────────────────────────────────────────────────────── */
.field { margin-bottom: .7rem; }
.field:last-child { margin-bottom: 0; }

label.lbl {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: .28rem;
}

select.sel,
input.num-in {
  width: 100%;
  box-sizing: border-box;
  padding: .4rem .6rem;
  font-size: .85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  transition: border-color .15s;
}
select.sel:focus,
input.num-in:focus { outline: none; border-color: var(--sk-mid); }

.input-error {
  font-size: .76rem;
  color: var(--color-danger);
  margin-top: .35rem;
  padding: .3rem .5rem;
  background: var(--color-danger-subtle);
  border-radius: var(--radius-md);
}

/* Calc button */
.btn-calc {
  width: 100%;
  padding: .55rem 1rem;
  font-size: .9rem;
  font-weight: 700;
  background: var(--sk-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity .15s;
  margin-top: .25rem;
}
.btn-calc:hover { opacity: .85; }

/* Trend textarea */
textarea.trend-ta {
  width: 100%;
  box-sizing: border-box;
  padding: .4rem .6rem;
  font-size: .82rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  resize: vertical;
  font-family: inherit;
  transition: border-color .15s;
}
textarea.trend-ta:focus { outline: none; border-color: var(--sk-mid); }

/* Device tip */
.device-tip {
  font-size: .76rem;
  color: var(--sk-text);
  background: var(--sk-bg);
  border: 1px solid var(--sk-border);
  border-radius: var(--radius-md);
  padding: .4rem .6rem;
  margin-top: .4rem;
  line-height: 1.5;
}

/* ── Score gauge card ─────────────────────────────────────────────────────────── */
.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem 1.125rem 1rem;
}

.gauge-wrap {
  position: relative;
  width: 180px;
  height: 98px;
  flex-shrink: 0;
}

.gauge-score {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1;
}

.gauge-score__num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--sk-dark);
  line-height: 1;
}

.gauge-score__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: .1rem;
}

/* ── Verdict banner ───────────────────────────────────────────────────────────── */
.verdict-banner {
  background: var(--color-surface);
  border: 1px solid var(--sk-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
}

.verdict-label {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 .35rem;
}

.verdict-advice {
  font-size: .84rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── Percentile bar ───────────────────────────────────────────────────────────── */
.pct-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .4rem;
}

.pct-value {
  font-size: .85rem;
  font-weight: 700;
  color: var(--sk-text);
}

.pct-track {
  height: 8px;
  background: var(--sk-bg);
  border: 1px solid var(--sk-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pct-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0;
  transition: width .5s cubic-bezier(.16,1,.3,1), background .3s;
}

.avg-norm {
  font-size: .76rem;
  color: var(--color-text-muted);
  margin-top: .5rem;
}

/* ── Trend card ───────────────────────────────────────────────────────────────── */
.trend-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.trend-stat {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.trend-stat__lbl {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
}

.trend-stat__val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sk-dark);
}

.trend-stat__sub {
  font-size: .7rem;
  color: var(--color-text-muted);
}

/* ── Info panel ───────────────────────────────────────────────────────────────── */
.info-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 0;
  list-style: none;
}

.info-list li {
  font-size: .82rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  padding: .35rem .5rem;
  border-left: 3px solid var(--sk-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.info-list li strong {
  color: var(--sk-text);
  font-weight: 700;
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .app-wrap { flex-direction: column; }
  .pane-in { width: 100%; }
}
