/* GO HUMAN Neuvottelutreeni — MVP-tyylit */

:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --ink: #2b2622;
  --muted: #7a726a;
  --accent: #b4552d;      /* lämmin terrakotta */
  --accent-soft: #f3e0d5;
  --power: #2d4a54;       /* voima: syvä petrooli */
  --ok: #3f7d4e;
  --warn: #a33b3b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 38, 34, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 20px 24px 8px;
  text-align: center;
}
.brand {
  font-size: 26px;
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--power);
}
.brand .tm { font-size: 12px; vertical-align: super; letter-spacing: 0; }
.subtitle { color: var(--muted); font-style: italic; margin-top: 2px; }

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 16px;
}

h1, h2 { font-weight: 700; color: var(--power); margin-top: 0; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
p { line-height: 1.55; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

button {
  font-family: inherit;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: filter 0.15s ease, transform 0.05s ease;
}
button:hover { filter: brightness(1.07); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.secondary {
  background: transparent;
  color: var(--power);
  border: 1.5px solid var(--power);
}
button.ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  text-decoration: underline;
  padding: 8px 10px;
}
button.record { background: var(--warn); font-size: 18px; padding: 16px 28px; }
button.record.recording { animation: pulse 1.2s infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 59, 59, 0.45); }
  50% { box-shadow: 0 0 0 14px rgba(163, 59, 59, 0); }
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

label { display: block; margin: 14px 0 4px; font-weight: 700; font-size: 15px; }
input[type="text"], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1.5px solid #ddd3c8;
  border-radius: 10px;
  background: #fffdf9;
  color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }

.choice-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 520px) { .choice-grid { grid-template-columns: 1fr 1fr; } }

.choice {
  text-align: left;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid #e5dcd1;
  border-radius: var(--radius);
  padding: 14px 16px;
}
.choice:hover { border-color: var(--accent); filter: none; }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice .t { font-weight: 700; color: var(--power); display: block; margin-bottom: 3px; }
.choice .d { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.choice .tag { font-size: 12px; color: var(--accent); font-weight: 700; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  flex: 1 1 30%;
  min-width: 0;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid #e5dcd1;
  border-radius: 10px;
  font-size: 14px;
  padding: 10px 4px;
  white-space: normal;
  line-height: 1.2;
}
.tabs button.active { background: var(--power); color: #fff; border-color: var(--power); }

/* Kuunteluindikaattori: mikrofonin tulotaso palkkeina (mobiililuottamus). */
.level-meter {
  display: flex; gap: 3px; justify-content: center; align-items: flex-end;
  height: 20px; margin: 10px 0 2px;
}
.level-meter span {
  width: 6px; height: 4px; background: #e5dcd1; border-radius: 2px;
  transition: height 0.06s linear, background-color 0.06s linear;
}
.level-meter span.on { background: var(--ok); height: 20px; }

.timer {
  font-size: 64px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
}
.timer.done { color: var(--ok); font-size: 28px; }

.situation {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-style: italic;
  line-height: 1.55;
}
.speaker { font-weight: 700; color: var(--power); font-style: normal; }

.feedback-block { border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; margin: 18px 0; }
.feedback-block h2 { margin-bottom: 6px; font-size: 17px; }
.feedback-block.ok { border-color: var(--ok); }
.feedback-block.alt { border-color: var(--power); }

.quote {
  background: #f4efe8;
  border-radius: 10px;
  padding: 14px 16px;
  font-style: italic;
  line-height: 1.5;
}

.kertaus-list { list-style: none; padding: 0; }
.kertaus-list li {
  border: 1.5px solid #e5dcd1;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.kertaus-list .osio { color: var(--accent); font-weight: 700; margin-right: 8px; }
.kertaus-list a { color: var(--power); }

.assessment-q { margin: 16px 0; }
.assessment-q .q { font-weight: 700; margin-bottom: 8px; }
.assessment-q .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.assessment-q .opts button {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid #ddd3c8;
  padding: 8px 14px;
  font-size: 14px;
}
.assessment-q .opts button.selected { background: var(--power); color: #fff; border-color: var(--power); }

.error-box {
  background: #fbeaea;
  border: 1.5px solid var(--warn);
  color: var(--warn);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
}

.spinner {
  width: 34px; height: 34px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 18px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.center { text-align: center; }
.hidden { display: none; }

audio { width: 100%; margin-top: 10px; }

.app-footer {
  padding: 14px 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.badge {
  align-self: center;
  background: var(--warn);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 6px;
  padding: 3px 10px;
}

.progress-steps { color: var(--muted); font-size: 13px; margin-bottom: 10px; letter-spacing: 0.5px; }
.progress-steps b { color: var(--accent); }

/* F3/PR6: historia & pelillistäminen */
.stats-row { display: flex; gap: 12px; margin: 14px 0; }
.stat {
  flex: 1; text-align: center; background: var(--accent-soft);
  border-radius: var(--radius); padding: 12px 6px;
}
.stat b { display: block; font-size: 26px; color: var(--power); }
.stat span { font-size: 12.5px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
.tool {
  border: 1.5px solid #e5dcd1; border-radius: 10px; padding: 8px;
  font-size: 12px; line-height: 1.3; display: flex; flex-direction: column; gap: 2px;
}
.tool.lukossa { opacity: 0.45; }
.tool.pronssi { border-color: #b08d57; }
.tool.hopea { border-color: #9aa5ad; background: #f6f8f9; }
.tool.kulta { border-color: #c9a227; background: #fdf8e7; }
.tool .tool-id { font-weight: 700; color: var(--accent); }
.tool .tool-name { color: var(--ink); }
.tool .tool-count { color: var(--muted); font-size: 11px; }

details.taso-info { margin: 8px 0 4px; font-size: 13.5px; color: var(--muted); }
details.taso-info summary { cursor: pointer; color: var(--power); font-weight: 700; }
details.taso-info p, details.taso-info ul { line-height: 1.5; margin: 8px 0; }
details.taso-info ul { padding-left: 18px; }
details.taso-info li { margin-bottom: 4px; }
details.taso-info b { color: var(--ink); }
