
:root{
  --bg:#f5f8fc;--panel:#fff;--line:#e2e8f0;--text:#14233b;--muted:#6f7e93;
  --blue:#2e6fc8;--blue-soft:#edf4ff;--radius:16px;--shadow:0 7px 22px rgba(33,54,84,.06)
}
*{box-sizing:border-box}
html{font-size:16px}
body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;line-height:1.7}
a{color:var(--blue);text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
.wrap{width:min(calc(100% - 24px),1120px);margin:auto}
[hidden]{display:none!important}

.site-header{position:sticky;top:0;z-index:60;background:#fff;border-bottom:1px solid var(--line)}
.header-inner{min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand-block{display:flex;flex-direction:column;color:var(--text);min-width:0}
.brand{font-weight:900;font-size:15px;white-space:nowrap}
.sub{font-size:10px;color:var(--muted);white-space:nowrap}
.menu-toggle{border:0;background:transparent;font-size:28px;line-height:1;padding:6px 8px;color:var(--text)}
.global-nav{display:none;position:absolute;top:60px;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);box-shadow:var(--shadow);padding:8px 12px 14px}
.global-nav.open{display:flex;flex-direction:column}
.global-nav a{padding:13px 8px;border-bottom:1px solid var(--line);color:var(--text);font-weight:700}
.global-nav a:last-child{border-bottom:0}

.hero{background:linear-gradient(180deg,#fff,#edf4ff);padding:26px 0 22px}
.hero h1{margin:0 0 9px;font-size:clamp(28px,8vw,44px);line-height:1.2;letter-spacing:-.03em}
.hero p{margin:0 0 14px;color:var(--muted);font-size:14px}
.searchbar{display:grid;grid-template-columns:1fr;gap:9px}
.searchbar input{width:100%;min-height:54px;padding:0 15px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:16px}
.searchbar button{min-height:50px;border:0;border-radius:14px;background:var(--blue);color:#fff;font-weight:900}
.search-help{font-size:12px;color:var(--muted);margin-top:8px}

.mobile-controls{padding-top:14px}
.mobile-filter-btn{width:100%;min-height:46px;border:1px solid #cbdcf4;border-radius:12px;background:#fff;color:var(--blue);font-weight:900}
.type-switch-wrap{padding-top:10px}
.type-switch{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
.type-btn,.profile-type,.ranking-type{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--text);padding:8px 15px;font-weight:800}
.type-btn.active,.profile-type.active,.ranking-type.active{background:var(--blue);border-color:var(--blue);color:#fff}
.compact{flex-wrap:wrap}

.app-grid{display:block;padding:12px 0 30px}
.filters{display:none;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:15px;margin-bottom:12px;box-shadow:var(--shadow)}
.filters.open{display:block}
.filter-head{display:flex;align-items:center;justify-content:space-between}
.filters h2{margin:0;font-size:18px}
.filter-close{border:0;background:transparent;color:var(--blue);font-weight:800}
.filters label{display:block;margin-top:11px;font-size:13px;font-weight:800}
.filters select{width:100%;min-height:46px;margin-top:4px;border:1px solid var(--line);border-radius:11px;background:#fff;padding:0 11px}
.secondary{width:100%;min-height:45px;margin-top:12px;border:0;border-radius:11px;background:var(--blue);color:#fff;font-weight:900}
.secondary.ghost{background:#fff;color:var(--text);border:1px solid var(--line);margin-top:8px}

.results{min-width:0}
.active-conditions{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.active-conditions span{font-size:12px;background:#fff;border:1px solid #cfddf0;border-radius:999px;padding:4px 9px}
.results-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 10px}
.results-head h2{margin:0;font-size:20px;display:inline-block;margin-right:8px}
#count{font-size:13px;color:var(--muted)}
#sort{min-height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 8px}

.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}
.muted-card{color:var(--muted)}
.meta{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:12px;color:var(--muted)}
.tag{background:var(--blue-soft);color:var(--blue);border-radius:999px;padding:3px 8px;font-weight:800}
.card h3{font-size:16px;line-height:1.5;margin:10px 0 4px}
.speaker-link{display:inline-block;color:var(--text);font-size:18px;font-weight:900;margin-bottom:8px}
.excerpt{white-space:pre-wrap;font-size:15px;line-height:1.9;overflow-wrap:anywhere}
mark{background:#fff0a6;padding:0 .05em}
.card-footer{display:flex;flex-direction:column;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.chars{font-size:12px;color:var(--muted)}
.actions{display:grid;grid-template-columns:1fr;gap:8px}
.context-btn,.source{min-height:46px;border-radius:11px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:900}
.context-btn{border:1px solid #cbdcf4;background:#fff;color:var(--blue)}
.source{background:var(--blue);color:#fff;padding:8px 12px}

.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0}
.pager button{min-width:88px;min-height:44px;border:1px solid var(--line);border-radius:11px;background:#fff}
.pager button:disabled{opacity:.45}

.modal{position:fixed;inset:0;background:rgba(7,14,26,.58);z-index:100;display:flex;align-items:flex-end}
.modal-box{position:relative;width:100%;max-height:86vh;overflow:auto;background:#fff;border-radius:20px 20px 0 0;padding:18px}
.close{position:absolute;right:12px;top:10px;width:40px;height:40px;border:0;border-radius:50%;background:#eef2f7;font-size:25px}
.context-item{padding:14px 0;border-bottom:1px solid var(--line)}
.context-item.current{background:#f1f6ff;margin:0 -8px;padding:14px 8px}
.context-speaker{font-weight:900}
.context-text{font-size:14px;white-space:pre-wrap;margin-top:6px}

.loader{position:fixed;inset:0;z-index:200;background:rgba(245,248,252,.94);display:flex;align-items:center;justify-content:center;padding:24px}
.loader-card{width:min(100%,420px);background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:0 18px 45px rgba(30,52,82,.12);text-align:center}
.spinner{width:36px;height:36px;margin:0 auto 13px;border:4px solid #dce7f5;border-top-color:var(--blue);border-radius:50%;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.progress-track{height:8px;background:#eaf0f6;border-radius:999px;overflow:hidden;margin:14px 0 8px}
.progress-bar{height:100%;width:0;background:var(--blue);border-radius:999px;transition:width .18s ease}
.progress-bar.indeterminate{width:35%!important;animation:slide 1.2s ease-in-out infinite}
@keyframes slide{0%{transform:translateX(-120%)}100%{transform:translateX(330%)}}
.loader-text{font-size:13px;color:var(--muted)}

.standalone-page,.speaker-page{padding:24px 0 36px}
.page-title{margin-bottom:16px}
.eyebrow{font-size:12px;letter-spacing:.14em;color:var(--blue);font-weight:900}
.page-title h1,.speaker-main-name{font-size:clamp(30px,8vw,46px);line-height:1.2;margin:4px 0 8px}
.page-title p,.speaker-title-card p{color:var(--muted);margin:0}
.panel,.speaker-title-card,.kpi{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel{padding:16px;margin-bottom:12px}
.panel h2{margin:0 0 10px;font-size:19px}
.prose h2{margin-top:24px}
.prose h2:first-child{margin-top:0}
.prose p{color:#42536b}
.note{font-size:13px;color:var(--muted);background:#f7f9fc;border-radius:12px;padding:12px}
.small-muted{font-size:13px;color:var(--muted)}

.ranking-controls{display:grid;gap:12px}
.ranking-controls label{font-weight:800}
.ranking-controls select{width:100%;min-height:46px;margin-top:5px;border:1px solid var(--line);border-radius:11px;background:#fff;padding:0 10px}
.table-wrap{overflow:auto}
.ranking-table{width:100%;border-collapse:collapse;min-width:520px}
.ranking-table th,.ranking-table td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left}
.ranking-table th:nth-child(2),.ranking-table td:nth-child(2),.ranking-table th:nth-child(3),.ranking-table td:nth-child(3){text-align:right}
.ranking-table tbody tr:hover{background:#f8fbff}

.speaker-title-card{padding:18px;margin-bottom:12px}
.speaker-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.kpi{padding:14px}
.kpi span{display:block;font-size:12px;color:var(--muted)}
.kpi strong{display:block;font-size:23px;margin-top:3px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.year-chart{display:flex;align-items:flex-end;gap:12px;overflow-x:auto;min-height:220px;padding:12px 2px}
.year-col{min-width:48px;text-align:center}
.year-value,.year-label{font-size:11px}
.year-bar-wrap{height:150px;display:flex;align-items:flex-end;justify-content:center}
.year-bar{width:28px;background:var(--blue);border-radius:6px 6px 0 0}
.speaker-grid{display:grid;gap:12px}
.bar-row{display:grid;grid-template-columns:72px 1fr 72px;gap:8px;align-items:center;margin:9px 0;font-size:12px}
.bar-track{height:9px;background:#edf1f6;border-radius:999px;overflow:hidden}
.bar-fill{height:100%;background:var(--blue)}
.bar-value{text-align:right}
.speech-row{padding:14px 0;border-bottom:1px solid var(--line)}
.speech-meta{font-size:12px;color:var(--muted)}
.speech-text{white-space:pre-wrap;font-size:14px;line-height:1.85;margin-top:6px}
.speech-actions{margin-top:8px}

footer{background:#14233b;color:#fff;padding:18px 0;font-size:12px}
.footer-inner{display:flex;flex-direction:column;gap:4px}
footer a{color:#fff;text-decoration:underline}

@media(min-width:900px){
  .wrap{width:min(calc(100% - 48px),1120px)}
  .menu-toggle{display:none}
  .global-nav{display:flex!important;position:static;box-shadow:none;border:0;padding:0;gap:22px;background:transparent}
  .global-nav a{border:0;padding:8px 0;font-size:14px}
  .brand{font-size:17px}.sub{font-size:11px}
  .hero{padding:46px 0 34px}
  .searchbar{grid-template-columns:1fr 100px}
  .mobile-controls{display:none}
  .app-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:18px;align-items:start;padding-top:16px}
  .filters{display:block;position:sticky;top:78px;margin:0}
  .filter-close{display:none}
  .results-head{margin-top:0}
  .card{padding:19px}
  .card-footer{flex-direction:row;align-items:center;justify-content:space-between}
  .actions{grid-template-columns:auto auto}
  .modal{align-items:center;justify-content:center}
  .modal-box{width:min(900px,90vw);border-radius:18px;max-height:82vh}
  .ranking-controls{grid-template-columns:220px 1fr;align-items:end}
  .speaker-kpis{grid-template-columns:repeat(4,1fr)}
  .speaker-grid{grid-template-columns:1fr 1fr}
  .footer-inner{flex-direction:row;justify-content:space-between}
}


/* V5.3 */
.pc-tools{display:none}
.tool-btn{
  border:1px solid var(--line);background:#fff;color:var(--text);border-radius:10px;
  padding:8px 12px;font-weight:800;font-size:13px
}
.tools-row{display:flex;gap:8px;flex-wrap:wrap}
.tool-message{margin-top:8px;font-size:12px;color:var(--blue);font-weight:800}

.quote-btn{
  min-height:46px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  text-align:center;font-weight:900;border:1px solid var(--line);background:#fff;color:var(--text)
}
.desktop-modal{max-width:860px}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 18px}
.statbox{background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:12px}
.statbox span{display:block;font-size:12px;color:var(--muted)}
.statbox strong{font-size:24px}
.stat-line{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
.compare-controls{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end;margin-bottom:14px}
.compare-controls select{min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 10px}
.compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.compare-card{background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:14px}
.compare-card h3{margin-top:0}
.mini-banner-wrap{text-align:center;padding:14px 0 4px}
.mini-banner-link{display:inline-block}
.mini-banner-link img{display:block;width:150px;max-width:42vw;height:auto;border-radius:8px}

@media(min-width:900px){
  .pc-tools{display:block;padding-top:12px}
  .mini-banner-link img{width:200px;max-width:none}
  .actions{grid-template-columns:auto auto auto}
}

@media print{
  .site-header,.hero,.mobile-controls,.type-switch-wrap,.filters,.pc-tools,.pager,
  .context-btn,.quote-btn,.source,.mini-banner-wrap,footer,#loader,.modal{display:none!important}
  body{background:#fff;color:#000}
  .wrap,.app-grid{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;display:block!important}
  .results-head{margin-bottom:12px}
  .card{box-shadow:none;border:0;border-bottom:1px solid #bbb;border-radius:0;padding:12px 0;break-inside:avoid}
  .excerpt{font-size:11pt;line-height:1.65}
  .speaker-link{color:#000}
  .card:after{content:"公式会議録: " attr(data-source);display:block;font-size:9pt;color:#444;margin-top:6px}
}


/* V5.4 speech detail */
.excerpt-link{
  display:block;
  color:var(--text);
  text-decoration:none;
}
.excerpt-link:hover{
  background:#f8fbff;
  border-radius:8px;
}
.speech-open-btn,
.record-print-btn,
.record-pdf-btn{
  min-height:46px;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:900;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:8px 12px;
}
.pc-only{display:none}
.speech-detail-card h2{margin:10px 0 4px}
.speech-detail-text{
  white-space:pre-wrap;
  font-size:16px;
  line-height:1.95;
  overflow-wrap:anywhere;
  margin-top:10px;
}
.speech-detail-meta{margin-top:12px;color:var(--muted);font-size:13px}
.detail-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.context-link{
  display:block;
  color:var(--text);
  text-decoration:none;
}
.context-link:hover{background:#f8fbff}
@media(min-width:900px){
  .pc-only{display:flex}
  .detail-actions{display:flex;flex-wrap:wrap}
  .speech-detail-page{max-width:920px}
  .actions{grid-template-columns:repeat(6,auto)}
}
@media print{
  .speech-detail-page .page-title,
  .speech-detail-actions,
  .speech-detail-page > .panel:last-of-type,
  .site-header,.mini-banner-wrap,footer,#loader{display:none!important}
  .speech-detail-page{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .speech-detail-card{
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
  }
  .speech-detail-text{font-size:12pt;line-height:1.7}
  .speech-detail-card:before{
    content:"舞鶴市議会 会議録検索";
    display:block;
    font-size:16pt;
    font-weight:700;
    margin-bottom:16px;
  }
}

/* V5.4.1 */
.speech-open-btn{cursor:pointer}


/* V5.4.2 */
.brand-block{
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  gap:10px;
}
.header-logo{
  width:44px;
  height:44px;
  border-radius:10px;
  object-fit:cover;
  flex:0 0 auto;
}
.brand-copy{display:flex;flex-direction:column;min-width:0}
.meeting-link{color:var(--text);text-decoration:none}
.meeting-link:hover{color:var(--blue);text-decoration:underline}
.meeting-tools{margin-bottom:12px}
.meeting-speech{padding:16px 0;border-bottom:1px solid var(--line)}
.meeting-speech:last-child{border-bottom:0}
.meeting-speech-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.meeting-order{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:50%;background:var(--blue-soft);color:var(--blue);font-size:12px;font-weight:900
}
.meeting-speech-text{
  display:block;color:var(--text);white-space:pre-wrap;font-size:15px;line-height:1.9;
  margin:8px 0;text-decoration:none
}
.meeting-speech-text:hover{background:#f8fbff;border-radius:8px}
.meeting-row-actions{display:flex;gap:8px;flex-wrap:wrap}
.meeting-row-actions .quote-btn,.meeting-row-actions .source{min-height:40px;padding:6px 10px}
@media(max-width:899px){
  .header-logo{width:38px;height:38px;border-radius:9px}
  .brand{font-size:14px}
  .sub{font-size:9px}
}
@media print{
  .meeting-tools,.meeting-row-actions,.site-header,.mini-banner-wrap,footer,#loader{display:none!important}
  .meeting-page{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .meeting-page .panel{border:0!important;box-shadow:none!important;padding:0!important}
  .meeting-speech{break-inside:avoid}
  .meeting-speech-text{font-size:11pt;line-height:1.65}
}


/* ===== V5.5 approved visual design ===== */
.header-inner{min-height:74px}
.header-logo{
  width:76px;
  height:58px;
  object-fit:contain;
  border-radius:0;
  background:#fff;
}
.brand{font-size:20px}
.sub{font-size:12px;font-weight:700;color:#415570}
.global-nav a{font-weight:800}

.hero-photo{
  position:relative;
  min-height:470px;
  padding:0;
  background:url('hero-akarennga.jpg') center center / cover no-repeat;
  display:flex;
  align-items:center;
}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(245,250,255,.50) 0%,rgba(245,250,255,.30) 40%,rgba(10,34,65,.12) 100%);
}
.hero-content{
  position:relative;
  z-index:2;
  padding-top:40px;
  padding-bottom:48px;
  text-align:center;
}
.hero-copy{
  max-width:850px;
  margin:0 auto 20px;
}
.hero-photo h1{
  margin:0 0 12px;
  font-size:clamp(38px,5vw,66px);
  line-height:1.12;
  letter-spacing:-.035em;
  color:#0e2b54;
  text-shadow:0 2px 8px rgba(255,255,255,.85);
}
.hero-photo p{
  margin:0;
  font-size:clamp(16px,2vw,22px);
  color:#16355d;
  font-weight:800;
  line-height:1.65;
  text-shadow:0 1px 5px rgba(255,255,255,.95);
}
.hero-search{
  position:relative;
  max-width:900px;
  margin:0 auto;
  grid-template-columns:1fr 118px;
  gap:0;
  background:#fff;
  border-radius:999px;
  overflow:hidden;
  border:2px solid rgba(20,54,91,.24);
  box-shadow:0 12px 30px rgba(15,43,79,.16);
}
.hero-search .search-icon{
  position:absolute;
  left:22px;
  top:50%;
  transform:translateY(-50%);
  font-size:30px;
  color:#6b7889;
  z-index:2;
}
.hero-search input{
  min-height:64px;
  border:0;
  border-radius:0;
  padding-left:60px;
  font-size:18px;
}
.hero-search button{
  min-height:64px;
  border-radius:0;
  font-size:18px;
  background:#123f73;
}
.hero-photo .search-help{
  margin:10px auto 0;
  display:inline-block;
  background:rgba(255,255,255,.88);
  border-radius:999px;
  padding:5px 12px;
  color:#43536a;
  font-size:12px;
}

.quick-links{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-top:-18px;
  position:relative;
  z-index:5;
}
.quick-card{
  min-height:108px;
  padding:14px 12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(26,50,82,.10);
  color:var(--text);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.quick-button{width:100%;font:inherit}
.quick-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(26,50,82,.14)}
.quick-icon{
  width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#0e3a70;background:#edf4ff;
  font-size:22px;font-weight:900;margin-bottom:5px
}
.quick-card strong{font-size:16px}
.quick-card small{font-size:11px;color:var(--muted);margin-top:2px}
.mobile-br{display:none}

@media(max-width:899px){
  .header-inner{min-height:64px}
  .header-logo{width:58px;height:48px}
  .brand{font-size:15px}
  .sub{font-size:9px}
  .hero-photo{min-height:410px;background-position:center center}
  .hero-content{padding-top:34px;padding-bottom:56px}
  .hero-photo h1{font-size:clamp(30px,8.5vw,42px)}
  .hero-photo p{font-size:14px}
  .mobile-br{display:block}
  .hero-search{
    grid-template-columns:1fr 82px;
    border-radius:18px;
  }
  .hero-search input{
    min-height:56px;
    font-size:15px;
    padding-left:44px;
  }
  .hero-search .search-icon{left:14px;font-size:24px}
  .hero-search button{min-height:56px;font-size:15px}
  .hero-photo .search-help{
    display:block;
    border-radius:12px;
    font-size:11px;
  }
  .quick-links{
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:-28px;
  }
  .quick-card{min-height:102px}
}

@media(max-width:520px){
  .hero-photo{
    min-height:420px;
    background-position:center center;
  }
  .quick-links{margin-top:-22px}
}

@media print{
  .quick-links{display:none!important}
}


/* ===== V5.5.1 logo/header balance ===== */
.header-inner{
  min-height:92px;
}
.brand-block{
  gap:14px;
  align-items:center;
}
.header-logo{
  width:118px;
  height:78px;
  object-fit:contain;
  border-radius:0;
  background:#fff;
  flex:0 0 auto;
}
.brand-copy{
  justify-content:center;
}
.brand{
  font-size:21px;
  line-height:1.25;
}
.sub{
  font-size:12px;
  margin-top:3px;
}

@media(max-width:899px){
  .header-inner{
    min-height:72px;
  }
  .brand-block{
    gap:9px;
  }
  .header-logo{
    width:76px;
    height:56px;
  }
  .brand{
    font-size:14px;
    line-height:1.2;
  }
  .sub{
    font-size:9px;
    margin-top:2px;
  }
  .menu-toggle{
    flex:0 0 auto;
  }
}

@media(max-width:430px){
  .header-logo{
    width:68px;
    height:50px;
  }
  .brand{
    font-size:13px;
  }
  .sub{
    font-size:8px;
  }
}

/* ranking warning emphasis */
.ranking-table + .note,
.panel .note{
  line-height:1.7;
}
.panel .note strong{
  color:#243b5a;
}


/* ===== V5.5.2 adopted brand logo ===== */
.header-logo{
  width:240px;
  height:auto;
  max-height:74px;
  object-fit:contain;
  object-position:left center;
  background:transparent;
  border-radius:0;
  flex:0 0 auto;
}
.brand-copy{
  display:none;
}
.brand-block{
  gap:0;
}
@media(max-width:899px){
  .header-logo{
    width:150px;
    height:auto;
    max-height:56px;
  }
}
@media(max-width:430px){
  .header-logo{
    width:138px;
    max-height:52px;
  }
}


/* ===== V5.5.3 header correction ===== */
.header-inner{
  min-height:82px;
}
.brand-block{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0;
}
.header-logo{
  width:66px!important;
  height:66px!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:10px!important;
  background:#fff!important;
  flex:0 0 66px!important;
}
.brand-copy{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:0;
}
.brand{
  display:block!important;
  font-size:20px!important;
  font-weight:900!important;
  line-height:1.25!important;
  color:var(--text)!important;
  white-space:nowrap;
}
.sub{
  display:block!important;
  font-size:11px!important;
  color:var(--muted)!important;
  margin-top:3px!important;
  white-space:nowrap;
}
@media(max-width:899px){
  .header-inner{
    min-height:66px;
  }
  .brand-block{
    gap:8px!important;
  }
  .header-logo{
    width:48px!important;
    height:48px!important;
    flex-basis:48px!important;
    border-radius:8px!important;
  }
  .brand{
    font-size:14px!important;
  }
  .sub{
    font-size:9px!important;
    margin-top:2px!important;
  }
}
@media(max-width:430px){
  .header-logo{
    width:44px!important;
    height:44px!important;
    flex-basis:44px!important;
  }
  .brand{
    font-size:13px!important;
  }
  .sub{
    font-size:8px!important;
  }
}


/* ===== V6.7.4 final usability adjustments ===== */
.results-head{position:relative}
.results-caution{
  grid-column:1/-1;
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
.pager[hidden]{display:none!important}

.site-footer{
  margin-top:26px;
  border-top:1px solid var(--line);
  background:#fff;
}
.footer-details{
  padding-top:18px;
  padding-bottom:18px;
  line-height:1.75;
}
.footer-details a{word-break:break-all}
.footer-meta{color:var(--muted)}

@media(min-width:900px){
  .footer-details{
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    gap:28px;
  }
  .footer-meta{text-align:right}
}

@media(max-width:899px){
  .ranking-notice{
    margin:12px 0 14px!important;
    padding:12px 13px!important;
    line-height:1.65!important;
    font-size:13px;
  }
  .table-wrap{
    overflow:visible;
  }
  .ranking-table{
    min-width:0!important;
    width:100%!important;
    table-layout:fixed;
    font-size:12px;
  }
  .ranking-table th,
  .ranking-table td{
    padding:9px 4px!important;
    vertical-align:top;
  }
  .ranking-table th:nth-child(1),
  .ranking-table td:nth-child(1){
    width:44%;
    word-break:break-word;
  }
  .ranking-table th:nth-child(2),
  .ranking-table td:nth-child(2){
    width:34%;
    white-space:nowrap;
    font-size:11.5px;
  }
  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3){
    width:22%;
    white-space:nowrap;
    font-size:11.5px;
  }
  .footer-details{
    display:block!important;
    font-size:12px;
  }
  .footer-meta{
    margin-top:10px;
    text-align:left;
  }
  .results-caution{
    font-size:11px;
  }
}


/* ===== V6.7.6 hero title line-break fix ===== */
.hero-title-line{
  display:block;
}
@media(min-width:900px){
  .hero h1 .hero-title-line{
    white-space:nowrap;
  }
}
@media(max-width:899px){
  .hero h1 .hero-title-line{
    white-space:normal;
  }
}


/* ===== V6.7.8 councilor speech count ===== */
.councilor-ranking-link-wrap{margin-top:14px;margin-bottom:18px}
.councilor-ranking-link{
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  box-shadow:0 5px 18px rgba(20,35,59,.06);
}
.councilor-ranking-link:hover{transform:translateY(-1px)}
.councilor-ranking-link-icon{
  display:grid;
  place-items:center;
  width:42px;height:42px;
  border-radius:10px;
  background:#f4f6f8;
  font-size:22px;
  flex:0 0 auto;
}
.councilor-ranking-link span:nth-child(2){display:flex;flex-direction:column;gap:3px}
.councilor-ranking-link strong{font-size:17px}
.councilor-ranking-link small{color:var(--muted);font-size:12px}
.councilor-ranking-arrow{margin-left:auto;font-size:22px;font-weight:700}

.councilor-count-page{max-width:980px}
.councilor-count-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin-bottom:30px;
}
.councilor-count-summary>div{
  display:flex;
  flex-direction:column;
  gap:5px;
}
.councilor-count-section{margin:34px 0}
.councilor-count-heading{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.councilor-count-heading h2{margin:0 0 3px;font-size:24px}
.councilor-count-heading p{margin:0;color:var(--muted);font-size:13px}
.count-badge{
  display:grid;place-items:center;
  width:42px;height:42px;border-radius:50%;
  background:#14233b;color:#fff;font-weight:800;
}
.count-badge.subdued{background:#e9edf2;color:#14233b}
.councilor-count-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.councilor-count-card{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:18px;
  box-shadow:0 5px 18px rgba(20,35,59,.05);
}
.councilor-count-name{
  font-size:20px;
  font-weight:800;
  margin-bottom:10px;
}
.councilor-count-total{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:14px;
}
.councilor-count-total strong{font-size:28px}
.councilor-count-total span{color:var(--muted);font-size:12px}
.councilor-year-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  margin:0 0 14px;
  font-size:12px;
}
.councilor-year-table th,.councilor-year-table td{
  border:1px solid var(--line);
  padding:6px 3px;
  text-align:center;
}
.councilor-year-table th{background:#f7f8fa;font-weight:700}
.councilor-detail-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:40px;
  border-radius:9px;
  background:#f2f5f8;
  color:#14233b;
  font-weight:700;
  text-decoration:none;
}
.councilor-count-footnote{line-height:1.8;margin-top:28px}

@media(max-width:899px){
  .councilor-ranking-link{padding:14px}
  .councilor-ranking-link strong{font-size:16px}
  .councilor-ranking-link small{font-size:11px;line-height:1.5}
  .councilor-count-summary{grid-template-columns:1fr;gap:10px}
  .councilor-count-summary>div{
    padding-bottom:9px;
    border-bottom:1px solid var(--line);
  }
  .councilor-count-grid{grid-template-columns:1fr}
  .councilor-count-card{padding:16px}
  .councilor-count-name{font-size:18px}
  .councilor-count-total strong{font-size:26px}
  .councilor-count-heading h2{font-size:20px}
}


/* ===== V6.7.9 councilor data: character count primary ===== */
.councilor-sort-panel{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
}
.councilor-sort-panel select{
  min-width:220px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.councilor-count-total-primary strong{
  font-size:27px;
}
.councilor-year-table small{
  color:var(--muted);
  font-size:10px;
}
@media(max-width:899px){
  .councilor-sort-panel{
    display:block;
  }
  .councilor-sort-panel label{
    display:block;
    margin-bottom:6px;
  }
  .councilor-sort-panel select{
    width:100%;
    min-width:0;
  }
}


/* ===== V6.8.0 reference data box ===== */
.reference-data-box{
  margin:18px 0 24px;
  padding:18px 20px;
  border:2px solid #14233b;
  border-radius:14px;
  background:#f7f9fc;
  box-shadow:0 6px 18px rgba(20,35,59,.07);
}
.reference-data-label{
  display:inline-block;
  margin-bottom:8px;
  padding:4px 10px;
  border-radius:999px;
  background:#14233b;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
}
.reference-data-box p{
  margin:0;
  line-height:1.85;
  font-size:16px;
}
.reference-data-box strong{
  font-size:1.15em;
}
@media(max-width:899px){
  .reference-data-box{
    margin:14px 0 20px;
    padding:15px 16px;
  }
  .reference-data-box p{
    font-size:14px;
    line-height:1.8;
  }
}
