:root {
    color-scheme: light;
    --primary: #a80202;
    --secondary: #f5c151;
    --light: #f3f0e6;
    --dark: #1b1b1b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Georgia", "Times New Roman", serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-shell {
    max-width: 900px;
    margin: 0 auto;
    /* padding: 2rem 1rem 3rem; */
}

.site-header {
    text-align: center;
    /* margin-bottom: 1.5rem; */
}

.site-title {
    display: inline-flex;
    flex-direction: column;
    color: var(--dark);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 0.95;
    padding: 1.5rem 0;
}

.site-title-line {
    font-size: 1.6rem;
}

.site-title-line.small {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.button {
    display: inline-flex;
    /* Grow to fill container width exluding the check mark */
    flex: 1;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--light);
    border: 2px solid var(--primary);
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    height: 2.6rem;
    /* transition: background 0.15s ease, color 0.15s ease; */
}

.button.is-revealed {
    background: var(--light);
    color: var(--primary);
}

.button.secondary {
    background: var(--secondary);
    color: var(--dark);
}

.answer-shell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    width: 100%;
    max-width: 400px;
}

.check-button {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    border: 2px solid var(--primary);
    background: var(--light);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.check-button.is-checked {
    background: var(--primary);
    color: var(--light);
}

.check-button .check-mark {
    width: 1rem;
    height: 1rem;
    display: none;
    color: inherit;
    filter: brightness(0) saturate(100%);
}

.check-button.is-checked .check-mark {
    display: block;
    filter: brightness(0) invert(1);
}

.archive {
    margin-top: 2rem;
}

.archive ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.archive li {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.site-header-divider {
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--dark) 20%, transparent);;
    margin: 0;
}

.quiz-title {
    margin: 1rem 0 0.25rem;
    text-align: center;
    /* font-size: 1.1rem;
    font-weight: 700; */
}

.quiz-meta {
    text-align: center;
    /* font-size: 0.85rem; */
    margin: 0 0 1.5rem;
}

.quiz-description {
    text-align: center;
    font-size: 1.2rem;
    margin: 0 0 1.5rem;
    padding: 0 1rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
}

.question-divider {
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--dark) 20%, transparent);;
    margin: 1.5rem 0 0 0;
}

.quiz-card {
    margin: 0 1rem;
}

.quiz-header {
    margin-bottom: 1.5rem;
}

.score-panel {
    display: flex;
    /* Stack on top of each other */
    flex-direction: column;
    align-items: center;

    /* align-items: center;
    gap: 1rem;
    background: var(--light);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin: 2rem 0 0;
    border: 1px solid var(--border); */
}

.score-copy {
    flex: 1;
    min-width: 0;
}

.score-label {
    margin: 0 0 0.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}

.progress-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg, var(--primary) 0deg, rgba(27, 27, 27, 0.08) 0deg);
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}

.progress-ring span {
    background: var(--light);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.question-card {
    padding: 1rem 0 0 0;
}

.explanation {
    color: #5a5a5a;
    font-style: italic;
}

.latest-quiz {
    /* Darken background */
    background-image: url('/img/flag.png');
    height:200px;
    width:100%;
    background-size: cover;
    background-position: center;

    /* Center the content */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 0 0;
}

.latest-quiz a {
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 700;
    /* Make uppercase */
    text-transform: uppercase;
    /* Add underline */
    text-decoration: underline;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.archive h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}


/*
Panel is a slightly rounded container.

Panel title has background of primary color, and the body has a light background.
Panel title colour is light, and the body text is dark.
*/
.share-panel {
    margin: 1.5rem auto 1rem auto;
    border: 1px solid var(--primary);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    max-width: 400px;
}

.share-title {
    background: var(--primary);
    color: var(--light);
    padding: 0.75rem 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    text-align: center;
}

.share-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-text {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.share-button {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    min-width: 2.6rem;
}

.share-icon {
    width: 1rem;
    height: 1rem;
    filter: brightness(0) invert(1);
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 2rem 0;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: var(--primary);
}

.instagram-icon {
  width: 2rem;
  height: 2rem;
  background-color: var(--light);
  
  /* Use both prefixes to ensure full browser compatibility */
  -webkit-mask-image: url('/img/instagram.svg');
  mask-image: url('/img/instagram.svg');
  
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}