/* SolidPro Engineering - shared styles for the front page and the admin panel.
   Ported from the Tailwind mockup in the project root: brand navy #0B1F43,
   brand red #E1251B, slate text on an #F8FAFC ground, Merriweather for
   headings and Inter for everything else. Written as plain CSS rather than
   pulling in the Tailwind CDN, which compiles in the browser and is explicitly
   not meant for production. */

:root {
  --navy: #0b1f43;
  --navy-soft: #12305f;
  --red: #e1251b;
  --red-dark: #b71a12;

  /* slate scale, matching the mockup's Tailwind classes */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;

  --bg: var(--slate-50);
  --card: #ffffff;
  --line: var(--slate-200);
  --ink: var(--slate-700);
  --muted: var(--slate-500);
  --ok-bg: #dcfce7;
  --ok-fg: #15803d;
  --blue-50: #eff6ff;
  --blue-200: #bfdbfe;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 67, .05);
  --shadow-md: 0 4px 14px rgba(11, 31, 67, .07);
  --shadow-lg: 0 24px 56px rgba(11, 31, 67, .22);

  --serif: Merriweather, Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
  background: var(--slate-100);
  color: var(--navy);
  padding: .12em .4em;
  border-radius: 5px;
}

/* ---- header ------------------------------------------------------------- */

.site-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  background: var(--navy);
  color: #fff;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }

/* The supplied wordmark is all-white, so it only ever sits on the navy header.
   Height-driven with width:auto keeps its 720x177 ratio at any size. */
.brand-logo { display: block; height: 30px; width: auto; }

/* Marks the admin pages apart from the public site at a glance. */
.brand-tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-200);
  border-left: 1px solid rgba(255, 255, 255, .25);
  padding-left: 12px;
}

.site-nav { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: #fff; text-decoration: none; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid #60a5fa; background: transparent;
  transition: background .15s;
}
.nav-link:hover { background: #1e40af; }

/* ---- layout ------------------------------------------------------------- */

main { flex: 1 0 auto; width: 100%; max-width: 1152px; margin: 0 auto; padding: 64px 32px; }

.hero { margin-bottom: 48px; }
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 36px; font-weight: 700; line-height: 1.2;
  color: var(--navy);
}
.hero p { margin: 0; max-width: 42rem; font-size: 18px; line-height: 1.6; color: var(--slate-600); }

/* ---- tabs --------------------------------------------------------------- */

.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 500; color: var(--slate-500);
  padding: 0 0 12px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--slate-700); }
.tab.is-active { color: var(--navy); font-weight: 600; border-bottom-color: var(--red); }
.tab-count {
  font-size: 12px; font-weight: 500; background: var(--slate-100);
  color: var(--slate-600); border-radius: 999px; padding: 2px 8px;
}
.tab.is-active .tab-count { background: var(--blue-50); color: var(--navy); }

.panel { display: none; }
.panel.is-active { display: block; }

/* ---- two-column split: industries | tools ------------------------------- */

.split { display: flex; gap: 48px; align-items: flex-start; }
.industries { width: 33.333%; flex: none; }
.tools-col { width: 66.667%; flex: 1 1 auto; min-width: 0; }

.col-title {
  margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate-400);
}

.industry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.industry-btn {
  width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center; gap: 16px;
  transition: border-color .15s, background .15s;
}
.industry-btn:hover { border-color: var(--slate-300); }
.industry-btn.is-active {
  background: var(--navy); border-color: var(--navy); color: #fff;
}
.industry-btn.is-active:hover { background: var(--navy-soft); }

