* {
margin: 0;
padding: 0;
font-weight: normal;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body,
.root {
width: 100vw;
height: 100vh;
}
body {
font-family:
"TeX Gyre Termes", "Nimbus Roman No9 L", "Times New Roman", "Times",
serif;
}
.root {
display: flex;
flex-direction: column;
.header,
.controls {
background: #f8f8f8;
}
.header {
padding: 32px;
border-bottom: 1px solid black;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.progress-bar {
width: 300px;
height: 24px;
border: 1px solid #999;
border-radius: 12px;
background: white;
overflow: hidden;
.progress-fill {
height: 100%;
background: palegreen;
}
}
}
.card-container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: #fcfcfc;
overflow: hidden;
.card {
background: white;
display: flex;
flex-direction: column;
.card-header {
border-bottom: 1px solid black;
padding: 24px;
h1 {
font-size: 36px;
}
}
.card-content {
flex: 1;
display: flex;
flex-direction: column;
overflow-x: hidden;
overflow-y: auto;
.question,
.answer,
.prompt {
padding: 24px;
}
.question {
border-bottom: 1px solid black;
}
.answer {
min-height: 30px;
}
.rich-text {
font-size: 30px;
text-align: justify;
line-height: 1.4;
.cloze {
width: 30px;
background: #a0a0a0;
text-decoration: none;
border-radius: 8px;
color: transparent;
}
.cloze-reveal {
color: royalblue;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
height: auto;
}
ul,
ol {
padding-left: 24px;
}
p,
img,
ol,
ul,
blockquote,
table,
pre {
&:not(:last-child) {
margin-bottom: 16px;
}
}
blockquote {
background: #f7f7f7;
border-left: 4px solid #ccc;
padding: 8px 12px;
}
table {
border-collapse: collapse;
width: 100%;
font-size: 0.65em;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
line-height: 1.6;
border: 1px solid #999;
th,
td {
border: 1px solid #bbb;
padding: 10px 14px;
text-align: left;
vertical-align: top;
}
th {
background: #e8e8e8;
font-weight: 600;
border: 1px solid #999;
}
tbody tr:nth-child(odd) {
background: #ffffff;
}
tbody tr:nth-child(even) {
background: #f5f5f5;
}
code {
font-size: 0.85em;
background: #ececec;
}
}
code {
background: #f7f7f7;
border: 1px solid #ddd;
padding: 2px 6px;
border-radius: 3px;
font-family: "Menlo", "Monaco", "Courier New", monospace;
font-size: 0.7em;
color: inherit;
}
pre {
background: #f7f7f7;
border: 1px solid #ddd;
border-radius: 4px;
padding: 12px;
overflow-x: auto;
font-size: 0.7em;
line-height: 1.5;
code {
background: transparent;
border: none;
padding: 0;
border-radius: 0;
font-size: 0.85em;
color: inherit;
}
}
audio {
width: 100%;
}
.katex {
font-size: 1em;
}
}
}
}
}
.controls {
border-top: 1px solid black;
form {
display: flex;
justify-content: space-between;
.spacer {
flex: 1;
}
input {
-webkit-appearance: none;
appearance: none;
background: white;
border: 1px solid #999;
padding: 7px 12px;
font-size: 16px;
color: black;
font-family:
system-ui,
-apple-system,
"Helvetica Neue",
sans-serif;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
box-shadow: #ccc 0px 1px 3px 0px;
&:disabled {
cursor: not-allowed;
}
}
}
}
}
.finished {
h1 {
text-align: center;
}
.summary {
font-size: 24px;
margin-bottom: 48px;
}
h2 {
border-bottom: 1px solid #ccc;
}
.stats {
table {
width: 100%;
border-collapse: collapse;
tr {
border-bottom: 1px solid #eee;
td {
padding-top: 12px;
padding-bottom: 12px;
&.key {
font-family: "SF Pro", sans-serif;
font-weight: 500;
width: auto;
white-space: nowrap;
}
&.val {
font-family: "SF Pro", sans-serif;
font-feature-settings: "tnum";
font-variant-numeric: tabular-nums;
width: 100%;
}
}
}
}
}
.shutdown-container {
margin-top: 48px;
text-align: center;
form {
display: inline-block;
}
.shutdown-button {
background: #dc3545;
color: white;
border: 1px solid #c82333;
padding: 12px 24px;
font-size: 18px;
font-family:
system-ui,
-apple-system,
"Helvetica Neue",
sans-serif;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
box-shadow: rgba(220, 53, 69, 0.3) 0px 2px 8px 0px;
transition:
background-color 0.2s,
box-shadow 0.2s;
&:hover {
background: #c82333;
box-shadow: rgba(220, 53, 69, 0.5) 0px 4px 12px 0px;
}
&:active {
background: #bd2130;
box-shadow: rgba(220, 53, 69, 0.2) 0px 1px 4px 0px;
}
}
}
}
@media (max-width: 768px) {
.card {
width: 100%;
height: 100%;
box-shadow: none;
}
.controls {
padding: 12px;
form {
flex-direction: column;
input {
margin: 6px 0;
}
.grades {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
}
.finished {
padding: 24px;
h1 {
font-size: 36px;
margin-bottom: 36px;
}
h2 {
font-size: 30px;
margin-bottom: 16px;
}
.stats {
font-size: 16px;
}
.val {
padding-left: 24px;
}
}
}
@media (min-width: 769px) {
.card {
width: 900px;
min-height: 400px;
max-height: 90%;
box-shadow: 0px 0px 48px 16px #ddd;
border: 1px solid black;
}
.controls {
padding: 32px;
form {
flex-direction: row;
input {
margin: 0 12px;
}
}
}
.finished {
padding: 48px;
h1 {
font-size: 48px;
margin-bottom: 48px;
}
h2 {
font-size: 36px;
margin-bottom: 24px;
}
.stats {
font-size: 22px;
}
.val {
padding-left: 48px;
}
}
}