/* Added for the DesyDigi portfolio demo (banner, admin and extra pages); not part of the original coursework */
.dd-demo { align-self: stretch; margin: -3rem -1.5rem 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px max(16px, env(safe-area-inset-left)); background: #F4F2EF; color: #1A1A1A; font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
.dd-demo span { flex: 1 1 320px; }
.dd-demo nav { margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.dd-demo a, .dd-demo button { color: #712E6F; font: inherit; font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; border-radius: 0; cursor: pointer; }
.dd-demo a:hover, .dd-demo button:hover { text-decoration: underline; background: none; }
:focus-visible { outline: 3px solid var(--purple-dim); outline-offset: 2px; }
main { width: 100%; max-width: 640px; display: flex; flex-direction: column; align-items: center; }
blockquote { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.3rem; }
.joke-text p + p { margin-top: .5rem; }
.author { color: var(--text-mid); }
nav[aria-label="Main"] a[aria-current] { background: var(--purple-glow); color: var(--text); }
.muted { color: var(--text-mid); font-size: .9rem; text-align: center; }
.panel { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem 1.5rem; display: grid; gap: 1rem; }
.panel p { line-height: 1.6; }
.big { font-family: 'Montserrat', sans-serif; font-size: 1.1rem; font-weight: 700; text-align: center; }

/* tables, forms and buttons (admin, shopping cart) */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--card); color: var(--text-mid); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; white-space: nowrap; }
.btn, input[type="submit"], button.btn { font: 500 .88rem 'DM Sans', sans-serif; color: #fff; background: var(--purple-dim); border: 0; border-radius: 999px; padding: .55rem 1.1rem; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover, input[type="submit"]:hover { background: #6f3c7a; }
.btn.light, input[type="submit"].light { background: #fff; color: var(--purple-dim); border: 1px solid var(--purple-dim); }
.btn.light:hover, input[type="submit"].light:hover { background: var(--purple-glow); }
input[value="Delete"], .btn.danger { background: #A3243A; }
input[value="Delete"]:hover, .btn.danger:hover { background: #861b2f; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
form.stack { width: 100%; display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field > label, fieldset legend { font-weight: 500; font-size: .9rem; }
input[type="text"], input[type="email"], input[type="password"], select, textarea { font: 400 .95rem 'DM Sans', sans-serif; color: var(--text); background: #fff; border: 1px solid #8f7a9b; border-radius: 10px; padding: .6rem .75rem; width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .4rem; }
fieldset label { display: flex; gap: .5rem; align-items: center; font-size: .92rem; }
.links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.links a { color: var(--purple-dim); font-weight: 500; }
.error { width: 100%; background: #FBEAEC; color: #7A1426; border: 1px solid #E8B4BF; border-radius: 10px; padding: .7rem 1rem; }
.hint { width: 100%; background: #F4F2EF; border-left: 4px solid var(--purple-dim); padding: .7rem 1rem; font-size: .9rem; line-height: 1.5; }
.admin-nav[hidden] { display: none; }
ul.plain { list-style: none; display: grid; gap: .6rem; width: 100%; }
ul.plain li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .9rem; }
.dash { list-style: none; display: grid; gap: .8rem; width: 100%; }
.dash a { display: block; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; color: var(--purple-dim); font-weight: 500; text-decoration: none; }
.dash a:hover { background: var(--purple-glow); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { nav { flex-wrap: wrap; justify-content: center; } th, td { padding: .55rem .6rem; } }
td .row-actions { flex-wrap: nowrap; }
.guess { display: flex; gap: .5rem; margin: .2rem 0 .7rem; }
.guess input { flex: 1; min-width: 0; padding: .45rem .7rem; }
.punch { margin: .2rem 0 .6rem; padding-left: .8rem; border-left: 3px solid var(--purple); }
.punch .joke-text { font-weight: 500; margin-bottom: .2rem; }
.punch:focus { outline: none; }
.your-guess { font-size: .82rem; color: var(--text-mid); }
.your-guess:empty { display: none; }
.linkish { background: none; border: 0; padding: 0 .2rem; font: inherit; color: var(--purple-dim); text-decoration: underline; cursor: pointer; min-height: 24px; }
main > .muted { margin: -1rem 0 1.5rem; }
