/*
Theme Name: OpenRecords Desk
Theme URI: https://dwstack.com/theme
Author: DW McEwing
Author URI: https://dwstack.com/theme
Description: Purpose-built WordPress theme for OpenRecordsDesk.com and the OpenRecords Desk public-records management plugin.
Version: 0.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: openrecords-desk-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ord-navy: #08284b;
  --ord-navy-deep: #061d36;
  --ord-green: #4f7d35;
  --ord-blue: #527da3;
  --ord-ink: #17202a;
  --ord-muted: #667085;
  --ord-border: #d7dee7;
  --ord-soft: #f5f8fb;
  --ord-white: #ffffff;
  --ord-radius: 12px;
  --ord-shadow: 0 8px 24px rgba(8, 40, 75, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ord-white);
  color: var(--ord-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ord-navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ord-green); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto !important; clip-path: none; color: #111; display: block;
  font-size: 14px; font-weight: 700; height: auto; left: 8px; padding: 12px 16px;
  top: 8px; width: auto; z-index: 100000;
}

.ord-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--ord-border);
  backdrop-filter: blur(10px);
}
.admin-bar .ord-site-header { top: 32px; }
.ord-header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 104px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.ord-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ord-brand img {
  display: block;
  width: 250px;
  height: 84px;
  object-fit: contain;
  object-position: left center;
}
.ord-nav { display: flex; align-items: center; gap: 18px; }
.ord-nav .menu { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.ord-nav .menu > li { margin: 0; }
.ord-nav .menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ord-navy-deep);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.ord-nav .menu a:hover,
.ord-nav .current-menu-item > a,
.ord-nav .current_page_item > a { background: var(--ord-soft); color: var(--ord-green); }
.ord-account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  background: var(--ord-navy);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ord-account-link:hover { background: var(--ord-green); color: #fff; }
.ord-menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--ord-border);
  background: #fff;
  color: var(--ord-navy);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ord-site-main { min-height: calc(100vh - 290px); }
.ord-content-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 64px;
}
.ord-content-shell--narrow { width: min(820px, calc(100% - 40px)); }
.entry-header { margin-bottom: 24px; }
.entry-title { color: var(--ord-navy-deep); font-size: clamp(2rem, 3vw, 3rem); line-height: 1.14; margin: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ord-navy-deep); line-height: 1.25; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--ord-border); padding: 10px; text-align: left; }
.entry-content input:not([type="checkbox"]):not([type="radio"]),
.entry-content textarea,
.entry-content select {
  max-width: 100%;
  border: 1px solid #b9c4d1;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ord-ink);
  font: inherit;
}
.entry-content button,
.entry-content input[type="submit"],
.entry-content .button,
.entry-content .wp-element-button {
  border: 0;
  border-radius: 8px;
  background: var(--ord-navy);
  color: #fff;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.entry-content button:hover,
.entry-content input[type="submit"]:hover,
.entry-content .button:hover,
.entry-content .wp-element-button:hover { background: var(--ord-green); color: #fff; }

/* Harmonize the OpenRecords Desk plugin UI with the theme without replacing its own styles. */
.ord-wrap { color: var(--ord-ink); }
.ord-wrap h2, .ord-wrap h3 { color: var(--ord-navy-deep); }
.ord-wrap .ord-card {
  border-color: var(--ord-border) !important;
  border-radius: var(--ord-radius) !important;
  box-shadow: var(--ord-shadow);
}
.ord-wrap .ord-button {
  background: var(--ord-navy) !important;
  border-radius: 8px !important;
}
.ord-wrap .ord-button:hover { background: var(--ord-green) !important; }
.ord-wrap .ord-badge { background: var(--ord-soft) !important; color: var(--ord-navy) !important; }

