/* Patty Henhoeffer Communications palette
   (sourced from pattyhenhoeffer.com) */
:root {
  --phc-blue: #50b3d0;
  --phc-blue-dark: #3d96b1;
  --phc-teal: #62b9b3;
  --phc-gradient: linear-gradient(90deg, var(--phc-blue) 0%, var(--phc-teal) 100%);

  --text: #333333;
  --text-soft: #555555;
  --muted: #888888;

  --gray-200: #ececec;
  --gray-100: #f4f4f4;
  --surface: #ffffff;
  --bg: #ffffff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--phc-blue); text-decoration: none; }
a:hover { color: var(--phc-blue-dark); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 700px) {
  .container { padding: 0 16px; }
}

/* ---------- Header / hero ---------- */
.site-header {
  text-align: center;
  padding: 56px 0 36px;
}

.phc-logo {
  display: block;
  margin: 0 auto 24px;
  width: 220px;
  max-width: 70vw;
  height: auto;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}

.subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

@media (max-width: 700px) {
  .site-header { padding: 32px 0 24px; }
  .phc-logo { width: 170px; margin-bottom: 18px; }
  .site-header h1 { font-size: 22px; }
  .subtitle { font-size: 14px; }
}

/* ---------- Main / cards ---------- */
.main {
  padding: 8px 28px 64px;
}

@media (max-width: 700px) {
  .main { padding: 4px 16px 40px; }
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

@media (max-width: 700px) {
  .tool-list { grid-template-columns: 1fr; gap: 14px; }
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Top gradient accent strip — matches the line in PHC's logo */
.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--phc-gradient);
}

.tool-card:hover {
  transform: translateY(-1px);
  border-color: var(--phc-blue);
  box-shadow: var(--shadow-md);
}

.tool-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  color: transparent;
  font-size: 0;
}
.tool-card-link:focus-visible {
  outline: 2px solid var(--phc-blue);
  outline-offset: -3px;
  border-radius: var(--radius-md);
}

.tool-card .tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.tool-card .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--phc-blue-dark);
}

.tool-card h2 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.tool-card p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.tool-card .meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
}

.tool-card .badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(80, 179, 208, 0.12);
  color: var(--phc-blue-dark);
}

.tool-card .badge.inactive {
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
}

.loading, .empty {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 24px 0;
}

/* ---------- Copy button (sits on top of overlay link) ---------- */
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.copy-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
.copy-btn:hover {
  color: var(--phc-blue);
  border-color: var(--phc-blue);
}
.copy-btn.copied {
  color: var(--surface);
  background: var(--phc-blue);
  border-color: var(--phc-blue);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--phc-blue);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .copy-btn-label { display: none; }
  .copy-btn { padding: 6px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--gray-200);
  padding: 18px 0 28px;
  margin-top: 32px;
  color: var(--muted);
  text-align: center;
}

.footer-inner small { font-size: 12px; }
.footer-inner a {
  color: var(--muted);
  text-decoration: underline;
  margin-left: 4px;
}
.footer-inner a:hover { color: var(--phc-blue); }

/* ---------- Lock screen ---------- */
body.locked #app {
  visibility: hidden;
  pointer-events: none;
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

/* Author CSS sets display: flex above, which overrides the user-agent
   [hidden] { display: none } rule. Re-assert it here so toggling the
   `hidden` attribute from JS actually hides the lock screen. */
.lock-screen[hidden] {
  display: none;
}

.lock-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 36px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.lock-card .phc-logo {
  width: 160px;
  margin-bottom: 18px;
}

.lock-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.lock-subtitle {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 13px;
}

#lock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#lock-form input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

#lock-form input:focus {
  outline: none;
  border-color: var(--phc-blue);
  box-shadow: 0 0 0 3px rgba(80, 179, 208, 0.18);
}

.lock-btn {
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--surface);
  background: var(--phc-blue);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s ease;
}
.lock-btn:hover { background: var(--phc-blue-dark); }
.lock-btn:disabled { background: var(--gray-200); color: var(--muted); cursor: progress; }

.lock-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #b3261e;
}
