.hword {
	margin: 0;  
	padding: 0;  
	display: inline;  
	font-size: 45px;  
	color: #CA0403;   
	vertical-align: bottom;  
	line-height: 55px;  
	font-family: georgia,arial,verdana,sans-serif;
}

.fl {
	margin: 0 8px 0 0;
	padding: 0;
	display: inline;
	font-size: 35px;
	color: #0000FF;
	font-style: italic;
	vertical-align: bottom;
	line-height: 40px;
	font-family: georgia,arial,verdana,sans-serif;
}

.prs {
    margin: 0 12px 0 5px;
	padding: 0;
	display: inline;
	font-size: 35px;
	color: #009900;
	vertical-align: bottom;
	line-height: 40px;
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}

.etymology {
	color: #CC0000;
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
	font-size: 22px;
	font-weight: normal;
	text-decoration: none;
}

.examples {
	color: #663300;
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
	font-size: 20px;
	font-weight: normal;
	text-decoration: none;
}

.related {
	color:#0000ff;
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
	font-size: 20px;
	font-weight: normal;
	text-decoration: none;
}

.word {
	color: #0000ff;
	font-size: 20px;
}
.definition {
	color: #000000;
	font-size: 25px;
}

.variants {
	color: #000000;
	font-size: 20px;
}

.plural {
	color: #000000;
	font-size: 20px;
}

.table-hover tbody tr:hover td {
    background: aqua;
}

:root {
    color-scheme: light;
    --bg: #f4f7f6;
    --panel: #ffffff;
    --panel-soft: #eef5f2;
    --text: #17211f;
    --muted: #60706b;
    --line: #d8e2df;
    --accent: #0f7c6e;
    --accent-strong: #095f55;
    --accent-soft: #d9f0ec;
    --warm: #f2b84b;
    --danger: #b73737;
    --shadow: 0 18px 45px rgba(24, 38, 35, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 14px;
    height: 100vh;
    overflow: hidden;
    padding: 18px;
}

.simple-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: auto;
}

.app-header,
.category-panel,
.list-rail,
.word-panel,
.dictionary-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
}

.app-header h1,
.rail-header h2 {
    margin: 0;
    font-weight: 750;
    letter-spacing: 0;
}

.app-header h1 {
    font-size: 30px;
}

.mode-links {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
}

.mode-links a {
    min-width: 72px;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
}

.mode-links a:hover,
.mode-links a[aria-current="page"] {
    background: var(--accent);
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-status {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.page-status[data-error="true"] {
    color: var(--danger);
}

.progress-card {
    display: grid;
    gap: 8px;
    width: min(320px, 42vw);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.progress-track {
    height: 18px;
    overflow: hidden;
    background: #dce7e4;
    border-radius: 999px;
}

.progress-fill {
    display: grid;
    place-items: center;
    min-width: 0;
    height: 100%;
    width: 0;
    overflow: hidden;
    background: linear-gradient(90deg, var(--accent), var(--warm));
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    transition: width 180ms ease;
}

.quiz-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 8px;
    width: min(430px, 48vw);
}

.stat-pill {
    display: grid;
    gap: 2px;
    min-height: 50px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfc;
}

.stat-pill span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.stat-pill strong {
    font-size: 18px;
    line-height: 1.1;
}

.quiz-progress {
    grid-column: 1 / -1;
}

.category-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.list-context-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-height: 42px;
    padding: 8px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.list-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.list-breadcrumb button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent-strong);
    font: inherit;
}

.list-breadcrumb button:hover {
    color: var(--accent);
    text-decoration: underline;
}

.list-breadcrumb [aria-current="page"] {
    overflow-wrap: anywhere;
}

.breadcrumb-separator {
    color: var(--muted);
}

.list-selected .category-panel,
.list-selected .list-rail {
    display: none;
}

.list-selected .workspace {
    grid-template-columns: minmax(0, 1fr);
}

