@font-face {
  font-family: Montserrat;
  src: url("/assets/fonts/Montserrat-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("/assets/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1c2927;
  --muted: #68736f;
  --line: #dce3dd;
  --canvas: #f4f6f1;
  --lime: #caff69;
  font-family: Montserrat, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

:focus-visible { outline: 3px solid #76a930; outline-offset: 4px; }

.site-frame {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 99% 6%, rgba(210, 238, 187, .37), transparent 28rem),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(219, 228, 219, .32) 50%, transparent calc(50% + 1px));
}

.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }

.topbar {
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 20px; text-decoration: none; }
.brand img { display: block; width: 97px; height: 23px; }
.brand-divider { width: 1px; height: 24px; background: #bdc8c0; }
.brand-app { font-size: 13px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #3d4a45;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
.home-link:hover { color: #749c2c; }
.home-link svg { width: 19px; height: 19px; }

.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  padding: 58px 0 42px;
}
.intro-copy { max-width: 860px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 13px; font-size: clamp(38px, 4.5vw, 66px); line-height: 1.1; letter-spacing: -.066em; font-weight: 800; }
h1 em { font-style: normal; color: #8db74b; }
.lead { max-width: 760px; margin-bottom: 0; color: #68756f; font-size: 14px; line-height: 1.75; }

.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 47px;
  padding: 0 20px;
  border: 1px solid #ced8cb;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(31, 54, 37, .035);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.refresh-button:hover { transform: translateY(-2px); border-color: #97b365; box-shadow: 0 10px 22px rgba(31, 54, 37, .1); }
.refresh-button svg { width: 18px; height: 18px; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(340px, 1fr); gap: 18px; }
.ip-card, .location-card { min-height: 366px; border-radius: 22px; position: relative; overflow: hidden; }
.ip-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 32px 0;
  color: #f6faf6;
  background: radial-gradient(circle at 90% 65%, #294b3c 0, #192a27 45%, #16221f 100%);
  box-shadow: 0 16px 40px rgba(21, 40, 33, .11);
}
.ip-card:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(90deg, transparent 25%, #000 100%);
}
.ip-card-orbit { position: absolute; width: 350px; height: 350px; right: -85px; top: 17px; pointer-events: none; }
.ip-card-orbit span { position: absolute; inset: 0; border: 1px solid rgba(197, 247, 132, .11); border-radius: 50%; }
.ip-card-orbit span:nth-child(2) { inset: 39px; }
.ip-card-orbit span:nth-child(3) { inset: 78px; }
.card-topline, .ip-main, .ip-card-bottom { position: relative; z-index: 1; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-index { font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.ip-card .card-index { color: #c2d4c6; }
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(202, 255, 105, .17);
  border-radius: 99px;
  background: rgba(202, 255, 105, .09);
  color: #d9e8d4;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #bbdb88; box-shadow: 0 0 0 4px rgba(192, 232, 133, .13); }
.live-status[data-state="online"] .status-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(202, 255, 105, .14); }
.live-status[data-state="offline"] .status-dot { background: #ffb594; box-shadow: 0 0 0 4px rgba(255, 181, 148, .12); }
.ip-main { padding: 23px 0 18px; }
.card-label, .small-label { margin: 0 0 14px; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.card-label { color: #c3d2c4; }
.ip-value-row { display: flex; align-items: center; gap: 16px; }
.ip-value {
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(32px, 3.6vw, 54px);
  line-height: 1.17;
  font-weight: 600;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.ip-value.is-ipv6 { font-size: clamp(23px, 2.5vw, 37px); letter-spacing: -.065em; }
.ip-value.loading { font-family: Montserrat, Arial, sans-serif; font-size: clamp(23px, 2.5vw, 34px); letter-spacing: -.045em; color: #d6e3d3; }
.copy-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 41px;
  height: 41px;
  border: 1px solid rgba(240, 255, 237, .28);
  border-radius: 11px;
  background: rgba(240, 255, 237, .1);
  color: #eaffd0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.copy-button:hover:not(:disabled) { background: rgba(202, 255, 105, .22); transform: translateY(-2px); }
.copy-button:disabled { opacity: .45; cursor: not-allowed; }
.copy-button svg { width: 19px; height: 19px; }
.ip-caption { max-width: 560px; margin: 16px 0 0; color: #aebfb4; font-size: 11px; line-height: 1.65; }
.ip-card-bottom {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  margin: 0 -32px;
  padding: 0 32px;
  border-top: 1px solid rgba(218, 239, 219, .14);
  color: #b3c2b7;
  font-size: 10px;
}
.signal-icon { display: inline-flex; align-items: end; gap: 2px; height: 13px; }
.signal-icon i { width: 3px; border-radius: 2px; background: var(--lime); }
.signal-icon i:nth-child(1) { height: 4px; }
.signal-icon i:nth-child(2) { height: 7px; }
.signal-icon i:nth-child(3) { height: 10px; }
.signal-icon i:nth-child(4) { height: 13px; }
.ip-source { margin-left: auto; white-space: nowrap; }

.location-card { padding: 28px 30px 24px; border: 1px solid #dfe6dd; background: #fdfefb; box-shadow: 0 8px 22px rgba(31, 54, 37, .035); }
.location-card .card-index { color: #7a8980; }
.globe-icon { width: 20px; height: 20px; color: #8fac73; }
.country-block { display: flex; align-items: center; gap: 21px; min-height: 181px; }
.country-flag { display: grid; place-items: center; flex: 0 0 auto; width: 68px; height: 68px; border-radius: 20px; background: #e9f2de; font-size: 36px; line-height: 1; }
.small-label { margin-bottom: 9px; color: #89988c; }
.country-block strong { display: block; font-size: clamp(20px, 2vw, 29px); font-weight: 800; letter-spacing: -.055em; line-height: 1.2; }
.city-line { display: block; margin-top: 9px; color: #73827a; font-size: 11px; line-height: 1.5; }
.detail-list { border-top: 1px solid #e7ece5; }
.detail-row { display: flex; align-items: start; justify-content: space-between; gap: 15px; min-height: 47px; padding: 13px 0; border-bottom: 1px solid #e7ece5; font-size: 10px; line-height: 1.45; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: #77857c; }
.detail-row strong { max-width: 65%; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.metrics { padding-top: 47px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
h2 { margin-bottom: 0; font-size: clamp(22px, 2.4vw, 31px); line-height: 1.25; letter-spacing: -.055em; font-weight: 800; }
.measurement-label { padding-bottom: 4px; color: #859187; font-size: 10px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 180px; padding: 22px 23px 20px; border: 1px solid #e1e7df; border-radius: 18px; background: #fff; box-shadow: 0 7px 16px rgba(36, 55, 38, .025); }
.metric-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; color: #9aa69c; font-size: 10px; font-weight: 800; }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-icon.violet { color: #6c69b8; background: #eeedff; }
.metric-icon.lime { color: #638c34; background: #ecf7dd; }
.metric-icon.peach { color: #ad7557; background: #fff0e7; }
.metric-card p { margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.metric-value { display: block; font-size: clamp(25px, 2.7vw, 35px); line-height: 1.18; letter-spacing: -.07em; font-weight: 800; }
.metric-value small { margin-left: 5px; font-size: .47em; letter-spacing: -.03em; font-weight: 600; }
.metric-note { display: block; margin-top: 5px; color: #89968d; font-size: 10px; line-height: 1.5; }

.explainer { display: flex; align-items: start; gap: 14px; margin-top: 22px; padding: 17px 19px; border: 1px solid #dce6d3; border-radius: 15px; background: #eef5e8; }
.explainer-mark { display: grid; place-items: center; flex: 0 0 auto; width: 20px; height: 20px; border: 1px solid #96b77b; border-radius: 50%; color: #63894a; font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.explainer p { margin: 0; color: #607464; font-size: 10px; line-height: 1.75; }
.explainer strong { color: #3b5940; }

.footer { display: flex; justify-content: space-between; gap: 24px; padding: 29px 0 33px; color: #95a198; font-size: 10px; }
.footer a { text-underline-offset: 2px; }
.footer a:hover { color: #568234; }

@media (max-width: 930px) {
  .wrap { width: min(100% - 48px, 720px); }
  .intro { align-items: start; flex-direction: column; padding-top: 45px; }
  .dashboard { grid-template-columns: 1fr; }
  .ip-card { min-height: 300px; }
  .location-card { min-height: 0; }
  .country-block { min-height: 150px; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { height: 72px; }
  .brand { gap: 11px; }
  .brand img { width: 76px; height: auto; }
  .brand-divider { height: 19px; }
  .brand-app { font-size: 10px; }
  .home-link { gap: 5px; }
  .home-link span { display: none; }
  .intro { gap: 22px; padding: 38px 0 29px; }
  h1 { font-size: clamp(37px, 10vw, 52px); }
  .lead { font-size: 12px; line-height: 1.7; }
  .refresh-button { min-height: 43px; }
  .dashboard { gap: 12px; }
  .ip-card { min-height: 280px; padding: 21px 20px 0; border-radius: 18px; }
  .card-index { font-size: 9px; }
  .live-status { padding: 7px 8px; font-size: 9px; }
  .ip-value { font-size: clamp(26px, 8.1vw, 42px); }
  .ip-value.is-ipv6 { font-size: 23px; }
  .copy-button { width: 36px; height: 36px; }
  .ip-card-bottom { margin: 0 -20px; padding: 0 20px; font-size: 9px; }
  .ip-source { display: none; }
  .location-card { padding: 22px 20px 17px; border-radius: 18px; }
  .country-block { gap: 17px; min-height: 135px; }
  .country-flag { width: 56px; height: 56px; border-radius: 16px; font-size: 30px; }
  .detail-row { min-height: 42px; }
  .metrics { padding-top: 36px; }
  .section-heading { margin-bottom: 15px; }
  .measurement-label { display: none; }
  .metric-grid { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { display: grid; grid-template-columns: 42px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; min-height: 88px; padding: 16px; }
  .metric-header { grid-row: 1 / 3; margin: 0; }
  .metric-header > span:last-child { display: none; }
  .metric-card p { grid-column: 2; margin: 0; font-size: 11px; }
  .metric-value { grid-column: 3; grid-row: 1 / 3; font-size: 27px; text-align: right; white-space: nowrap; }
  .metric-note { grid-column: 2; margin: 0; font-size: 9px; }
  .explainer { margin-top: 17px; }
  .footer { display: block; line-height: 1.7; }
  .footer span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
