/* unfurlcheck.com
   Dev-tool restraint. Light, near-mono neutrals, one accent.
   The platform cards carry the visual interest. Everything around them stays quiet. */

/* ------------------------------------------------------------------ tokens */

:root {
  /* surface + ink */
  --bg:        #fafafa;
  --surface:   #ffffff;
  --ink:       #14171c;
  --ink-2:     #3b424e;
  --muted:     #6f7681;
  --faint:     #9aa1ab;
  --line:      #e4e6ea;
  --line-2:    #eef0f3;

  /* one accent */
  --accent:      #2563eb;
  --accent-ink:  #1d4ed8;
  --accent-soft: #eff4ff;

  /* status, used only as small markers and labels */
  --fail: #b42318;
  --warn: #92400e;
  --ok:   #3f7d58;

  /* type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* space */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* radius */
  --r1: 4px; --r2: 6px; --r3: 10px;

  /* platform font stacks, for card fidelity */
  --f-apple:   -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-slack:   'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-discord: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-x:       'Chirp', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --f-meta:    'Segoe UI', Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  /* sticky footer: with only the form on screen the footer belongs at the
     bottom, not floating a third of the way down over empty background */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

.mono { font-family: var(--mono); }
.dot { color: var(--faint); }

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--s5);
}

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

.site-head, .site-foot { flex: 0 0 auto; }
main.wrap { flex: 1 0 auto; padding-bottom: var(--s8); }

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: var(--s6) 0 var(--s5);
}

.wordmark {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }

.tagline {
  margin-top: var(--s2);
  color: var(--muted);
  font-size: 15px;
  max-width: 68ch;
}

/* ------------------------------------------------------------------ form */

.checkform { padding: var(--s7) 0 0; }

.checkform-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s2);
}

.checkform-row { display: flex; gap: var(--s2); align-items: stretch; }

.checkform-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 13px var(--s4);
  line-height: 1.3;
}
.checkform-input::placeholder { color: var(--faint); }
.checkform-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.checkform-btn {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r2);
  padding: 13px var(--s5);
  cursor: pointer;
}
.checkform-btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.checkform-btn:disabled { opacity: 0.55; cursor: default; }
.checkform-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.checkform-hint {
  margin-top: var(--s3);
  font-size: 12px;
  color: var(--muted);
}
.checkform-hint .mono { font-size: 11.5px; }

/* ------------------------------------------------------------------ status */

.status {
  margin-top: var(--s5);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink-2);
}
.status-error { border-left: 3px solid var(--fail); }
.status-loading { border-left: 3px solid var(--accent); }
.status .step { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }

/* ------------------------------------------------------------------ results */

.results { padding-bottom: var(--s8); }

.checked-url {
  margin-top: var(--s6);
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.checked-url .k {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
  margin-right: var(--s2);
}
.checked-url .hop { display: block; margin-top: var(--s1); color: var(--muted); font-size: 12px; }

.block { margin-top: var(--s8); }
.block-head { border-top: 1px solid var(--line); padding-top: var(--s4); margin-bottom: var(--s6); }
.block-title { font-size: 13px; font-family: var(--mono); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.block-sub { margin-top: var(--s2); color: var(--muted); font-size: 14px; max-width: 62ch; }

/* ------------------------------------------------------------------ card grid */

.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s7) var(--s6);
  align-items: start;
}

.platform { min-width: 0; }

