/*
Theme Name: Lich Cup Dien Tay Ninh
Theme URI: https://lichcupdientayninh.com
Author: LCD
Description: Dashboard navy/vàng riêng cho website lịch cúp điện Tây Ninh.
Version: 3.3.0-mobile-polish
Text Domain: lich-cup-dien-tay-ninh
*/
:root{--navy:#062a56;--navy2:#0b3c78;--blue:#1667cc;--yellow:#f6bd32;--bg:#f4f7fb;--ink:#0d2444;--muted:#62748e;--line:#dfe7f1;--white:#fff;--shadow:0 8px 24px rgba(9,44,91,.10)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.55}a{text-decoration:none;color:inherit}.tn-shell{width:min(1180px,calc(100% - 40px));margin:0 auto}
.tn-header{height:76px;background:var(--navy);color:#fff;position:sticky;top:0;z-index:1000;box-shadow:0 2px 10px rgba(0,0,0,.14)}.tn-header-inner{height:100%;display:flex;align-items:center;gap:28px}.tn-logo{display:flex;align-items:center;gap:10px;color:#fff;min-width:210px}.tn-logo-icon{width:43px;height:43px;border:3px solid var(--yellow);border-radius:50%;display:grid;place-items:center;color:var(--yellow);font-size:24px}.tn-logo span:last-child{display:flex;flex-direction:column;line-height:1}.tn-logo b{font-size:13px}.tn-logo strong{font-size:21px;margin-top:3px}.tn-nav{margin-left:auto}.tn-nav ul{display:flex;align-items:center;gap:20px;margin:0;padding:0;list-style:none}.tn-nav a{height:76px;display:flex;align-items:center;color:#fff;font-size:12px;font-weight:800;position:relative;white-space:nowrap}.tn-nav a:hover:after,.tn-nav .current-menu-item>a:after,.tn-nav .current_page_item>a:after{content:"";height:4px;background:var(--yellow);position:absolute;left:0;right:0;bottom:0}.tn-header-actions{display:flex;gap:12px;align-items:center}.tn-search-icon{width:37px;height:37px;border-radius:50%;background:rgba(255,255,255,.12);display:grid;place-items:center;font-size:19px}.tn-quick{height:39px;border-radius:8px;background:var(--yellow);color:#112847;padding:0 14px;display:flex;align-items:center;gap:8px;font-weight:900}.tn-menu{display:none;background:transparent;border:0;color:#fff;font-size:24px}
.tn-hero{height:360px;background:#d9efff;position:relative;overflow:hidden}.tn-hero-art{position:absolute;inset:0;overflow:hidden}.tn-hero-art img{width:100%;height:100%;display:block;object-fit:cover;object-position:center center}.tn-hero-art:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.82),rgba(255,255,255,.28) 52%,rgba(5,35,72,.22))}.tn-hero-inner{position:relative;z-index:3;height:100%;display:flex;align-items:center;justify-content:space-between;gap:30px}.tn-hero-copy h1{margin:0;font-size:50px;line-height:1.04;letter-spacing:-.04em;color:var(--ink)}.tn-hero-copy h1 span{color:var(--yellow);text-shadow:0 2px 0 rgba(0,0,0,.10)}.tn-hero-copy p{font-size:16px;font-weight:700;line-height:1.7;margin:18px 0;max-width:460px}.tn-update{display:inline-flex;background:rgba(255,255,255,.92);border:1px solid rgba(13,36,68,.12);border-radius:8px;padding:9px 13px;font-weight:800;box-shadow:var(--shadow)}.tn-today-card{width:310px;background:linear-gradient(150deg,rgba(5,40,82,.96),rgba(10,52,103,.92));border-radius:10px;color:#fff;padding:20px 24px;box-shadow:0 18px 38px rgba(4,31,65,.24);backdrop-filter:blur(2px)}.tn-card-title{font-size:12px;font-weight:900;margin-bottom:12px}.tn-stat-line{display:flex;gap:13px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.1)}.tn-stat-line:last-child{border-bottom:0}.tn-stat-line .ico{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:18px}.ico.yellow{background:#f3b523}.ico.blue{background:#2872d9}.ico.green{background:#35a263}.tn-stat-line div{display:flex;flex-direction:column}.tn-stat-line b{font-size:18px}.tn-stat-line small{opacity:.85;font-size:11px}
.tn-searchbar{margin-top:-38px;position:relative;z-index:10;background:#fff;border-radius:8px;box-shadow:var(--shadow);padding:18px 20px;display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:20px;align-items:end}.tn-searchbar label{display:flex;flex-direction:column;gap:7px}.tn-searchbar label span{font-size:12px;font-weight:900}.tn-searchbar input,.tn-searchbar select{height:46px;border:1px solid #dce4ee;border-radius:6px;padding:0 12px;background:#fff;color:var(--ink);width:100%}
.tn-dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.tn-panel{background:#fff;border:1px solid #e4eaf2;border-radius:8px;box-shadow:0 5px 16px rgba(8,43,86,.06)}.tn-panel h2{font-size:13px;margin:0;font-weight:900;color:#122947}.tn-map-card{background:linear-gradient(160deg,#072c58,#08396d);color:#fff;overflow:hidden}.tn-map-card h2{color:#fff;padding:16px 18px}.tn-map-visual{height:286px;position:relative}.tn-map-visual svg{width:76%;height:100%;margin-left:2%}.tn-map-visual path{fill:#20518b;stroke:#88a9cc;stroke-width:1.6}.tn-map-visual .p2{fill:#3163a3}.tn-map-visual .p3{fill:#447cc4}.tn-map-visual .p4{fill:#2c6fca}.tn-map-visual .p5{fill:#5a91dd}.tn-map-visual .hot{fill:#f2b62d}.tn-map-legend{position:absolute;right:16px;top:52px;width:118px;font-size:11px}.tn-map-legend b{display:block;margin-bottom:8px}.tn-map-legend span{display:flex;align-items:center;gap:7px;margin:6px 0}.lg{width:12px;height:12px;border-radius:50%;display:inline-block}.l1{background:#486384}.l2{background:#3163a3}.l3{background:#447cc4}.l4{background:#2c6fca}.l5{background:#f2b62d}.tn-map-card>p{margin:0;padding:12px 18px 15px;font-size:11px;opacity:.85;text-align:center}.tn-panel-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px}.tn-panel-head>span,.tn-panel-head>a{font-size:11px;color:#315d96}.tn-donut-card{padding-bottom:12px}.tn-donut-wrap{padding:14px 18px 0;display:flex;gap:18px;align-items:center}.tn-donut{width:122px;height:122px;border-radius:50%;background:conic-gradient(#246fd6 0 25%,#3aa275 25% 45%,#f0a22a 45% 65%,#ec713f 65% 82%,#7e60cc 82% 100%);display:grid;place-items:center;position:relative;flex:0 0 auto}.tn-donut:after{content:"";width:78px;height:78px;border-radius:50%;background:#fff;position:absolute}.tn-donut>div{position:relative;z-index:2;text-align:center}.tn-donut b{display:block;font-size:22px}.tn-donut small{font-size:10px}.tn-legend-list{flex:1}.tn-legend-list div{display:grid;grid-template-columns:10px 1fr auto;gap:6px;align-items:center;margin:7px 0;font-size:11px}.tn-legend-list em{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dot{width:7px;height:7px;border-radius:50%}.d1{background:#246fd6}.d2{background:#3aa275}.d3{background:#f0a22a}.d4{background:#ec713f}.d5{background:#7e60cc}.tn-donut-card>a,.tn-bars-card>a{display:block;text-align:right;padding:8px 16px;font-size:11px;color:#315d96;font-weight:800}.tn-bars-card{padding:14px 16px}.tn-bars-card>p{margin:4px 0 10px;font-size:10px;color:var(--muted)}.tn-bars{height:180px;display:flex;align-items:flex-end;gap:9px;border-bottom:1px solid #dbe4ef;padding-bottom:8px}.bar-col{flex:1;height:150px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.bar-col b{font-size:11px}.bar-col i{display:block;width:20px;background:#1e6fd1;border-radius:4px 4px 0 0}.bar-col span{font-size:9px;color:#60748e;white-space:nowrap}
.tn-content-grid{display:grid;grid-template-columns:.82fr 1.65fr;gap:16px;margin-top:16px}.tn-news{padding-bottom:12px}.tn-news-item{display:grid;grid-template-columns:76px 1fr;gap:12px;padding:10px 14px;border-top:1px solid #eef2f6;align-items:center}.tn-news-item img,.tn-news-thumb{width:76px;height:56px;object-fit:cover;border-radius:6px}.tn-news-thumb{display:grid;place-items:center;background:#dceaf7;color:var(--navy);font-size:24px}.tn-news-item span:last-child{display:flex;flex-direction:column}.tn-news-item b{font-size:12px}.tn-news-item small{font-size:10px;color:var(--muted);margin-top:4px}.tn-news-empty{padding:18px;color:var(--muted);font-size:12px}.tn-upcoming{overflow:hidden}.tn-tabs{display:flex;gap:8px;padding:0 16px 10px}.tn-tabs a{background:#f2f5f8;padding:8px 12px;border-radius:5px;font-size:11px;font-weight:800}.tn-tabs a.active{background:var(--navy);color:#fff}.tn-schedule-row{display:grid;grid-template-columns:88px 1.5fr 1fr 92px;gap:10px;align-items:center;padding:12px 16px;border-top:1px solid #edf1f6}.tn-schedule-row .time{display:grid;grid-template-columns:1fr;line-height:1.1}.tn-schedule-row .time b{font-size:11px;color:#1c5d9d}.tn-schedule-row .time small{font-size:9px;color:#8b9aad;margin:3px 0}.tn-schedule-row .place,.tn-schedule-row .reason{display:flex;flex-direction:column}.tn-schedule-row b{font-size:11px}.tn-schedule-row small{font-size:10px;color:var(--muted);margin-top:3px}.tn-schedule-row .unit{font-size:10px;color:#38516d}.tn-schedule-row .detail{font-size:10px;color:#2d5b91;font-weight:800;text-align:right}.tn-no-data{padding:30px;text-align:center;color:var(--muted)}
.tn-feature-strip{margin:20px 0;background:linear-gradient(90deg,#f0f7ff,#eef7ff);border:1px solid #dfeaf5;border-radius:8px;display:grid;grid-template-columns:repeat(5,1fr);padding:18px 12px}.tn-feature-strip a{display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:0 18px;border-right:1px solid #dbe8f5}.tn-feature-strip a:last-child{border-right:0}.tn-feature-strip span{grid-row:1/3;width:44px;height:44px;border:2px solid #2e70c4;border-radius:10px;display:grid;place-items:center;font-size:22px;color:#2e70c4}.tn-feature-strip b{font-size:12px}.tn-feature-strip small{font-size:10px;color:var(--muted)}
.tn-seo-content{margin:26px 0 40px}.tn-seo-content .lcd-wrap{max-width:none!important;padding:0!important}.tn-seo-content .lcd-section{background:#fff!important;border:1px solid #e3eaf2!important;border-radius:8px!important;padding:28px 30px!important;box-shadow:none!important}.tn-seo-content h2{font-size:22px!important;color:var(--ink)!important}.tn-seo-content h3{font-size:17px!important;color:var(--ink)!important}.tn-seo-content p{color:#455b75!important}
.tn-footer{background:var(--navy);color:#fff;margin-top:0}.tn-footer-grid{display:grid;grid-template-columns:1.45fr .75fr .75fr .65fr 1fr;gap:32px;padding:36px 0}.tn-logo-footer{min-width:0}.tn-footer p{font-size:11px;line-height:1.7;color:#c6d6e9}.tn-footer h3{font-size:11px;margin:0 0 12px;color:#fff}.tn-footer-grid>div>a:not(.tn-logo){display:block;color:#dce8f6;font-size:11px;margin:7px 0}.tn-socials{display:flex;gap:9px}.tn-socials span{width:30px;height:30px;border-radius:6px;background:#1767c9;display:grid;place-items:center;font-weight:900}.tn-hotline{color:var(--yellow);font-size:16px}.tn-footer-bottom{text-align:center;padding:10px;border-top:1px solid rgba(255,255,255,.12);font-size:10px;color:#c1d1e4}.tn-source-note{opacity:.75}
.tn-page{padding:38px 0 60px}.tn-page h1{font-size:36px;margin:0 0 24px}.tn-page-content{background:#fff;border-radius:10px;padding:26px;border:1px solid #e3eaf2}.tn-post{background:#fff;padding:20px;margin-bottom:14px;border-radius:8px;border:1px solid #e3eaf2}
/* neutralize plugin inline styles on non-home pages enough to fit */
.tn-page .lcd-wrap{max-width:none!important;padding:0!important}.tn-page .lcd-section{border-radius:8px!important}.tn-page .lcd-hero{background:#eff5fb!important;color:var(--ink)!important}.tn-page .lcd-hero h1{color:var(--ink)!important}
@media(max-width:1050px){.tn-nav ul{gap:12px}.tn-quick{display:none}.tn-dashboard-grid{grid-template-columns:1fr 1fr}.tn-content-grid{grid-template-columns:1fr}.tn-searchbar{grid-template-columns:1fr 1fr}.tn-feature-strip{grid-template-columns:repeat(2,1fr);gap:16px}.tn-feature-strip a{border-right:0}.tn-footer-grid{grid-template-columns:1.3fr 1fr 1fr}.tn-footer-grid>div:nth-child(4),.tn-footer-grid>div:nth-child(5){grid-column:auto}}
@media(max-width:820px){.tn-header{height:68px}.tn-header-inner{height:68px}.tn-nav{display:none;position:absolute;top:68px;left:0;right:0;background:var(--navy);padding:10px 20px}.tn-nav.open{display:block}.tn-nav ul{display:block}.tn-nav a{height:44px}.tn-header-actions{margin-left:auto}.tn-menu{display:block}.tn-logo{min-width:0}.tn-hero{height:auto;padding:40px 0 70px}.tn-hero-inner{align-items:flex-start}.tn-today-card{width:280px}.tn-searchbar{margin-top:-38px}.tn-dashboard-grid{grid-template-columns:1fr}.tn-schedule-row{grid-template-columns:80px 1fr 1fr}.tn-schedule-row .unit,.tn-schedule-row .detail{display:none}.tn-footer-grid{grid-template-columns:1fr 1fr}.tn-footer-grid>div:first-child{grid-column:1/-1}}
@media(max-width:620px){.tn-shell{width:min(100% - 24px,1180px)}.tn-logo b{font-size:10px}.tn-logo strong{font-size:15px}.tn-logo-icon{width:36px;height:36px}.tn-search-icon{display:none}.tn-hero-inner{display:block}.tn-hero-copy h1{font-size:40px}.tn-today-card{width:100%;margin-top:24px}.tn-searchbar{grid-template-columns:1fr;gap:12px}.tn-dashboard-grid,.tn-content-grid{display:block}.tn-panel{margin-bottom:14px}.tn-feature-strip{grid-template-columns:1fr}.tn-feature-strip a{padding:10px 18px}.tn-schedule-row{grid-template-columns:72px 1fr}.tn-schedule-row .reason{display:none}.tn-map-visual svg{width:72%}.tn-footer-grid{grid-template-columns:1fr}.tn-footer-grid>div:first-child{grid-column:auto}}

/* ===== Mobile UI fix 2026-08-31 ===== */
@media(max-width:620px){
  html,body{max-width:100%;overflow-x:hidden}
  body{font-size:14px}
  .tn-shell{width:calc(100% - 24px);max-width:100%;}

  /* Header */
  .tn-header,.tn-header-inner{height:64px}
  .tn-header-inner{gap:12px}
  .tn-logo{gap:9px;min-width:0}
  .tn-logo-icon{width:35px;height:35px;font-size:19px;border-width:2px}
  .tn-logo b{font-size:9px;letter-spacing:.02em}
  .tn-logo strong{font-size:15px;margin-top:3px}
  .tn-menu{font-size:22px;padding:8px;margin-left:auto}
  .tn-nav{top:64px}

  /* Hero: keep the image visible but stop the summary card swallowing the viewport */
  .tn-hero{height:auto;min-height:0;padding:30px 0 50px;background:#d9efff}
  .tn-hero-art img{object-position:62% center}
  .tn-hero-art:after{background:linear-gradient(90deg,rgba(255,255,255,.93) 0%,rgba(255,255,255,.68) 46%,rgba(5,35,72,.18) 100%)}
  .tn-hero-inner{display:block;height:auto}
  .tn-hero-copy{max-width:300px}
  .tn-hero-copy h1{font-size:36px;line-height:1.02;letter-spacing:-.035em}
  .tn-hero-copy p{font-size:13px;line-height:1.55;margin:12px 0;max-width:285px}
  .tn-update{font-size:10px;padding:7px 9px;border-radius:7px}

  .tn-today-card{width:100%;margin-top:20px;padding:11px 10px 10px;border-radius:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;background:rgba(5,40,82,.94)}
  .tn-card-title{grid-column:1/-1;margin:0 0 7px;padding:0 5px;font-size:10px}
  .tn-stat-line{min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:8px 5px;border-bottom:0;border-right:1px solid rgba(255,255,255,.12)}
  .tn-stat-line:last-child{border-right:0}
  .tn-stat-line .ico{width:30px;height:30px;font-size:13px}
  .tn-stat-line div{min-width:0;align-items:center}
  .tn-stat-line b{font-size:15px;line-height:1.2;white-space:normal}
  .tn-stat-line small{font-size:8.5px;line-height:1.3;max-width:92px}

  /* Filters: 2 x 2 instead of one huge vertical column */
  .tn-searchbar{margin-top:-28px;padding:14px;border-radius:14px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;align-items:start}
  .tn-searchbar label{min-width:0;gap:5px}
  .tn-searchbar label span{font-size:11px;line-height:1.25}
  .tn-searchbar input,.tn-searchbar select{min-width:0;width:100%;height:44px;padding:0 10px;border-radius:8px;font-size:16px;background:#fff}
  .tn-searchbar select{padding-right:24px;text-overflow:ellipsis}

  /* Dashboard panels */
  .tn-dashboard-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:14px}
  .tn-panel{margin:0;border-radius:10px}
  .tn-panel-head{padding:13px 14px}
  .tn-panel-head h2,.tn-bars-card h2{font-size:12px}
  .tn-donut-wrap{display:grid;grid-template-columns:104px minmax(0,1fr);gap:13px;padding:12px 14px 4px;align-items:center}
  .tn-donut{width:100px;height:100px}
  .tn-donut:after{width:64px;height:64px}
  .tn-donut b{font-size:19px}
  .tn-donut small{font-size:8.5px;line-height:1.2}
  .tn-legend-list{min-width:0}
  .tn-legend-list div{grid-template-columns:8px minmax(0,1fr) auto;gap:5px;margin:5px 0;font-size:10px}
  .tn-legend-list em{min-width:0}
  .tn-bars-card{padding:13px 12px}
  .tn-bars{height:145px;gap:5px}
  .bar-col{height:120px;min-width:0}
  .bar-col i{width:15px}
  .bar-col span{font-size:8px}

  /* Put upcoming outages before news on mobile */
  .tn-content-grid{display:flex;flex-direction:column;gap:12px;margin-top:12px}
  .tn-upcoming{order:1}
  .tn-news{order:2}
  .tn-tabs{overflow-x:auto;white-space:nowrap;padding:0 12px 9px;gap:6px;-webkit-overflow-scrolling:touch}
  .tn-tabs a{flex:0 0 auto;padding:7px 10px;font-size:10px}
  .tn-schedule-row{grid-template-columns:68px minmax(0,1fr);gap:10px;padding:11px 12px}
  .tn-schedule-row .reason,.tn-schedule-row .unit,.tn-schedule-row .detail{display:none}
  .tn-schedule-row .time b{font-size:10px}
  .tn-schedule-row .time small{font-size:8px}
  .tn-schedule-row .place b{font-size:11px;line-height:1.35}
  .tn-schedule-row .place small{font-size:9.5px;line-height:1.45}

  .tn-news-item{grid-template-columns:68px 1fr;padding:9px 12px;gap:10px}
  .tn-news-item img,.tn-news-thumb{width:68px;height:52px}

  .tn-feature-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px 8px}
  .tn-feature-strip a{grid-template-columns:36px 1fr;column-gap:8px;padding:9px;border:0;background:rgba(255,255,255,.55);border-radius:8px}
  .tn-feature-strip span{width:34px;height:34px;font-size:17px}
  .tn-feature-strip b{font-size:10px}
  .tn-feature-strip small{font-size:8.5px}

  .tn-seo-content{margin:18px 0 28px}
  .tn-seo-content .lcd-section{padding:20px 16px!important}
  .tn-seo-content h2{font-size:19px!important}

  .tn-footer-grid{grid-template-columns:1fr;gap:22px;padding:28px 0}
  .tn-footer-grid>div:first-child{grid-column:auto}
}

@media(max-width:360px){
  .tn-searchbar{grid-template-columns:1fr}
  .tn-today-card{grid-template-columns:1fr}
  .tn-stat-line{flex-direction:row;text-align:left;justify-content:flex-start;border-right:0;border-bottom:1px solid rgba(255,255,255,.10);padding:8px 5px}
  .tn-stat-line:last-child{border-bottom:0}
  .tn-stat-line div{align-items:flex-start}
  .tn-stat-line small{max-width:none}
}

/* Editable footer page: WP Admin > Pages > Footer Tây Ninh */
.tn-footer-editable{padding:0}
.tn-footer-editable>.wp-block-columns.tn-footer-grid{margin:0;padding:36px 0;display:grid;grid-template-columns:1.45fr .75fr .75fr .65fr 1fr;gap:32px;align-items:start}
.tn-footer-editable .wp-block-column{margin:0;min-width:0}
.tn-footer-editable .wp-block-column>*:first-child{margin-top:0}
.tn-footer-editable .wp-block-column>*:last-child{margin-bottom:0}
.tn-footer-editable h3{font-size:11px;margin:0 0 12px;color:#fff;text-transform:uppercase}
.tn-footer-editable p{font-size:11px;line-height:1.7;color:#c6d6e9;margin:7px 0}
.tn-footer-editable a{color:#dce8f6;text-decoration:none}
.tn-footer-editable a:hover{color:#fff;text-decoration:underline}
.tn-footer-brand-editable{font-size:13px!important;line-height:1.25!important;color:#fff!important;letter-spacing:.01em}
.tn-footer-brand-editable strong{font-size:15px;color:#fff}
.tn-footer-editable .tn-hotline{color:var(--yellow)!important;font-size:14px!important}
.tn-footer-editable>.tn-footer-bottom{width:100vw;margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;margin-top:0!important;margin-bottom:0!important;padding:10px!important;border-top:1px solid rgba(255,255,255,.12)!important;color:#c1d1e4!important;font-size:10px!important;text-align:center!important}
@media(max-width:1050px){.tn-footer-editable>.wp-block-columns.tn-footer-grid{grid-template-columns:1.3fr 1fr 1fr}.tn-footer-editable>.wp-block-columns.tn-footer-grid>.wp-block-column:nth-child(4),.tn-footer-editable>.wp-block-columns.tn-footer-grid>.wp-block-column:nth-child(5){grid-column:auto}}
@media(max-width:820px){.tn-footer-editable>.wp-block-columns.tn-footer-grid{grid-template-columns:1fr 1fr}.tn-footer-editable>.wp-block-columns.tn-footer-grid>.wp-block-column:first-child{grid-column:1/-1}}
@media(max-width:620px){.tn-footer-editable>.wp-block-columns.tn-footer-grid{grid-template-columns:1fr;gap:22px;padding:28px 0}.tn-footer-editable>.wp-block-columns.tn-footer-grid>.wp-block-column:first-child{grid-column:auto}.tn-footer-editable p{font-size:12px}.tn-footer-editable h3{font-size:12px}}


/* ===== Mobile Safari / iPhone layout fix v2 ===== */
@media(max-width:480px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .tn-shell{width:calc(100% - 20px);max-width:none;margin-left:auto;margin-right:auto}

  /* Keep the site header clear of hero content on iOS */
  .tn-header{height:60px;position:sticky;top:0;z-index:10000}
  .tn-header-inner{height:60px;padding:0 2px;gap:8px}
  .tn-logo{gap:7px}
  .tn-logo-icon{width:32px;height:32px;font-size:17px;border-width:2px}
  .tn-logo b{font-size:8px}
  .tn-logo strong{font-size:14px;margin-top:2px}
  .tn-menu{font-size:21px;padding:7px 4px}
  .tn-nav{top:60px;left:10px;right:10px;padding:8px 10px;border-radius:0 0 10px 10px;box-shadow:0 12px 25px rgba(0,0,0,.18)}
  .tn-nav a{height:40px;font-size:12px}

  /* Hero: smaller type, shorter copy, and compact live stats */
  .tn-hero{padding:22px 0 40px;min-height:0;height:auto}
  .tn-hero-art img{object-position:68% center}
  .tn-hero-art:after{background:linear-gradient(90deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.76) 47%,rgba(5,35,72,.25) 100%)}
  .tn-hero-copy{max-width:255px}
  .tn-hero-copy h1{font-size:31px!important;line-height:1.03!important;letter-spacing:-.035em!important;margin:0!important}
  .tn-hero-copy p{font-size:11.5px!important;line-height:1.48!important;margin:10px 0!important;max-width:245px!important}
  .tn-update{font-size:9px;padding:6px 8px;line-height:1.25;white-space:nowrap}

  .tn-today-card{margin-top:14px;padding:9px 7px 8px;border-radius:11px;grid-template-columns:repeat(3,minmax(0,1fr))}
  .tn-card-title{font-size:9px;margin-bottom:4px;padding:0 3px}
  .tn-stat-line{padding:6px 3px;gap:3px}
  .tn-stat-line .ico{width:26px;height:26px;font-size:11px}
  .tn-stat-line b{font-size:13px;line-height:1.15}
  .tn-stat-line small{font-size:7.5px;line-height:1.25;max-width:84px}

  /* Search: dates can share a row; Safari date text is explicitly shrunk.
     Long selects receive a full row so labels/options never collide. */
  .tn-searchbar{margin-top:-20px;padding:12px 11px 13px;border-radius:13px;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:8px!important;row-gap:10px!important;overflow:hidden}
  .tn-searchbar label{min-width:0!important;width:100%!important;gap:4px!important;margin:0!important}
  .tn-searchbar label:nth-of-type(3),
  .tn-searchbar label:nth-of-type(4){grid-column:1/-1!important}
  .tn-searchbar label span{font-size:10.5px!important;line-height:1.2!important;margin:0!important}
  .tn-searchbar input[type=date],
  .tn-searchbar select{display:block!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!important;height:42px!important;border-radius:8px!important;padding:0 8px!important;font-size:13px!important;line-height:42px!important;background:#fff!important;color:var(--ink)!important}
  .tn-searchbar input[type=date]{-webkit-appearance:none!important;appearance:none!important;text-align:left!important;font-variant-numeric:tabular-nums!important}
  .tn-searchbar input[type=date]::-webkit-date-and-time-value{text-align:left!important;min-width:0!important;margin:0!important}
  .tn-searchbar input[type=date]::-webkit-calendar-picker-indicator{width:17px!important;height:17px!important;margin:0!important;padding:0!important;opacity:.72!important}
  .tn-searchbar select{-webkit-appearance:auto!important;appearance:auto!important;padding-right:26px!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}

  /* Main panels: lighter and denser on phones */
  .tn-dashboard-grid{gap:10px;margin-top:10px}
  .tn-panel{border-radius:10px}
  .tn-panel-head{padding:11px 12px}
  .tn-panel-head h2,.tn-bars-card h2{font-size:11px;line-height:1.25}
  .tn-panel-head>span,.tn-panel-head>a{font-size:9px}
  .tn-donut-wrap{grid-template-columns:88px minmax(0,1fr);gap:10px;padding:10px 12px 4px}
  .tn-donut{width:86px;height:86px}
  .tn-donut:after{width:56px;height:56px}
  .tn-donut b{font-size:17px}
  .tn-donut small{font-size:7.5px}
  .tn-legend-list div{font-size:9px;margin:4px 0;grid-template-columns:7px minmax(0,1fr) auto}
  .tn-donut-card>a,.tn-bars-card>a{font-size:9px;padding:7px 12px 10px}

  .tn-bars-card{padding:11px 10px}
  .tn-bars{height:125px;gap:3px}
  .bar-col{height:105px}
  .bar-col i{width:12px}
  .bar-col b{font-size:9px}
  .bar-col span{font-size:6.7px;letter-spacing:-.02em}

  .tn-content-grid{gap:10px;margin-top:10px}
  .tn-tabs{padding:0 10px 8px;gap:5px}
  .tn-tabs a{padding:6px 8px;font-size:9px}
  .tn-schedule-row{grid-template-columns:60px minmax(0,1fr);gap:8px;padding:10px}
  .tn-schedule-row .time b{font-size:9px}
  .tn-schedule-row .time small{font-size:7.5px}
  .tn-schedule-row .place b{font-size:10px}
  .tn-schedule-row .place small{font-size:8.7px}

  .tn-feature-strip{grid-template-columns:1fr 1fr;gap:7px;padding:10px 7px;margin:14px 0}
  .tn-feature-strip a{grid-template-columns:32px 1fr;padding:8px 7px;column-gap:7px}
  .tn-feature-strip span{width:30px;height:30px;font-size:15px}
  .tn-feature-strip b{font-size:9px}
  .tn-feature-strip small{font-size:7.5px;line-height:1.25}

  .tn-seo-content{margin:14px 0 22px}
  .tn-seo-content .lcd-section{padding:17px 13px!important}
  .tn-seo-content h2{font-size:17px!important;line-height:1.25!important}
  .tn-seo-content h3{font-size:15px!important}
  .tn-seo-content p,.tn-seo-content li{font-size:12.5px!important;line-height:1.6!important}
}

@media(max-width:374px){
  .tn-searchbar{grid-template-columns:1fr!important}
  .tn-searchbar label:nth-of-type(1),
  .tn-searchbar label:nth-of-type(2),
  .tn-searchbar label:nth-of-type(3),
  .tn-searchbar label:nth-of-type(4){grid-column:1!important}
  .tn-hero-copy h1{font-size:28px!important}
  .tn-today-card{grid-template-columns:1fr}
  .tn-card-title{grid-column:1}
  .tn-stat-line{flex-direction:row;text-align:left;border-right:0;border-bottom:1px solid rgba(255,255,255,.10);padding:7px 4px}
  .tn-stat-line div{align-items:flex-start}
  .tn-stat-line small{max-width:none}
}

/* Ward-only search */
@media(min-width:621px) and (max-width:1050px){.tn-searchbar{grid-template-columns:1fr 1fr 1.4fr}}
@media(max-width:620px){.tn-searchbar label:nth-of-type(3){grid-column:1/-1!important}}


/* Search button restored: date range + ward + submit */
.tn-searchbar{grid-template-columns:1fr 1fr 1.4fr auto!important}
.tn-search-submit{height:46px;min-width:112px;padding:0 22px;border:0;border-radius:6px;background:var(--navy);color:#fff;font-weight:900;cursor:pointer;white-space:nowrap}
.tn-search-submit:hover{background:var(--navy2)}
@media(max-width:820px){.tn-searchbar{grid-template-columns:1fr 1fr!important}.tn-searchbar label:nth-of-type(3),.tn-search-submit{grid-column:1/-1!important}.tn-search-submit{width:100%}}
@media(max-width:620px){.tn-searchbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.tn-searchbar label:nth-of-type(3),.tn-search-submit{grid-column:1/-1!important}.tn-search-submit{height:44px;border-radius:8px}}
@media(max-width:360px){.tn-searchbar{grid-template-columns:1fr!important}.tn-searchbar label:nth-of-type(1),.tn-searchbar label:nth-of-type(2),.tn-searchbar label:nth-of-type(3),.tn-search-submit{grid-column:1!important}}

/* Search result directly below the search bar */
.tn-search-results{margin-top:16px;overflow:hidden;border:2px solid rgba(13,52,94,.10)}
.tn-search-results .tn-panel-head{background:#f7f9fc}
.tn-search-summary{padding:10px 16px;background:#fff8df;border-bottom:1px solid #f0e5bd;color:#59697c;font-size:11px}
.tn-search-results .tn-schedule-row{grid-template-columns:88px 1.65fr 1fr}
@media(max-width:820px){.tn-search-results{margin-top:12px}.tn-search-results .tn-schedule-row{grid-template-columns:80px 1fr 1fr}}
@media(max-width:620px){.tn-search-results{margin-top:10px}.tn-search-summary{padding:9px 12px;line-height:1.5}.tn-search-results .tn-schedule-row{grid-template-columns:72px 1fr}.tn-search-results .tn-schedule-row .reason{display:none}}

/* v3.1 - Upcoming tabs: instant switch, no reload / no query-string navigation */
.tn-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 16px 12px;overflow:visible;white-space:normal}
.tn-tab{appearance:none;-webkit-appearance:none;width:100%;min-width:0;height:42px;border:1px solid transparent;border-radius:7px;background:#f2f5f8;color:var(--ink);padding:0 10px;font:inherit;font-size:11px;font-weight:900;line-height:1.15;text-align:center;cursor:pointer;transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease}
.tn-tab:hover{border-color:#d6e0eb;background:#eaf0f6}
.tn-tab:focus-visible{outline:3px solid rgba(243,181,35,.35);outline-offset:2px}
.tn-tab.is-active{background:var(--navy);color:#fff;border-color:var(--navy)}
.tn-tab-panel[hidden]{display:none!important}
.tn-tab-panel.is-active{display:block}
@media(max-width:620px){
  .tn-upcoming .tn-panel-head{padding:14px 12px 10px;align-items:flex-start}
  .tn-upcoming .tn-panel-head h2{font-size:15px;line-height:1.25}
  .tn-upcoming .tn-panel-head>a{font-size:9px;line-height:1.3;text-align:right;max-width:96px}
  .tn-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 10px 10px}
  .tn-tab{height:40px;padding:0 4px;border-radius:8px;font-size:10px;letter-spacing:-.01em}
}
@media(max-width:360px){
  .tn-tabs{gap:5px;padding-left:8px;padding-right:8px}
  .tn-tab{font-size:9.5px;padding:0 2px}
}

/* Compact today stats: icons removed */
.tn-today-card .tn-stat-line{justify-content:center;}
.tn-today-card .tn-stat-line>div{width:100%;align-items:center;text-align:center;}
@media(max-width:620px){
  .tn-today-card{padding-top:10px;padding-bottom:9px;}
  .tn-today-card .tn-stat-line{padding:7px 5px;gap:0;}
  .tn-today-card .tn-stat-line b{font-size:16px;}
  .tn-today-card .tn-stat-line small{margin-top:2px;}
}
@media(max-width:360px){
  .tn-today-card{grid-template-columns:repeat(3,minmax(0,1fr));}
  .tn-today-card .tn-stat-line{flex-direction:column;text-align:center;justify-content:center;border-bottom:0;border-right:1px solid rgba(255,255,255,.10);}
  .tn-today-card .tn-stat-line:last-child{border-right:0;}
  .tn-today-card .tn-stat-line>div{align-items:center;}
}

/* Clarify active wards vs total provincial wards in the 30-day donut. */
.tn-donut-total{font-size:.62em;font-weight:800;opacity:.72;margin-left:1px}
.tn-footer-disclaimer-fallback{text-align:left;margin-top:0!important;padding-bottom:4px}
@media(max-width:620px){.tn-donut-total{font-size:.58em}}


/* ===== v3.3 Mobile visual polish ===== */
.tn-mobile-ward-summary{display:none}
@media(max-width:767px){
  body{background:#f3f6fa}
  .tn-shell{width:calc(100% - 24px);max-width:none}

  /* Header */
  .tn-header{height:62px}
  .tn-header-inner{height:62px;gap:10px}
  .tn-logo{min-width:0}
  .tn-logo-icon{width:34px;height:34px;border-width:2px;font-size:18px}
  .tn-logo b{font-size:9px}
  .tn-logo strong{font-size:15px}

  /* Hero: content-first, less vertical weight */
  .tn-hero{height:auto!important;min-height:0!important;padding:24px 0 48px!important}
  .tn-hero-art img{object-position:70% center!important}
  .tn-hero-art:after{background:linear-gradient(90deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.84) 42%,rgba(255,255,255,.36) 69%,rgba(6,42,86,.08) 100%)!important}
  .tn-hero-inner{display:block!important;height:auto!important}
  .tn-hero-copy{max-width:285px!important}
  .tn-hero-copy h1{font-size:36px!important;line-height:.98!important;letter-spacing:-.045em!important;margin:0!important}
  .tn-hero-copy p{font-size:12.5px!important;line-height:1.52!important;margin:12px 0!important;max-width:275px!important}
  .tn-update{font-size:9.5px!important;padding:7px 9px!important;border-radius:9px!important;box-shadow:0 5px 14px rgba(9,44,91,.08)!important}

  /* Today summary: one compact strip */
  .tn-today-card{width:100%!important;margin-top:16px!important;padding:11px 8px 10px!important;border-radius:14px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;background:#0a376c!important;box-shadow:0 10px 24px rgba(4,31,65,.18)!important}
  .tn-card-title{grid-column:1/-1!important;font-size:9.5px!important;letter-spacing:.01em!important;margin:0 0 7px!important;padding:0 7px!important}
  .tn-stat-line{min-width:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:5px 6px!important;border-bottom:0!important;border-right:1px solid rgba(255,255,255,.12)!important}
  .tn-stat-line:last-child{border-right:0!important}
  .tn-stat-line>div{width:100%!important;align-items:center!important;text-align:center!important}
  .tn-stat-line b{font-size:19px!important;line-height:1.05!important;letter-spacing:-.025em!important}
  .tn-stat-line small{font-size:8.5px!important;line-height:1.25!important;max-width:100px!important;margin-top:4px!important;color:rgba(255,255,255,.82)!important}

  /* Search card: thinner, calmer spacing */
  .tn-searchbar{margin-top:-24px!important;padding:14px!important;border-radius:16px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:9px!important;row-gap:10px!important;border:1px solid #e3e9f1!important;box-shadow:0 8px 22px rgba(9,44,91,.08)!important}
  .tn-searchbar label{gap:5px!important}
  .tn-searchbar label span{font-size:10.5px!important;line-height:1.2!important}
  .tn-searchbar input[type=date],.tn-searchbar select{height:42px!important;border-radius:9px!important;border-color:#d9e2ed!important;font-size:13px!important;padding-left:10px!important;background:#fff!important}
  .tn-searchbar label:nth-of-type(3){grid-column:1/-1!important}
  .tn-search-submit{grid-column:1/-1!important;width:100%!important;height:44px!important;border-radius:9px!important;font-size:13px!important;box-shadow:none!important}

  /* Panels */
  .tn-dashboard-grid{margin-top:12px!important;gap:12px!important}
  .tn-panel{border-radius:14px!important;border-color:#e2e8f0!important;box-shadow:0 3px 12px rgba(8,43,86,.045)!important}
  .tn-panel-head{padding:13px 14px 9px!important}
  .tn-panel-head h2,.tn-bars-card h2{font-size:13px!important;line-height:1.25!important}
  .tn-panel-head>span,.tn-panel-head>a{font-size:9.5px!important}

  /* On phones the ring chart is less useful than a clear metric. */
  .tn-donut-wrap{display:block!important;padding:3px 14px 4px!important}
  .tn-donut{display:none!important}
  .tn-mobile-ward-summary{display:flex;align-items:center;gap:10px;padding:4px 0 11px;border-bottom:1px solid #edf1f5}
  .tn-mobile-ward-summary b{font-size:31px;line-height:1;color:var(--navy);letter-spacing:-.045em}
  .tn-mobile-ward-summary span{font-size:10.5px;line-height:1.4;color:var(--muted)}
  .tn-mobile-ward-summary strong{color:var(--ink)}
  .tn-legend-list{padding:6px 0 1px!important}
  .tn-legend-list div{grid-template-columns:8px minmax(0,1fr) auto!important;gap:7px!important;margin:6px 0!important;font-size:10.5px!important}
  .tn-legend-list .dot{width:7px!important;height:7px!important}
  .tn-donut-card>a,.tn-bars-card>a{font-size:9.5px!important;padding:8px 14px 12px!important}

  /* Hour chart: still readable without micro text */
  .tn-bars-card{padding:13px 14px!important}
  .tn-bars-card>p{font-size:9.5px!important;margin:4px 0 8px!important}
  .tn-bars{height:126px!important;gap:5px!important}
  .bar-col{height:108px!important}
  .bar-col i{width:14px!important}
  .bar-col b{font-size:9px!important}
  .bar-col span{font-size:8px!important}

  /* Upcoming tabs / rows */
  .tn-content-grid{margin-top:12px!important;gap:12px!important}
  .tn-upcoming .tn-panel-head{padding:14px 14px 10px!important}
  .tn-upcoming .tn-panel-head h2{font-size:14px!important}
  .tn-tabs{gap:6px!important;padding:0 12px 11px!important}
  .tn-tab{height:39px!important;border-radius:9px!important;font-size:10px!important;padding:0 4px!important}
  .tn-schedule-row{grid-template-columns:64px minmax(0,1fr)!important;gap:9px!important;padding:11px 13px!important}
  .tn-schedule-row .time b{font-size:9.5px!important}
  .tn-schedule-row .place b{font-size:10.5px!important;line-height:1.35!important}
  .tn-schedule-row .reason,.tn-schedule-row .detail{display:none!important}

  .tn-feature-strip{border-radius:14px!important;margin:14px 0!important}
}

@media(max-width:374px){
  .tn-hero-copy h1{font-size:32px!important}
  .tn-hero-copy{max-width:250px!important}
  .tn-searchbar{grid-template-columns:1fr!important}
  .tn-searchbar label:nth-of-type(1),.tn-searchbar label:nth-of-type(2),.tn-searchbar label:nth-of-type(3),.tn-search-submit{grid-column:1!important}
  .tn-today-card{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .tn-stat-line b{font-size:16px!important}
  .tn-stat-line small{font-size:7.8px!important}
}

/* Mobile cleanup: today summary as simple label/value rows */
@media(max-width:620px){
  .tn-today-card{
    display:block!important;
    width:100%!important;
    margin-top:14px!important;
    padding:12px 14px 10px!important;
    border-radius:14px!important;
    background:#0a376c!important;
    box-shadow:0 8px 20px rgba(4,31,65,.14)!important;
  }
  .tn-card-title{
    display:block!important;
    margin:0 0 5px!important;
    padding:0 1px 7px!important;
    font-size:10px!important;
    line-height:1.2!important;
    border-bottom:1px solid rgba(255,255,255,.12)!important;
  }
  .tn-today-card .tn-stat-line{
    display:block!important;
    padding:0!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.10)!important;
  }
  .tn-today-card .tn-stat-line:last-child{
    border-bottom:0!important;
  }
  .tn-today-card .tn-stat-line>div{
    width:100%!important;
    min-height:39px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
    text-align:left!important;
  }
  .tn-today-card .tn-stat-line b{
    order:2!important;
    flex:0 0 auto!important;
    margin:0!important;
    font-size:15px!important;
    line-height:1!important;
    letter-spacing:-.015em!important;
    white-space:nowrap!important;
    text-align:right!important;
  }
  .tn-today-card .tn-stat-line small{
    order:1!important;
    flex:1 1 auto!important;
    max-width:none!important;
    margin:0!important;
    font-size:9.5px!important;
    line-height:1.25!important;
    color:rgba(255,255,255,.80)!important;
    text-align:left!important;
  }
}
@media(max-width:374px){
  .tn-today-card{display:block!important;padding:11px 12px 9px!important}
  .tn-today-card .tn-stat-line b{font-size:14px!important}
  .tn-today-card .tn-stat-line small{font-size:9px!important}
}
