/* tamer-protocol · two doors, red vs copper. Own prefix. */

.tp-main {
  padding-left: 0;
  padding-right: 0;
}

.tp-body {
  background: #120d0c;
  color: #f3e6d8;
}

.tp-hidden,
.tp-body .hidden { display: none !important; }

.tp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tp-safety {
  margin: 0;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #d7c4a4;
  border-bottom: 1px solid rgba(196, 146, 78, 0.28);
}

.tp-stage {
  min-height: calc(100vh - 7rem);
  position: relative;
}

.tp-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 7rem);
  position: relative;
}

.tp-door {
  position: relative;
  overflow: hidden;
  min-height: 28rem;
}

.tp-door-left {
  background:
    radial-gradient(circle at 30% 20%, rgba(160, 32, 36, 0.35), transparent 46%),
    linear-gradient(180deg, #1a1010 0%, #0e0909 100%);
}

.tp-door-right {
  background:
    radial-gradient(circle at 70% 18%, rgba(196, 146, 78, 0.22), transparent 48%),
    linear-gradient(180deg, #16110c 0%, #0c0a08 100%);
}

.tp-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, #c4924e 18%, #7a1f2b 50%, #c4924e 82%, transparent);
  z-index: 2;
  pointer-events: none;
}

.tp-chain {
  position: absolute;
  top: 8%;
  left: 42%;
  width: 4px;
  height: 42%;
  background: repeating-linear-gradient(
    180deg,
    #8a8a8a 0 10px,
    #3a3a3a 10px 14px
  );
  border-radius: 2px;
  transform-origin: top center;
  animation: tp-sway 4.8s ease-in-out infinite;
  box-shadow: 2px 0 0 rgba(122, 31, 43, 0.5);
}

.tp-chain::after {
  content: "";
  position: absolute;
  left: -10px;
  bottom: -14px;
  width: 24px;
  height: 24px;
  border: 3px solid #9a9a9a;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #1a1010;
}

.tp-plaque {
  position: absolute;
  top: 18%;
  right: 16%;
  width: min(14rem, 70%);
  padding: 1rem 1.1rem 0.9rem;
  border: 1px solid #c4924e;
  background: linear-gradient(180deg, #3a2a16, #1c140c);
  color: #e6d2a8;
  box-shadow: 0 0 0 1px #7a5a28, 0 12px 30px rgba(0, 0, 0, 0.4);
  font-family: Georgia, "Times New Roman", serif;
}

.tp-plaque b {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: #c4924e;
  margin-bottom: 0.45rem;
}

.tp-plaque span {
  display: block;
  font-size: 1.05rem;
  line-height: 1.45;
}

.tp-welcome {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: min(34rem, calc(100% - 1.5rem));
  z-index: 3;
  text-align: center;
  padding: 1.1rem 1.15rem 1.15rem;
  background: rgba(12, 9, 8, 0.78);
  border: 1px solid rgba(196, 146, 78, 0.35);
  backdrop-filter: blur(8px);
}

.tp-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4924e;
}

.tp-welcome h1,
.tp-result h1 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #f6ead8;
}

.tp-lead,
.tp-note {
  margin: 0.2rem 0 0;
  color: #d7c4a4;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tp-gate {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 0.75rem;
  text-align: left;
}

.tp-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(196, 146, 78, 0.28);
  background: rgba(18, 13, 12, 0.9);
  color: #f3e6d8;
  cursor: pointer;
}

.tp-check input {
  margin-top: 0.2rem;
  accent-color: #7a1f2b;
}

.tp-check strong {
  display: block;
  font-size: 0.92rem;
}

.tp-check small {
  display: block;
  color: #bba68a;
  font-size: 0.78rem;
}