.ord-site-footer {
  border-top: 1px solid var(--ord-border);
  background: #f8fafc;
  color: #435064;
}
.ord-footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.ord-footer-brand { color: var(--ord-navy-deep); font-weight: 750; }
.ord-footer-meta { font-size: 14px; }
.ord-footer-nav .menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.ord-footer-nav a { color: #435064; text-decoration: none; font-size: 14px; }
.ord-footer-nav a:hover { color: var(--ord-green); }

@media (max-width: 920px) {
  .ord-header-inner { min-height: 96px; flex-wrap: wrap; gap: 10px 18px; padding: 6px 0; }
  .ord-menu-toggle { display: inline-flex; margin-left: auto; }
  .ord-nav { display: none; width: 100%; align-items: stretch; padding-bottom: 12px; }
  .ord-nav.is-open { display: flex; flex-direction: column; }
  .ord-nav .menu { flex-direction: column; align-items: stretch; width: 100%; }
  .ord-nav .menu a { width: 100%; }
  .ord-account-link { align-self: stretch; }
}
@media (max-width: 782px) { .admin-bar .ord-site-header { top: 46px; } }
@media (max-width: 640px) {
  .ord-header-inner, .ord-content-shell, .ord-footer-inner { width: min(100% - 28px, 1180px); }
  .ord-brand img { width: 218px; height: 73px; }
  .ord-footer-inner { grid-template-columns: 1fr; }
  .ord-footer-nav .menu { justify-content: flex-start; }
}

/* ===== 0.2.0 Public homepage and signed-in Desk experience ===== */
.ord-eyebrow {
  display: inline-block;
  color: var(--ord-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ord-primary-button,
.ord-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 9px;
  font-weight: 750;
  text-decoration: none;
}
.ord-primary-button { background: var(--ord-navy); color: #fff; }
.ord-primary-button:hover { background: var(--ord-green); color: #fff; }
.ord-secondary-button { border: 1px solid #bac7d4; background: #fff; color: var(--ord-navy); }
.ord-secondary-button:hover { border-color: var(--ord-green); color: var(--ord-green); }

/* Public homepage */
.ord-home-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.ord-home-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 92px;
  background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
  border-bottom: 1px solid #e4eaf0;
}
.ord-home-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -210px;
  top: -250px;
  border: 90px solid rgba(79,125,53,.045);
  border-radius: 50%;
  pointer-events: none;
}
.ord-home-hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 68px; align-items: center; }
.ord-home-hero-copy h1 {
  max-width: 760px;
  margin: 14px 0 20px;
  color: var(--ord-navy-deep);
  font-size: clamp(2.8rem, 5.4vw, 5.15rem);
  line-height: .99;
  letter-spacing: -.045em;
}
.ord-home-lede { max-width: 690px; margin: 0; color: #516072; font-size: clamp(1.05rem, 1.45vw, 1.22rem); line-height: 1.72; }
.ord-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ord-home-trust-row { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: #607083; font-size: 13px; font-weight: 700; }
.ord-home-trust-row span { position: relative; padding-left: 17px; }
.ord-home-trust-row span::before { content: ""; position: absolute; left: 0; top: .54em; width: 7px; height: 7px; border-radius: 50%; background: var(--ord-green); }

.ord-home-workspace-preview {
  position: relative;
  border: 1px solid #cbd6e0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(8,40,75,.14);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}
.ord-preview-topbar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border-bottom: 1px solid #e5eaf0; background: #fbfcfd; }
.ord-preview-topbar span { width: 8px; height: 8px; border-radius: 50%; background: #ccd5df; }
.ord-preview-body { min-height: 360px; display: grid; grid-template-columns: 72px 1fr; }
.ord-preview-sidebar { padding: 28px 18px; background: var(--ord-navy-deep); }
.ord-preview-sidebar span { display: block; height: 10px; margin-bottom: 20px; border-radius: 4px; background: rgba(255,255,255,.22); }
.ord-preview-sidebar span.is-active { background: #7ba158; }
.ord-preview-content { padding: 36px 32px; }
.ord-preview-heading { width: 44%; height: 19px; margin-bottom: 28px; border-radius: 5px; background: var(--ord-navy); }
.ord-preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ord-preview-stats div { padding: 19px; border: 1px solid #dde4eb; border-radius: 10px; }
.ord-preview-stats b { display: block; color: var(--ord-navy); font-size: 27px; }
.ord-preview-stats i { display: block; width: 58%; height: 8px; margin-top: 8px; border-radius: 4px; background: #dce3ea; }
.ord-preview-table { margin-top: 20px; padding: 4px 19px; border: 1px solid #dde4eb; border-radius: 10px; }
.ord-preview-table span { display: block; height: 42px; border-bottom: 1px solid #e7ebef; }
.ord-preview-table span:last-child { border: 0; }

.ord-home-section { padding: 86px 0; }
.ord-home-section--soft { background: #f4f7f9; border-top: 1px solid #e3e9ef; border-bottom: 1px solid #e3e9ef; }
.ord-section-heading { max-width: 750px; margin-bottom: 42px; }
.ord-section-heading h2, .ord-security-grid h2, .ord-home-cta h2 { margin: 10px 0 14px; color: var(--ord-navy-deep); font-size: clamp(2rem, 3.4vw, 3.3rem); line-height: 1.08; letter-spacing: -.025em; }
.ord-section-heading p, .ord-security-grid p { color: #5b6878; font-size: 17px; }
.ord-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ord-feature-card { min-height: 228px; padding: 25px; border: 1px solid #d9e1e8; border-radius: 12px; background: #fff; }
.ord-feature-number { display: block; margin-bottom: 30px; color: var(--ord-blue); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.ord-feature-card h3 { margin: 0 0 9px; color: var(--ord-navy); font-size: 21px; }
.ord-feature-card p { margin: 0; color: #5f6d7c; font-size: 15px; }
.ord-security-grid { display: grid; grid-template-columns: 1fr .88fr; gap: 80px; align-items: center; }
.ord-security-list { border: 1px solid #d7e0e8; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: var(--ord-shadow); }
.ord-security-list div { display: grid; grid-template-columns: 105px 1fr; gap: 22px; padding: 21px 24px; border-bottom: 1px solid #e3e9ef; }
.ord-security-list div:last-child { border-bottom: 0; }
.ord-security-list strong { color: var(--ord-navy); }
.ord-security-list span { color: #617080; }
.ord-home-cta { padding: 56px 0; }
.ord-home-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px 44px; border-radius: 16px; background: var(--ord-navy-deep); }
.ord-home-cta .ord-eyebrow { color: #8eb06e; }
.ord-home-cta h2 { max-width: 720px; margin-bottom: 0; color: #fff; }
.ord-home-cta .ord-primary-button { background: #fff; color: var(--ord-navy); white-space: nowrap; }
.ord-home-cta .ord-primary-button:hover { background: #eef3f7; color: var(--ord-green); }

/* Signed-in Desk application shell */
.ord-desk-mode .ord-site-main { background: #f4f7fa; }
.ord-site-header--desk { box-shadow: 0 1px 0 rgba(8,40,75,.04); }
.ord-site-header--desk .ord-header-inner { min-height: 92px; }
.ord-desk-account { display: flex; align-items: center; gap: 16px; }
.ord-desk-account-copy { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.ord-desk-account-copy strong { color: var(--ord-navy-deep); font-size: 14px; }
.ord-desk-account-copy small { color: #778495; font-size: 12px; }
.ord-account-link--quiet { min-height: 38px; padding: 8px 13px; background: #eef3f7; color: var(--ord-navy); }
.ord-account-link--quiet:hover { background: #e3ebf1; color: var(--ord-green); }
.ord-desk-layout { width: min(1440px, 100%); min-height: calc(100vh - 166px); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.ord-desk-sidebar { padding: 30px 20px; border-right: 1px solid #dce3ea; background: #fff; }
.ord-desk-sidebar-label { padding: 0 12px 15px; color: #7a8795; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.ord-desk-sidebar ul { list-style: none; margin: 0; padding: 0; }
.ord-desk-sidebar li { margin: 3px 0; }
.ord-desk-sidebar a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: #334459; font-size: 14px; font-weight: 700; text-decoration: none; }
.ord-desk-sidebar a:hover { background: #f3f6f8; color: var(--ord-navy); }
.ord-desk-sidebar a.is-current { background: #eaf0f5; color: var(--ord-navy); }
.ord-desk-nav-icon { display: inline-flex; width: 18px; height: 18px; color: var(--ord-blue); }
.ord-desk-nav-icon svg { width: 18px; height: 18px; fill: currentColor; }
.ord-desk-sidebar-help { margin-top: 34px; padding: 16px; border: 1px solid #dce4eb; border-radius: 10px; background: #f8fafb; }
.ord-desk-sidebar-help strong { display: block; margin-bottom: 5px; color: var(--ord-navy); font-size: 13px; }
.ord-desk-sidebar-help span { display: block; color: #687789; font-size: 12px; line-height: 1.5; }
.ord-desk-content { min-width: 0; padding: 42px clamp(26px, 4vw, 58px) 64px; }
.ord-desk-content--page { padding-top: 30px; }
.ord-desk-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.ord-desk-welcome h1 { margin: 8px 0 8px; color: var(--ord-navy-deep); font-size: clamp(2rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -.03em; }
.ord-desk-welcome p { max-width: 690px; margin: 0; color: #607083; }
.ord-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.ord-action-card { display: flex; gap: 13px; min-height: 104px; padding: 18px; border: 1px solid #d8e0e7; border-radius: 11px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 3px 12px rgba(8,40,75,.035); }
.ord-action-card:hover { border-color: #b7c7d5; color: inherit; transform: translateY(-1px); }
.ord-action-card--static:hover { transform: none; }
.ord-action-icon { display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 8px; background: #eef3f7; color: var(--ord-navy); }
.ord-action-icon svg { width: 20px; height: 20px; fill: currentColor; }
.ord-action-card strong, .ord-action-card small { display: block; }
.ord-action-card strong { margin: 1px 0 4px; color: var(--ord-navy-deep); font-size: 14px; }
.ord-action-card small { color: #6c7887; font-size: 12px; line-height: 1.45; }
.ord-dashboard-panel .ord-wrap, .ord-desk-page-article .ord-wrap { max-width: none; margin: 0; }
.ord-dashboard-panel .ord-wrap > h2, .ord-dashboard-panel .ord-wrap > .ord-muted { display: none; }
.ord-dashboard-panel .ord-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ord-dashboard-panel .ord-card, .ord-desk-page-article .ord-card { box-shadow: 0 3px 14px rgba(8,40,75,.04); }
.ord-dashboard-panel .ord-stat { min-height: 128px; padding: 23px !important; }
.ord-dashboard-panel .ord-stat strong { color: var(--ord-navy); font-size: 38px; line-height: 1; }
.ord-dashboard-panel .ord-stat span { display: block; margin-top: 10px; font-weight: 700; }
.ord-desk-page-article .ord-wrap > h2 { margin-top: 0; margin-bottom: 5px; font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.025em; }
.ord-desk-page-article .ord-table { overflow: hidden; border: 1px solid var(--ord-border); border-radius: 10px; background: #fff; }
.ord-desk-page-article .ord-table th { background: #f5f8fa; color: #425267; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.ord-desk-page-article .ord-form input[type=text], .ord-desk-page-article .ord-form input[type=date], .ord-desk-page-article .ord-form input[type=file], .ord-desk-page-article .ord-form textarea, .ord-desk-page-article .ord-form select { border-color: #bfcbd6; }
.ord-desk-page-article .ord-request-text { background: #f6f8fa; }

.ord-hosting-credit { margin-top: 3px; }
.ord-hosting-credit a { color: var(--ord-green); font-weight: 700; text-decoration: none; }
.ord-hosting-credit a:hover { text-decoration: underline; }

@media (max-width: 1040px) {
  .ord-home-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .ord-home-workspace-preview { max-width: 720px; transform: none; }
  .ord-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .ord-security-grid { gap: 45px; }
  .ord-desk-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .ord-quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .ord-desk-layout { display: block; }
  .ord-desk-sidebar { padding: 12px 14px; border-right: 0; border-bottom: 1px solid #dce3ea; overflow-x: auto; }
  .ord-desk-sidebar-label, .ord-desk-sidebar-help { display: none; }
  .ord-desk-sidebar ul { display: flex; gap: 5px; min-width: max-content; }
  .ord-desk-sidebar a { padding: 9px 11px; }
  .ord-security-grid { grid-template-columns: 1fr; }
  .ord-desk-welcome { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) {
  .ord-home-shell { width: min(100% - 28px, 1180px); }
  .ord-home-hero { padding: 58px 0 64px; }
  .ord-home-hero-copy h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  .ord-preview-body { min-height: 285px; grid-template-columns: 52px 1fr; }
  .ord-preview-sidebar { padding: 22px 13px; }
  .ord-preview-content { padding: 28px 20px; }
  .ord-home-section { padding: 62px 0; }
  .ord-feature-grid { grid-template-columns: 1fr; }
  .ord-feature-card { min-height: 0; }
  .ord-home-cta-inner { align-items: flex-start; flex-direction: column; padding: 30px 25px; }
  .ord-security-list div { grid-template-columns: 1fr; gap: 5px; }
  .ord-desk-content { padding: 28px 16px 48px; }
  .ord-site-header--desk .ord-header-inner { width: min(100% - 20px, 1180px); }
  .ord-site-header--desk .ord-brand img { width: 184px; height: 62px; }
  .ord-desk-account-copy { display: none; }
  .ord-dashboard-panel .ord-grid { grid-template-columns: 1fr; }
}

/* Configurable WordPress Site Logo. */
.ord-brand .ord-site-logo {
  display: block;
  width: 250px;
  height: 84px;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 520px) {
  .ord-brand .ord-site-logo {
    width: min(250px, 72vw);
    height: auto;
    aspect-ratio: 250 / 84;
  }
}
