/* ═══════════════════════════════════════════════════
   DAILYHUB v4 — Light AI-Modern Design
   Theme: Warm off-white · Deep navy · Electric teal
   Fonts: Bricolage Grotesque (headings) + Plus Jakarta Sans (body)
   Mobile-first · Fully responsive
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* ── Brand palette ── */
  --teal:       #0D9488;   /* primary action */
  --teal-light: #14B8A6;
  --teal-pale:  #F0FDFA;
  --teal-glow:  rgba(13,148,136,.12);
  --navy:       #0F172A;   /* headings */
  --navy2:      #1E293B;
  --amber:      #F59E0B;
  --amber-pale: #FFFBEB;
  --coral:      #EF4444;

  /* ── Backgrounds — light, warm, layered ── */
  --bg-page:    #F8F7F4;   /* warm off-white page */
  --bg-white:   #FFFFFF;
  --bg-muted:   #F1EFE9;   /* slightly warm gray */
  --bg-card:    #FFFFFF;
  --bg-subtle:  #F5F4F0;

  /* ── Hero ── */
  --hero-bg:    #0F172A;   /* deep navy only for hero */

  /* ── Text ── */
  --tx-head:    #0F172A;
  --tx-body:    #334155;
  --tx-muted:   #64748B;
  --tx-faint:   #94A3B8;

  /* ── Borders ── */
  --bd:         #E7E5DF;
  --bd2:        #D4D2CB;
  --bd-teal:    rgba(13,148,136,.25);

  /* ── Shadows ── */
  --sh-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --sh-lg:  0 12px 40px rgba(0,0,0,.10);
  --sh-teal:0 4px 20px rgba(13,148,136,.22);

  /* ── Radii ── */
  --r1: 8px;  --r2: 14px;  --r3: 20px;  --r4: 28px;

  /* ── Ease ── */
  --ease: cubic-bezier(.25,.46,.45,.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-page);
  color: var(--tx-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Subtle page texture ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%230D9488' fill-opacity='0.025'%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* ══ NAV ══ */
.nav {
  position: sticky; top: 0; z-index: 1000;
  height: 60px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
  padding: 0 clamp(16px,4vw,28px);
  box-shadow: 0 1px 0 var(--bd), 0 4px 16px rgba(0,0,0,.04);
}

.nav-logo {
  display: flex; align-items: center;
  gap: 10px; text-decoration: none;
  margin-right: auto; flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), #0891B2);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  box-shadow: var(--sh-teal); flex-shrink: 0;
}
.nav-logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--tx-head); letter-spacing: -.4px;
  white-space: nowrap;
}
.nav-logo-text .accent { color: var(--teal); }

.nav-links {
  display: flex; gap: 2px; align-items: center;
}
.nav-links a {
  font-size: 13px; font-weight: 600;
  color: var(--tx-muted); text-decoration: none;
  padding: 7px 13px; border-radius: var(--r1);
  transition: all .18s var(--ease); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--teal); background: var(--teal-pale);
}

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: pointer;
  background: none; border: none; margin-left: 8px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--tx-body); border-radius: 2px;
  transition: all .3s var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 999;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--bd);
  padding: 16px 20px 24px;
  transform: translateY(-110%);
  transition: transform .32s var(--ease);
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
.nav-drawer.open { transform: translateY(0); }
.nav-drawer a {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: var(--r2);
  font-size: 15px; font-weight: 700; color: var(--tx-body);
  text-decoration: none; transition: all .18s;
}
.nav-drawer a:hover, .nav-drawer a.active {
  background: var(--teal-pale); color: var(--teal);
}

/* ── Page body offset ── */
.page-body { padding-top: 60px; }

/* ══ TOOL HEADER (inner pages) ══ */
.tool-header {
  background: linear-gradient(135deg, var(--teal-pale) 0%, #F0F9FF 50%, var(--teal-pale) 100%);
  border-bottom: 1px solid var(--bd-teal);
  padding: clamp(28px,5vw,52px) 20px clamp(24px,4vw,44px);
  text-align: center; position: relative; overflow: hidden;
}
.tool-header::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='1' fill='%230D9488' fill-opacity='0.07'/%3E%3C/svg%3E");
  pointer-events: none;
}
.tool-icon {
  font-size: clamp(36px,6vw,52px); margin-bottom: 12px;
  display: block; position: relative; z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(13,148,136,.2));
  animation: floatIcon 4s ease-in-out infinite;
}
@keyframes floatIcon {
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-5px);}
}
.tool-header h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(20px, 4.5vw, 34px);
  font-weight: 800; color: var(--tx-head);
  margin-bottom: 10px; letter-spacing: -.5px;
  position: relative; z-index: 1;
}
.tool-header p {
  font-size: clamp(13px,2.5vw,16px);
  color: var(--tx-muted); max-width: 520px;
  margin: 0 auto; position: relative; z-index: 1;
}

/* ══ TOOL WRAP ══ */
.tool-wrap {
  max-width: 920px; margin: 0 auto;
  padding: clamp(16px,3vw,28px) clamp(12px,4vw,20px) clamp(48px,8vw,72px);
  background: var(--bg-page);
}

