/* TextTrimmer.com — shared styles */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d24;
  --text-muted: #5a6270;
  --brand: #2f6fed;
  --brand-dark: #1d4fc4;
  --brand-light: #eaf1ff;
  --accent: #10b487;
  --danger: #e5484d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.06);
  --max-width: 1080px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
}

.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 40px 0 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.footer-grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a {
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.footer-disclaimer {
  max-width: 720px;
  font-size: 0.8rem;
  color: #8890a0;
  margin-top: 16px;
}

/* Hero / page header */
.page-hero {
  padding: 48px 0 32px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.page-hero p.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* Cards / tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin: 32px 0;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
  text-decoration: none;
}

.tool-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.tool-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text);
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Tool widget */
.tool-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 28px 0;
}

.tool-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .tool-columns {
    grid-template-columns: 1fr;
  }
}

.tool-widget label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text);
}

.tool-widget textarea,
.tool-widget input[type="text"],
.tool-widget input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  background: #fbfcfe;
  color: var(--text);
}

.tool-widget textarea {
  min-height: 220px;
}

.tool-widget textarea:focus,
.tool-widget input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #f1f3f7;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stat-pill {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 90px;
  text-align: center;
}

.stat-pill span {
  display: block;
  font-size: 1.15rem;
  margin-top: 2px;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  font-size: 0.88rem;
}

.options-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 0;
  cursor: pointer;
}

.copy-note {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  margin-left: 4px;
  visibility: hidden;
}

.copy-note.show {
  visibility: visible;
}

/* Content sections */
.content-section {
  margin: 44px 0;
}

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.content-section h3 {
  font-size: 1.15rem;
  margin: 20px 0 8px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  margin-bottom: 10px;
  background: var(--surface);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-size: 1.3rem;
  color: var(--brand);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--text-muted);
  padding-bottom: 14px;
  margin: 0;
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.related-tools a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.related-tools a:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

/* Static/legal pages */
.prose h2 {
  margin-top: 32px;
}

.prose ul, .prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.badge-list span {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}

/* Blog */
.post-list {
  display: grid;
  gap: 18px;
  margin: 28px 0;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.post-card .post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-card h3 {
  margin: 8px 0 6px;
}

article.prose {
  max-width: 740px;
  margin: 0 auto;
}

article.prose h1 {
  font-size: 2rem;
}

/* Ad slots */
.ad-slot {
  background: repeating-linear-gradient(45deg, #f1f3f7, #f1f3f7 10px, #eceff3 10px, #eceff3 20px);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 18px;
  margin: 28px 0;
}

/* Mobile nav */
@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 14px;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
