:root {
  --cedis-cyan: #51c5cf;
  --cedis-teal: #1c9699;
  --cedis-orange: #f7941e;
  --gray-100: #f7f7f7;
  --gray-700: #333;
  --error: #b42318;
}

body {
  margin: 0;
  padding: 24px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-family: Arial, Helvetica, sans-serif;
}

main {
  max-width: 1100px;
  margin: 0 auto;
}

.card,
.header {
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .08);
}

.card {
  max-width: 640px;
  margin: 32px auto;
  border-top: 7px solid var(--cedis-cyan);
}

.closed-card {
  max-width: 520px;
  margin: 64px auto;
  padding: 36px 32px;
  border-top-color: var(--cedis-orange);
  text-align: center;
}

.code-card {
  max-width: 480px;
  margin: 64px auto;
  padding: 32px;
}

.header {
  border-top: 8px solid var(--cedis-cyan);
  margin-bottom: 18px;
}

.question {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 12px 0 4px;
  color: #24313a;
}

h1 {
  margin-top: 0;
  color: var(--cedis-teal);
  font-size: 1.5rem;
}

.code-card h1 {
  margin: 0 0 12px;
  text-align: center;
}

p {
  line-height: 1.55;
}

.code-card p {
  text-align: center;
}

label {
  display: block;
  margin-top: 16px;
  font-weight: 700;
}

input[type="text"],
textarea,
select,
input[name="code"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
}

input[name="code"] {
  padding: 16px;
  margin-top: 8px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

input[name="code"]:focus {
  outline: none;
  border-color: var(--cedis-cyan);
}

.option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-top: 10px;
  font-weight: 400;
}

.option input[type="radio"] {
  flex: 0 0 auto;
}

.option-marker {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e8f8f9;
  color: var(--cedis-teal);
  font-weight: 800;
}

.option-text {
  line-height: 1.4;
}

button {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: var(--cedis-orange);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.result {
  display: none;
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #eefafa;
  border-left: 5px solid var(--cedis-teal);
}

.result.is-visible {
  display: block;
}

.small,
.status {
  color: #666;
  font-size: .86rem;
}

.small {
  margin-top: 18px;
}

.context-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  margin-top: 10px;
}

.context-row-folder {
  min-width: 0;
}

.context-row-folder strong {
  overflow-wrap: anywhere;
}

.context-folder-anchor {
  color: var(--cedis-teal);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.context-folder-anchor:hover,
.context-folder-anchor:focus {
  text-decoration: underline;
}

.context-row-author {
  justify-self: end;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.context-label,
.context-author-stamp {
  color: #8a5a18;
  font-weight: 700;
}

.context-author-stamp {
  letter-spacing: .02em;
}

.context-row-author a {
  color: var(--cedis-teal);
  font-weight: 700;
  text-decoration: none;
}

.context-row-author span:last-child {
  color: #41525c;
  font-weight: 700;
}

.context-row-author a:hover,
.context-row-author a:focus {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .context-row {
    grid-template-columns: 1fr;
  }

  .context-row-author {
    justify-self: start;
    white-space: normal;
  }
}

.closed-card .small,
.code-card .small {
  margin-top: 22px;
  font-size: .82rem;
  text-align: center;
}

.closed-card .context-row,
.code-card .context-row {
  margin-top: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.closed-card .context-row-author,
.code-card .context-row-author {
  justify-self: end;
}

code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

.hint {
  margin-top: 20px;
  padding: 14px 16px;
  background: #eefafa;
  border-left: 5px solid var(--cedis-teal);
  border-radius: 10px;
  text-align: left;
  font-size: .95rem;
}

.error {
  color: var(--error);
  background: #fdecea;
  border: 1px solid #f4c1bb;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 16px 0;
  text-align: center;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.total {
  font-size: 3rem;
  font-weight: 800;
  color: var(--cedis-orange);
}

.bar-row {
  margin: 16px 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.bar-progress {
  width: 100%;
  height: 24px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
}

.bar-progress::-webkit-progress-bar {
  background: #eee;
  border-radius: 999px;
}

.bar-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--cedis-teal), var(--cedis-cyan));
  border-radius: 999px;
}

.bar-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--cedis-teal), var(--cedis-cyan));
  border-radius: 999px;
}

.empty {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  color: #666;
}

.session-closed {
  background: #fdf1dd;
  border-left: 5px solid var(--cedis-orange);
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 12px;
}
