
/* -------------------------------------------------- PREFERENCES */
:root {
--card-max-width: 40em;
--card-text-align: left;
--font-size-regular: 18px;
--font-size-small: 16px;
--font-family: "DejaVu Sans", -apple-system, system-ui, BlinkMacSystemFont, Segoe UI,
    Roboto, Helvetica, Arial, sans-serif;
--img-width: 50%;
--img-brightness: 1;
--img-filter: none;
}

/* -------------------------------------------------- COLORS */
.card {
/* Light theme */
background-color: #cfd6d8;
--text-fg: #333333e6;
--text-fg-faint: #333333cc;
--text-bg-selected: #3333331a;
--card-bg: #ffffff;
--card-border: #f7f7f7;
--card-box-shadow: #3c42570f;
--divider: #3333331a;
--tag-fg: #333333cc;
--tag-bg: #3333330f;
--tag-fg-active: #333333;
--tag-bg-active: #3333331a;
--tag-border: transparent;
--cloze-fg: #348ccb;
--cloze-bg: transparent;
--link-fg: #2a70a2;
--link-bg: transparent;
--link-fg-active: #2f7eb6;
--link-bg-active: transparent;
--bold-fg: var(--text-fg);
--italic-fg: var(--text-fg);
--bold-italic-fg: var(--text-fg);
--underline-fg: var(--text-fg);
}

.card.night_mode {
/* Dark theme */
background-color: #242426;
--text-fg: #ffffffe6;
--text-fg-faint: #ffffffb3;
--text-bg-selected: #ffffff1f;
--card-bg: #2e2f31;
--card-border: #ffffff0a;
--card-box-shadow: #0000001f;
--divider: #ffffff1f;
--tag-fg: #ffffffb3;
--tag-bg: #ffffff14;
--tag-fg-active: #ffffff;
--tag-bg-active: #ffffff1f;
--tag-border: transparent;
--cloze-fg: #99ebff;
--cloze-bg: transparent;
--link-fg: #5da3d5;
--link-bg: transparent;
--link-fg-active: #71afda;
--link-bg-active: transparent;
--bold-fg: var(--text-fg);
--italic-fg: var(--text-fg);
--bold-italic-fg: var(--text-fg);
--underline-fg: var(--text-fg);
}

/* -------------------------------------------------- BACKGROUND */
.card {
cursor: default;
padding: 0.5em 0;
}
html:not(.mobile) .card {
padding: 0.5em;
}
.card::-webkit-scrollbar {
display: none;
}

/* -------------------------------------------------- FLASHCARD */
.prettify-flashcard {
background-color: var(--card-bg);
border-radius: 0.25em;
border: 1px solid var(--card-border);
box-shadow: var(--card-box-shadow) 0px 7px 14px 0px, var(--card-box-shadow) 0px 3px 6px 0px;
color: var(--text-fg);
font-family: var(--font-family);
font-size: var(--font-size-regular);
line-height: 1.5;
margin: 0 auto;
max-width: var(--card-max-width);
text-align: var(--card-text-align);
word-wrap: break-word;
}
.prettify-flashcard ::selection {
background-color: var(--text-bg-selected);
}

/* -------------------------------------------------- FIELDS */
.prettify-field {
margin: 2em;
}
.mobile .prettify-field {
margin: 1em;
}

.prettify-field--back {
color: var(--text-fg);
font-size: var(--font-size-regular);
}

/* -------------------------------------------------- CLOZE */
.cloze {
background-color: var(--cloze-bg);
color: var(--cloze-fg);
}

/* -------------------------------------------------- DECK */
.prettify-deck {
margin: 2em;
display: flex;
color: var(--text-fg-faint);
font-size: var(--font-size-small);
white-space: nowrap;
}
.mobile .prettify-deck {
margin: 1em;
}

.prettify-subdeck {
text-decoration: underline;
text-overflow: ellipsis;
overflow: hidden;
}

/* -------------------------------------------------- TAGS */
.prettify-tags {
margin: 2em;
display: flex;
flex-flow: row wrap;
font-size: var(--font-size-small);
}
.mobile .prettify-tags {
margin: 1em;
}

.prettify-tag {
all: initial;
background-color: var(--tag-bg);
border-radius: 0.2em;
color: var(--tag-fg);
display: inline;
font-size: var(--font-size-small);
font-family: var(--font-family);
margin: 0 0.5em 0.5em 0;
padding: 0.25em;
transition: all 0.25s;
word-break: break-word;
}
.prettify-tag:hover {
background-color: var(--tag-bg-active);
color: var(--tag-fg-active);
cursor: pointer;
}

