:root {
  color-scheme: light;
  --forest-950: #102b25;
  --forest-900: #173f35;
  --forest-700: #286957;
  --forest-100: #dcebe4;
  --cream: #f7f5ee;
  --paper: #fffefa;
  --ink: #17211d;
  --muted: #66736d;
  --line: #dce3dd;
  --gold: #c49145;
  --red: #a23b35;
  --amber: #a1651e;
  --shadow: 0 18px 50px rgba(19, 48, 40, 0.11);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  width: 100%;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  background: var(--forest-950);
  color: white;
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.site-header {
  align-items: center;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid rgba(220, 227, 221, 0.9);
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  min-height: 74px;
  padding: 10px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  max-width: 100%;
  width: 100%;
}

.brand { align-items: center; display: flex; gap: 10px; min-width: 0; text-decoration: none; }
.brand img { height: 48px; width: 48px; }
.brand span { display: grid; font-family: "Libre Franklin", sans-serif; line-height: 1.05; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--forest-700); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }

nav { display: flex; gap: clamp(16px, 3vw, 36px); justify-content: center; }
nav a { color: #405049; font-size: 0.92rem; font-weight: 600; text-decoration: none; }
nav a:hover { color: var(--forest-700); }

#noticeNav.notice-nav-important,
#noticeNav.notice-nav-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#noticeNav.notice-nav-important::before,
#noticeNav.notice-nav-alert::before {
  content: "!";
  display: inline-grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

#noticeNav.notice-nav-important {
  color: #5f3b00;
  background: #fff2c2;
  border-color: #d99918;
  box-shadow: 0 0 0 0 rgba(217, 153, 24, 0.35);
  animation: noticeImportantPulse 3s ease-in-out infinite;
}

#noticeNav.notice-nav-important::before {
  color: #fff;
  background: #9a6400;
}

#noticeNav.notice-nav-alert {
  color: #fff;
  background: var(--red);
  border-color: #7d211d;
  box-shadow: 0 0 0 0 rgba(162, 59, 53, 0.48);
  animation: noticeEmergencyPulse 1.8s ease-in-out infinite;
}

#noticeNav.notice-nav-alert::before {
  color: var(--red);
  background: #fff;
}

#noticeNav.notice-nav-important:hover {
  color: #442900;
  background: #ffe79a;
}

#noticeNav.notice-nav-alert:hover {
  color: #fff;
  background: #842d28;
}

@keyframes noticeImportantPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 153, 24, 0.3); }
  50% { box-shadow: 0 0 0 7px rgba(217, 153, 24, 0); }
}

@keyframes noticeEmergencyPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(162, 59, 53, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(162, 59, 53, 0);
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  #noticeNav.notice-nav-important,
  #noticeNav.notice-nav-alert { animation: none; }
}

.account-actions { align-items: center; display: flex; gap: 10px; }
.account-name { color: var(--forest-700); font-size: 0.88rem; font-weight: 700; }

.priority-banner {
  border-bottom: 2px solid transparent;
  color: white;
  font-size: clamp(.86rem, 2.5vw, 1rem);
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.2;
  overflow: hidden;
  padding: 10px 0;
  text-transform: uppercase;
  white-space: nowrap;
  width: 100%;
}
.priority-banner.important { background: #9a6400; border-color: #f1c15d; }
.priority-banner.alert { background: var(--red); border-color: #f0aaa4; }
.priority-banner-text {
  display: inline-block;
  padding-left: 100%;
  will-change: transform;
  animation: priorityBannerScroll 11s linear infinite;
}
@keyframes priorityBannerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 43px;
  padding: 10px 18px;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--forest-900); color: white; box-shadow: 0 8px 24px rgba(23, 63, 53, 0.2); }
.button-primary:hover { background: var(--forest-700); }
.button-danger { background: var(--red); color: white; }
.button-danger:hover { background: #842f2a; }
.button-quiet { background: transparent; border-color: var(--line); color: var(--forest-900); }
.button-glass { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.42); color: white; }
.button-full { width: 100%; }
.button:disabled { cursor: wait; opacity: .65; transform: none; }

