/* Selected10: live civil results over isolated photographic source materials. */
body:has(.date-page) .nav{position:sticky;top:0}
.date-page{padding:16px 0 32px}
.date-container{max-width:none;margin:auto;padding-inline:44px}
.date-page [hidden]{display:none!important}
.date-page .duration-heading h1{font-size:3.375rem}
.date-calc-tabs{display:flex;gap:16px;background:none;max-width:none;justify-content:flex-start;border-radius:0;margin:20px 0 0;width:min(100%,620px);border-bottom:1px solid var(--border)}
.date-calc-tabs .date-tab{background:none;color:var(--text-secondary);border:0;border-radius:0;padding:12px 24px;min-height:52px;font-size:1.25rem;line-height:1.4;flex:none;max-width:100%;white-space:normal}
.date-calc-tabs .date-tab.active{color:var(--accent);border-bottom:4px solid var(--accent);background:none;box-shadow:0 7px 18px -13px var(--accent)}
.date-workspace{display:grid;grid-template-columns:minmax(0,620px) minmax(0,1fr);gap:18px;align-items:stretch}
.date-form,.date-result{min-width:0;margin:0;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass);padding:26px 32px}
.date-form{display:flex;flex-direction:column;align-items:stretch;gap:22px}
.date-result-ready{display:none;min-width:0;align-self:start;margin:0;padding:26px 32px;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass);min-height:540px;position:relative;isolation:isolate;overflow:hidden;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.date-result-ready::after{content:"";position:absolute;inset:auto 0 0;height:240px;z-index:-1;background:url('/assets/visual-fidelity/tools/date-landscape-v1.a135166157d1.png') center bottom/100% auto no-repeat;opacity:.42;pointer-events:none;mask-image:linear-gradient(to bottom,transparent,#000 35%,#000 75%,transparent)}
.date-result-ready h2,.date-result-ready p{position:relative;z-index:1}
.date-result-ready h2{margin:0;font-size:1.65rem;line-height:1.3}
.date-result-ready p{margin:14px 0 0;color:var(--text-secondary);font-size:1rem;line-height:1.6;max-width:46ch}
@media(min-width:1200px){.date-result-ready{display:flex;grid-column:2}}
.date-form h2,.date-result h2{font-size:1.8rem;line-height:1.3;font-weight:700;margin:0}
.date-form-row{position:relative;display:flex;flex-direction:column;gap:22px;margin:0;padding-right:58px}
.date-form-group{min-width:0;width:100%}
.date-form-group label{font-size:1.2rem;color:var(--text-secondary);margin:0 0 8px;display:block}
.date-form-group input{width:100%;min-width:0;max-width:100%;min-height:60px;padding:10px 16px;font-size:1.7rem;font-weight:600;line-height:1.2;border:1px solid #5092b4;border-radius:10px;background:var(--input-bg);color:var(--text);font-family:inherit;font-variant-numeric:tabular-nums;caret-color:var(--accent)}
.date-form-group input[type=date]{appearance:none}
.date-form-group input::-webkit-calendar-picker-indicator{width:25px;height:25px;cursor:pointer;padding:2px}
.date-form-group input[aria-invalid=true]{border-color:var(--accent);outline:1px solid var(--accent)}
.date-error{color:var(--text);font-size:.9375rem;line-height:1.5;margin-top:8px;max-width:55ch}
.date-error:empty{display:none}
#betweenSwap{position:absolute;right:-6px;top:calc(50% - 25px);width:54px;min-height:54px;border:1px solid var(--accent);border-radius:10px;color:var(--accent);background:var(--input-bg);display:grid;place-items:center}
#betweenSwap svg{width:26px;height:26px}
.date-inclusive{display:flex;align-items:flex-start;gap:22px;margin:6px 0 14px;min-height:60px;cursor:pointer;line-height:1.4;font-size:1.25rem}
.date-inclusive input{appearance:none;flex:none;width:32px;height:32px;border:2px solid #8ba8c7;background:var(--input-bg);border-radius:5px;accent-color:var(--accent);margin:0}
.date-inclusive input:checked{background:var(--accent);border-color:var(--accent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 5 5 9-11' fill='none' stroke='%23032330' stroke-width='3'/%3E%3C/svg%3E")}
.date-inclusive small{display:block;font-size:1rem;color:var(--text-secondary);margin-top:6px}
.date-calculate{min-height:76px;margin-top:auto;justify-content:center;border:2px solid var(--accent);border-radius:14px;color:var(--text);font-size:1.5rem;font-weight:700;background:var(--bg-alt);box-shadow:inset 0 0 22px var(--accent-glow);white-space:normal;overflow-wrap:anywhere}
@media(max-width:999px){
 .date-page .date-calculate{overflow-wrap:normal;word-break:normal;padding-inline:8px}
 .date-page .date-calc-tabs{flex-wrap:wrap}
 .date-page .date-calc-tabs .date-tab{flex:1 1 max-content;min-width:0}
}
.date-result{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:stretch;padding:24px 34px;text-align:left;overflow:hidden;min-height:540px}
.date-result h2{position:relative;z-index:2;font-size:1.65rem}
.date-result-number{position:relative;z-index:2;margin-top:6px;color:var(--text);font-weight:760;text-align:center;line-height:1.15;font-size:clamp(2rem,10vw,10rem);text-shadow:0 0 22px var(--accent-glow);overflow-wrap:anywhere;max-width:100%}
#betweenDays span:last-child{font-size:.47em;font-weight:700}
.date-result-label{position:relative;z-index:2;text-align:center;margin:0;max-width:none;font-size:1.2rem;line-height:1.4;color:var(--text-secondary)}
.date-landscape{position:absolute;left:0;right:0;bottom:130px;height:185px;min-height:0;width:100%;margin:0;color:#062535;z-index:1;pointer-events:none}
.date-landscape img{position:absolute;inset:auto 0 0;width:100%;height:auto;display:block;z-index:-1}
.date-paper{position:absolute;bottom:22%;width:14%;height:53%;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;color:#062535;font-variant-numeric:tabular-nums;text-align:center;overflow-wrap:anywhere}
.date-paper-from{left:5.3%;transform:rotate(-4deg)}
.date-paper-to{right:5.6%;transform:rotate(4deg);color:#402d0a}
.date-paper strong{font-size:2.4rem;line-height:1.1;font-weight:750}
.date-paper small{white-space:pre-line;font-size:.9rem;font-weight:600}
.date-landscape[data-material="failed"] .date-paper{background:#caecfa;border:1px solid #70adc5;border-radius:5px}
.date-landscape[data-material="failed"] .date-paper-to{background:#ffe4ad;border-color:#d8a13a}
.date-result-actions{position:relative;z-index:3;margin-top:auto;padding-top:12px;text-align:center}
.date-result-actions .btn{display:flex;justify-content:center;align-items:center;gap:24px;min-height:68px;width:100%;font-size:1.7rem;font-weight:700;border:1px solid #ffe58b;border-radius:16px;color:#131200;background:linear-gradient(105deg,#ffdc49,#ffc532);white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.date-result-actions .tool-glyph{width:1.3em;height:1.3em}
.date-hint{color:var(--text-secondary);font-size:.9375rem;line-height:1.5;margin-top:10px}
#addDate{font-size:2.5rem;line-height:1.25;margin-block:16px}
#tab-add .date-form-row{padding:0}
.date-explanation{margin-top:20px;display:flex;align-items:flex-start;gap:28px;padding:24px 30px;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass);line-height:1.6}
.date-explanation>.tool-glyph{color:var(--accent);width:34px;height:34px;margin-top:8px}
.date-explanation h2{font-size:1.4rem;margin-bottom:6px}
.date-explanation p{color:var(--text-secondary);font-size:1.05rem;max-width:90ch}
.date-explanation p+p{font-size:.875rem;margin-top:8px}
.date-page .faq-list{max-width:none;margin-top:28px!important;border:1px solid var(--glass-border);border-radius:14px;background:var(--glass);padding:6px 26px}
.date-page .faq-list .faq-item:last-child{border-bottom:0}
.date-page :focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.date-page button{cursor:pointer}
.date-page .date-tab:hover,.date-page button:not(.date-calculate):hover{background:var(--surface-hover)}
.date-page button:active{transform:translateY(1px)}
[data-theme="light"] .date-result{background:var(--glass)}
@media(max-width:1100px){.date-container{padding-inline:24px}.date-workspace{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}.date-form{padding:22px}.date-result{padding-inline:24px}.date-form-group input{font-size:1.2rem}.date-form h2,.date-result h2{font-size:1.4rem}.date-landscape{width:calc(100% + 48px);margin-inline:-24px}.date-paper strong{font-size:1.6rem}.date-paper small{font-size:.65rem}.date-result-actions .btn{font-size:1.3rem}}
@media(max-width:800px){.date-container{padding-inline:16px}.date-page .duration-heading h1{font-size:2rem}.date-page .duration-heading>p:last-child{font-size:1.05rem}.date-calc-tabs{width:100%;gap:0;margin-top:16px}.date-calc-tabs .date-tab{flex:1;font-size:1rem;padding:12px 8px}.date-workspace{grid-template-columns:minmax(0,1fr);gap:16px}.date-form{padding:20px 16px;gap:16px}.date-form-row{gap:18px;padding-right:50px}.date-form-group label{font-size:1rem}.date-form-group input{font-size:1.15rem;min-height:54px;padding-inline:10px}#betweenSwap{right:0;width:44px;min-height:48px}.date-inclusive{font-size:1.05rem;gap:14px;margin-bottom:8px}.date-inclusive small{font-size:.9rem}.date-inclusive input{width:28px;height:28px}.date-calculate{min-height:58px;font-size:1.2rem}.date-result{min-height:430px;padding:20px 16px}.date-result-number{font-size:clamp(2rem,22vw,6rem);margin-top:12px}.date-result-label{font-size:1rem}.date-landscape{min-height:145px;width:calc(100% + 32px);margin-inline:-16px}.date-paper{bottom:17%;height:40%}.date-paper strong{font-size:1.45rem}.date-paper small{font-size:.57rem}.date-result-actions .btn{min-height:60px;font-size:1.2rem;gap:14px}.date-explanation{gap:14px;padding:20px 16px}.date-explanation>.tool-glyph{width:24px;height:24px}.date-explanation h2{font-size:1.1rem}.date-explanation p{font-size:.95rem}#addDate{font-size:1.8rem}}
@media(max-width:360px){.date-form-row{padding-right:44px}.date-form-group input{font-size:1rem;padding-inline:6px}.date-paper small{font-size:.5rem}.date-result-actions .btn{font-size:1rem}.date-paper strong{font-size:1.25rem}}
@media(prefers-reduced-motion:reduce){.date-page *{transition:none!important;scroll-behavior:auto!important}}
.date-page .date-landscape{width:100%;margin:0;min-height:0}
.date-landscape{container-type:inline-size}
.date-page .date-paper strong{font-size:4.2cqw}
.date-page .date-paper small{font-size:1.5cqw}
[data-theme="light"] .date-result-label{background:rgba(245,248,252,.94);border-radius:6px}
@media(max-width:800px){.date-page .date-landscape{bottom:112px;height:145px}.date-result{min-height:460px}}
@media(max-width:360px){.date-page .date-form-row{padding-right:0}#betweenSwap{position:static;align-self:flex-end;order:2}}
.date-page .duration-heading h1{line-height:1.05;margin-bottom:4px}
.date-page .duration-heading>p:first-child{margin-bottom:8px}
.date-page{padding-top:8px}
.date-calc-tabs{margin-top:14px}
.date-result-number{color:var(--text);text-shadow:0 0 18px rgba(0,163,236,.5),0 0 42px rgba(0,163,236,.2)}
.date-result-label{padding-inline:13%;font-size:1.05rem}
.date-page .date-result-actions .date-hint{font-size:.875rem}
#betweenDays[data-digits="6"],#betweenDays[data-digits="7"]{font-size:clamp(2rem,6vw,6rem)}
@media(max-width:800px){.date-page{padding-top:20px}.date-result-label{padding-inline:0}.date-landscape img{height:auto}.date-page .date-paper{height:25%;bottom:18%}.date-paper-from{left:5.3%}.date-paper-to{right:5.6%}.date-page .date-paper strong{font-size:6cqw}.date-page .date-paper small{font-size:2cqw}}
@media(max-width:800px){
 .date-page .date-landscape{position:relative;left:auto;right:auto;bottom:auto;height:150px;margin-top:8px;flex:none;isolation:isolate}
 .date-landscape>img{display:none}
 .date-landscape:before{content:"";position:absolute;inset:0 -16px;background:url('/assets/visual-fidelity/tools/date-mobile-landscape-v1.2233ae35b694.png') center bottom/100% auto no-repeat;z-index:-1}
 .date-page .date-paper{width:30%;height:120px;top:0;bottom:auto;background-position:center top;background-size:contain;background-repeat:no-repeat;justify-content:flex-start;padding-top:29px;transform:none;container-type:normal}
 .date-page .date-paper-from{left:0;background-image:url('/assets/visual-fidelity/tools/date-calendar-blue-v1.95976292eec8.png')}
 .date-page .date-paper-to{right:0;background-image:url('/assets/visual-fidelity/tools/date-calendar-gold-v1.767659e25a8a.png')}
 .date-page .date-paper strong{font-size:24px;line-height:1.05}
 .date-page .date-paper small{font-size:10px;line-height:1.15;overflow-wrap:normal;max-width:100%}
 .date-result-actions{margin-top:0;padding-top:10px}
 .date-result{min-height:0}
 .date-landscape[data-material="failed"] .date-paper{background-color:#caecfa}
 .date-landscape[data-material="failed"] .date-paper-to{background-color:#ffe4ad}
}


@media(max-width:700px){.date-result{scroll-margin-top:12px}.date-result .task-result-edit{align-self:flex-start;margin-bottom:10px}.date-result h2{font-size:1.25rem}.date-result-number{margin-top:6px;font-size:4.5rem}.date-result-label{font-size:1rem}.date-result-actions .btn{min-height:48px;font-size:1rem}.date-page .date-result-actions .date-hint{line-height:1.4}}

/* 10: recessed blue dates and cool native checkbox boundary. */
.date-workspace input[type=date],.date-workspace input[type=number],.date-form input[type=date],.date-form input[type=number],#betweenFrom,#betweenTo,#addFrom,#addDays{background:var(--control-fill);border-color:var(--control-edge);box-shadow:var(--control-light)}
.date-inclusive input{accent-color:var(--accent);outline:1px solid var(--control-edge);outline-offset:1px}


/* 10's empty blue box is a real native checkbox, with a scoped visible state. */
.date-inclusive input[type=checkbox]{appearance:none;display:inline-grid;place-content:center;width:26px;height:26px;flex:0 0 26px;border:2px solid var(--control-edge);border-radius:5px;background:var(--control-fill);outline:none;cursor:pointer}.date-inclusive input[type=checkbox]:checked{background:var(--accent);border-color:var(--accent)}.date-inclusive input[type=checkbox]:checked::before{content:'';width:7px;height:13px;border:solid var(--bg);border-width:0 3px 3px 0;transform:rotate(45deg) translate(-1px,-1px)}.date-inclusive input[type=checkbox]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(forced-colors:active){.date-inclusive input[type=checkbox]{appearance:auto;background:Field;border-color:ButtonText}.date-inclusive input[type=checkbox]::before{display:none}}

/* V10: keep day, genitive month and year inside the mobile calendar paper leaf at 320px. */
@media(max-width:420px){
  .date-page .date-paper{width:36%;height:104px;padding-top:18px}
  .date-page .date-paper strong{font-size:20px;line-height:1.05}
  .date-page .date-paper small{font-size:9px;line-height:1.12}
}
html[data-theme="light"] .date-result-ready::after{opacity:.22;filter:brightness(1.35) saturate(.85)}
html[data-theme="light"] .date-landscape::before{opacity:.38;filter:brightness(1.3) saturate(.85)}
html[data-theme="light"] .date-result-number{text-shadow:0 2px 12px rgba(8,107,136,.16)}
html[data-theme="light"] .date-calculate{background:linear-gradient(135deg,#fff,#e8f4fc);color:#086b88;box-shadow:0 6px 18px rgba(24,74,114,.08)}