/* -------------------------------------------------- DIVIDER */
.prettify-divider {
background-color: transparent;
border: none;
border-bottom: 1px dashed var(--divider);
margin: 1em;
padding: 0;
}

.prettify-divider--answer {
margin: 0 0 1em;
}

/* -------------------------------------------------- IMAGES */
img {
border-radius: 0.25em;
display: block;
margin: 1em auto;
max-width: var(--img-width) !important;
transition: max-width 0.25s 0.1s, opacity 0.25s 0.1s, filter 0.1s, transform 0s;
}
.night_mode img {
filter: var(--img-filter);
opacity: var(--img-brightness);
}
img:hover {
cursor: zoom-in;
filter: none;
max-width: 100% !important;
opacity: 1;
}
img + br {
display: none;
}
html:not(.mobile) img:active {
border: 1px solid var(--link-fg-active);
cursor: zoom-out;
filter: none;
left: 0;
max-width: 95% !important;
opacity: 1;
position: fixed;
top: 0;
transform: translate(calc(50vw - 50%), calc(50vh - 50%));
z-index: 100;
}

/* -------------------------------------------------- TABLES */
table {
border-collapse: separate;
border-spacing: 0;
margin: 0 auto;
max-width: 100%;
}
table thead {
background-color: var(--card-border);
}
table tr:nth-of-type(even) {
background-color: var(--card-border);
}
table tr:first-child th:first-child {
border-top-left-radius: 0.25em;
}
table tr:first-child th:last-child {
border-top-right-radius: 0.25em;
}
table tr:last-child td:first-child {
border-bottom-left-radius: 0.25em;
}
table tr:last-child td:last-child {
border-bottom-right-radius: 0.25em;
}
table th {
border-bottom: solid 1px var(--text-bg-selected);
border-left: solid 1px var(--text-bg-selected);
border-top: solid 1px var(--text-bg-selected);
padding: 0.5em;
}
table th:last-child {
border-right: solid 1px var(--text-bg-selected);
}
table td {
border-bottom: solid 1px var(--text-bg-selected);
border-left: solid 1px var(--text-bg-selected);
padding: 0.5em;
}
table td:last-of-type {
border-right: solid 1px var(--text-bg-selected);
}

/* -------------------------------------------------- HYPERLINKS */
a, a:visited {
text-decoration: none;
color: var(--link-fg);
}
a:hover, a:active {
text-decoration: underline;
color: var(--link-fg-active);
}

/* -------------------------------------------------- FORMATTING */
b {
color: var(--bold-fg);
}

i {
color: var(--italic-fg);
}

b > i,
i > b {
color: var(--bold-italic-fg);
}

u {
color: var(--underline-fg);
}

pre {
white-space: pre-wrap;
overflow-x: auto;
}

/* -------------------------------------------------- CUSTOM FONTS */
@font-face {
font-family: Inter;
src: local("Inter-Regular"), url("_Inter-Regular.woff2") format("woff2");
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: Inter;
src: local("Inter-Bold"), url("_Inter-Bold.woff2") format("wofff2");
font-style: normal;
font-weight: bold;
}
@font-face {
font-family: Inter;
src: local("Inter-Italic"), url("_Inter-Italic.woff2") format("wofff2");
font-style: italic;
font-weight: normal;
}
@font-face {
font-family: Inter;
src: local("Inter-BoldItalic"), url("_Inter-BoldItalic.woff2") format("wofff2");
font-style: italic;
font-weight: bold;
}

/* -------------------------------------------------- ADDITIONAL STYLES ADDED BY ANKI-DECKS.COM */
/* -------------------------------------------------- MULTIPLE CHOICE */
.prettify-multiple-choice {
    list-style-type: none; /* Remove the default list styling */
    padding-left: 0; /* Remove the left padding */
    margin: 1em 0; /* Add space around the list */
}

.prettify-multiple-choice li {
    margin-bottom: 0.5em; /* Add space between list items */
    padding: 0.5em 1em; /* Add padding inside each option */
    border: 1px solid var(--divider); /* Light border around each option */
    border-radius: 0.25em; /* Slightly round the edges of each option */
    cursor: pointer; /* Show pointer cursor on hover */
    transition: background-color 0.2s ease, border-color 0.2s ease; /* Smooth transition for hover effects */
}

