:root { --dotd-accent: #dc3545; --bs-body-font-family: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; }
.container-xxl { --bs-gutter-x: clamp(2.5rem, 7vw, 6rem); }                 /* the same side padding for header, pages and footer */
body { min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.02em; }
.btn { --bs-btn-border-radius: .5rem; --bs-btn-font-weight: 600; text-wrap: balance; }
.btn-lg { --bs-btn-padding-y: .8rem; --bs-btn-padding-x: 1.5rem; --bs-btn-font-size: 1.05rem; }
.form-control { border-radius: .75rem; }
.navbar { padding-block: .85rem; }
.navbar-brand { font-size: 1.15rem; letter-spacing: -.02em; }
.dotd-skip:focus { position: fixed; top: .5rem; inset-inline-start: .5rem; z-index: 2000; padding: .5rem 1rem; border-radius: .375rem; background: var(--bs-body-bg); color: var(--bs-body-color); }

/* header icons: no box, no border */
.dotd-icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: .4rem; border: 0; background: none; color: var(--bs-body-color); line-height: 1; border-radius: .375rem; cursor: pointer; }
.dotd-icon-btn:hover { color: var(--dotd-accent); }
.dotd-icon-btn:focus-visible { outline: 2px solid var(--dotd-accent); outline-offset: 2px; }
.dotd-theme-glyph { display: inline-block; font-size: 1.45rem; line-height: 1; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
[data-bs-theme=dark] .dotd-theme-glyph { transform: rotate(180deg); }
.dotd-lang-icon { display: block; width: 1.5rem; height: 1.5rem; background: url(/language-icon.svg) center / contain no-repeat; }
[data-bs-theme=dark] .dotd-lang-icon { background-image: url(/language-icon-white.svg); }

/* the home page stage: the picture of the day (always square, 1800 x 1800) centred and as large as the screen allows below the menu, so it fits above the fold; the texts follow underneath, centred.
   --dotd-hero-chrome = the height of the menu plus the breathing room around the picture (raise it if the picture ever touches the bottom of the screen, lower it for a larger picture). The picture is never smaller than 18rem and never wider than its container. */
.dotd-stage { padding-top: clamp(.75rem, 1.6vw, 1.25rem); }
.dotd-hero { --dotd-hero-chrome: 6.5rem; display: block; position: relative; overflow: hidden; width: min(100%, max(18rem, calc(100vh - var(--dotd-hero-chrome)))); width: min(100%, max(18rem, calc(100svh - var(--dotd-hero-chrome)))); aspect-ratio: 1 / 1; margin-inline: auto; border-radius: 0; box-shadow: var(--bs-box-shadow); background: var(--bs-secondary-bg); }
.dotd-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dotd-stage-text { max-width: 52rem; margin-inline: auto; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.5rem, 7vw, 5.5rem); text-align: center; }
.dotd-stage-title { margin-bottom: 1.25rem; font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }
.dotd-stage-lead { max-width: 46rem; margin: 0 auto; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--bs-secondary-color); text-wrap: pretty; }
.dotd-stage-cta { margin-top: 2rem; --bs-btn-padding-x: 2.25rem; }
.dotd-archive-link { margin: 1.25rem 0 0; font-size: .95rem; line-height: 1.5; }
.dotd-archive-link a { color: var(--bs-secondary-color); text-decoration: underline; text-decoration-color: var(--bs-border-color); text-underline-offset: .25em; }
.dotd-archive-link a:hover { color: var(--dotd-accent); text-decoration-color: currentColor; }

/* share and e-mail icons (home page below the text, and in the footer band); "Link copied" appears next to them */
.dotd-share { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; }
.dotd-share-note { font-size: .85rem; color: var(--bs-secondary-color); }
.dotd-share-hero { margin-top: 1.75rem; }
.dotd-share-hero .dotd-share { justify-content: center; }

/* the features of the day: a centred heading block with generous room above (after the ads) and a clear gap below it, then square pictures, square corners, no border lines */
.dotd-network { padding-block: clamp(4.5rem, 9vw, 7.5rem) clamp(2.5rem, 5vw, 3.5rem); }
.dotd-network-head { max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.dotd-network-title { margin-bottom: 1rem; font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.dotd-network-text { margin: 0; font-size: 1.0625rem; line-height: 1.7; color: var(--bs-secondary-color); text-wrap: balance; }
.dotd-card { border-radius: 0; overflow: hidden; background: var(--bs-tertiary-bg); transition: transform .25s ease, box-shadow .25s ease; }
.dotd-card:hover, .dotd-card:focus-within { transform: translateY(-4px); box-shadow: var(--bs-box-shadow-lg) !important; }
.dotd-card-media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--bs-secondary-bg); }
.dotd-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.dotd-card:hover .dotd-card-img { transform: scale(1.04); }
.dotd-arrow::before { content: "\2192"; display: inline-block; margin-inline-start: .35em; transition: transform .2s ease; }   /* a real element after the text: the ::after of a stretched link covers the whole card */
[dir=rtl] .dotd-arrow::before { content: "\2190"; }
.dotd-card:hover .dotd-arrow::before { transform: translateX(.25em); }
[dir=rtl] .dotd-card:hover .dotd-arrow::before { transform: translateX(-.25em); }

