:root {
    --td-ink: #173242;
    --td-muted: #415b66;
    --td-blue: #235470;
    --td-green: #12604b;
    --td-surface: #f1f6f7;
}
.tedoen-modern, .td-form {
    margin: 0;
    background: var(--td-surface);
    color: var(--td-ink);
    font: 1rem/1.6 system-ui, sans-serif;
}
.td-page, .td-nav, .td-form {
    box-sizing: border-box;
    padding-inline: clamp(1rem, 4vw, 4rem);
}
.td-page { padding-block: clamp(1.25rem, 4vw, 3rem); }
.td-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    padding-block: .65rem;
    background: #193b50;
}
.td-nav a, .td-button, #menu a.td-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: .35rem .75rem;
}
.td-nav a { color: white; }
.td-nav .td-brand { font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.td-button, #menu a.td-button {
    border-radius: .5rem;
    background: var(--td-green);
    color: white;
    font-weight: 700;
    text-decoration: none;
}
.td-nav .td-button { margin-inline-start: auto; }
.td-skip { position: absolute; inset-block-start: .25rem; inset-inline-start: .25rem; z-index: 5; padding: .5rem; background: white; }
.td-skip:not(:focus) { clip-path: inset(50%); }
:is(.td-page, .td-nav, .td-form, #menu) :focus-visible { outline: 3px solid #dd8c00; outline-offset: 3px; }
.td-card, .td-hero {
    border-radius: 1rem;
    padding: clamp(1rem, 4vw, 3rem);
    overflow-wrap: anywhere;
}
.td-card { background: white; border: 1px solid #d1e0e4; }
.td-card a:not(.td-button), .td-form a { color: var(--td-blue); }
.td-card h1, .td-hero h1 { font-size: clamp(1.75rem, 5vw, 3.5rem); line-height: 1.1; margin: 0 0 1rem; }
.td-card p, .td-hero p { max-width: 68ch; }
.td-category { color: var(--td-muted); font-weight: 700; }
.td-description { white-space: pre-line; }
.td-status { background: #fff4d5; padding: .75rem 1rem; border-radius: .5rem; }
.td-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.td-facts > div { padding: 1rem; background: var(--td-surface); border-radius: .5rem; }
.td-facts dt { font-weight: 700; }
.td-facts dd { margin: 0; }
.td-register { max-width: 76rem; margin-inline: auto; }
.td-register .td-hero { margin-block: 0; background: #193b50; color: white; }
.td-register .td-hero p { margin-block-end: 0; }
.td-options { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; margin-block: 1rem; }
.td-options .td-card { padding: clamp(1rem, 3vw, 1.75rem); }
.td-options h2, .td-register-info h2 { font-size: 1.25rem; line-height: 1.3; margin-block-start: 0; }
.td-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .5rem; padding: 0; margin-block-end: 0; list-style: none; }
.td-days a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .25rem .5rem; border: 1px solid #7b929b; border-radius: .5rem; font-weight: 650; text-decoration: none; }
.td-days a:not(.td-button) { background: var(--td-surface); }
.td-days a:hover, .td-options .td-button:hover { text-decoration: underline; }
.td-register-info { padding: clamp(1rem, 3vw, 1.75rem); }
.td-register-info a { color: var(--td-blue); }
@media (max-width: 720px) {
    .td-options { grid-template-columns: 1fr; }
}
.td-ad { margin-block: 2rem; min-height: 275px; text-align: center; color: var(--td-muted); }
.td-ad span { font-size: .8rem; }
.td-hero { margin-block: 1rem; background: #dceeea; color: var(--td-ink); }
.td-form { padding-block: 1rem; }
.td-form input, .td-form textarea, .td-form select { max-width: 100%; box-sizing: border-box; font-size: 1rem; }
.td-form :is(input[type="submit"], input[type="button"], button, select) { min-height: 44px; }
.td-form table { max-width: 100%; }
.td-form td { overflow-wrap: anywhere; }
.td-period-page { max-width: 48rem; margin-inline: auto; }
.td-period-page > p:first-child a { display: inline-flex; align-items: center; min-height: 44px; }
.td-period-form form { padding: clamp(1rem, 4vw, 2rem); border: 1px solid #d1e0e4; border-radius: 1rem; background: white; }
.td-period-form .td-hero { margin-block-start: 0; }
.td-period-form .td-hero p { margin-block-end: 0; }
.td-period-form table { width: 100%; margin-block-end: .65rem; border-spacing: 0; }
.td-period-form td:first-child { font-weight: 650; padding-inline-end: .75rem; }
.td-period-form :is(input:not([type="hidden"], [type="submit"]), select, textarea) {
    width: 100%;
    min-height: 44px;
    padding: .55rem .65rem;
    border: 1px solid #7b929b;
    border-radius: .4rem;
    background: white;
    color: var(--td-ink);
    font: inherit;
}
.td-period-form textarea { min-height: 8rem; resize: vertical; }
.td-period-form input[type="submit"] { margin-block-start: .75rem; padding: .55rem 1rem; border: 0; border-radius: .5rem; background: var(--td-green); color: white; font-weight: 700; cursor: pointer; }
#content { max-width: none; }
@media (max-width: 600px) {
    .td-nav .td-button { margin-inline-start: 0; }
    #menu ul { flex-direction: row; flex-wrap: wrap; }
    #menu li a { min-height: 44px; }
}

#content .td-hero h1 { color: var(--td-ink); }
#content :is(input, select, textarea) { max-width: 100%; box-sizing: border-box; }
.td-event-list { list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.td-event-list a { display: flex; flex-direction: column; padding: 1rem; border: 1px solid #d1e0e4; background: white; border-radius: .65rem; line-height: 1.5; overflow-wrap: anywhere; }
.td-event-list span { color: var(--td-muted); font-size: .9rem; }

.td-search { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: stretch; gap: .65rem; margin-block: 1rem 2rem; }
.td-search :is(select, input) { width: 100%; height: auto; min-height: 44px; padding: .55rem; border: 1px solid #7b929b; border-radius: .4rem; background: white; color: var(--td-ink); }
.td-search input[type="submit"] { width: 100%; height: auto; background: var(--td-blue); color: white; cursor: pointer; }

.td-date-picker { min-width: 0; margin: 1rem 0; border: 1px solid #7b929b; border-radius: .5rem; }
.td-date-picker legend { font-weight: 700; }
.td-date-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: .25rem; }
.td-date-options label { display: flex; align-items: center; gap: .35rem; min-height: 44px; }
@media (max-width: 600px) {
    .td-form { overflow-wrap: anywhere; }
    .td-form table { width: 100%; }
    .td-form table:not(.td-dates) :is(tbody, tr, td) { display: block; width: auto; }
    .td-form table:not(.td-dates) :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) { width: 100%; }
    .td-form .td-dates { font-size: .875rem; }
    .td-form .td-dates td { width: auto; }
}
