/* Tochka2 visual canon — circular pastel discs, hand-drawn vibe.
   Reference: docs/tochka2/ photos. Palette extracted from the magnets. */

:root {
  --t2-mint:    #9ED9B0;
  --t2-mint-2:  #B7E2C5;
  --t2-peach:   #F0AC79;
  --t2-lime:    #BFDF74;
  --t2-sky:     #9CC4DE;
  --t2-yellow:  #F2D173;
  --t2-coral:   #D86C5A;
  --t2-ink:     #2C3E50;
  --t2-paper:   #F5EFE6;
  --t2-paper-2: #ECE4D6;
  --t2-shadow:  rgba(44,62,80,0.15);

  --t2-radius:  9999px;
  --t2-font:    "Caveat", "Patrick Hand", "Comic Neue", "Segoe UI", system-ui, -apple-system, sans-serif;
  --t2-font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--t2-paper);
  background-image:
    radial-gradient(circle at 10% 5%, rgba(158,217,176,0.15) 0, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(240,172,121,0.12) 0, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(156,196,222,0.08) 0, transparent 60%);
  color: var(--t2-ink);
  font-family: var(--t2-font-ui);
  -webkit-font-smoothing: antialiased;
}

/* Discs ------------------------------------------------------------------ */

.disc {
  position: relative;
  width: min(80vmin, 720px);
  aspect-ratio: 1 / 1;
  border-radius: var(--t2-radius);
  background: var(--t2-mint);
  box-shadow:
    0 18px 36px var(--t2-shadow),
    inset 0 0 0 2px rgba(44,62,80,0.08);
  display: grid;
  place-items: center;
  margin: 0 auto;
  overflow: hidden;
  /* slight handheld tilt */
  transform: rotate(-1.2deg);
}
.disc.peach  { background: var(--t2-peach); }
.disc.lime   { background: var(--t2-lime); }
.disc.sky    { background: var(--t2-sky); }
.disc.yellow { background: var(--t2-yellow); }
.disc.coral  { background: var(--t2-coral); color: #fff; }
.disc.mint2  { background: var(--t2-mint-2); }

.disc::before {
  /* hole punch like the physical magnet */
  content: '';
  position: absolute;
  left: 12%;
  bottom: 8%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.disc__inner {
  width: 84%;
  text-align: center;
  padding: 24px;
}

.disc__title {
  font-family: var(--t2-font);
  font-size: clamp(24px, 4.4vmin, 44px);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 0 18px;
  text-decoration: underline wavy rgba(44,62,80,0.18);
  text-underline-offset: 8px;
}

.disc__body {
  font-family: var(--t2-font-ui);
  font-size: clamp(14px, 2vmin, 20px);
  line-height: 1.45;
}

.disc__brand {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--t2-font);
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.55;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.disc__brand .m {
  font-style: italic;
  font-size: 22px;
  font-weight: 700;
}

.disc.coral .disc__brand { color: rgba(255,255,255,0.85); }

.disc__powered {
  position: absolute;
  bottom: 6%;
  right: 12%;
  font-family: var(--t2-font);
  font-size: 12px;
  opacity: 0.5;
}

/* SPIN model boxes (Q1 / Q2 backdrops) ----------------------------------- */
.spin {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px 18px;
  margin: 16px auto 8px;
  width: 90%;
  font-family: var(--t2-font);
  font-size: clamp(13px, 1.8vmin, 18px);
}
.spin .box {
  border: 2px solid rgba(44,62,80,0.55);
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  transform: rotate(-0.6deg);
}
.spin .box.muted { opacity: 0.45; }
.spin .arrow { opacity: 0.55; font-size: 18px; }

/* Iceberg model (Q3 backdrop) -------------------------------------------- */
.iceberg {
  width: 78%;
  margin: 6px auto 8px;
  font-family: var(--t2-font);
  position: relative;
}
.iceberg__triangle {
  position: relative;
  width: 0; height: 0;
  margin: 0 auto;
  border-left: 9vmin solid transparent;
  border-right: 9vmin solid transparent;
  border-bottom: 13vmin solid #fff;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.18));
}
/* Waterline cuts through the lower portion of the triangle without
   reflowing siblings (would otherwise pull labels up into the triangle). */
.iceberg__waterline {
  position: absolute;
  left: 0;
  right: 0;
  top: 9vmin;
  height: 3px;
  background: rgba(255,255,255,0.75);
  pointer-events: none;
}
.iceberg__labels {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: clamp(13px, 1.8vmin, 18px);
}
.iceberg__labels b { letter-spacing: 0.5px; }

/* Layout ------------------------------------------------------------------ */

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px;
}

.app__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.app__brand {
  font-family: var(--t2-font);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}

.app__nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(44,62,80,0.18);
  background: #fff;
  font: inherit;
  font-family: var(--t2-font-ui);
  font-weight: 600;
  cursor: pointer;
  color: var(--t2-ink);
  text-decoration: none;
  font-size: 14px;
}
.tab:hover { background: var(--t2-paper-2); }
.tab.active {
  background: var(--t2-ink);
  color: #fff;
  border-color: var(--t2-ink);
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
@media (min-width: 920px) {
  .row { grid-template-columns: 1fr 1fr; }
}

.panel {
  background: #fff;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 24px var(--t2-shadow);
  border: 2px solid rgba(44,62,80,0.06);
}
.panel h2 {
  margin: 0 0 12px;
  font-family: var(--t2-font);
  font-size: 28px;
  letter-spacing: 0.5px;
}
.panel h3 {
  margin: 18px 0 8px;
  font-family: var(--t2-font);
  font-size: 22px;
}

.btn {
  font-family: var(--t2-font-ui);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--t2-ink);
  background: var(--t2-ink);
  color: #fff;
  cursor: pointer;
  transition: transform 80ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost {
  background: #fff;
  color: var(--t2-ink);
}
.btn.warm {
  background: var(--t2-coral);
  border-color: var(--t2-coral);
}
.btn.mint {
  background: var(--t2-mint);
  color: var(--t2-ink);
  border-color: rgba(44,62,80,0.4);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.input, .textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid rgba(44,62,80,0.18);
  background: #fff;
  font: inherit;
  font-family: var(--t2-font-ui);
  font-size: 15px;
  color: var(--t2-ink);
}
.textarea { min-height: 80px; resize: vertical; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--t2-ink);
}

.code {
  font-family: "Menlo", monospace;
  font-size: 56px;
  letter-spacing: 14px;
  font-weight: 700;
  color: var(--t2-ink);
  text-align: center;
}

.qr {
  display: block;
  margin: 14px auto;
  width: 220px;
  height: 220px;
}

.muted { opacity: 0.65; font-size: 14px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--t2-paper-2);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
}
.tag.ok    { background: var(--t2-mint); }
.tag.warm  { background: var(--t2-peach); }
.tag.alert { background: var(--t2-coral); color: #fff; }

.list {
  display: grid;
  gap: 8px;
}

.answer {
  padding: 10px 14px;
  background: var(--t2-paper-2);
  border-radius: 12px;
  font-size: 15px;
}
.answer.gap {
  background: var(--t2-coral);
  color: #fff;
  font-weight: 600;
}

.slot-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.slot-row .num {
  font-family: var(--t2-font);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  opacity: 0.6;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.center { text-align: center; }
.stack { display: grid; gap: 10px; }
.disc-wrap { display: grid; place-items: center; padding: 14px 0; }
