:root{
  --green:#2E7D32;
  --accent:#4CAF50;
  --light-green:#E8F5E9;
  --white:#ffffff;
  --border:#E6E6E6;
  --muted:#666666;
  --bg:#ffffff;
  --max-width:1100px;
}

.logo-icon{
width:20px;
height:20px;
object-fit:contain;
margin-right:6px;
vertical-align:middle;
}

/* ===== RESET & BASE ===== */
*{
  box-sizing:border-box;
  font-family:Inter,system-ui,Arial;
  margin:0;
  padding:0;
}

html{
  scroll-behavior:smooth;
}

body{
  background:var(--bg);
  color:#111;
}

/* ===== LAYOUT ===== */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:20px;
}

.crumb{
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}

.small{
  font-size:13px;
  color:var(--muted);
}

.desc{
  color:var(--muted);
  margin-bottom:18px;
}

h1{
  margin:4px 0 8px;
  font-size:22px;
  color:var(--green);
}

h1, h2, h3{
  color:var(--green);
}

a.small,
.link-like{
  color:var(--green);
  text-decoration:none;
}

/* ===== TOOL PAGE ===== */
.tool-wrap{
  display:grid;
  grid-template-columns:1fr 340px;
  gap:18px;
}

.panel{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:10px;
  padding:14px;
}

/* ===== HEADER ===== */
#site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px;
  border-bottom:1px solid var(--border);
  background:var(--white);
}

.brand{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  color:var(--green);
  font-weight:700;
  text-decoration:none;
}

.brand .dot{
  width:10px;
  height:10px;
  background:var(--accent);
  border-radius:3px;
  display:inline-block;
}

/* ===== DRAWER ===== */
.drawer{
  position:fixed;
  right:0;
  top:0;
  height:100%;
  width:320px;
  background:var(--white);
  border-left:1px solid var(--border);
  transform:translateX(120%);
  transition:transform .18s ease;
  padding:18px;
  z-index:100;
}

.drawer.open{
  transform:translateX(0);
}

.drawer ul{
  list-style:none;
  margin:20px 0;
}

.drawer a{
  display:block;
  padding:10px 6px;
  color:var(--green);
  text-decoration:none;
  border-radius:6px;
  font-weight:600;
}

.drawer a:hover,
.drawer a:focus{
  background:rgba(46,125,50,0.05);
  outline:none;
}

/* ===== FOOTER (UPDATED – MOBILE SAFE) ===== */
#site-footer{
  border-top:1px solid var(--border);
  padding:20px 16px;
  color:var(--muted);
  background:var(--white);
  text-align:center;
}

#site-footer .footer-links{
  margin-bottom:8px;
}

#site-footer a,
#site-footer a:visited{
  color:var(--green);
  text-decoration:none;
  font-weight:500;
  margin:0 8px;
}

#site-footer a:hover{
  text-decoration:underline;
}

/* Mobile footer layout */
@media(max-width:600px){

  #site-footer .footer-links{
    display:flex;
    flex-direction:column;
    gap:6px;
  }

  #site-footer a{
    margin:0;
  }

}

/* ===== GRIDS & CARDS ===== */
.grid{
  display:grid;
  gap:16px;
}

.grid.cols-3{
  grid-template-columns:repeat(3,1fr);
}

.card{
  background:var(--white);
  border:1px solid var(--border);
  padding:12px;
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(46,125,50,0.04);
  transition:all .16s ease;
}

.card:hover{
  transform:translateY(-4px);
}

.card strong{
  display:block;
  font-size:16px;
  color:var(--green);
}

.tools-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

/* ===== BUTTONS & RESULTS ===== */
.btn{
  background:var(--accent);
  color:var(--white);
  padding:10px 14px;
  border-radius:999px;
  border:0;
  cursor:pointer;
  font-weight:600;
}

.btn.ghost{
  background:var(--white);
  color:var(--accent);
  border:1px solid var(--accent);
}

.result-box{
  background:var(--light-green);
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(76,175,80,0.08);
}

/* ===== FAQ ===== */
.faq{
  margin-top:30px;
}

.faq h2{
  font-size:18px;
  margin-bottom:12px;
  color:var(--green);
}

/* ===== ACCESSIBILITY ===== */
a:focus,
button:focus,
input:focus{
  outline:3px solid rgba(76,175,80,0.18);
  outline-offset:2px;
}

/* ===== RESPONSIVE ===== */
@media(max-width:980px){
  .tool-wrap{
    grid-template-columns:1fr;
  }

  .grid.cols-3{
    grid-template-columns:repeat(2,1fr);
  }

  .tools-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:560px){
  .grid.cols-3{
    grid-template-columns:1fr;
  }

  .container{
    padding:14px;
  }
}

/* =================================================
   WORLD CLOCK (RECTIFIED & STABLE)
================================================= */

.tool-wrap.world-clock-layout{
  grid-template-columns:1fr;
}

.tool-wrap.world-clock-layout #result{
  display:none;
}

.world-clock-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.world-clock-table td{
  border:1px solid var(--border);
  padding:10px 12px;
  font-size:14px;
  white-space:nowrap;
  text-align:left;
}

.world-clock-table tr:nth-child(odd) td{
  background:rgba(0,0,0,0.015);
}

.world-clock-table tr:nth-child(even) td{
  background:rgba(0,0,0,0.03);
}

@media (max-width:600px){
  .world-clock-table{
    display:block;
  }

  .world-clock-table tr{
    display:block;
    margin-bottom:6px;
  }

  .world-clock-table td{
    width:100%;
    display:block;
    border-left:none;
    border-right:none;
  }

  .wc-cell{
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }

  .wc-country{
    font-weight:600;
  }

  .wc-time{
    text-align:left;
    opacity:0.8;
    font-size:13px;
  }

  .wc-controls{
    flex-wrap:wrap;
  }
}

.crumb a{
  color:var(--green);
  text-decoration:none;
  font-weight:500;
}

.crumb a:hover{
  text-decoration:underline;
}

.crumb span{
  color:var(--muted);
}

/* FIX: Prevent timezone text overflow */
table{
  table-layout:fixed;
  word-wrap:break-word;
}

th, td{
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

@media (max-width:640px){
  table{
    font-size:13px;
  }
}