.list-selected .quiz-workspace {
    grid-template-columns: minmax(560px, 1.75fr) minmax(260px, .85fr);
}

.category-nav,
.group-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.list-button,
.word-button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.category-button,
.group-button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.category-button,
.group-button {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-weight: 750;
    white-space: nowrap;
}

.group-button {
    background: var(--panel-soft);
    color: var(--accent-strong);
    font-size: 14px;
}

.category-button:hover,
.group-button:hover,
.list-button:hover,
.word-button:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.category-button[aria-pressed="true"],
.group-button[aria-pressed="true"],
.list-button[aria-pressed="true"],
.word-button[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.workspace {
    display: grid;
    grid-template-columns: clamp(180px, 12.5vw, 230px) minmax(0, 1fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.quiz-workspace {
    grid-template-columns: clamp(170px, 11vw, 220px) minmax(560px, 1.75fr) minmax(260px, .85fr);
}

.list-rail,
.word-panel,
.dictionary-panel,
.image-panel {
    min-height: 0;
}

.list-rail {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
}

.rail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rail-header h2 {
    font-size: 16px;
    overflow-wrap: anywhere;
}

.count-pill {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
}

.search-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-field input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfdfc;
    color: var(--text);
}

.search-field input:focus {
    border-color: var(--accent);
    outline: 3px solid var(--accent-soft);
}

.list-nav,
.word-list {
    display: grid;
    align-content: start;
    gap: 6px;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.list-button {
    display: grid;
    gap: 2px;
    width: 100%;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 13px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.study-panel {
    display: grid;
    grid-template-columns: clamp(170px, 12vw, 220px) minmax(0, 1fr) clamp(150px, 14vw, 240px);
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.word-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
}

.missed-word-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.word-button {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    color: #1544a0;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.dictionary-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    padding: 10px;
}

.image-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.image-panel-header {
    display: grid;
    gap: 8px;
}

.image-status {
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    overflow: auto;
    overscroll-behavior: contain;
}

.image-card {
    width: 100%;
    padding: 0;
    display: grid;
    place-items: center;
    min-height: min(34vh, 260px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 140ms ease, transform 140ms ease;
}

.image-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.image-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dictionary-frame-wrap {
    position: relative;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.dictionary-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.dictionary-message {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 14px;
    place-items: center;
    padding: 24px;
    color: var(--muted);
    font-weight: 750;
    text-align: center;
    background: #ffffff;
}

.dictionary-status {
    z-index: 2;
}

.dictionary-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.dictionary-open-link:hover {
    background: var(--accent-strong);
}

.dictionary-test-shell {
    grid-template-rows: auto minmax(0, 1fr);
}

.form-panel,
.launcher-panel {
    width: min(100%, 430px);
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.wide-form-panel {
    width: min(100%, 640px);
}

.form-heading {
    margin-bottom: 18px;
}

.form-heading h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.stack-form input,
.stack-form textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfdfc;
    color: var(--text);
    font: inherit;
}

.stack-form textarea {
    min-height: 260px;
    resize: vertical;
}

.stack-form input:focus,
.stack-form textarea:focus {
    border-color: var(--accent);
    outline: 3px solid var(--accent-soft);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.inline-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.inline-check input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.secondary-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    color: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
}

.secondary-link:hover {
    color: var(--accent);
}

.form-status {
    min-height: 20px;
    margin: 0;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.form-status[data-error="true"] {
    color: var(--danger);
}

.account-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    margin-bottom: 14px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.account-bar a,
.account-bar button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    background: #ffffff;
    color: var(--accent-strong);
    font: inherit;
    text-decoration: none;
}

.account-bar button {
    cursor: pointer;
}

.launcher-grid {
    display: grid;
    gap: 10px;
}

.launcher-grid a {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-weight: 850;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.launcher-grid a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
}

.quiz-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.quiz-panel-header {
    align-items: center;
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.missed-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.missed-actions .primary-action,
.missed-actions .secondary-action {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.primary-action {
    background: var(--accent);
    color: #ffffff;
}

.secondary-action {
    background: #ffffff;
    color: var(--text);
}

.primary-action:hover,
.secondary-action:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.primary-action[aria-disabled="true"],
.secondary-action[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.quiz-list {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.quiz-row {
    display: grid;
    grid-template-columns: minmax(170px, .9fr) minmax(380px, 2.6fr) 42px;
    gap: 7px;
    align-items: center;
    min-height: 46px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.quiz-row[data-active="true"] {
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

.quiz-row[data-result="correct"] {
    background: #eef8f4;
}

.quiz-row[data-result="incorrect"] {
    background: #fff2f0;
}

.quiz-prompt {
    display: block;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.quiz-hint {
    display: block;
    min-width: 0;
    color: #1544a0;
    font-size: 17px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-input {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 8px;
    background: #fbfdfc;
    color: var(--text);
}

.quiz-spelling-cell {
    min-width: 0;
}

.quiz-spelling-review {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 32px;
    overflow: hidden;
}

.quiz-raw-answer,
.quiz-answer-diff,
.quiz-correct-spelling {
    display: inline-flex;
    min-width: 0;
    align-items: center;
}

.quiz-raw-answer {
    max-width: 24%;
    overflow: hidden;
    color: var(--muted);
    font-size: 15px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-answer-diff {
    max-width: 42%;
    gap: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-correct-spelling {
    flex: 0 1 auto;
    max-width: 30%;
    border-radius: 6px;
    padding: 1px 7px;
    overflow: hidden;
    background: #25855f;
    color: #ffffff;
    font-size: 16px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-input:focus {
    border-color: var(--accent);
    outline: 3px solid var(--accent-soft);
}

.result-mark {
    display: grid;
    place-items: center;
    width: 42px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.quiz-row[data-result="correct"] .result-mark {
    border-color: #25855f;
    background: #25855f;
    color: #ffffff;
}

.quiz-row[data-result="incorrect"] .result-mark {
    border-color: var(--danger);
    background: var(--danger);
    color: #ffffff;
}

.diff-letter {
    display: inline-flex;
    min-width: 17px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 3px;
}

.diff-letter-match {
    color: var(--text);
}

.diff-letter-missed {
    background: #25855f;
    color: #ffffff;
}

.diff-letter-extra {
    background: var(--danger);
    color: #ffffff;
    text-decoration: line-through;
    text-decoration-color: #ffffff;
    text-decoration-thickness: 2px;
}

[hidden] {
    display: none !important;
}

.empty-state {
    margin: 0;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
}

.empty-state.error {
    border-color: rgba(183, 55, 55, 0.35);
    color: var(--danger);
}

@media (max-width: 1100px) {
    .workspace,
    .study-panel,
    .quiz-workspace {
        grid-template-columns: 1fr;
    }

    .list-rail {
        max-height: 360px;
    }

    .word-panel {
        max-height: 420px;
    }

    .quiz-panel {
        max-height: 60vh;
    }
}

@media (max-width: 720px) {
    .app-shell {
        gap: 10px;
        padding: 10px;
    }

    .app-header {
        display: grid;
        padding: 14px;
    }

    .app-header h1 {
        font-size: 26px;
    }

    .form-heading h1 {
        font-size: 26px;
    }

    .progress-card {
        width: 100%;
    }

    .quiz-stats {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-panel,
    .list-rail,
    .word-panel,
    .dictionary-panel,
    .quiz-panel,
    .image-panel {
        padding: 12px;
    }

    .category-button,
    .group-button {
        max-width: 82vw;
        white-space: normal;
    }

    .dictionary-frame-wrap {
        min-height: 70vh;
    }

    .quiz-panel-header {
        display: grid;
    }

    .quiz-actions {
        justify-content: stretch;
    }

    .quiz-actions button {
        flex: 1 1 130px;
    }

    .quiz-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        display: grid;
    }
}