/* pages: breathing room, a clear title, readable text (one width in rem for the whole text block, so headings, paragraphs and code boxes share the same edges) */
.dotd-page { padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.dotd-eyebrow { margin-bottom: 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dotd-accent); }
.dotd-title { margin-bottom: 2rem; font-size: clamp(2.25rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.dotd-title-sm { margin-bottom: 1.25rem; font-size: clamp(2rem, 3.6vw, 2.75rem); }
.dotd-prose { max-width: 46rem; font-size: 1.0625rem; line-height: 1.8; }
.dotd-prose-wide { max-width: none; }                                         /* the embed page uses the whole container; only plain text stays readable */
.dotd-prose-wide > p, .dotd-prose-wide > ul { max-width: 60rem; }
.dotd-prose > p:first-child { font-size: 1.25rem; line-height: 1.65; color: var(--bs-emphasis-color); }
.dotd-prose p { margin-bottom: 1.35rem; }
.dotd-prose h2 { margin: 2.75rem 0 1rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.dotd-prose ul { margin-bottom: 1.5rem; padding-inline-start: 1.25rem; }
.dotd-prose li { margin-bottom: .6rem; padding-inline-start: .25rem; }
.dotd-prose a:not(.btn) { color: var(--dotd-accent); text-decoration-thickness: .08em; text-underline-offset: .22em; }   /* buttons keep their own colours (a red link colour made red buttons empty) */
.dotd-prose a:not(.btn):hover { color: var(--bs-link-hover-color); }
.dotd-prose dt { font-weight: 600; }
.dotd-prose dd { margin-bottom: .75rem; }
.dotd-sticky { top: 2rem; }
.dotd-panel { border-radius: 1.75rem; background: var(--bs-tertiary-bg); }
.dotd-visual-panel { display: flex; align-items: center; justify-content: center; min-height: 22rem; padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 1.75rem; background: var(--bs-tertiary-bg); }
.dotd-visual { width: 100%; max-width: 30rem; }
.dotd-visual-bare { width: 100%; max-width: 24rem; }                    /* no background behind the icon (newsletter, sign-up) */

/* embed page: code boxes as wide as the container, long lines wrap, the copy button sits inside the box; variants, preview, tabs */
.dotd-code { position: relative; margin-bottom: 1.5rem; }
.dotd-code-pre { margin: 0; padding: 3.5rem 1.5rem 1.5rem; overflow: visible; border-radius: 1rem; background: var(--bs-tertiary-bg); font-size: .95rem; line-height: 1.7; text-align: start; white-space: pre-wrap; overflow-wrap: anywhere; }
.dotd-code-copy { position: absolute; top: .75rem; inset-inline-end: .75rem; z-index: 1; }
.dotd-variant { margin-block: 3.5rem; }
.dotd-label { margin-bottom: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bs-secondary-color); }
.dotd-preview { padding: 1.25rem; border-radius: 1.25rem; background: var(--bs-tertiary-bg); }
.dotd-tabs .nav-link { padding: .45rem 1rem; border-radius: .75rem; font-weight: 600; color: var(--bs-body-color); }
.dotd-tabs .nav-link.active { background: var(--dotd-accent); color: #fff; }

/* icons of the icon database (inline SVG): colours are never changed; in the dark theme the icon sits on a white tile */
.dotd-icon svg { display: block; width: 100%; height: auto; }
[data-bs-theme=dark] .dotd-icon-plate { box-sizing: border-box; padding: 1.25rem; border-radius: 1.25rem; background: #fff; }

/* redirect page (design awards): logo, text, a bar that fills during the delay (CSS only) and a short introduction to the A' Design Award */
.dotd-redirect { max-width: 36rem; }
.dotd-redirect-logo { width: min(100%, 15rem); margin-inline: auto; }
.dotd-redirect-about { font-size: .95rem; line-height: 1.7; }
.dotd-fill { width: 0; animation: dotd-fill var(--dotd-seconds, 3s) linear forwards; }
@keyframes dotd-fill { to { width: 100%; } }

/* design quote of the day (DesignAdage): on the page background, between the content (or the ads) and the footer; the browser fills in today's quote */
.dotd-adage { padding-block: clamp(3rem, 7vw, 6rem); text-align: center; }
.dotd-adage-label { margin-bottom: 1.25rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dotd-accent); }
.dotd-adage-text { max-width: 52rem; min-height: 1.25em; margin: 0 auto; font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.dotd-adage-text a { color: inherit; text-decoration: none; }
.dotd-adage-text a:hover { color: var(--dotd-accent); }
.dotd-adage-author { min-height: 1.5em; margin-top: 1.25rem; font-size: 1rem; color: var(--bs-secondary-color); }
.dotd-adage-source { margin: 1rem 0 0; font-size: .85rem; }
.dotd-adage-source a { color: var(--bs-secondary-color); text-decoration: none; }
.dotd-adage-source a:hover { color: var(--dotd-accent); }

/* footer: the main area, and under it a darker band: the copyright line on one side, a thin divider, the icons on the other */
.dotd-footer-main { padding-block: clamp(3rem, 6vw, 5rem) 3rem; }
.dotd-footer-bar { padding-block: 1.25rem; background: var(--bs-secondary-bg); }
@supports (background: color-mix(in srgb, red, blue)) { .dotd-footer-bar { background: color-mix(in srgb, var(--bs-tertiary-bg) 92%, #000); } }   /* 8% darker than the footer, in the light and in the dark theme */
.dotd-footer-barrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.dotd-footer-base { flex: 1 1 24rem; margin: 0; font-size: .875rem; line-height: 1.7; color: var(--bs-secondary-color); }
.dotd-footer-icons { flex: 0 0 auto; }
@media (min-width: 992px) { .dotd-footer-icons { padding-inline-start: 2rem; border-inline-start: 1px solid var(--bs-border-color); } }
.dotd-footer-logo { width: min(100%, 17rem); margin-bottom: 1.75rem; }
[data-bs-theme=dark] .dotd-footer-logo { padding: .75rem; }
.dotd-footer-title { margin-bottom: .6rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.dotd-footer-text { max-width: 32rem; font-size: .95rem; line-height: 1.7; color: var(--bs-secondary-color); }
.dotd-footer-heading { margin-bottom: 1.25rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bs-secondary-color); }
.dotd-footer-links a { font-weight: 500; text-decoration: none; color: var(--bs-body-color); }
.dotd-footer-links a:hover { color: var(--dotd-accent); }

/* language window (dotd-modal.php): the language icon on top, a search box that stays in view, one tile per language: the code, what the websites are in that language (bold), what to do there (grey) and the name of the language; the current language is red */
.dlm-dialog { --bs-modal-width: 60rem; }
.dlm-content { border: 0; border-radius: 1.75rem; overflow: hidden; box-shadow: var(--bs-box-shadow-lg); }
.dlm-header { align-items: center; justify-content: space-between; padding: 1rem 1.75rem; border-bottom: 1px solid var(--bs-border-color); }
.dlm-icon { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; }
.dlm-header .btn-close { margin: 0; padding: .9rem; }
.dlm-body { padding: 0 1.75rem 1.75rem; }
.dlm-searchrow { position: sticky; top: 0; z-index: 2; margin-inline: -1.75rem; padding: 1.25rem 1.75rem 1rem; background: var(--bs-modal-bg, var(--bs-body-bg)); }
.dlm-searchbox { position: relative; }
.dlm-find { position: absolute; top: 50%; inset-inline-start: 1.1rem; transform: translateY(-50%); color: var(--bs-secondary-color); pointer-events: none; }
.dlm-search { display: block; width: 100%; padding: .85rem 1.1rem; padding-inline-start: 3.1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); color: var(--bs-body-color); font-size: 1.05rem; outline: 0; transition: box-shadow .15s ease, border-color .15s ease; }
.dlm-search:focus { border-color: var(--dotd-accent); box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .18); }
.dlm-card { display: flex; align-items: flex-start; gap: 1.25rem; height: 100%; padding: 1.15rem 1.35rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.dlm-card:hover { border-color: var(--dotd-accent); background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.dlm-card:focus-visible { outline: 2px solid var(--dotd-accent); outline-offset: 2px; }
.dlm-card.active, .dlm-card.active:hover { border-color: var(--dotd-accent); background: var(--dotd-accent); color: #fff; }
.dlm-code { flex: 0 0 3rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 1.4rem; font-weight: 700; line-height: 1.35; color: var(--dotd-accent); }
.dlm-text { flex: 1 1 auto; min-width: 0; }
.dlm-noun { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.dlm-meta { display: block; margin-top: .4rem; font-size: .85rem; line-height: 1.55; color: var(--bs-secondary-color); }
.dlm-card.active .dlm-code, .dlm-card.active .dlm-meta { color: #fff; }
.dlm-card.active .dlm-meta { opacity: .85; }
.dlm-none { margin: 1rem 0 0; color: var(--bs-secondary-color); }

/* newsletter hand-over: the panel rises in, the bar fills during the delay (width and duration are set by dotd.js) */
.dotd-forward { animation: dotd-rise .45s ease-out both; }
.dotd-forward-progress { max-width: 24rem; height: .5rem; }
.dotd-forward .progress-bar { width: 0; transition-property: width; transition-timing-function: linear; transition-duration: 0ms; }
@keyframes dotd-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .dotd-theme-glyph, .dotd-card, .dotd-card-img, .dotd-arrow::before, .dlm-card, .dlm-search { transition: none; }
  .dotd-card:hover, .dotd-card:focus-within, .dotd-card:hover .dotd-card-img, .dotd-card:hover .dotd-arrow::before { transform: none; }
  .dotd-forward { animation: none; }
  .dotd-forward .progress-bar { transition: none !important; }
  .dotd-fill { animation: none; width: 100%; }
}