.tool-body {
  background: var(--bg-white);
  border: 1px solid var(--bd);
  border-radius: var(--r3);
  padding: clamp(16px,4vw,28px);
  box-shadow: var(--sh-md);
  margin-bottom: 16px;
}

/* ── Inputs ── */
.tool-wrap input,
.tool-wrap select,
.tool-wrap textarea {
  width: 100%; padding: 11px 16px;
  font-size: 14px; font-family: inherit;
  color: var(--tx-head); background: var(--bg-white);
  border: 1.5px solid var(--bd);
  border-radius: var(--r2); outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none; appearance: none;
}
.tool-wrap input:focus,
.tool-wrap select:focus,
.tool-wrap textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.tool-wrap textarea { resize: vertical; line-height: 1.75; min-height: 100px; }
.tool-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' fill='none' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ── Field group ── */
.field-group { margin-bottom: 16px; }
.field-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--tx-muted); text-transform: uppercase;
  letter-spacing: .6px; margin-bottom: 6px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 11px 22px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  border-radius: var(--r2);
  border: 1.5px solid var(--bd2);
  background: var(--bg-white); color: var(--tx-body);
  cursor: pointer; transition: all .18s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover {
  border-color: var(--teal); color: var(--teal);
  background: var(--teal-pale); transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}
.btn-primary {
  background: var(--teal); color: #fff;
  border-color: var(--teal);
  box-shadow: var(--sh-teal);
}
.btn-primary:hover {
  background: var(--teal-light); border-color: var(--teal-light);
  color: #fff; box-shadow: 0 6px 24px rgba(13,148,136,.3);
  transform: translateY(-2px);
}
.btn-amber {
  background: var(--amber); color: #fff;
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(245,158,11,.25);
}
.btn-amber:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-block { width: 100%; }

/* ── Stat box ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px,45%),1fr));
  gap: 12px; margin: 16px 0;
}
.stat-box {
  background: linear-gradient(135deg, var(--teal-pale), #E0F2FE);
  border: 1.5px solid var(--bd-teal);
  border-radius: var(--r2); padding: 16px; text-align: center;
}
.stat-box .val {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(22px,4vw,30px); font-weight: 800;
  color: var(--teal); line-height: 1;
}
.stat-box .lbl {
  font-size: 11px; color: var(--tx-muted);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; margin-top: 4px;
}

/* ── Table ── */
.tbl-wrap { overflow-x: auto; border-radius: var(--r2); border: 1px solid var(--bd); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 300px; }
th {
  padding: 10px 14px; text-align: left;
  background: var(--teal-pale);
  font-weight: 800; color: var(--teal);
  border-bottom: 2px solid var(--bd-teal);
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--bd); color: var(--tx-body); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--teal-pale); }

/* ── Doc output ── */
.doc-output {
  background: var(--bg-white);
  border: 1.5px solid var(--bd);
  border-radius: var(--r2);
  padding: clamp(16px,4vw,28px) clamp(16px,4vw,32px);
  font-size: 14px; line-height: 2;
  color: #1a1a1a; white-space: pre-wrap;
  font-family: Georgia, serif;
  box-shadow: var(--sh-sm); min-height: 160px;
  word-break: break-word;
}

/* ── Tool info ── */
.tool-info {
  background: var(--teal-pale);
  border: 1.5px solid var(--bd-teal);
  border-radius: var(--r2);
  padding: clamp(16px,4vw,22px) clamp(16px,4vw,24px);
  margin-top: 20px;
}
.tool-info h2 { font-size: 16px; font-weight: 800; color: var(--teal); margin-bottom: 8px; }
.tool-info p { font-size: 14px; color: var(--tx-muted); line-height: 1.75; margin-bottom: 8px; }

/* ── Ad slot ── */
.ad-slot { margin: 16px 0; text-align: center; }
.ad-slot:empty { display: none; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: clamp(16px,4vw,24px);
  left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff;
  border: none; padding: 12px 24px; border-radius: 50px;
  font-size: 14px; font-weight: 700; z-index: 9999;
  white-space: nowrap; box-shadow: var(--sh-lg);
  animation: toastUp .25s var(--ease);
}
@keyframes toastUp {
  from{opacity:0;transform:translateX(-50%) translateY(12px);}
  to{opacity:1;transform:translateX(-50%) translateY(0);}
}

/* ── Responsive ── */
@media(max-width:900px){
  .nav-links { display:none; }
  .nav-hamburger { display:flex; }
}
@media(max-width:600px){
  .tool-wrap { padding: 12px 12px 48px; }
  .tool-body { padding: 14px; border-radius: var(--r2); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .btn { padding: 10px 16px; font-size: 13px; }
  .field-group { margin-bottom: 12px; }
}
@media(max-width:400px){
  .nav-logo-text { font-size: 16px; }
  .stat-box { padding: 12px 8px; }
  .stat-box .val { font-size: 20px; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from{opacity:0;transform:translateY(18px);}
  to{opacity:1;transform:translateY(0);}
}
@keyframes scaleIn {
  from{opacity:0;transform:scale(.95);}
  to{opacity:1;transform:scale(1);}
}