.prettify-multiple-choice li:hover {
    background-color: var(--text-bg-selected); /* Highlight option on hover */
    border-color: var(--text-fg); /* Change border color on hover */
}

.prettify-correct {
    color: #4caf50; /* Green for correct answers */
    font-weight: bold; /* Make the correct answer bold */
}

.prettify-incorrect {
    color: #f44336; /* Red for incorrect answers */
    text-decoration: line-through; /* Strike through incorrect answers */
    opacity: 0.8; /* Slightly dim the incorrect answers */
}

/* -------------------------------------------------- SOURCE (PDF page + bbox) */
/* Answer-side `source` field: a zero-JS <details> whose <summary> is a pill
   button ("Source · Page N" + a CSS chevron that rotates on open). Opening
   reveals the shared per-page source image (bundled in the .apkg media),
   height-capped and framed, with the flashcard's bounding box drawn as a pure
   CSS overlay. No JS, no external assets — works offline on desktop and mobile
   and adapts to night mode via the theme CSS vars. */
.prettify-source {
    margin: 1.5em 2em 1em;
}
.mobile .prettify-source {
    margin: 1em;
}
.anki-source {
    font-size: var(--font-size-small);
}
/* Footnote-style toggle: no box, no border — muted text + chevron only.
   inline-flex (+ list-style / ::-webkit marker off) suppresses the native
   disclosure triangle across engines. */
.anki-source-pill {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35em;
    padding: 0.2em 0;
    color: var(--text-fg-faint);
    background-color: transparent;
    border: none;
    cursor: pointer;
    user-select: none;
    list-style: none;
    line-height: 1.4;
    transition: color 0.15s ease;
}
.anki-source-pill::-webkit-details-marker {
    display: none;
}
.anki-source-pill:hover {
    color: var(--text-fg);
}
.anki-source-pill::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 0.28em solid transparent;
    border-right: 0.28em solid transparent;
    border-top: 0.32em solid currentColor;
    opacity: 0.6;
    transition: transform 0.2s ease;
}
.anki-source[open] .anki-source-pill::after {
    transform: rotate(180deg);
}
.anki-source[open] .anki-source-pill {
    margin-bottom: 0.6em;
}
/* The page image + overlay live in a tightly-wrapping relative box so the
   absolutely-positioned bbox (percentages) tracks the image at any size. */
.anki-source-page {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}
/* Neutralise the global `img` rules (50% width, hover-zoom, :active fullscreen)
   that would otherwise detach the page image from its overlay; cap the height
   so a tall portrait page reads as a tidy framed thumbnail, not a wall. */
.anki-source-page img {
    display: block;
    margin: 0;
    width: auto;
    max-width: 100% !important;
    max-height: 22em;
    height: auto;
    object-fit: contain;
    border-radius: 0.4em;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-box-shadow) 0px 2px 8px 0px;
    cursor: default;
    transition: none;
    filter: none;
    opacity: 1;
}
.anki-source-page img:hover,
html:not(.mobile) .anki-source-page img:active {
    max-width: 100% !important;
    position: static;
    transform: none;
    border: 1px solid var(--card-border);
    left: auto;
    top: auto;
    z-index: auto;
}
.anki-source-bbox {
    position: absolute;
    box-sizing: border-box;
    background-color: rgba(255, 235, 59, 0.30);   /* yellow @ 30% — matches web modal */
    border: 2px solid rgba(255, 152, 0, 0.95);    /* orange border */
    border-radius: 2px;
    pointer-events: none;
}

/* -------------------------------------------------- END OF THEME */

.prettify-deck:empty { display: none; }

@media (prefers-color-scheme: dark) { .card {
/* Dark theme */
background-color: #242426;
--text-fg: #ffffffe6;
--text-fg-faint: #ffffffb3;
--text-bg-selected: #ffffff1f;
--card-bg: #2e2f31;
--card-border: #ffffff0a;
--card-box-shadow: #0000001f;
--divider: #ffffff1f;
--tag-fg: #ffffffb3;
--tag-bg: #ffffff14;
--tag-fg-active: #ffffff;
--tag-bg-active: #ffffff1f;
--tag-border: transparent;
--cloze-fg: #99ebff;
--cloze-bg: transparent;
--link-fg: #5da3d5;
--link-bg: transparent;
--link-fg-active: #71afda;
--link-bg-active: transparent;
--bold-fg: var(--text-fg);
--italic-fg: var(--text-fg);
--bold-italic-fg: var(--text-fg);
--underline-fg: var(--text-fg);
} }
