/* Town of Acton Public Document Center */

:root {
  --navy: #153b5c;
  --navy-dark: #0d2a42;
  --navy-soft: #edf4f8;
  --green: #54765b;
  --green-dark: #3d5b43;
  --cream: #f5f3ed;
  --paper: #ffffff;
  --ink: #1d2933;
  --muted: #687681;
  --line: #dbe1e5;
  --line-soft: #edf0f2;
  --focus: #f2b441;
  --shadow: 0 8px 24px rgba(17, 42, 61, .08);
  --radius: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

button, input, select { font: inherit; }

a { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #000;
  background: #fff;
  border-radius: 6px;
}

.skip-link:focus { left: 8px; }

.utility-bar {
  color: #fff;
  background: var(--navy-dark);
  font-size: .9rem;
}

.utility-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.utility-inner nav {
  display: flex;
  gap: 20px;
}

.utility-inner a {
  color: #fff;
  text-decoration: none;
}

.utility-inner a:hover { text-decoration: underline; }

.brand-bar {
  color: #fff;
  background: var(--navy);
  border-bottom: 5px solid var(--green);
}

.brand-inner {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.seal {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.town-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
}

.town-state {
  margin-top: 5px;
  font-size: .95rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .9;
}

.header-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 7px;
  color: #fff;
  text-decoration: none;
}

.header-link:hover { background: rgba(255,255,255,.10); }

.hero {
  color: #fff;
  background: linear-gradient(120deg, #0d2a42, #153b5c);
}

.hero-inner {
  padding: 46px 0 64px;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 3.9rem);
  line-height: 1.05;
}

.eyebrow,
.folder-label {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-eyebrow { color: #d8e8d6; }

.intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 1.12rem;
}

.content-section {
  padding: 0 0 70px;
  background: linear-gradient(var(--cream) 0 150px, #fff 150px 100%);
}

.search-card {
  position: relative;
  top: -28px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-dark);
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #aeb8c0;
  border-radius: 7px;
  font-size: 1rem;
}

.search-clear {
  min-width: 84px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.search-clear:hover { background: var(--navy-dark); }

.search-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 18px;
  padding: 9px 12px;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.breadcrumb-link {
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  color: var(--navy);
  background: transparent;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}

.breadcrumb-link:hover { background: var(--navy-soft); }

.breadcrumb-current {
  padding: 4px 6px;
  color: #44515b;
  font-size: .9rem;
  font-weight: 700;
}

.breadcrumb-separator {
  color: #9aa4ac;
}

.folder-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 26px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.folder-header h2 {
  margin: 0;
  color: var(--navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.item-summary {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}

.folder-header-actions {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-controls[hidden] {
  display: none;
}

.sort-controls label {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.sort-controls select {
  min-height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid #aeb8c0;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.section-title {
  margin: 0;
  color: var(--navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.folder-section { margin-bottom: 32px; }

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.folder-card {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 3px 12px rgba(17, 42, 61, .04);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.folder-card:hover {
  transform: translateY(-1px);
  border-color: #afc0cb;
  box-shadow: var(--shadow);
}

.folder-card-text strong {
  display: block;
  color: var(--navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.folder-card-text span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
}

.folder-arrow {
  color: var(--green-dark);
  font-size: 1.65rem;
  line-height: 1;
}

.files-section { margin-top: 10px; }

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-count {
  color: var(--muted);
  font-size: .88rem;
}

.file-table {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(17, 42, 61, .04);
}

.file-table-header,
.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 95px 70px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.file-table-header {
  background: #f6f8f9;
  border-bottom: 1px solid var(--line);
  color: #65727d;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.file-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.file-row:last-child { border-bottom: 0; }

.file-row:hover { background: #f9fbfc; }

.file-row:hover .file-name {
  color: var(--navy-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-name {
  min-width: 0;
  color: var(--navy);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.file-meta {
  color: var(--muted);
  font-size: .88rem;
}

.file-open {
  color: var(--green-dark);
  font-size: .82rem;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.status-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}

.status-error { border-left: 5px solid #9b2f2f; }

.help-section { padding: 0 0 70px; }

.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  background: var(--cream);
  border-left: 6px solid var(--green);
  border-radius: var(--radius);
}

.help-card h2 {
  margin: 0;
  color: var(--navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.help-card p:not(.eyebrow) { margin-bottom: 0; }

.button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button.secondary {
  color: #fff;
  background: var(--green-dark);
}

.site-footer {
  color: #fff;
  background: var(--navy-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 36px 0 26px;
}

.footer-grid p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.82);
}

.footer-grid a { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.72);
  font-size: .88rem;
}

@media (max-width: 800px) {
  .folder-grid { grid-template-columns: 1fr; }
  .header-actions { display: none; }
  .footer-grid { grid-template-columns: 1fr; }

  .file-table-header { display: none; }

  .file-row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 15px;
  }

  .file-name { grid-column: 1; }
  .file-open { grid-column: 2; grid-row: 1; }
  .file-meta { grid-column: 1; }

  .file-meta + .file-meta::before {
    content: " · ";
  }
}

@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }

  .utility-inner {
    padding: 7px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .brand-inner { min-height: 94px; }
  .seal { width: 58px; height: 58px; }

  .search-row { grid-template-columns: 1fr; }

  .folder-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .item-summary { white-space: normal; }

  .folder-header-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .sort-controls {
    width: 100%;
    justify-content: space-between;
  }

  .sort-controls select {
    min-width: 190px;
  }

  .help-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-bottom { flex-direction: column; }
}


/* Repository-wide search results */
.search-result-table .file-table-header,
.search-result-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr) 135px 70px;
}

.search-result-location {
  min-width: 0;
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.search-folder-card .folder-card-text span {
  max-width: 720px;
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .search-result-table .file-table-header {
    display: none;
  }

  .search-result-row {
    grid-template-columns: 1fr auto;
  }

  .search-result-row .file-name {
    grid-column: 1;
    grid-row: 1;
  }

  .search-result-row .file-open {
    grid-column: 2;
    grid-row: 1;
  }

  .search-result-row .search-result-location {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .search-result-row .file-meta {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}


/* 2026 standalone portal visual refresh — presentation only.
   Existing browse/search/preview JavaScript is intentionally unchanged. */
:root {
  --navy: #173c5b;
  --navy-dark: #102e47;
  --navy-soft: #eef4f7;
  --green: #58765b;
  --green-dark: #405f46;
  --cream: #f5f6f4;
  --ink: #243340;
  --muted: #60717c;
  --line: #dae3e7;
  --line-soft: #eaf0f2;
  --radius: 10px;
  --max: 1200px;
}
body { background: #f9fbfc; }
.brand-bar { border-bottom: 3px solid #729175; }
.brand-inner { min-height: 96px; }
.seal { width: 68px; height: 68px; }
.town-name { font-size: clamp(1.5rem, 3vw, 1.95rem); }
.town-state { font-size: .76rem; letter-spacing: .12em; }
.brand-divider { padding: 0 .45em; opacity: .65; }
.header-link { font-size: .9rem; font-weight: 700; }
.hero { background: linear-gradient(105deg, #153850 0%, #1b4663 65%, #325c67 100%); }
.hero-inner { padding: 38px 0 68px; }
.hero-kicker { margin: 0 0 8px; color: #cfdfd5; font-size: .74rem; font-weight: 800; letter-spacing: .17em; }
.hero h1 { font-size: clamp(2.15rem, 4.2vw, 3.3rem); letter-spacing: -.025em; }
.intro { margin-top: 12px; font-size: 1.04rem; }
.content-section { background: linear-gradient(#f3f7f7 0 125px, #f9fbfc 125px 100%); padding-bottom: 52px; }
.search-card { top: -32px; padding: 24px 28px; border-radius: 11px; box-shadow: 0 9px 30px rgba(12,42,62,.1); }
.search-card-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; }
.search-card-heading label { margin: 0; }
.search-card-mark { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; color: var(--navy); background: var(--navy-soft); font-size: 1.5rem; line-height: 1; }
.search-row input { min-height: 50px; border-color: #b8c7ce; }
.search-row input:focus { border-color: var(--navy); }
.search-clear { min-width: 92px; }
.breadcrumb-bar { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 12px; margin-top: -5px; }
.folder-header { margin-bottom: 22px; }
.folder-header h2 { font-size: clamp(1.7rem, 3vw, 2.15rem); }
.folder-grid { gap: 12px; }
.folder-card { min-height: 82px; padding: 16px 20px; border-radius: 9px; box-shadow: 0 1px 4px rgba(12,42,62,.035); }
.folder-card:hover { border-color: #8bab99; box-shadow: 0 6px 18px rgba(12,42,62,.085); }
.file-table { box-shadow: 0 1px 8px rgba(12,42,62,.04); }
.file-table-header { background: #edf3f5; }
.file-row:hover { background: #f1f7f6; }
.file-open { color: #42694c; }
.help-section { padding-bottom: 52px; background: #f9fbfc; }
.help-card { background: #edf3ee; border-left-width: 4px; }
.site-footer { background: #102e47; }
@media(max-width:800px) { .header-actions { display: block; } .brand-inner { gap: 12px; } .header-link { padding: 8px; font-size: .76rem; } }
@media(max-width:560px) {
  .brand-inner { flex-wrap: wrap; padding: 14px 0; }
  .brand { gap: 10px; }
  .town-name { font-size: 1.4rem; }
  .town-state { font-size: .64rem; letter-spacing: .04em; }
  .header-actions { width: 100%; }
  .header-link { display: inline-block; }
  .hero-inner { padding: 30px 0 60px; }
  .search-card { padding: 18px; }
}


/* ----------------------------------------------------------
   ACTON PORTAL V2 — prominent civic branding, airy document UI
   All additions are presentation-only; API and application JS untouched.
   ---------------------------------------------------------- */
:root {
  --navy: #244e70;
  --navy-dark: #17344d;
  --navy-soft: #eaf2f8;
  --green: #bd9247;
  --green-dark: #876528;
  --cream: #f4f6f8;
  --paper: #ffffff;
  --ink: #233445;
  --muted: #586d7c;
  --line: #d5dfe7;
  --line-soft: #eaf0f4;
  --focus: #e9af35;
  --shadow: 0 10px 32px rgba(16, 49, 72, .10);
  --radius: 14px;
  --max: 1240px;
}
body { background: #f4f7f9; }
.site-header { background: #fff; box-shadow: 0 2px 12px rgba(22,48,71,.08); position: relative; z-index: 2; }
.brand-bar { background: #fff; border-bottom: 4px solid #b99350; color: #17344d; }
.brand-inner { min-height: 126px; }
.brand { gap: 22px; }
.seal { width: 90px; height: 90px; object-fit: contain; background: #fff; padding: 3px; }
.town-name { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.9rem,3.3vw,2.6rem); color: #17344d; line-height: 1.06; }
.town-state { color: #4c687c; font-family: 'Segoe UI',Arial,sans-serif; font-weight: 700; letter-spacing: .11em; font-size: .79rem; opacity: 1; margin-top: 10px; }
.header-link { color: #17344d; border: 1px solid #bacbd7; background: #f5f9fc; font-weight: 700; border-radius: 7px; padding: 12px 18px; }
.header-link:hover { background: #eaf2f8; }
.hero { color: #fff; background: linear-gradient(120deg, #17344d 0%, #2e6080 72%, #406f89 100%); border-bottom: 0; }
.hero-inner { padding: 56px 0 106px; }
.hero-kicker { color: #e4c483 !important; font-weight: 800; letter-spacing: .16em; font-size: 1.05rem; margin: 0 0 13px; }
.hero h1 { font-family: Georgia,'Times New Roman',serif; font-size: clamp(2.9rem,5.2vw,4.8rem); line-height: 1.07; letter-spacing: -.025em; }
.intro { font-size: 1.12rem; margin-top: 19px; max-width: 660px; color: #e7f0f5; }
.content-section { padding: 0 0 70px; background: #f4f7f9; }
.search-card { top: -54px; margin-bottom: -24px; padding: 28px 30px 24px; border: 1px solid #d4dfe7; border-top: 5px solid #bd9247; border-radius: 14px; box-shadow: 0 17px 42px rgba(18,48,69,.17); }
.search-card label { font-size: 1.12rem; }
.search-card-mark { background: #eaf2f8 !important; color: #214c6f !important; border: 1px solid #c8d8e4; }
.search-row { gap: 12px; }
.search-row input { min-height: 58px; border-radius: 8px; border: 2px solid #c5d6e2; font-size: 1.06rem; padding: 0 19px; background: #fff; }
.search-row input:focus { border-color: #2c6487; }
.search-clear { background: #244e70; min-width: 112px; border-radius: 8px; }
.search-note { margin-top: 12px; }
.breadcrumb-bar { background: transparent; border: 0; border-bottom: 1px solid #d6e1e9; border-radius: 0; padding: 10px 0 16px; margin-bottom: 26px; }
.breadcrumb-link { color: #1b567c; }
.folder-header { margin-bottom: 25px; border-color: #d5dfe7; }
.folder-header h2 { color: #17344d; font-size: clamp(1.9rem,3vw,2.45rem); }
.section-title { color: #17344d; font-size: 1.42rem; margin-bottom: 7px; }
.folder-grid { gap: 18px; }
.folder-card { min-height: 106px; background: #fff; padding: 21px 23px; border: 1px solid #d9e3ea; border-left: 4px solid #b99350; border-radius: 9px; box-shadow: 0 3px 13px rgba(23,52,77,.055); }
.folder-card:hover { border-color: #bbcedd; border-left-color: #214e70; background: #fafeff; box-shadow: 0 8px 22px rgba(18,48,70,.12); }
.folder-card-text strong { font-family: 'Segoe UI',Arial,sans-serif; font-size: 1.1rem; color: #214e70; }
.folder-arrow { color: #ae8240; font-size: 1.8rem; }
.file-table { border-radius: 9px; border-color: #d6e2ea; box-shadow: 0 3px 15px rgba(22,49,70,.05); }
.file-table-header { background: #eaf1f6; color: #33566e; }
.file-row { min-height: 64px; }
.file-row:nth-of-type(odd) { background: #fcfdfe; }
.file-row:hover { background: #eef5fa; }
.file-name { color: #1e577d; }
.file-open { color: #1e577d; }
.sort-controls select { border-color: #c1d1db; background: #fff; }
.help-section { background: #f4f7f9; padding-bottom: 65px; }
.help-card { background: #e8f0f5; border-left: 5px solid #bd9247; border-radius: 10px; }
.help-card h2 { color: #17344d; }
.button.secondary { background: #244e70; }
.site-footer { background: #17344d; border-top: 5px solid #bd9247; }
@media (max-width: 800px) {
  .brand-inner { min-height: 105px; }
  .seal { width: 68px; height: 68px; }
  .hero-inner { padding: 42px 0 86px; }
  .search-card { top: -40px; margin-bottom: -14px; }
}
@media (max-width: 560px) {
  .brand-inner { min-height: 90px; }
  .town-name { font-size: 1.64rem; }
  .town-state { letter-spacing: .035em; font-size: .67rem; }
  .seal { width: 56px; height: 56px; }
  .brand { gap: 12px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-inner { padding: 36px 0 80px; }
  .search-card { padding: 20px 18px; }
  .search-row input { min-height: 52px; }
  .search-clear { min-height: 46px; }
  .folder-card { min-height: 88px; }
}

/* V3: exact official Town of Acton wordmark provided by the Town */
.brand-inner { min-height: 116px; }
.brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.official-logo-link { display: inline-flex; flex: 0 1 auto; align-items: center; }
.official-logo { display: block; width: min(375px, 38vw); max-width: 100%; height: auto; object-fit: contain; }
.portal-brand-label { border-left: 1px solid #c6d3dc; padding-left: 20px; color: #17344d; font-size: 1.12rem; font-weight: 700; letter-spacing: .01em; }
@media (max-width: 900px) {
  .official-logo { width: min(325px, 45vw); }
  .portal-brand-label { font-size: 1rem; padding-left: 14px; }
}
@media (max-width: 640px) {
  .brand-inner { gap: 12px; min-height: 0; }
  .brand { width: 100%; flex-wrap: wrap; gap: 8px; }
  .official-logo { width: min(315px, 85vw); }
  .portal-brand-label { width: 100%; border-left: 0; padding-left: 0; font-size: .95rem; }
}
