:root {
  --dcci-purple: #8e44ad;
  --dcci-purple-deep: #6c3483;
  --dcci-pink: #e91e63;
  --dcci-indigo: #3f51b5;
  --dcci-green: #27ae60;
  --dcci-dark: #1c2833;
  --dcci-navy: #2c3e50;
  --dcci-muted: #5d6d7e;
  --dcci-light: #ecf0f1;
  --dcci-white-hi: #ffffff;
  --dcci-white-mid: rgba(255, 255, 255, 0.82);
  --dcci-border: rgba(255, 255, 255, 0.22);
  --dcci-header-font: Montserrat, "Montserrat Medium", Aptos, "Segoe UI", Arial, sans-serif;
  --panel: rgba(236, 240, 241, 0.95);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --focus: #e91e63;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: auto;
  min-height: 0;
  overflow: visible;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-image: url("https://dcciportal.co.uk/wp-content/uploads/2026/02/Picture1.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--dcci-dark);
  font-family: Montserrat, "Montserrat Medium", Aptos, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.18), transparent 30%),
    radial-gradient(circle at 94% 10%, rgba(255, 255, 255, 0.14), transparent 26%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) 0 34px;
}

.app-header {
  text-align: center;
  margin: 0 auto clamp(18px, 3vw, 28px);
  max-width: 780px;
}

.dcci-logo {
  display: block;
  width: min(190px, 48vw);
  height: auto;
  margin: 0 auto 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--dcci-purple-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #17202a;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.header-copy {
  max-width: 620px;
  margin: 16px auto 0;
  color: #34495e;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.58;
}

.activity-panel {
  position: relative;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  background: var(--panel);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(28, 40, 51, 0.13);
}

.activity-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, #8e44ad 0%, #e91e63 30%, #3f51b5 62%, #27ae60 100%);
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 260px);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding-left: 6px;
}

.status-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #34495e;
  font-size: 0.94rem;
  font-weight: 700;
}

.status-copy span + span {
  color: var(--dcci-purple-deep);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(52, 73, 94, 0.14);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dcci-purple), var(--dcci-pink), var(--dcci-green));
  transition: width 220ms ease;
}

.flashcard {
  display: block;
  width: 100%;
  min-height: clamp(420px, 58vw, 560px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  perspective: 1400px;
  text-align: left;
}

.flashcard:focus-visible,
.control-btn:focus-visible,
.text-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.card-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.flashcard.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  min-height: inherit;
  overflow: hidden;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-front {
  align-items: flex-end;
  background: #17202a;
}

.front-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-overlay {
  position: absolute;
  inset: auto 0 0;
  min-height: 54%;
  background: linear-gradient(0deg, rgba(23, 32, 42, 0.9) 0%, rgba(23, 32, 42, 0.62) 45%, rgba(23, 32, 42, 0) 100%);
}

.front-label {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: min(760px, calc(100% - 36px));
  margin: 18px;
  padding: clamp(16px, 3vw, 24px);
  border-left: 6px solid var(--dcci-pink);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #17202a;
}

.card-kicker,
.back-kicker {
  color: var(--dcci-purple-deep);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#front-title {
  font-size: clamp(1.45rem, 4.2vw, 3.1rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
}

.card-back {
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(28px, 5vw, 58px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 240, 241, 0.98)),
    linear-gradient(90deg, #8e44ad, #e91e63, #3f51b5, #27ae60);
  transform: rotateY(180deg);
}

.back-title {
  color: #17202a;
  font-size: clamp(1.5rem, 3.6vw, 2.8rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.back-answer {
  max-width: 760px;
  color: #2c3e50;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.55;
  font-weight: 550;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.control-btn,
.text-btn {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #17202a;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(52, 73, 94, 0.16);
}

.control-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--dcci-purple), var(--dcci-pink));
  box-shadow: 0 12px 24px rgba(142, 68, 173, 0.22);
}

.control-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.text-btn {
  min-height: 38px;
  padding: 0 14px;
  color: var(--dcci-purple-deep);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.completion-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(39, 174, 96, 0.13);
  color: #145a32;
  font-size: 0.98rem;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(39, 174, 96, 0.24);
}

.completion-note strong {
  display: block;
  color: #0b4223;
}

.dcci-a11y-trigger--float {
  right: 18px;
  bottom: 18px;
  top: auto;
  border-color: rgba(255, 255, 255, 0.2);
  background: #1e1136;
  color: #fff;
}

.dcci-a11y-trigger--float .dcci-a11y-trigger__label {
  display: none;
}

.dcci-a11y-panel {
  top: auto;
  right: 18px;
  bottom: 72px;
}

.dcci-a11y-panel,
.dcci-a11y-panel * {
  color: #fff;
}

.dcci-a11y-panel input:checked + .dcci-a11y-seg-btn {
  color: #1c2833;
}

html.accessibility-reduce-motion * {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .card-inner,
  .progress-track span,
  .control-btn,
  .text-btn {
    transition: none;
  }
}

html.accessibility-high-contrast body,
html.accessibility-contrast-light body,
html.accessibility-contrast-dyslexia body,
html.accessibility-contrast-yellow body {
  background-image: none;
}

html.accessibility-simplified .header-copy {
  display: none;
}

html.accessibility-text-large .flashcard {
  min-height: 600px;
}

html.accessibility-text-xl .flashcard {
  min-height: 680px;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding-top: 18px;
  }

  .status-row,
  .controls {
    grid-template-columns: 1fr;
  }

  .flashcard {
    min-height: 460px;
  }

  .front-label {
    width: calc(100% - 24px);
    margin: 12px;
  }

  .card-back {
    padding: 26px;
  }
}


/* DCC-i typography lock: Montserrat throughout this app. */
:root {
  --dcci-header-font: Montserrat, "Montserrat Medium", Aptos, "Segoe UI", Arial, sans-serif;
  --dcci-body-font: Montserrat, "Montserrat Medium", Aptos, "Segoe UI", Arial, sans-serif;
}

html,
body,
button,
input,
select,
textarea,
.dcci-a11y-panel,
.dcci-a11y-panel *,
.dcci-a11y-trigger--float,
.dcci-a11y-trigger--float * {
  font-family: Montserrat, "Montserrat Medium", Aptos, "Segoe UI", Arial, sans-serif !important;
}

.card-kicker {
  display: none;
}
