/* Modern CSS Reset */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}html{scroll-behavior:smooth;font-size:clamp(14px,1.5vw,16px)}body{font-family:'Inter',system-ui,-apple-system,sans-serif;line-height:1.5;color:#0f172a;background:#ffffff;font-display:swap;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}img{max-width:100%;height:auto;display:block}a{color:#3b82f6;text-decoration:none;transition:all .2s cubic-bezier(0.4,0,0.2,1)}a:hover,a:focus{color:#1d4ed8}button{font-family:inherit;cursor:pointer;border:none;background:none;transition:all .2s cubic-bezier(0.4,0,0.2,1)}input,textarea,select{font-family:inherit;font-size:inherit}

/* Utility Classes */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Skip Link */
.skip-link{position:absolute;top:-40px;left:8px;background:#000;color:#fff;padding:8px 12px;text-decoration:none;z-index:1000;transition:top .2s;font-weight:500;border-radius:4px;font-size:14px}.skip-link:focus{top:8px}

/* Container */
.container{max-width:min(1200px,calc(100vw - 2rem));margin:0 auto;padding:0 1rem}

/* Header */
.header{background:rgba(255,255,255,.95);backdrop-filter:blur(10px);box-shadow:0 1px 3px rgba(0,0,0,.05);position:sticky;top:0;z-index:100;border-bottom:1px solid #e2e8f0}.navbar{padding:0.75rem 0}.nav-container{display:flex;justify-content:space-between;align-items:center;gap:1rem}.nav-logo a{display:flex;align-items:center;font-size:clamp(1.25rem,4vw,1.5rem);font-weight:700;color:#3b82f6}.nav-logo svg{margin-right:0.5rem;width:clamp(20px,5vw,24px);height:clamp(20px,5vw,24px)}.nav-toggle{display:none;flex-direction:column;width:28px;height:28px;justify-content:space-around;background:transparent;border:none;cursor:pointer;padding:2px}.nav-toggle span{width:100%;height:2px;background:#3b82f6;transition:all .2s;border-radius:1px}.nav-menu{display:flex;list-style:none;gap:clamp(1rem,3vw,2rem)}.nav-menu a{font-weight:500;padding:0.5rem 0.75rem;border-radius:6px;transition:all .2s;font-size:clamp(0.875rem,2vw,1rem);white-space:nowrap}.nav-menu a:hover{background:#f1f5f9;color:#3b82f6}

/* Hero Section */
.hero{background:linear-gradient(135deg,#3b82f6 0%,#8b5cf6 50%,#ec4899 100%);color:#fff;padding:clamp(2rem,8vw,4rem) 0;text-align:center;position:relative;overflow:hidden}.hero::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");opacity:0.3}.hero h1{font-size:clamp(1.75rem,8vw,3rem);font-weight:800;margin-bottom:1rem;line-height:1.1;letter-spacing:-0.02em;position:relative;z-index:1}.hero-subtitle{font-size:clamp(1rem,4vw,1.25rem);margin-bottom:2rem;opacity:0.9;font-weight:400;line-height:1.4;position:relative;z-index:1}

/* Calculator Widget */
.calculator-widget{background:#fff;border-radius:12px;padding:clamp(1rem,4vw,2rem);box-shadow:0 10px 25px rgba(0,0,0,.08);margin-top:2rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:clamp(1rem,4vw,2rem);border:1px solid rgba(0,0,0,.05)}.calc-section h2{color:#1e40af;margin-bottom:1rem;font-size:clamp(1.25rem,4vw,1.5rem);font-weight:700}.calc-inputs{display:flex;flex-direction:column;gap:1rem}.input-group{display:flex;flex-direction:column}.input-group label{font-weight:600;margin-bottom:0.5rem;color:#1f2937;font-size:clamp(0.875rem,2vw,1rem)}.date-input,.number-input{padding:0.75rem;border:1px solid #d1d5db;border-radius:6px;font-size:1rem;transition:all .2s;background:#fafafa;width:100%}.date-input:focus,.number-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1);background:#fff}.calc-btn{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;padding:0.75rem 1.5rem;border-radius:6px;font-weight:600;font-size:1rem;transition:all .2s;cursor:pointer;border:none;width:100%}.calc-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(59,130,246,.25)}.calc-result{margin-top:1rem;padding:1rem;background:linear-gradient(135deg,#f0f9ff,#e0f2fe);border-radius:6px;border:1px solid #3b82f6;font-weight:600;color:#1e40af;font-size:1rem}

/* Calendar */
.calendar {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  max-width: 420px;
  margin: 0 auto;
}

.calendar-section {
  margin-top: 2rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.calendar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

.calendar-nav {
  background: #f1f5f9;
  color: #3b82f6;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.calendar-nav:hover {
  background: #e2e8f0;
  color: #2563eb;
  transform: translateY(-1px);
}

.calendar-nav:active {
  transform: translateY(0);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-weekday {
  padding: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.calendar-day {
  background: #ffffff;
  padding: 0.75rem 0.5rem;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
  color: #334155;
  position: relative;
  border: 1px solid transparent;
}

.calendar-day:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #e2e8f0;
}

.calendar-day.today {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.calendar-day.selected {
  background: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.calendar-day.future {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.calendar-day.other-month {
  color: #94a3b8;
  opacity: 0.6;
}

.calendar-day.highlight {
  background: #e0f2fe;
  color: #0369a1;
}

@media (max-width: 480px) {
  .calendar {
    padding: 1rem;
  }
  
  .calendar-day {
    padding: 0.5rem 0.25rem;
    min-height: 38px;
    font-size: 0.8rem;
  }
  
  .calendar-weekday {
    font-size: 0.7rem;
    padding: 0.25rem;
  }
}

/* Main Article */
.main-article{padding:clamp(2rem,6vw,4rem) 0;background:#fff}.article-header{text-align:center;margin-bottom:clamp(2rem,6vw,3rem)}.article-header h1{font-size:clamp(1.5rem,6vw,2.5rem);color:#0f172a;margin-bottom:1rem;font-weight:800;line-height:1.2;letter-spacing:-0.02em}.article-meta{color:#64748b;font-size:clamp(0.875rem,2vw,1rem);font-weight:500}.article-meta time{margin-right:1rem}.lead{font-size:clamp(1rem,3vw,1.25rem);line-height:1.6;color:#334155;margin-bottom:2rem;font-weight:500}.article-content{max-width:min(700px,calc(100vw - 2rem));margin:0 auto;line-height:1.6}.article-content h2{color:#0f172a;font-size:clamp(1.25rem,4vw,1.75rem);margin:2rem 0 1rem;font-weight:700;line-height:1.3}.article-content h3{color:#1e293b;font-size:clamp(1.125rem,3vw,1.4rem);margin:1.5rem 0 0.75rem;font-weight:600}.article-content h4{color:#334155;font-size:clamp(1rem,2.5vw,1.2rem);margin:1rem 0 0.5rem;font-weight:600}.article-content p{margin-bottom:1.5rem;color:#334155;font-size:clamp(0.875rem,2vw,1rem)}

/* Blockquotes */
.highlight-quote{background:linear-gradient(135deg,#f0f9ff,#e0f2fe);border-left:4px solid #3b82f6;padding:1.5rem;margin:2rem 0;font-style:italic;font-size:clamp(1rem,2.5vw,1.125rem);color:#1e40af;line-height:1.6;border-radius:0 8px 8px 0;position:relative}.highlight-quote::before{content:'"';font-size:2rem;color:#3b82f6;position:absolute;top:0.5rem;left:1rem;line-height:1}

/* Highlight Boxes */
.highlight-box{background:linear-gradient(135deg,#eff6ff,#dbeafe);border:1px solid #93c5fd;border-radius:8px;padding:1.5rem;margin:2rem 0}.highlight-box h4{color:#1e40af;margin-bottom:1rem;font-weight:700;font-size:clamp(1rem,2.5vw,1.125rem)}.highlight-box ul,.highlight-box ol{margin-left:1.5rem;color:#334155;line-height:1.6}.highlight-box li{margin-bottom:0.5rem;font-size:clamp(0.875rem,2vw,1rem)}

/* Tables */
.info-table{margin:2rem 0;overflow-x:auto;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,.05)}.info-table table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;overflow:hidden;min-width:500px}.info-table th,.info-table td{padding:clamp(0.75rem,2vw,1rem);text-align:left;border-bottom:1px solid #e2e8f0;font-size:clamp(0.875rem,2vw,1rem)}.info-table th{background:#f8fafc;font-weight:700;color:#1f2937}.info-table tr:hover{background:#f9fafb}.info-table td{color:#334155}

/* Article Sources */
.article-sources{margin-top:3rem;padding:2rem;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.article-sources h3{color:#3b82f6;margin-bottom:1rem;font-weight:700;font-size:clamp(1.125rem,3vw,1.25rem)}.article-sources ol{margin-left:1.5rem}.article-sources li{margin-bottom:0.75rem;color:#334155;line-height:1.6;font-size:clamp(0.875rem,2vw,1rem)}

/* Articles Section */
.articles-section{padding:clamp(2rem,6vw,4rem) 0;background:#f8fafc}.articles-section h2{text-align:center;font-size:clamp(1.5rem,6vw,2.5rem);color:#0f172a;margin-bottom:clamp(2rem,6vw,3rem);font-weight:800;letter-spacing:-0.02em}.articles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:clamp(1rem,4vw,2rem)}.article-card{background:#fff;border-radius:12px;padding:clamp(1rem,4vw,2rem);box-shadow:0 4px 6px rgba(0,0,0,.05);transition:all .2s;border:1px solid rgba(0,0,0,.05);overflow:hidden}.article-card:hover{transform:translateY(-4px);box-shadow:0 10px 25px rgba(0,0,0,.1)}.article-card h3{margin-bottom:1rem}.article-card h3 a{color:#0f172a;font-size:clamp(1.125rem,3vw,1.25rem);font-weight:700;line-height:1.3}.article-card h3 a:hover{color:#3b82f6}.article-card p{color:#64748b;margin-bottom:1rem;line-height:1.5;font-size:clamp(0.875rem,2vw,1rem)}.article-card .article-meta{display:flex;justify-content:space-between;font-size:clamp(0.75rem,2vw,0.875rem);color:#94a3b8;font-weight:500;flex-wrap:wrap;gap:0.5rem}

/* Footer */
.footer{background:#0f172a;color:#cbd5e1;padding:clamp(2rem,6vw,3rem) 0 1rem}.footer-content{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:clamp(1rem,4vw,2rem);margin-bottom:2rem}.footer-section h4{color:#fff;font-size:clamp(1rem,3vw,1.125rem);margin-bottom:1rem;font-weight:700}.footer-section p{line-height:1.6;color:#94a3b8;font-size:clamp(0.875rem,2vw,1rem)}.footer-section ul{list-style:none}.footer-section ul li{margin-bottom:0.5rem}.footer-section ul li a{color:#cbd5e1;transition:color .2s;font-size:clamp(0.875rem,2vw,1rem)}.footer-section ul li a:hover{color:#60a5fa}.footer-bottom{border-top:1px solid #334155;padding-top:1rem;text-align:center;color:#94a3b8;font-size:clamp(0.875rem,2vw,1rem)}

/* GDPR Notice */
.gdpr-notice{position:fixed;bottom:1rem;left:1rem;right:1rem;max-width:320px;background:rgba(15,23,42,.95);backdrop-filter:blur(10px);color:#fff;padding:1rem;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.3);z-index:1000;transform:translateY(100px);transition:transform .3s;border:1px solid #334155}.gdpr-notice.show{transform:translateY(0)}.gdpr-content{display:flex;flex-direction:column;gap:0.75rem}.gdpr-content p{font-size:clamp(0.875rem,2vw,1rem);line-height:1.5}.gdpr-content a{color:#60a5fa;font-weight:600}.gdpr-btn{background:#3b82f6;color:#fff;padding:0.5rem 1rem;border-radius:4px;font-size:clamp(0.875rem,2vw,1rem);font-weight:600;transition:background .2s;border:none;cursor:pointer}.gdpr-btn:hover{background:#1d4ed8}

/* Back to Top Button */
.back-to-top{position:fixed;bottom:1rem;right:1rem;background:#3b82f6;color:#fff;width:clamp(44px,8vw,50px);height:clamp(44px,8vw,50px);border-radius:50%;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all .2s;z-index:1000;font-weight:700;font-size:clamp(1rem,3vw,1.25rem);box-shadow:0 2px 8px rgba(59,130,246,.3)}.back-to-top.show{opacity:1;visibility:visible}.back-to-top:hover{background:#1d4ed8;transform:translateY(-2px);box-shadow:0 4px 12px rgba(59,130,246,.4)}

/* Focus States */
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #60a5fa;outline-offset:2px;border-radius:2px}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body{background:#0f172a;color:#e2e8f0}
  .header{background:rgba(15,23,42,.95);border-bottom-color:#334155}
  .calculator-widget,.article-card{background:#1e293b;border-color:#334155}
  .calendar{background:#1e293b;border-color:#334155}
  .calendar-day{background:#334155;color:#e2e8f0}
  .calendar-day:hover{background:#475569}
  .main-article{background:#0f172a}
  .articles-section{background:#1e293b}
  .highlight-box{background:#1e293b;border-color:#3b82f6}
  .highlight-quote{background:#1e293b}
  .article-sources{background:#1e293b;border-color:#334155}
  .info-table table{background:#1e293b}
  .info-table th{background:#334155}
  .info-table td{color:#e2e8f0}
  .nav-menu a:hover{background:#334155}
  .date-input,.number-input{background:#334155;border-color:#475569;color:#e2e8f0}
  .date-input:focus,.number-input:focus{background:#475569}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important}
  html{scroll-behavior:auto}
}

/* Mobile Navigation */
@media (max-width:768px){
  .nav-toggle{display:flex}
  .nav-menu{position:fixed;top:100%;left:0;width:100%;background:rgba(255,255,255,.98);backdrop-filter:blur(10px);flex-direction:column;padding:1rem;box-shadow:0 4px 20px rgba(0,0,0,.1);transform:translateX(-100%);transition:transform .3s;border-top:1px solid #e2e8f0;gap:0}
  .nav-menu.active{transform:translateX(0)}
  .nav-menu a{padding:0.75rem 1rem;margin:0.25rem 0;border-radius:8px;width:100%;text-align:left}
  .nav-toggle.active span:nth-child(1){transform:rotate(45deg) translate(5px,5px)}
  .nav-toggle.active span:nth-child(2){opacity:0}
  .nav-toggle.active span:nth-child(3){transform:rotate(-45deg) translate(7px,-6px)}
  .gdpr-notice{left:0.5rem;right:0.5rem;max-width:none}
}

/* Extra Small Devices */
@media (max-width:480px){
  .container{padding:0 0.75rem}
  .calculator-widget{grid-template-columns:1fr}
  .article-content{padding:0}
  .footer-content{grid-template-columns:1fr}
  .articles-grid{grid-template-columns:1fr}
  .calendar-grid{gap:0}
  .calendar-day{min-height:32px;padding:0.25rem}
}

/* Performance Optimizations */
.hero{will-change:transform;contain:layout style paint}
.calculator-widget{contain:layout style}
.article-card{contain:layout style paint}
.calendar-day{contain:layout style}

/* Print Styles */
@media print{
  .header,.footer,.gdpr-notice,.back-to-top,.nav-toggle{display:none !important}
  .main-article{padding:0}
  .container{max-width:none;padding:0}
  body{color:#000 !important;background:#fff !important;font-size:12pt;line-height:1.4}
  .hero{background:#fff !important;color:#000 !important;padding:1rem 0}
  a{color:#000 !important;text-decoration:underline !important}
  .calculator-widget,.article-card{box-shadow:none !important;border:1px solid #000 !important}
}