.industry-icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--slate-50); color: var(--slate-500);
  display: grid; place-items: center;
}
.industry-icon svg { width: 20px; height: 20px; }
.industry-btn.is-active .industry-icon { background: rgba(255, 255, 255, .1); color: #fff; }

.industry-meta { flex: 1 1 auto; min-width: 0; }
.industry-name { display: block; font-size: 15px; font-weight: 600; color: var(--navy); }
.industry-btn.is-active .industry-name { color: #fff; }
.industry-desc {
  display: block; font-size: 12px; color: var(--slate-500); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.industry-btn.is-active .industry-desc { color: var(--blue-200); }

.industry-pill {
  flex: none; width: 24px; height: 24px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 500;
  background: var(--slate-100); color: var(--slate-500);
}
.industry-btn.is-active .industry-pill { background: var(--red); color: #fff; font-weight: 700; }

.tools-head { margin-bottom: 16px; }
.tools-head .col-title { margin-bottom: 4px; }
.tools-sub { margin: 0; font-size: 14px; color: var(--slate-500); }

/* ---- tool cards --------------------------------------------------------- */

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

.tool-card {
  position: relative; overflow: hidden;
  text-align: left; font-family: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.tool-card:hover { border-color: var(--slate-300); box-shadow: var(--shadow-sm); }

/* The card whose link sheet is open keeps the mockup's left indicator strip. */
.tool-card.is-open { border-color: var(--navy); box-shadow: var(--shadow-md); }
.tool-card.is-open::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy);
}
.tool-card.is-open > * { padding-left: 8px; }

.tool-card-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.tool-icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--navy); color: #fff; display: grid; place-items: center;
}
.tool-icon svg { width: 20px; height: 20px; }
.tool-name { display: block; font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.tool-badge {
  display: inline-block; margin-top: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--ok-bg); color: var(--ok-fg);
  border-radius: 4px; padding: 2px 8px;
}
.tool-desc { margin: 0 0 24px; font-size: 14px; line-height: 1.6; color: var(--slate-600); flex: 1 1 auto; }
.tool-foot {
  margin-top: auto; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tag {
  font-size: 12px; font-weight: 500; color: var(--slate-600);
  background: var(--slate-100); border-radius: 999px; padding: 4px 10px;
}
.tool-cta {
  flex: none; font-size: 14px; font-weight: 600; color: var(--red); white-space: nowrap;
}
.tool-card:hover .tool-cta { text-decoration: underline; }

.empty {
  grid-column: 1 / -1; padding: 48px 24px; text-align: center;
  color: var(--slate-500); font-size: 14px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius-lg);
}

.search-row { margin-bottom: 24px; }
.search {
  width: 100%; max-width: 420px; font-family: inherit; font-size: 15px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
}
.search:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: transparent; }

/* ---- link sheet --------------------------------------------------------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(11, 31, 67, .5);
  display: grid; place-items: center; padding: 20px;
}
/* display:grid above outranks the UA stylesheet's [hidden]{display:none}, so
   without this the backdrop stays on top of the page and eats every click. */
.sheet-backdrop[hidden] { display: none; }

.sheet {
  position: relative; width: 100%; max-width: 500px;
  background: var(--card); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-lg);
}
.sheet-close {
  position: absolute; top: 16px; right: 18px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--slate-400); cursor: pointer; padding: 2px 6px;
}
.sheet-close:hover { color: var(--slate-700); }
.sheet-eyebrow {
  margin: 0 0 8px; padding-right: 34px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red);
}
.sheet-title {
  margin: 0 0 8px; padding-right: 34px;
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--navy);
}
.sheet-desc { margin: 0 0 24px; font-size: 14px; line-height: 1.6; color: var(--slate-600); }
.sheet-label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate-400); margin-bottom: 8px;
}
.link-box { margin-bottom: 20px; }
.link-box input {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--slate-50); color: var(--navy);
}

.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--navy);
  text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.share-fallback { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-fallback-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate-400);
}
.share-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.share-links a {
  font-size: 14px; font-weight: 500; color: var(--navy); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 14px; cursor: pointer;
}
.share-links a:hover { background: var(--slate-50); }

/* ---- toast + footer ----------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--navy); color: #fff; font-size: 14px; font-weight: 500;
  padding: 12px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 60;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.site-footer {
  flex: none; margin-top: auto;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 32px;
}
.site-footer-inner {
  max-width: 1152px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 14px; color: var(--slate-500);
}
.site-footer a {
  color: inherit; text-decoration: underline;
  text-decoration-color: var(--slate-300); text-underline-offset: 4px;
}
.site-footer a:hover { color: var(--navy); }

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  main { padding: 40px 20px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .split { flex-direction: column; gap: 32px; }
  .industries, .tools-col { width: 100%; }
  .industry-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .industry-btn { min-width: 240px; }
  .site-header { padding: 14px 20px; }
  .brand-logo { height: 24px; }
  .site-footer { padding: 24px 20px; }
  .tabs { gap: 20px; }
}
