/* D&D Campaign Tracker — refined responsive interface (v1.1) */
.ddct{--ddct-ink:#142b38;--ddct-muted:#647784;--ddct-teal:#147e9f;--ddct-border:#e4ebef;--ddct-bg:#f6f9fa;--ddct-shadow:0 12px 32px rgba(25,59,77,.055);font-family:Inter,Arial,Helvetica,sans-serif;color:var(--ddct-ink);width:100%;max-width:1320px;margin:28px auto 48px;background:transparent;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
.ddct *, .ddct *::before,.ddct *::after{box-sizing:border-box}
.ddct [hidden]{display:none!important}
.ddct button{font-family:inherit;cursor:pointer;color:inherit;appearance:none;-webkit-appearance:none;box-shadow:none!important;text-shadow:none!important;letter-spacing:normal;text-transform:none;border:0}
.ddct-primary{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#f3f7f9;border:1px solid var(--ddct-border);border-radius:18px;margin:0 0 16px;overflow-x:auto;scrollbar-width:none}
.ddct-primary::-webkit-scrollbar,.ddct-secondary::-webkit-scrollbar{display:none}
.ddct-primary-btn{background:transparent!important;border:1px solid transparent!important;border-radius:12px!important;white-space:nowrap;flex:1 0 auto;padding:13px 17px!important;min-height:50px;font-size:16px!important;font-weight:600!important;line-height:1.25!important;color:#526b77!important;transition:background .2s,color .2s,box-shadow .2s}
.ddct-primary-btn:hover{color:var(--ddct-ink)!important;background:#fff!important}
.ddct-primary-btn.is-active{background:#fff!important;color:#0c617f!important;border-color:#e2eaef!important;box-shadow:0 4px 14px rgba(31,65,84,.09)!important}
.ddct-surface{background:linear-gradient(145deg,#fbfdfd 0%,#f5f9fb 100%);border:1px solid var(--ddct-border);border-radius:22px;padding:26px 30px 30px;box-shadow:0 18px 46px rgba(19,47,65,.045)}
.ddct-secondary{display:flex;gap:8px;align-items:stretch;padding:0 0 12px;border-bottom:1px solid #dfe9ee;overflow-x:auto;scrollbar-width:none}
.ddct-secondary-btn{position:relative;background:transparent!important;flex:1 0 0;min-width:0;padding:14px 10px!important;text-align:center;border:0!important;border-radius:10px!important;white-space:nowrap;color:var(--ddct-muted)!important;font-size:15px!important;font-weight:600!important;line-height:1.3!important;transition:color .18s,background .18s}
.ddct-secondary-btn:hover{background:#eaf2f6!important;color:var(--ddct-ink)!important}
.ddct-secondary-btn.is-active{color:#0c6788!important;background:#e5f2f6!important}
.ddct-secondary-btn.is-active::after{position:absolute;content:"";height:3px;width:32px;bottom:2px;left:50%;transform:translateX(-50%);border-radius:9px;background:var(--ddct-teal)}
.ddct-stats{position:relative;background:#fff;border:1px solid #e9eff2;border-radius:20px;padding:32px 34px 34px;margin:24px 0 20px;box-shadow:var(--ddct-shadow)}
.ddct-stats::before{content:"";position:absolute;left:0;top:31px;bottom:31px;width:4px;background:linear-gradient(#187c9f,#6bbec8);border-radius:0 6px 6px 0}
.ddct-main-number{font-size:clamp(34px,3vw,48px);font-weight:750;line-height:1.12;letter-spacing:-.04em;margin:0 0 28px;color:#133344}
.ddct-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.ddct-metrics>div{min-width:0;padding:19px 20px;background:#f5f9fa;border:1px solid #e8eff2;border-radius:14px}
.ddct-metric-label{display:block;color:#627782;font-size:14px;margin:0 0 6px;overflow-wrap:anywhere}
.ddct-metrics strong{display:block;color:#173d51;font-size:23px;line-height:1.25;font-weight:700;overflow-wrap:anywhere}
.ddct-accordions{display:grid;gap:14px;margin-top:18px}
.ddct-accordion{background:#fff;border:1px solid #e7eef1;border-radius:16px;box-shadow:var(--ddct-shadow);overflow:hidden;transition:border-color .18s,box-shadow .18s}
.ddct-accordion[open]{border-color:#c3dde6;box-shadow:0 12px 34px rgba(23,93,121,.085)}
.ddct-accordion summary{cursor:pointer;list-style:none;padding:23px 26px;display:flex;align-items:center;gap:17px;font-size:18px;font-weight:700;color:#173546;transition:background .18s}
.ddct-accordion summary:hover{background:#f7fafb}
.ddct-accordion summary::-webkit-details-marker{display:none}
.ddct-chevron{width:11px;height:11px;flex:0 0 11px;border-right:2px solid var(--ddct-teal);border-bottom:2px solid var(--ddct-teal);transform:rotate(45deg);transition:transform .18s;margin-top:-5px}
.ddct-accordion[open] .ddct-chevron{transform:rotate(225deg);margin-top:5px}
.ddct-table-scroll{overflow-x:auto;padding:0 24px 24px}
.ddct table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:400px;border:1px solid #e1e9ec;border-radius:12px;overflow:hidden;background:#fff}
.ddct th,.ddct td{padding:15px 17px!important;text-align:left;border-right:1px solid #e6edef;border-bottom:1px solid #e6edef;font-size:15px!important;height:58px;line-height:1.4!important;background:transparent!important}
.ddct tr>*:last-child{border-right:0}
.ddct tbody tr:last-child>*{border-bottom:0}
.ddct thead th{background:#f4f8fa!important;color:#637782;font-size:13px!important;font-weight:700}
.ddct tbody th{font-weight:700;color:#1c7494}
.ddct tbody tr:last-child{background:#f7fafb}
.ddct-footer{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:18px 6px 0}
.ddct-footer a{display:block;text-align:center;padding:12px 6px;color:#167b9d!important;text-decoration:none!important;border-radius:10px;font-size:14px;font-weight:650;transition:background .18s,color .18s}
.ddct-footer a:hover{background:#eaf4f7;color:#0a5a75!important}
.ddct-primary-btn:focus-visible,.ddct-secondary-btn:focus-visible,.ddct-accordion summary:focus-visible,.ddct-footer a:focus-visible{outline:2px solid var(--ddct-teal);outline-offset:3px}
@media(max-width:900px){.ddct{margin:16px auto 28px}.ddct-primary{gap:6px}.ddct-primary-btn{flex:0 0 auto;min-width:130px}.ddct-surface{padding:18px}.ddct-secondary-btn{flex:0 0 auto;min-width:135px}.ddct-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.ddct-footer{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.ddct-primary{padding:6px;border-radius:13px;margin-bottom:12px}.ddct-primary-btn{font-size:14px!important;min-width:110px;min-height:43px;padding:10px 12px!important}.ddct-surface{padding:14px 12px 18px;border-radius:16px}.ddct-secondary{gap:5px;padding-bottom:10px}.ddct-secondary-btn{min-width:110px;font-size:13px!important;padding:12px 10px!important}.ddct-stats{margin:16px 0;padding:26px 17px 18px;border-radius:15px}.ddct-stats::before{top:26px;bottom:22px}.ddct-main-number{font-size:36px;margin-bottom:19px}.ddct-metrics{gap:8px}.ddct-metrics>div{padding:13px 12px;border-radius:10px}.ddct-metric-label{font-size:12px}.ddct-metrics strong{font-size:19px}.ddct-accordions{gap:10px}.ddct-accordion{border-radius:13px}.ddct-accordion summary{font-size:16px;padding:17px 16px}.ddct-table-scroll{padding:0 12px 14px}.ddct th,.ddct td{padding:11px 12px!important;font-size:13px!important}.ddct-footer{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:14px 0 0}.ddct-footer a{font-size:13px;padding:10px 4px}}
@media(prefers-reduced-motion:reduce){.ddct *{transition:none!important}}