.platform-head {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-bottom: var(--s3);
}
.platform-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}
.platform-mode {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.platform-stage { min-width: 0; }

.platform-note {
  margin-top: var(--s3);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 44ch;
}
.platform-note + .platform-note { margin-top: var(--s1); }
.platform-note.flag { color: var(--warn); }

/* honest placeholder for a missing or unloadable image */
.ph {
  background: #e9ebee repeating-linear-gradient(
    45deg, rgba(0,0,0,0.025) 0 6px, rgba(0,0,0,0) 6px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #77808c;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: var(--s3);
  min-height: 64px;
}
.ph.dark { background: #232428 repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 6px, rgba(255,255,255,0) 6px 12px); color: #9aa0a8; }

.img-1x91 { aspect-ratio: 1.91 / 1; object-fit: cover; width: 100%; background: #f1f2f4; }

/* ratio-only classes, so a placeholder can borrow a card's crop without
   inheriting display:block and losing its centering */
.ratio-1x91 { aspect-ratio: 1.91 / 1; width: 100%; }
.ratio-3x2  { aspect-ratio: 3 / 2;    width: 100%; }

/* truncation helpers */
.clamp1, .clamp2, .clamp3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp1 { -webkit-line-clamp: 1; line-clamp: 1; }
.clamp2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp3 { -webkit-line-clamp: 3; line-clamp: 3; }

/* ============================================================== 1. iMessage */

.c-imessage { font-family: var(--f-apple); max-width: 300px; }
.imsg-thread { padding-left: var(--s2); }
.imsg-bubble {
  position: relative;
  background: #f1f1f3;
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
}
.imsg-bubble::after {
  content: "";
  position: absolute;
  left: -5px; bottom: 0;
  width: 14px; height: 16px;
  background: #f1f1f3;
  border-bottom-right-radius: 14px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.imsg-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: #e3e4e8; }
.imsg-meta { padding: 8px 12px 10px; background: #ffffff; }
.imsg-title { font-size: 13px; font-weight: 600; color: #000; line-height: 1.28; letter-spacing: -0.01em; }
.imsg-domain { margin-top: 2px; font-size: 11.5px; color: #8a8a8e; }
.imsg-stamp { margin-top: 6px; font-size: 10.5px; color: #a3a3a8; padding-left: 4px; }

/* ================================================================ 2. Slack */

.c-slack { font-family: var(--f-slack); max-width: 420px; }
.slack-msg { background: #ffffff; padding: 2px 0; }
.slack-unfurl {
  border-left: 4px solid #dddddd;
  padding-left: 12px;
  max-width: 400px;
}
.slack-title {
  font-size: 15px;
  font-weight: 700;
  color: #1264a3;
  line-height: 1.3;
}
.slack-domain { margin-top: 2px; font-size: 13px; color: #616061; }
.slack-desc { margin-top: 4px; font-size: 15px; color: #1d1c1d; line-height: 1.46; }
.slack-img { margin-top: 8px; border-radius: 8px; overflow: hidden; max-width: 360px; }
.slack-img img { width: 100%; }
.slack-img .ph { border-radius: 8px; }

/* =============================================================== 3. Discord */

.c-discord { font-family: var(--f-discord); max-width: 440px; }
.dsc-msg { background: #313338; padding: 12px; border-radius: var(--r2); }
.dsc-embed {
  background: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  padding: 12px 16px 16px;
  max-width: 432px;
}
.dsc-site { font-size: 12px; color: #dbdee1; line-height: 1.4; }
.dsc-title { margin-top: 6px; font-size: 16px; font-weight: 600; color: #00a8fc; line-height: 1.375; }
.dsc-desc { margin-top: 6px; font-size: 14px; color: #dbdee1; line-height: 1.375; }
.dsc-img-large { margin-top: 16px; border-radius: 4px; overflow: hidden; }
.dsc-img-large img { width: 100%; }
.dsc-img-large .ph { border-radius: 4px; }
.dsc-row { display: flex; gap: 16px; align-items: flex-start; }
.dsc-row .dsc-body { flex: 1 1 auto; min-width: 0; }
.dsc-thumb { flex: 0 0 auto; width: 80px; height: 80px; border-radius: 4px; overflow: hidden; }
.dsc-thumb img { width: 80px; height: 80px; object-fit: cover; }
.dsc-thumb .ph { width: 80px; height: 80px; min-height: 0; font-size: 9px; border-radius: 4px; }

/* ==================================================================== 4. X */

.c-x { font-family: var(--f-x); max-width: 440px; }
.x-card {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  max-width: 420px;
}
.x-card-body { padding: 12px; }
.x-title { font-size: 15px; font-weight: 700; color: #0f1419; line-height: 1.3; }
.x-desc { margin-top: 2px; font-size: 15px; color: #0f1419; line-height: 1.3; }
.x-domain { margin-top: 4px; font-size: 15px; color: #536471; }
.x-small { display: flex; align-items: stretch; }
.x-small-img { flex: 0 0 auto; width: 130px; border-right: 1px solid #cfd9de; background: #f7f9f9; }
.x-small-img img { width: 130px; height: 130px; object-fit: cover; }
.x-small-img .ph { width: 130px; height: 130px; min-height: 0; font-size: 9.5px; }
.x-small .x-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.x-small .x-title, .x-small .x-desc, .x-small .x-domain { font-size: 14px; }

/* ============================================================= 5. LinkedIn */

.c-linkedin { font-family: var(--f-meta); max-width: 420px; }
.li-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  max-width: 400px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.02);
}
.li-body { background: #f3f2ef; padding: 10px 12px 12px; }
.li-title { font-size: 14px; font-weight: 600; color: #000000e6; line-height: 1.28; letter-spacing: -0.01em; }
.li-domain { margin-top: 4px; font-size: 12px; color: #00000099; }

/* ============================================================= 6. Facebook */

.c-facebook { font-family: var(--f-meta); max-width: 420px; }
.fb-card {
  background: #f2f3f5;
  border: 1px solid #dadde1;
  border-radius: 2px;
  overflow: hidden;
  max-width: 400px;
}
.fb-body { padding: 10px 12px; }
.fb-title { font-size: 17px; font-weight: 600; color: #050505; line-height: 1.25; letter-spacing: -0.01em; }
.fb-domain { margin-top: 3px; font-size: 12px; color: #65676b; text-transform: uppercase; letter-spacing: 0.02em; }
.fb-desc { margin-top: 3px; font-size: 13px; color: #65676b; line-height: 1.34; }

/* ============================================================= 7. WhatsApp */

.c-whatsapp { font-family: var(--f-meta); max-width: 340px; }
.wa-thread { padding-right: var(--s2); display: flex; justify-content: flex-end; }
.wa-bubble {
  position: relative;
  background: #d9fdd3;
  border-radius: 8px;
  border-top-right-radius: 0;
  padding: 4px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 1px 0.5px rgba(11,20,26,0.13);
}
.wa-bubble::after {
  content: "";
  position: absolute;
  right: -8px; top: 0;
  width: 8px; height: 13px;
  background: #d9fdd3;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.wa-preview {
  display: flex;
  gap: 8px;
  background: #d1f4cc;
  border-radius: 6px;
  padding: 8px;
  align-items: flex-start;
}
.wa-thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 4px; overflow: hidden; }
.wa-thumb img { width: 72px; height: 72px; object-fit: cover; }
.wa-thumb .ph { width: 72px; height: 72px; min-height: 0; font-size: 9px; }
.wa-body { flex: 1 1 auto; min-width: 0; }
.wa-title { font-size: 13px; font-weight: 600; color: #111b21; line-height: 1.28; }
.wa-desc { margin-top: 2px; font-size: 12px; color: #667781; line-height: 1.3; }
.wa-domain { margin-top: 3px; font-size: 11.5px; color: #8696a0; }
.wa-link { padding: 6px 6px 2px; font-size: 13.5px; color: #027eb5; overflow-wrap: anywhere; }
.wa-stamp { text-align: right; font-size: 11px; color: #667781; padding: 0 4px 2px; }

/* ------------------------------------------------------- UA comparison */

.ua {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  padding: var(--s5);
  margin-bottom: var(--s6);
}
.ua.hit { border-left: 3px solid var(--fail); }
.ua.clear { border-left: 3px solid var(--ok); }
.ua-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.ua-verdict { margin-top: var(--s2); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ua-verdict.hit { color: var(--fail); }
.ua-body { margin-top: var(--s2); font-size: 14.5px; color: var(--ink-2); max-width: 66ch; }
.ua-body p + p { margin-top: var(--s2); }

.ua-table { margin-top: var(--s4); width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.ua-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  padding: 0 var(--s4) var(--s2) 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ua-table td { padding: var(--s2) var(--s4) var(--s2) 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
.ua-table tr:last-child td { border-bottom: 0; }
.ua-table .num { text-align: right; padding-right: var(--s5); }
.ua-table .bad { color: var(--fail); }
.ua-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------- checklist */

.checklist { border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); overflow: hidden; }

.check { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-2); }
.check:last-child { border-bottom: 0; }

.check-mark {
  flex: 0 0 auto;
  width: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.check-body { flex: 1 1 auto; min-width: 0; }
.check-name { font-size: 14px; line-height: 1.5; }
.check-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
  margin-left: var(--s2);
}

.check.pass { color: var(--muted); }
.check.pass .check-mark { color: var(--ok); }
.check.pass .check-name { color: var(--muted); }

.check.skip .check-mark { color: var(--faint); }
.check.skip .check-name { color: var(--muted); }

.check.fail { background: #fffaf9; }
.check.fail .check-mark { color: var(--fail); }
.check.fail .check-name { color: var(--ink); font-weight: 600; }

.check.warn { background: #fffdf7; }
.check.warn .check-mark { color: var(--warn); }
.check.warn .check-name { color: var(--ink); font-weight: 600; }

.check-detail { margin-top: var(--s2); display: grid; grid-template-columns: 44px 1fr; gap: var(--s1) var(--s3); }
.check-detail dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.check-detail dd { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.check-detail code { font-family: var(--mono); font-size: 12.5px; background: var(--line-2); padding: 1px 4px; border-radius: var(--r1); overflow-wrap: anywhere; }

.checklist-legend { margin-top: var(--s3); font-size: 12.5px; color: var(--muted); }

/* ----------------------------------------------------------------- tools */

.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); }
.tool {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  padding: var(--s4);
}
.tool-name { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tool-body { margin-top: var(--s2); font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.tool-link { display: inline-block; margin-top: var(--s3); font-size: 14px; font-weight: 500; }
.tool.none { background: #fbfbfc; }

/* ----------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--s5) 0;
  font-size: 14px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 720px) {
  .wrap { padding: 0 var(--s4); }
  .checkform { padding-top: var(--s6); }
  .checkform-row { flex-direction: column; }
  .checkform-input { width: 100%; }
  .checkform-btn { width: 100%; }
  .cardgrid { grid-template-columns: 1fr; gap: var(--s6); }
  .block { margin-top: var(--s7); }
  .tools { grid-template-columns: 1fr; }
  .check-detail { grid-template-columns: 1fr; gap: 0; }
  .check-detail dt { padding-top: var(--s2); }
}

@media (max-width: 400px) {
  .c-slack, .c-discord, .c-x, .c-linkedin, .c-facebook, .c-whatsapp, .c-imessage { max-width: 100%; }
  .x-small-img, .x-small-img img, .x-small-img .ph { width: 104px; }
  .x-small-img img, .x-small-img .ph { height: 104px; }
}