.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.tp-btn {
  appearance: none;
  border: 1px solid #c4924e;
  background: transparent;
  color: #f3e6d8;
  padding: 0.62rem 1.15rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.tp-btn.primary {
  background: linear-gradient(90deg, #7a1f2b, #c4924e);
  border-color: transparent;
  color: #140c0a;
  font-weight: 700;
}

.tp-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tp-status {
  min-height: 1.2rem;
  margin: 0.45rem 0 0;
  color: #d7c4a4;
  font-size: 0.85rem;
}

.tp-quiz {
  padding: 0.8rem 1rem 1.4rem;
  max-width: 52rem;
  margin: 0 auto;
}

.tp-rail {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  margin: 0.55rem 0 0.9rem;
}

.tp-rail + .tp-rail { margin-top: 3px; }

.tp-cell {
  height: 8px;
  background: #2a211c;
}

.tp-cell.is-a { background: #9a2430; }
.tp-cell.is-b { background: #c4924e; }

.tp-q {
  margin: 0.4rem 0 0.35rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.45;
  color: #f6ead8;
}

.tp-q-note {
  text-align: center;
  color: #bba68a;
  font-size: 0.82rem;
  margin: 0 0 0.9rem;
  min-height: 1.1rem;
}

.tp-how {
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #c4924e;
  margin: 0 0 0.7rem;
}

.tp-plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.tp-plate {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 8.5rem;
  padding: 1.1rem 1rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: #f3e6d8;
  line-height: 1.45;
}

.tp-plate-a {
  background:
    linear-gradient(180deg, rgba(122, 31, 43, 0.28), rgba(18, 10, 10, 0.92));
  border-color: #7a1f2b;
  box-shadow: inset 0 0 0 1px rgba(154, 36, 48, 0.35);
}

.tp-plate-b {
  background:
    linear-gradient(180deg, rgba(196, 146, 78, 0.16), rgba(16, 12, 8, 0.92));
  border-color: #c4924e;
  box-shadow: inset 0 0 0 1px rgba(196, 146, 78, 0.28);
}

.tp-plate.is-on {
  transform: translateY(1px);
  filter: brightness(1.12);
}

.tp-plate.is-dim { opacity: 0.35; }

.tp-result {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.2rem 1rem 2.4rem;
}

.tp-pull {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
  font-variant-numeric: tabular-nums;
}

.tp-pull-t,
.tp-pull-p {
  font-size: clamp(3.2rem, 12vw, 5.2rem);
  line-height: 0.9;
  font-weight: 800;
}

.tp-pull-t { color: #c43b45; text-align: left; }
.tp-pull-p { color: #c4924e; text-align: right; }
.tp-pull-dash {
  color: #d7c4a4;
  font-size: 2rem;
  padding-bottom: 0.55rem;
}

.tp-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.tp-title-row.is-tamer h1 { color: #c43b45; }
.tp-title-row.is-protocol h1 { color: #c4924e; }
.tp-title-row.is-dual h1 { color: #f3e6d8; }

.tp-seal {
  display: none;
  border: 1px solid #c43b45;
  color: #c43b45;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0.12rem 0.4rem;
}

.tp-seal.is-on { display: inline-block; }

.tp-line {
  font-size: 1.15rem;
  margin: 0.35rem 0 1rem;
  color: #f6ead8;
}

.tp-block {
  margin: 0 0 0.85rem;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid #c4924e;
  background: rgba(28, 20, 16, 0.72);
}

.tp-block h2 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #c4924e;
}

.tp-block p { margin: 0; color: #f3e6d8; line-height: 1.5; }

.tp-archive pre {
  white-space: pre-wrap;
  background: #1a1210;
  border: 1px solid rgba(196, 146, 78, 0.35);
  color: #f3e6d8;
  padding: 0.8rem;
  font: 0.92rem/1.45 ui-monospace, Consolas, monospace;
}

.tp-share-preview { margin-top: 0.8rem; }
.tp-share-preview canvas {
  width: min(100%, 22rem);
  height: auto;
  display: block;
  margin: 0 auto 0.6rem;
  background: #120d0c;
}

.tp-end {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(196, 146, 78, 0.22);
}

.tp-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.tp-more .tp-kicker {
  margin: 0;
  text-align: center;
}

.tp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 0;
}

a.tp-btn {
  color: #f3e6d8;
  text-decoration: none;
}

.tp-login {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  color: #d7c4a4;
  font-size: 0.88rem;
  line-height: 1.55;
}

.tp-login a,
.tp-body a.auth-login-link,
.tp-body a.auth-login-link:visited {
  color: #c4924e;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 146, 78, 0.55);
}

.tp-end-nav {
  justify-content: center;
  width: 100%;
}

.tp-foot {
  color: #bba68a;
  font-size: 0.82rem;
  text-align: center;
  margin: 0;
}

@keyframes tp-sway {
  0%, 100% { transform: rotate(-3.4deg); }
  50% { transform: rotate(3.2deg); }
}

@media (max-width: 720px) {
  .tp-plates { grid-template-columns: 1fr; }
  .tp-door { min-height: 16rem; }
  .tp-welcome { position: relative; left: auto; bottom: auto; transform: none; width: auto; margin: 0.6rem; }
  .tp-doors { display: block; min-height: 0; }
  .tp-door-left { min-height: 11rem; }
  .tp-door-right { min-height: 11rem; }
  .tp-seam { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-chain { animation: none; }
  .tp-plate.is-on { transform: none; }
}
