/* Tokens — extracted from Astra's :root in your HTML */
:root {
  --c-primary:    #046bd2;   /* Astra global-color-0 */
  --c-primary-h:  #045cb4;   /* hover */
  --c-text:       #334155;   /* body text */
  --c-heading:    #1e293b;   /* headings */
  --c-bg:         #ffffff;
  --c-bg-alt:     #F0F5FA;   /* section alt background */
  --c-border:     #D1D5DB;
  --radius:       4px;
  --container:    1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-h); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--c-heading); font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: 2rem; line-height: 1.3; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

.wt-container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Header */
.wt-header { background: #fff; border-bottom: 1px solid #eaeaea; position: sticky; top: 0; z-index: 100; }
.wt-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; }
.wt-logo img { display: block; }
.wt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.wt-nav a { color: var(--c-text); font-weight: 500; }
.wt-nav a:hover, .wt-nav .current > a { color: var(--c-primary-h); text-decoration: none; }
.wt-nav .has-sub { position: relative; }
.wt-nav .has-sub > ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-top: 2px solid var(--c-primary); box-shadow: 0 4px 12px rgba(0,0,0,.08); min-width: 200px; flex-direction: column; gap: 0; padding: 8px 0; }
.wt-nav .has-sub:hover > ul { display: flex; }
.wt-nav .has-sub ul li a { display: block; padding: 8px 20px; }

.wt-menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.wt-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--c-primary); margin: 4px 0; }

@media (max-width: 921px) {
  .wt-menu-toggle { display: block; }
  .wt-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid #eaeaea; padding: 16px 20px; }
  .wt-nav.open { display: block; }
  .wt-nav ul { flex-direction: column; gap: 0; }
  .wt-nav ul li a { display: block; padding: 10px 0; }
  .wt-nav .has-sub > ul { display: block; position: static; box-shadow: none; border: 0; padding-left: 16px; }
}

/* Layout: sidebar + main */
.wt-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 32px 0; }
@media (max-width: 921px) { .wt-layout { grid-template-columns: 1fr; } }

.wt-sidebar { background: var(--c-bg-alt); border-radius: var(--radius); padding: 20px; align-self: start; position: sticky; top: 100px; }
.wt-sidebar h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: 12px; }
.wt-sidebar ul { list-style: none; padding: 0; margin: 0; }
.wt-sidebar li a { display: block; padding: 8px 10px; border-radius: var(--radius); color: var(--c-text); }
.wt-sidebar li a:hover { background: #fff; text-decoration: none; }
.wt-sidebar li a.active { background: var(--c-primary); color: #fff; }

/* Forms */
.tool-form { display: flex; gap: 10px; margin: 20px 0; }
.tool-form input[type=text], .tool-form input[type=url] {
  flex: 1; padding: 12px 16px; border: 1px solid var(--c-border);
  border-radius: var(--radius); font-size: 16px;
}
.tool-form input:focus { outline: none; border-color: var(--c-primary); }
.tool-form button {
  padding: 12px 24px; background: var(--c-primary); color: #fff;
  border: 0; border-radius: var(--radius); font-size: 16px;
  font-weight: 500; cursor: pointer;
}
.tool-form button:hover { background: var(--c-primary-h); }

.tool-result { background: var(--c-bg-alt); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.tool-error { background: #fef2f2; color: #991b1b; padding: 16px; border-radius: var(--radius); margin: 16px 0; border-left: 4px solid #dc2626; }

/* Ad slots */
.ad-slot { margin: 24px 0; text-align: center; min-height: 90px; }

/* Footer */
.wt-footer { background: var(--c-bg-alt); margin-top: 64px; border-top: 1px solid #eaeaea; }
.wt-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px 24px; }
@media (max-width: 921px) { .wt-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 544px) { .wt-footer-grid { grid-template-columns: 1fr; } }
.wt-footer-col h4 { font-size: 1rem; margin-bottom: 12px; }
.wt-footer-col ul { list-style: none; padding: 0; margin: 0; }
.wt-footer-col ul li { padding: 4px 0; }
.wt-footer-col p { margin: 0 0 10px; font-size: .95rem; }

.wt-footer-bottom { background: #fff; border-top: 1px solid #eaeaea; }
.wt-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; padding: 20px; }
.wt-social a { display: inline-block; width: 32px; height: 32px; line-height: 32px; text-align: center; background: var(--c-primary); color: #fff; border-radius: 4px; margin-left: 8px; font-size: 14px; }
.wt-social a:hover { background: var(--c-primary-h); text-decoration: none; }

/* --- Whois result presentation --- */

.whois-result {
  background: #fff;                     /* was var(--c-bg-alt); white reads cleaner for tables */
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
}

.whois-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.whois-header h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.3px;
  color: var(--c-heading);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-cached { background: #eef2ff; color: #3730a3; }

/* The key fix: a real table with a fixed label column */
.tool-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;                  /* ← forces consistent column widths */
}

.tool-table th,
.tool-table td {
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.5;
}

.tool-table th {
  width: 160px;                         /* ← fixed width = labels align down the column */
  padding-right: 24px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.tool-table tr:last-child th,
.tool-table tr:last-child td {
  border-bottom: 0;
}

/* Status pills — visible, separated, scannable */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 8px 8px 0;                  /* ← the 8px right margin is the separator */
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* Nameservers — mono + one per line */
.ns-row {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.7;
}

/* Muted footnote */
.muted { color: #64748b; }
.small { font-size: 13px; }

.tool-table td {
  color: var(--c-text);
}

/* --- DNS result presentation --- */

.dns-result { padding: 24px; }

.dns-block { margin-bottom: 28px; }
.dns-block:last-of-type { margin-bottom: 12px; }

.dns-type {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--c-primary);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}

/* DNS tables: fixed-layout off, since columns vary per type */
.dns-table { table-layout: auto; }
.dns-table th {
  width: auto;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding-bottom: 6px;
  background: #f8fafc;
  padding: 8px 10px;
}
.dns-table td {
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;          /* TXT values are long; wrap not scroll */
}
.dns-table td:first-child { font-family: inherit; font-size: 14px; }   /* e.g. Pri column stays readable */

/* Text input + select side by side */
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-form input[type=text] { flex: 1; min-width: 220px; }
.tool-form select {
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.status-ok    { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status-warn  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-danger{ background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.auth-issues {
  margin: 0 0 24px;
  padding: 16px 20px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #78350f;
}
.auth-issues ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.auth-issues li { margin: 4px 0; font-size: 14px; }

.dns-block .dns-type .status-pill {
  font-size: 11px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}


/* --- Tool Index Page Grid --- */

.tool-categories {
  margin-top: 32px;
}

.tool-category {
  margin-bottom: 40px;
}

.category-title {
  font-size: 20px;
  color: var(--c-heading);
  border-bottom: 2px solid var(--c-border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* A subtle colored top border that animates on hover */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.tool-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--c-primary);
}

.tool-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.5;
  flex-grow: 1; /* Pushes the "Open Tool" link to the bottom */
}

.tool-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary-h);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}