
:root {
    /* Primary palette */
    --tm-color-black: #1a1a1a;
    --tm-color-blue: #2980b9;
    --tm-color-grey: #666;
    --tm-color-red:  #c0392b;

    /* Property-specific colors */
    --tm-color-border: #e8e8e8;
    --tm-color-background: #f8f9fa;
    --tm-color-screen: #e9e9ed;
}

/* Base styles */
body {
    font-family: Georgia, serif;
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.5rem;
    line-height: 1.6;
    color: var(--tm-color-black);
}

/* Headings */
h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 1.5em 0 0.5em;
    line-height: 1.2;
}

h2 {
    font-size: 1.3em;
    font-weight: 400;
    margin: 1.2em 0 0.5em;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
}

a:hover {
    color: var(--tm-color-blue);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

li {
    margin: 0.8em 0;
    padding: 0.5em 0;
    border-bottom: 1px solid var(--tm-color-border);
}

li:last-child {
    border-bottom: none;
}

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

/* Supporting text - sans serif */
.meta {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85em;
    color: var(--tm-color-grey);
}

/* Informative highlights */
.highlight {
    color: var(--tm-color-blue);
}

/* Corrections (for future use) */
.error {
    color: var(--tm-color-red);
}

/* Header */
.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.header h1 {
    margin: 0;
    padding: 0.25rem 0.50rem 0.40rem;
    font-size: 1rem;
    font-variant: petite-caps;
    color: white;
    background: var(--tm-color-blue);
}
.header nav {
    justify-self: end;
}
.header nav a {
    display: flex;
}

.subheader {
    margin: 1rem 0;
}
.subheader h1, h2 {
    display: inline;
}
.subheader h2 {
    margin-left: 0.25rem;
}

/* Labeled paragraphs */
.labeled .label {
    display: inline;
    font-weight: bold;
}
.labeled .label:after {
    content: ":";
}

.labeled p {
    display: inline;
}
.section {
    margin: 1rem 0;
}

/* Play button */
.play-button {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-button:hover {
    color: var(--tm-color-blue);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5em;
    }
}

/* Forms */
input[type=text] {
    width: 100%;
    border: 0;
    border-bottom: 2px var(--tm-color-border) solid;
}

input[type=submit] {
    background: var(--tm-color-screen);
    border: none;
    padding: 0.5rem 1rem;
    margin-left: auto;
}

textarea {
    border: 2px var(--tm-color-border) solid;
    width: 100%;
    height: 3rem;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85em;
}

.form-field {
    margin: 2rem 0;
}
.form-field label {
    display: block;
    font-weight: bold;
}
.form-field select {
    border: none;
    padding: 0.5rem 2rem;
    margin-top: 1rem;
}
/* Sentences */
.sentence-input {
    width: 100%;
    font-size: 1em;
    margin-bottom: 1rem;
}

.token {
    display: inline-grid;
    grid-template-rows: auto auto auto;
    text-align: center;
    vertical-align: bottom;
    margin: 0 8px 0 0;
    align-items: end;
}

.token:has(+ .token.punctuation) {
    margin-right: 0;
}

.translation {
    font-size: 0.8em;
    white-space: nowrap;
    font-family: sans-seif;                
}

.translation input {
    border: none;
    border-bottom: 2px var(--tm-color-border) solid;
    color: var(--tm-color-blue);
    display: block;
    margin-bottom: 2px;
    text-align: center;
    width: 60px;
}
.translation select {
    background: var(--tm-color-screen);
    border: none;
}
.punctuation input {
    width: 10px;
}

.sentence-footer {
    border-top: 1px var(--tm-color-border) solid;
    
}
.sentence-footer nav ul {
    display: flex;
    justify-content: space-between;
    font-family: system-ui, -apple-system, sans-serif;
}
.sentence-footer nav li {
    border: none;
}

/* Cloze */
input.cloze {
    border: none;
    border-bottom: 1px var(--tm-color-black) solid;
    background: var(--tm-color-background);
    color: var(--tm-color-blue);
    text-align: center;
    font-size: 0.9rem;
}

input.correct {
    color: #008000;
    background: #e1ffb4;
}
input.incorrect {
    color: red;
}