.hero { min-height: clamp(470px, 70vh, 680px); overflow: hidden; position: relative; }
.hero > img { height: 100%; inset: 0; object-fit: cover; object-position: center 48%; position: absolute; width: 100%; }
.hero-shade { background: linear-gradient(90deg, rgba(9, 31, 25, .9) 0%, rgba(9,31,25,.56) 48%, rgba(9,31,25,.12) 82%); inset: 0; position: absolute; }
.hero-content { color: white; max-width: 750px; padding: clamp(90px, 13vw, 150px) clamp(22px, 7vw, 100px); position: relative; }
.hero h1 { font-family: "Libre Franklin", sans-serif; font-size: clamp(3rem, 7vw, 6.2rem); letter-spacing: -.055em; line-height: .94; margin: 8px 0 22px; }
.hero-copy { font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.55; max-width: 610px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.eyebrow { color: var(--forest-700); font-size: .75rem; font-weight: 700; letter-spacing: .14em; margin: 0 0 7px; text-transform: uppercase; }
.eyebrow.light { color: #dcefe6; }

.status-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 17px clamp(22px, 7vw, 100px);
}
.status-strip > div { align-items: center; border-right: 1px solid var(--line); display: flex; gap: 12px; justify-content: center; padding: 3px 20px; }
.status-strip > div:last-child { border: 0; }
.status-strip p { display: grid; font-size: .86rem; margin: 0; }
.status-strip p span, .status-strip p a { color: var(--muted); text-decoration: none; }
.status-dot { background: #2a9a67; border: 5px solid #daf0e5; border-radius: 50%; height: 18px; width: 18px; }
.status-icon { color: var(--forest-700); font-size: 1.25rem; }

.page-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); margin: 28px auto 0; max-width: 1320px; min-width: 0; padding: 0 clamp(16px, 4vw, 44px) 70px; width: 100%; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); max-width: 100%; min-width: 0; padding: clamp(20px, 3vw, 30px); }
.section-heading { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { font-family: "Libre Franklin", sans-serif; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.03em; margin: 0; }
.pill { background: #edf1ed; border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 700; padding: 6px 10px; white-space: nowrap; }
.pill-authorized { background: var(--forest-100); color: var(--forest-700); }
.muted { color: var(--muted); }

.notice-list { min-width: 0; }
.notice-table-scroll { border: 1px solid var(--line); border-radius: 12px; max-height: 330px; max-width: 100%; min-width: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.notice-table { border-collapse: separate; border-spacing: 0; min-width: 680px; width: 100%; }
.notice-table th { background: #edf1ed; color: var(--muted); font-size: .72rem; letter-spacing: .08em; padding: 11px 13px; position: sticky; text-align: left; text-transform: uppercase; top: 0; z-index: 1; }
.notice-table td { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding: 13px; vertical-align: middle; }
.notice-table tbody tr:first-child td { border-top: 0; }
.notice-row { border-left: 4px solid transparent; cursor: pointer; outline: none; transition: background 140ms ease; }
.notice-row:hover, .notice-row:focus-visible { background: var(--forest-100); }
.notice-row.alert { background: #fff8f6; }
.notice-row.alert:hover, .notice-row.alert:focus-visible { background: #fbe9e5; }
.notice-row .notice-title { color: var(--ink); font-size: .9rem; font-weight: 700; }
.notice-priority { background: var(--forest-100); border-radius: 999px; color: var(--forest-700); display: inline-block; font-size: .7rem; font-weight: 700; padding: 5px 8px; white-space: nowrap; }
.notice-priority.important { background: #fff0d8; color: var(--amber); }
.notice-priority.alert { background: #f8dfdc; color: var(--red); }
.notice-empty { border: 1px solid var(--line); border-radius: 12px; color: var(--muted); line-height: 1.5; margin: 0; padding: 17px 18px; }
.notice-empty.alert { background: #fff8f6; border-color: #e8cbc7; color: var(--red); }
.notice-loading { color: var(--muted); }
.text-button { background: transparent; border: 0; color: var(--forest-700); cursor: pointer; font-weight: 700; margin-top: 14px; padding: 4px 0; }

.weather-now { align-items: center; display: flex; gap: 20px; }
.temperature { color: var(--forest-900); font-family: "Libre Franklin", sans-serif; font-size: clamp(3.5rem, 8vw, 5.5rem); letter-spacing: -.08em; line-height: 1; margin: 0; }
.weather-description { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.weather-now .muted { font-size: .84rem; line-height: 1.45; margin: 0; }
.weather-advisory { background: #fff1ee; border-radius: 10px; color: var(--red); font-size: .88rem; font-weight: 600; margin-top: 18px; padding: 12px; }
.weather-links { border-top: 1px solid var(--line); display: flex; gap: 18px; margin-top: 22px; padding-top: 16px; }
.weather-links a, .forecast-link { color: var(--forest-700); font-size: .85rem; font-weight: 700; }
.forecast-link { background: transparent; border: 0; cursor: pointer; padding: 0; text-decoration: underline; }

.leadership-panel { grid-column: 1 / -1; }
label { color: #35443e; display: grid; font-size: .86rem; font-weight: 700; gap: 7px; }
input, select, textarea { background: #fbfcf9; border: 1px solid #cfd8d1; border-radius: 10px; color: var(--ink); min-height: 44px; padding: 10px 12px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(40,105,87,.13); outline: none; }
.form-row { display: grid; gap: 14px; margin-bottom: 14px; }
.two-column { grid-template-columns: 2fr 1fr; }
.form-footer { align-items: end; grid-template-columns: minmax(220px, 1fr) auto; margin: 14px 0 0; }
.form-status { color: var(--red); font-size: .84rem; min-height: 20px; margin: 10px 0 0; }
.form-status.success { color: var(--forest-700); }

.tools-section { grid-column: 1 / -1; margin-top: 14px; }
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.tool-card { align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 14px; grid-template-columns: auto 1fr auto; padding: 22px; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tool-card.featured { background: var(--forest-900); color: white; }
.tool-icon { align-items: center; background: var(--forest-100); border-radius: 12px; color: var(--forest-900); display: flex; font-size: 1.2rem; height: 44px; justify-content: center; width: 44px; }
.featured .tool-icon { background: rgba(255,255,255,.15); color: white; }
.tool-card h3 { font-size: 1rem; margin: 0 0 4px; }
.tool-card p { color: var(--muted); font-size: .82rem; line-height: 1.4; margin: 0; }
.featured p { color: rgba(255,255,255,.72); }
.arrow { font-size: 1.4rem; }

footer { align-items: center; background: var(--forest-950); color: rgba(255,255,255,.72); display: flex; justify-content: space-between; padding: 28px clamp(22px, 7vw, 100px); }
.footer-brand { align-items: center; display: flex; gap: 11px; }
.footer-brand img { height: 42px; width: 42px; }
.footer-brand p { display: grid; margin: 0; }
.footer-brand strong { color: white; }
.footer-brand span, footer > p { font-size: .8rem; margin: 0; }

.login-dialog { background: transparent; border: 0; max-width: 450px; padding: 14px; width: calc(100% - 24px); }
.login-dialog::backdrop, .notice-dialog::backdrop { background: rgba(7, 23, 19, .76); backdrop-filter: blur(4px); }
.login-card { background: var(--paper); border-radius: 20px; box-shadow: 0 28px 90px rgba(0,0,0,.34); display: grid; gap: 14px; padding: 34px; position: relative; }
.login-card > img { height: 58px; width: 58px; }
.login-card h2 { font-family: "Libre Franklin", sans-serif; font-size: 2rem; margin: -8px 0 0; }
.login-card > p { margin: 0; }
.dialog-close { background: #edf1ed; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.5rem; height: 38px; line-height: 1; position: absolute; right: 16px; top: 16px; width: 38px; }
.notice-dialog { background: transparent; border: 0; max-width: 680px; padding: 14px; width: calc(100% - 24px); }
.forecast-dialog { background: transparent; border: 0; max-width: 820px; padding: 14px; width: calc(100% - 24px); }
.forecast-dialog::backdrop { background: rgba(7, 23, 19, .76); backdrop-filter: blur(4px); }
.forecast-card { background: var(--paper); border-radius: 20px; box-shadow: 0 28px 90px rgba(0,0,0,.34); padding: 34px; position: relative; }
.forecast-card h2 { font-family: "Libre Franklin", sans-serif; font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 48px 22px 0; }
.forecast-content { margin-bottom: 24px; }
.forecast-table-scroll { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.forecast-table { border-collapse: collapse; min-width: 620px; width: 100%; }
.forecast-table th { background: #edf1ed; color: var(--muted); font-size: .72rem; letter-spacing: .08em; padding: 11px 13px; text-align: left; text-transform: uppercase; }
.forecast-table td { border-top: 1px solid var(--line); font-size: .86rem; padding: 13px; }
.forecast-table td:first-child { color: var(--ink); font-weight: 700; }
.forecast-loading { color: var(--muted); }
.forecast-error { background: #fff8f6; border: 1px solid #e8cbc7; border-radius: 10px; color: var(--red); padding: 14px; }
.notice-detail-card { background: var(--paper); border-radius: 20px; box-shadow: 0 28px 90px rgba(0,0,0,.34); padding: 34px; position: relative; }
.notice-detail-card h2 { font-family: "Libre Franklin", sans-serif; font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 48px 22px 0; }
.notice-detail-meta { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; }
.notice-detail-meta div { background: #f4f6f2; border-radius: 10px; padding: 11px 12px; }
.notice-detail-meta dt { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.notice-detail-meta dd { color: var(--ink); font-size: .84rem; margin: 4px 0 0; }
.notice-detail-body { border-top: 1px solid var(--line); margin-bottom: 24px; padding-top: 20px; }
.notice-detail-body h3 { font-size: .8rem; letter-spacing: .08em; margin: 0 0 9px; text-transform: uppercase; }
.notice-detail-body p { line-height: 1.6; margin: 0; white-space: pre-wrap; }
.notice-dialog-actions { display: flex; gap: 10px; justify-content: space-between; }
.notice-dialog.important .eyebrow { color: var(--amber); }
.notice-dialog.alert .eyebrow { color: var(--red); }
.remember-row { align-items: center; display: flex; font-weight: 500; }
.remember-row input { min-height: 18px; width: 18px; }
.toast { background: var(--forest-950); border-radius: 12px; bottom: 22px; color: white; left: 50%; max-width: calc(100% - 30px); padding: 12px 18px; position: fixed; transform: translateX(-50%); z-index: 60; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  nav { display: none; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
  .weather-panel { grid-row: auto; }
}

@media (max-width: 640px) {
  .site-header { gap: 10px; padding: 8px 12px; }
  .brand img { height: 40px; width: 40px; }
  .brand span { display: none; }
  .account-name { display: none; }
  .button-quiet { font-size: .82rem; padding: 8px 12px; }
  .hero { min-height: 520px; }
  .hero-content { padding-top: 110px; }
  .status-strip { grid-template-columns: 1fr; padding: 8px 18px; }
  .status-strip > div { border-bottom: 1px solid var(--line); border-right: 0; justify-content: flex-start; padding: 10px 4px; }
  .page-grid { padding-left: 12px; padding-right: 12px; }
  .panel { padding-left: 16px; padding-right: 16px; }
  .section-heading { min-width: 0; }
  .section-heading > div { min-width: 0; }
  .two-column, .form-footer { grid-template-columns: 1fr; }
  .form-footer .button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; gap: 18px; }
  .login-card { padding: 28px 22px; }
  .notice-detail-card { padding: 28px 22px; }
  .forecast-card { padding: 28px 22px; }
  .notice-detail-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .priority-banner { text-align: center; }
  .priority-banner-text { animation: none; padding-left: 0; }
}
