:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171a24;
  background: #f6f7fa;
  --bg: #f6f7fa;
  --surface: #fff;
  --surface-soft: #fafbfc;
  --text: #171a24;
  --muted: #697083;
  --subtle: #8b92a1;
  --border: #e4e7ed;
  --border-strong: #d8dce5;
  --primary: #5268e8;
  --primary-dark: #3d51cc;
  --primary-soft: #eef0ff;
  --success: #16845b;
  --success-soft: #e9f8f0;
  --warning: #a85c15;
  --warning-soft: #fff3e2;
  --danger: #cc4545;
  --danger-soft: #fff0f0;
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(22, 27, 40, .04), 0 8px 24px rgba(22, 27, 40, .035);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(1.75rem, 2.7vw, 2.25rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { margin-bottom: 4px; font-size: 1.05rem; letter-spacing: -.02em; }
h3 { font-size: .86rem; color: var(--muted); }
p { color: var(--muted); line-height: 1.55; }
:focus-visible { outline: 3px solid rgba(82, 104, 232, .28); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.route-progress { position: fixed; z-index: 100; top: 0; right: 0; left: 0; height: 3px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .1s ease; }
.route-progress[hidden], .route-status[hidden] { display: none; }
.route-progress span { display: block; width: 38%; height: 100%; background: linear-gradient(90deg, #5268e8, #9a45cb); transform: translateX(-110%); }
.route-status { position: fixed; z-index: 99; top: 14px; left: calc(50% + 124px); display: flex; min-height: 34px; padding: 0 13px; align-items: center; gap: 8px; color: #fff; background: rgba(28, 32, 43, .94); border: 1px solid rgba(255, 255, 255, .09); border-radius: 999px; box-shadow: 0 8px 24px rgba(20, 24, 35, .18); font-size: .7rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: opacity .12s ease, transform .12s ease; }
.route-status span { width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; }
.is-navigating { cursor: progress; }
.is-navigating .route-progress, .is-navigating .route-status { opacity: 1; }
.is-navigating .route-progress span { animation: route-progress 1s ease-in-out infinite; }
.is-navigating .route-status { transform: translate(-50%, 0); }
.is-navigating .app-shell a, .is-navigating .app-shell button, .is-navigating .app-shell select { pointer-events: none; }
@keyframes route-progress { from { transform: translateX(-110%); } to { transform: translateX(275%); } }
@keyframes route-spin { to { transform: rotate(360deg); } }
.is-navigating .route-status span { animation: route-spin .7s linear infinite; }

/* Authentication */
.auth-shell { width: min(100% - 32px, 1080px); min-height: 100vh; margin: 0 auto; padding: 24px 0 70px; }
.auth-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #151824; font-size: 1.06rem; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.brand-mark { display: inline-grid; width: 32px; height: 32px; place-items: center; color: #fff; background: linear-gradient(145deg, #5369e8, #794ed8); border-radius: 9px; font-weight: 900; box-shadow: 0 6px 15px rgba(82, 104, 232, .25); }
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card { padding: clamp(24px, 5vw, 42px); }
.login-card { max-width: 470px; margin: 7vh auto 0; }
.eyebrow { display: block; margin-bottom: 9px; color: #6571b8; font-size: .72rem; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.field { display: grid; gap: 7px; margin: 20px 0; color: #34394a; font-size: .86rem; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; line-height: 1.45; }
.field input, .field textarea, .field select, .link-filters input, .link-filters select, .range-control select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.field textarea { min-height: 100px; padding-top: 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .link-filters input:focus, .link-filters select:focus, .range-control select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(82, 104, 232, .12); }
.field input[readonly], .field select:disabled { background: #f5f6f8; color: var(--muted); }
.otp { letter-spacing: .28em; font-size: 1.3rem; font-weight: 800; }
.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: #151822;
  border: 1px solid #151822;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s, background .14s, border-color .14s, box-shadow .14s;
}
.button:hover { background: #2a2e3a; border-color: #2a2e3a; transform: translateY(-1px); box-shadow: 0 7px 17px rgba(21, 24, 34, .14); }
.button svg { width: 17px; height: 17px; }
.button-secondary { color: #313645; background: #fff; border-color: var(--border-strong); box-shadow: none; }
.button-secondary:hover { color: #171a24; background: #f8f9fb; border-color: #cbd0db; box-shadow: none; }
.google-button { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; color: #3c4043; background: #fff; border: 1px solid #dadce0; border-radius: 9px; font: 500 14px/1.2 Arial, sans-serif; text-decoration: none; }
.google-button svg { width: 20px; height: 20px; }
.google-button[disabled] { opacity: .55; }
.divider { display: flex; margin: 24px 0; align-items: center; gap: 12px; color: var(--subtle); font-size: .82rem; }
.divider::before, .divider::after { height: 1px; background: var(--border); content: ""; flex: 1; }
.notice, .error { padding: 12px 14px; border-radius: 10px; font-size: .9rem; }
.notice { color: #34428d; background: #edf1ff; }
.error { color: #a42929; background: #fff0f0; }
.legal { margin-top: 20px; font-size: .8rem; }
.legal a { color: var(--primary-dark); }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 248px;
  padding: 20px 14px 16px;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--border);
}
.sidebar-head { display: flex; min-height: 40px; padding: 0 8px; align-items: center; justify-content: space-between; }
.sidebar-close { display: none; width: 40px; height: 40px; background: transparent; border: 0; border-radius: 9px; font-size: 1.6rem; cursor: pointer; }
.create-link { display: flex; min-height: 44px; margin: 24px 2px 16px; padding: 0 15px; align-items: center; justify-content: center; gap: 9px; color: #fff; background: #151822; border-radius: 10px; font-size: .82rem; font-weight: 750; text-decoration: none; }
.create-link:hover { background: #292d39; }
.create-link svg { width: 18px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; min-height: 43px; padding: 0 12px; align-items: center; gap: 12px; color: #555d6d; border-radius: 10px; font-size: .86rem; font-weight: 600; text-decoration: none; transition: color .14s, background .14s; }
.nav-item:hover { color: var(--text); background: #f5f6f9; }
.nav-item.active { color: #4055cf; background: var(--primary-soft); }
.nav-item svg { width: 19px; }
.sidebar-footer { display: grid; margin-top: auto; gap: 8px; }
.free-card { display: flex; margin: 0 3px 8px; padding: 12px; align-items: center; gap: 10px; background: linear-gradient(135deg, #f6f7ff, #faf6ff); border: 1px solid #e7e7fa; border-radius: 12px; }
.free-card > span { display: grid; width: 32px; height: 32px; place-items: center; color: #5268e8; background: #fff; border: 1px solid #e3e5f2; border-radius: 9px; }
.free-card svg { width: 17px; }
.free-card strong, .free-card small { display: block; }
.free-card strong { font-size: .78rem; }
.free-card small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.user-row { display: flex; min-width: 0; padding: 12px 5px 0; align-items: center; gap: 9px; border-top: 1px solid var(--border); }
.avatar { display: inline-grid; width: 34px; height: 34px; place-items: center; color: #fff; background: #262b3a; border-radius: 50%; font-size: .8rem; font-weight: 800; flex: none; }
.user-email { min-width: 0; overflow: hidden; color: #454b5a; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.icon-button { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; color: #5e6575; background: #fff; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; cursor: pointer; }
.icon-button:hover { color: var(--text); background: #f7f8fa; }
.icon-button svg { width: 17px; }
.app-column { min-height: 100vh; margin-left: 248px; }
.mobile-header { display: none; }
.app-main { width: min(100%, 1500px); margin: 0 auto; padding: 34px clamp(24px, 3vw, 48px) 70px; }
.nav-scrim { display: none; }

/* Page header and common surfaces */
.page-header, .detail-header { display: flex; margin-bottom: 24px; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-header p, .detail-header p { margin-bottom: 0; font-size: .9rem; }
.page-header .eyebrow { margin-bottom: 10px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.range-control { position: relative; display: flex; align-items: center; }
.range-control svg { position: absolute; z-index: 1; left: 12px; width: 17px; color: #737b8c; pointer-events: none; }
.range-control select { min-width: 150px; padding: 0 34px 0 38px; font-size: .83rem; cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8a91a0 50%), linear-gradient(135deg, #8a91a0 50%, transparent 50%); background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.panel { min-width: 0; padding: 22px; }
.panel-heading { display: flex; margin-bottom: 22px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading.compact { margin-bottom: 18px; }
.panel-heading h2 { margin-bottom: 4px; }
.panel-heading p { margin-bottom: 0; font-size: .78rem; }
.panel-heading > a { color: var(--primary-dark); font-size: .76rem; font-weight: 750; text-decoration: none; }
.panel-total { color: #596172; font-size: .78rem; font-weight: 700; }
.title-with-icon { display: flex; align-items: center; gap: 9px; }
.title-with-icon > span { display: grid; width: 31px; height: 31px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; }
.title-with-icon svg { width: 16px; height: 16px; }
.back-link { display: inline-flex; margin-bottom: 12px; align-items: center; gap: 6px; color: #6e7585; font-size: .8rem; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--primary-dark); }
.back-link svg { width: 15px; }
.compact-header { margin-bottom: 20px; }

/* Metrics */
.metric-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { display: flex; min-height: 112px; padding: 18px; align-items: flex-start; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.metric-help { position: relative; }
.metric-help > button { display: grid; width: 16px; height: 16px; padding: 0; place-items: center; color: #778097; background: #f3f5fa; border: 1px solid #d9deea; border-radius: 50%; font: 700 .6rem/1 ui-sans-serif, system-ui, sans-serif; cursor: help; }
.metric-help > button:hover, .metric-help > button:focus-visible { color: #fff; background: #5268e8; border-color: #5268e8; outline: none; }
.metric-tooltip { position: absolute; z-index: 20; bottom: calc(100% + 9px); left: 50%; width: min(240px, 70vw); padding: 9px 11px; color: #fff; background: #1c202b; border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; box-shadow: 0 9px 24px rgba(20, 24, 35, .2); font-size: .68rem; font-weight: 500; line-height: 1.45; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); visibility: hidden; transition: opacity .12s ease, transform .12s ease, visibility .12s ease; }
.metric-tooltip::after { position: absolute; top: 100%; left: 50%; width: 8px; height: 8px; background: #1c202b; content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.metric-help:hover .metric-tooltip, .metric-help:focus-within .metric-tooltip { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.metric-card strong { margin-top: 7px; font-size: 1.65rem; line-height: 1; letter-spacing: -.05em; }
.metric-card small { margin-top: 7px; color: var(--subtle); font-size: .66rem; }
.metric-icon { display: grid !important; width: 40px; height: 40px; place-items: center; border-radius: 11px; }
.metric-icon svg { width: 19px; }
.tone-blue { color: #4562df; background: #eaf0ff; }
.tone-purple { color: #9a45cb; background: #f5eaff; }
.tone-green { color: #209461; background: #e7f8ef; }
.tone-orange { color: #dc7a22; background: #fff1df; }

/* Charts and dashboard grids */
.overview-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.overview-grid > .timeline-panel { grid-column: span 8; }
.overview-grid > .top-links-panel { grid-column: span 4; }
.overview-grid > .breakdown-panel, .overview-grid > .recent-panel { grid-column: span 4; }
.timeline-panel { margin-bottom: 16px; }
.chart-wrap { position: relative; min-height: 250px; padding-top: 4px; }
.timeline-chart { position: relative; z-index: 1; display: block; width: 100%; height: 218px; overflow: visible; cursor: crosshair; }
.timeline-chart:focus { outline: 0; }
.chart-grid { stroke: #edf0f4; stroke-width: .5; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#timelineFill); }
.chart-line { fill: none; stroke: #5268e8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-guide { position: absolute; z-index: 2; width: 1px; background: repeating-linear-gradient(to bottom, #7d88a7 0 4px, transparent 4px 8px); pointer-events: none; transform: translateX(-.5px); }
.chart-dot { position: absolute; z-index: 3; width: 11px; height: 11px; background: #fff; border: 3px solid #5268e8; border-radius: 50%; box-shadow: 0 2px 8px rgba(52, 66, 145, .28); pointer-events: none; transform: translate(-50%, -50%); }
.chart-tooltip { position: absolute; z-index: 4; min-width: 132px; padding: 9px 11px; color: #fff; background: #1c202b; border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; box-shadow: 0 9px 24px rgba(20, 24, 35, .2); pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); }
.chart-tooltip::after { position: absolute; top: 100%; left: 50%; width: 9px; height: 9px; background: #1c202b; content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.chart-tooltip span, .chart-tooltip strong { position: relative; z-index: 1; display: block; white-space: nowrap; }
.chart-tooltip span { color: #bfc5d2; font-size: .64rem; }
.chart-tooltip strong { margin-top: 3px; font-size: .78rem; }
.chart-loader { position: absolute; z-index: 6; inset: 0 0 24px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #4e5668; background: rgba(255, 255, 255, .78); border-radius: 10px; opacity: 0; pointer-events: none; visibility: hidden; backdrop-filter: blur(2px); transition: opacity .12s ease; }
.chart-loader > span { width: 22px; height: 22px; border: 3px solid #dfe3f4; border-top-color: #5268e8; border-radius: 50%; animation: chart-spin .65s linear infinite; }
.chart-loader strong { font-size: .74rem; }
.timeline-panel.is-loading .chart-loader { opacity: 1; visibility: visible; }
.timeline-panel.is-loading .chart-tooltip, .timeline-panel.is-loading .chart-guide, .timeline-panel.is-loading .chart-dot { display: none; }
@keyframes chart-spin { to { transform: rotate(360deg); } }
.chart-axis { display: flex; padding: 0 4%; justify-content: space-between; color: var(--subtle); font-size: .68rem; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.breakdown-panel ul, .top-links-panel ol, .recent-panel ul, .history-panel ul, .method-list, .session-list { margin: 0; padding: 0; list-style: none; }
.breakdown-panel li { margin-top: 15px; }
.breakdown-label { display: flex; margin-bottom: 7px; align-items: center; justify-content: space-between; gap: 12px; color: #4c5362; font-size: .76rem; }
.breakdown-label > span:last-child { color: var(--subtle); font-size: .69rem; }
.breakdown-label strong { margin-right: 6px; color: #353a48; font-size: .75rem; }
.progress { display: block; width: 100%; height: 7px; overflow: hidden; appearance: none; background: #eff1f5; border: 0; border-radius: 20px; }
.progress::-webkit-progress-bar { background: #eff1f5; border-radius: 20px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, #6a7bea, #5268e8); border-radius: 20px; }
.progress::-moz-progress-bar { background: #5268e8; border-radius: 20px; }
.empty-mini { padding: 25px 8px !important; color: var(--subtle); font-size: .78rem; line-height: 1.5; text-align: center; }
.top-links-panel, .recent-panel { overflow: hidden; }
.top-links-panel ol { display: grid; min-width: 0; gap: 3px; }
.top-links-panel li, .recent-panel li { min-width: 0; }
.top-links-panel li a { display: flex; width: 100%; min-width: 0; padding: 10px 7px; align-items: center; gap: 10px; overflow: hidden; border-radius: 10px; text-decoration: none; }
.top-links-panel li a:hover { background: #f7f8fb; }
.amazon-dot { display: inline-grid; width: 34px; height: 34px; place-items: center; color: #fff; background: linear-gradient(145deg, #ffad32, #f06c22); border-radius: 10px; flex: none; }
.amazon-dot svg { width: 19px; }
.top-link-name { width: 0; min-width: 0; overflow: hidden; flex: 1 1 0%; }
.top-link-name strong, .top-link-name small, .top-link-value strong, .top-link-value small { display: block; }
.top-link-name strong { overflow: hidden; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.top-link-name small { margin-top: 3px; overflow: hidden; color: var(--subtle); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.top-link-value { min-width: 42px; text-align: right; flex: none; }
.top-link-value strong { font-size: .77rem; }
.top-link-value small { margin-top: 2px; color: var(--subtle); font-size: .64rem; }
.top-links-panel li > a > svg { width: 14px; color: #9ca2af; }
.recent-panel ul { display: grid; gap: 2px; }
.recent-panel li a { display: flex; width: 100%; min-width: 0; padding: 8px 4px; align-items: center; gap: 9px; overflow: hidden; text-decoration: none; }
.activity-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; }
.activity-icon svg { width: 16px; }
.recent-panel li a > span:nth-child(2) { width: 0; min-width: 0; overflow: hidden; flex: 1 1 0%; }
.recent-panel strong, .recent-panel small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-panel strong { font-size: .75rem; }
.recent-panel small { margin-top: 2px; color: var(--subtle); font-size: .65rem; }
.recent-panel time { color: var(--subtle); font-size: .65rem; white-space: nowrap; flex: none; }
.peak-summary { display: grid; margin: 4px 0 22px; grid-template-columns: 1fr 1fr; gap: 12px; }
.peak-summary > div { padding: 13px; background: #f7f8fb; border: 1px solid #edf0f4; border-radius: 11px; }
.peak-summary strong, .peak-summary span { display: block; }
.peak-summary strong { font-size: 1.05rem; }
.peak-summary span { margin-top: 4px; color: var(--muted); font-size: .67rem; }
.peak-panel h3 { margin: 16px 0 10px; }
.hour-bars, .day-bars { margin: 0; padding: 0; list-style: none; }
.hour-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.hour-bars li { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 5px; }
.hour-bars progress { width: 8px; height: 68px; transform: rotate(180deg); writing-mode: vertical-lr; appearance: none; }
.hour-bars progress::-webkit-progress-bar { background: #eef0f4; border-radius: 10px; }
.hour-bars progress::-webkit-progress-value { background: #6375e6; border-radius: 10px; }
.hour-bars span, .day-bars span { color: var(--subtle); font-size: .6rem; }
.day-bars { display: grid; gap: 7px; }
.day-bars li { display: grid; align-items: center; grid-template-columns: 28px 1fr 38px; gap: 8px; }
.day-bars progress { width: 100%; height: 6px; }
.day-bars strong { color: #596172; font-size: .65rem; text-align: right; }

/* Links library */
.link-filters { display: grid; margin-bottom: 16px; padding: 14px; grid-template-columns: minmax(250px, 1fr) 170px 170px; gap: 10px; box-shadow: none; }
.search-field { position: relative; }
.search-field svg { position: absolute; top: 13px; left: 13px; width: 18px; color: #9aa1af; }
.search-field input { padding-left: 41px; }
.link-filters select { min-height: 46px; padding: 0 12px; cursor: pointer; }
.links-panel { padding: 0; overflow: hidden; }
.link-table-head, .link-list-item { display: grid; align-items: center; grid-template-columns: 28px 44px minmax(250px, 2fr) minmax(190px, 1fr) 105px 74px 100px 42px; gap: 12px; }
.link-table-head > span:first-child { grid-column: 1 / 3; }
.link-table-head { min-height: 48px; padding: 0 17px; color: var(--subtle); background: #fafbfc; border-bottom: 1px solid var(--border); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.link-list-item { min-height: 92px; padding: 13px 17px; border-bottom: 1px solid #eceef2; transition: background .13s; }
.link-list-item:last-child { border-bottom: 0; }
.link-list-item:hover { background: #fbfbfd; }
.select-placeholder { width: 15px; height: 15px; margin-left: 4px; border: 1px solid #cfd4de; border-radius: 4px; }
.link-primary, .link-destination { min-width: 0; }
.link-primary > a { display: block; overflow: hidden; color: #334dcc; font-size: .83rem; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.link-primary small, .link-destination small, .link-stat small, .link-last small { display: block; margin-top: 3px; overflow: hidden; color: var(--subtle); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-inline { position: relative; display: inline-flex; max-width: 100%; padding: 0; align-items: center; gap: 6px; overflow: hidden; color: #6e7585; background: transparent; border: 0; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.copy-inline svg { width: 13px; }
[data-copy-state]::after { position: absolute; z-index: 10; right: 0; bottom: calc(100% + 7px); padding: 6px 9px; color: #fff; background: #252936; border-radius: 6px; content: attr(data-copy-state); font-size: .66rem; }
.link-destination strong, .link-stat strong, .link-last strong { display: block; overflow: hidden; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.link-stat strong { font-size: .86rem; }
.status-badge { display: inline-flex; min-height: 26px; padding: 0 9px; align-items: center; gap: 6px; color: var(--success); background: var(--success-soft); border: 1px solid #d1efdf; border-radius: 20px; font-size: .67rem; font-weight: 750; }
.status-badge i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.status-paused { color: var(--warning); background: var(--warning-soft); border-color: #f1d9ba; }
.status-archived { color: #707685; background: #f1f2f5; border-color: #e3e5e9; }
.status-suspended { color: var(--danger); background: var(--danger-soft); border-color: #f2d5d5; }
.manage-button { width: 34px; height: 34px; border: 0; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state > span { display: grid; width: 52px; height: 52px; margin: 0 auto 15px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 15px; }
.empty-state h2 { font-size: 1.1rem; }
.empty-state p { max-width: 440px; margin: 0 auto 18px; font-size: .82rem; }
.pagination { display: grid; min-height: 66px; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 16px; }
.pagination > div:last-child { text-align: right; }
.pagination span { color: var(--muted); font-size: .72rem; }

/* Creation */
.create-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .8fr); gap: 18px; align-items: start; }
.form-panel { padding: clamp(22px, 3vw, 34px); }
.form-panel form { max-width: 780px; }
.step-label { display: flex; margin-bottom: 24px; align-items: center; gap: 12px; }
.step-label > span { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: #5369e8; border-radius: 10px; font-size: .78rem; font-weight: 800; }
.step-label strong, .step-label small { display: block; }
.step-label strong { font-size: .9rem; }
.step-label small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.step-label.second { margin-top: 34px; }
.form-actions { display: flex; margin-top: 28px; justify-content: flex-end; gap: 9px; }
.create-aside { position: sticky; top: 24px; padding: 28px; overflow: hidden; background: linear-gradient(160deg, #202536, #171a24); border-color: #252a39; }
.create-aside h2 { color: #fff; font-size: 1.15rem; }
.create-aside > p { margin: 22px 0 0; color: #aab0bf; font-size: .72rem; }
.aside-illustration { display: grid; width: 55px; height: 55px; margin-bottom: 20px; place-items: center; color: #fff; background: linear-gradient(145deg, #ffae34, #ef6e28); border-radius: 16px; box-shadow: 0 12px 28px rgba(239, 110, 40, .24); }
.aside-illustration svg { width: 29px; height: 29px; }
.create-aside ul { display: grid; margin: 24px 0 0; padding: 0; gap: 18px; list-style: none; }
.create-aside li { display: flex; gap: 12px; color: #eef0f5; }
.create-aside li > svg { width: 19px; color: #8697ff; }
.create-aside li strong, .create-aside li small { display: block; }
.create-aside li strong { font-size: .79rem; }
.create-aside li small { margin-top: 3px; color: #989faf; font-size: .68rem; line-height: 1.45; }

/* Link detail */
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { margin-bottom: 0; }
.detail-title-value { display: block; width: fit-content; max-width: 100%; min-width: 0; }
.detail-title-value h1 { display: inline; min-width: 0; overflow-wrap: anywhere; }
.detail-title-value[hidden], .title-inline-form[hidden] { display: none; }
.title-edit { display: inline-grid; width: 34px; height: 34px; margin-left: 8px; padding: 0; place-items: center; vertical-align: .15em; color: #667086; background: #fff; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; box-shadow: 0 3px 8px rgba(30, 35, 50, .05); }
.title-edit:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.title-edit svg { width: 15px; height: 15px; }
.title-inline-form { display: grid; width: min(100%, 1120px); grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.title-inline-form input { min-width: 0; min-height: 52px; padding: 0 14px; color: var(--text); background: #fff; border: 1px solid var(--primary); border-radius: 10px; outline: none; box-shadow: 0 0 0 3px rgba(82, 104, 232, .12); font-size: clamp(1.1rem, 2.25vw, 1.8rem); font-weight: 780; }
.title-inline-form .button { min-height: 52px; }
.detail-heading { width: 100%; min-width: 0; }
.detail-link-group { display: grid; width: fit-content; max-width: 100%; margin-top: 10px; gap: 7px; }
.detail-link-row { display: grid; max-width: 100%; align-items: center; grid-template-columns: 88px minmax(0, auto) auto auto; gap: 8px; }
.detail-link-label { color: var(--subtle); font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.detail-short-url { min-width: 0; overflow: hidden; color: var(--primary-dark); font-size: .73rem; font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.detail-short-url:hover { text-decoration: underline; }
.detail-link-action { min-height: 34px; padding: 0 11px; font-size: .7rem; flex: none; }
.detail-link-action svg { width: 14px; height: 14px; }
.detail-workspace { padding: 0; overflow: hidden; }
.detail-tabs { display: grid; min-height: 58px; padding: 7px; background: #fafbfc; border-bottom: 1px solid var(--border); grid-template-columns: repeat(3, 1fr); gap: 7px; }
.detail-tabs a { display: flex; align-items: center; justify-content: center; gap: 8px; color: #777e8d; border-radius: 9px; font-size: .77rem; font-weight: 700; text-decoration: none; }
.detail-tabs a:hover { color: var(--text); background: #f0f1f4; }
.detail-tabs a.active { color: #fff; background: #181b24; box-shadow: 0 5px 12px rgba(24, 27, 36, .12); }
.detail-tabs svg { width: 16px; }
.detail-content { padding: 20px; background: #f9fafb; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 16px; }
.details-panel, .share-panel, .preview-editor { box-shadow: none; }
.detail-list { margin: 0; }
.detail-list > div { padding: 15px 0; border-bottom: 1px solid #eceef2; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { margin-bottom: 6px; color: var(--subtle); font-size: .68rem; font-weight: 700; }
.detail-list dd { margin: 0; color: #343948; font-size: .78rem; font-weight: 600; overflow-wrap: anywhere; }
.detail-list dd a { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-dark); text-decoration: none; }
.detail-list dd svg { width: 13px; }
.destination-value { display: flex; align-items: center; gap: 8px; }
.destination-value > a { min-width: 0; }
.destination-edit { display: inline-grid; width: 30px; height: 30px; padding: 0; place-items: center; color: #667086; background: #f6f7fa; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; flex: none; }
.destination-edit:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.destination-edit svg { width: 14px; height: 14px; }
.destination-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.destination-inline-form[hidden], .destination-value[hidden] { display: none; }
.destination-inline-form input { min-width: 0; min-height: 42px; padding: 0 11px; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 9px; outline: none; }
.destination-inline-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(82, 104, 232, .12); }
.destination-inline-form .button { min-height: 42px; padding: 0 13px; }
.detail-pair { display: grid !important; grid-template-columns: 1fr 1fr; gap: 20px; }
.share-input { display: flex; min-width: 0; }
.share-input input { min-width: 0; height: 43px; padding: 0 12px; color: #4b5260; background: #f6f7f9; border: 1px solid var(--border); border-radius: 9px 0 0 9px; font-size: .72rem; flex: 1; }
.share-input button { display: grid; width: 43px; place-items: center; color: #555d6d; background: #fff; border: 1px solid var(--border); border-left: 0; border-radius: 0 9px 9px 0; cursor: pointer; }
.share-input svg { width: 16px; }
.share-url-list { display: grid; gap: 10px; }
.share-url-block { display: grid; gap: 5px; }
.share-url-block > span:first-child { color: var(--subtle); font-size: .61rem; font-weight: 800; }
.share-buttons { display: grid; margin: 10px 0 20px; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.share-buttons a { display: flex; min-height: 36px; align-items: center; justify-content: center; color: #4f5666; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: .65rem; font-weight: 650; text-decoration: none; }
.share-buttons a:hover { background: #f8f9fb; }
.mini-info { margin: 0; padding-top: 14px; border-top: 1px solid var(--border); }
.mini-info > div { display: flex; padding: 5px 0; justify-content: space-between; gap: 12px; }
.mini-info dt { color: var(--subtle); font-size: .67rem; }
.mini-info dd { margin: 0; color: #4a5060; font-size: .67rem; font-weight: 650; text-align: right; }
.preview-editor { grid-column: 1 / -1; }
.preview-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.preview-layout form { max-width: none; }
.preview-label { display: block; margin-bottom: 8px; color: var(--subtle); font-size: .68rem; font-weight: 700; }
.social-card { overflow: hidden; background: #f7f8fa; border: 1px solid #dfe3ea; border-radius: 11px; }
.social-card > img, .social-image-placeholder { display: grid; width: 100%; aspect-ratio: 1.9 / 1; object-fit: cover; place-items: center; color: #e68928; background: linear-gradient(145deg, #fff8ee, #f5f6fb); }
.social-image-placeholder svg { width: 58px; height: 58px; }
.social-card > div { padding: 13px; }
.social-card span, .social-card strong, .social-card p { display: block; }
.social-card span { color: var(--subtle); font-size: .58rem; letter-spacing: .07em; }
.social-card strong { margin-top: 5px; font-size: .78rem; }
.social-card p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: .68rem; white-space: nowrap; text-overflow: ellipsis; }
.detail-analytics-head { display: flex; margin-bottom: 16px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-analytics-head p { margin-bottom: 0; font-size: .78rem; }
.detail-content > .timeline-panel { box-shadow: none; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid .form-panel, .settings-grid .link-controls, .settings-grid .history-panel { box-shadow: none; }
.history-panel { grid-column: 1 / -1; }
.control-row { display: flex; padding: 15px 0; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.control-row:last-child { border-bottom: 0; }
.control-row > span { display: flex; align-items: center; gap: 11px; }
.control-row > span > svg { color: #6d77ad; }
.control-row strong, .control-row small { display: block; }
.control-row strong { font-size: .78rem; }
.control-row small { margin-top: 3px; color: var(--subtle); font-size: .66rem; line-height: 1.4; }
.history-panel li { display: flex; min-width: 0; padding: 12px 0; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); }
.history-panel li:last-child { border-bottom: 0; }
.history-panel li > span { display: grid; width: 32px; height: 32px; place-items: center; color: #6571b8; background: var(--primary-soft); border-radius: 9px; }
.history-panel li > span svg { width: 15px; }
.history-panel li > div { min-width: 0; flex: 1; }
.history-panel li strong, .history-panel li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-panel li strong { font-size: .74rem; }
.history-panel li small, .history-panel time { color: var(--subtle); font-size: .64rem; }

/* Account settings */
.settings-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-section { box-shadow: none; }
.settings-section form { max-width: 700px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-list { display: grid; gap: 6px; }
.method-list li, .session-list li { display: flex; padding: 12px 0; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.method-list li:last-child, .session-list li:last-child { border-bottom: 0; }
.method-list li > span:first-child, .session-icon { display: grid; width: 36px; height: 36px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.method-list svg, .session-icon svg { width: 17px; }
.method-list li > div, .session-list li > div { min-width: 0; flex: 1; }
.method-list strong, .method-list small, .session-list strong, .session-list small { display: block; }
.method-list strong, .session-list strong { font-size: .76rem; }
.method-list small, .session-list small { margin-top: 3px; color: var(--subtle); font-size: .65rem; }
.connected-badge, .muted-badge, .current-badge { padding: 5px 8px; color: var(--success); background: var(--success-soft); border-radius: 20px; font-size: .62rem; font-weight: 750; }
.muted-badge { color: #707686; background: #f0f1f4; }
.domain-status { display: inline-flex; align-items: center; gap: 6px; }
.pending-badge { display: inline-flex; padding: 5px 8px; color: #8a5c00; background: #fff3cf; border: 1px solid #f3d98f; border-radius: 20px; font-size: .62rem; font-weight: 750; }
.current-badge { margin-left: 5px; vertical-align: 1px; }
.sessions-section, .danger-section { grid-column: 1 / -1; }
.session-list form { margin: 0; }
.session-list .button { min-height: 35px; }
.clipboard-fallback { position: fixed; left: -9999px; }

/* Feedback and administration */
.feedback-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .65fr); gap: 18px; align-items: start; }
.feedback-form-panel { padding: clamp(22px, 3vw, 34px); }
.feedback-form-panel form { max-width: 760px; }
.feedback-form-panel textarea { min-height: 170px; resize: vertical; }
.feedback-aside { padding: 28px; color: #e9ecf4; background: linear-gradient(160deg, #202536, #171a24); border-color: #252a39; }
.feedback-aside h2 { color: #fff; font-size: 1.15rem; }
.feedback-aside p { color: #b0b6c5; font-size: .76rem; line-height: 1.65; }
.feedback-aside ul { display: grid; margin: 22px 0 0; padding: 0 0 0 18px; gap: 11px; color: #c9ceda; font-size: .72rem; line-height: 1.5; }
.form-alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; font-size: .75rem; line-height: 1.5; }
.form-alert.success { color: #16734b; background: #e8f7ef; border: 1px solid #cbead9; }
.form-alert.error { color: #a33d3d; background: #fff0f0; border: 1px solid #f2d5d5; }
.admin-metrics .metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-feedback { padding: 0; overflow: hidden; }
.admin-feedback .panel-heading { padding: 22px 24px 15px; }
.admin-table-wrap { overflow-x: auto; }
.admin-feedback table { width: 100%; border-collapse: collapse; }
.admin-feedback th, .admin-feedback td { padding: 14px 18px; border-top: 1px solid #eceef2; text-align: left; vertical-align: top; }
.admin-feedback th { color: var(--subtle); background: #fafbfc; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-feedback td { color: #454b5a; font-size: .72rem; line-height: 1.55; }
.admin-feedback td strong, .admin-feedback td small { display: block; }
.admin-feedback td small { margin-top: 3px; color: var(--subtle); }
.admin-feedback .feedback-message { min-width: 340px; max-width: 720px; white-space: normal; }
.status-new { color: #3559ca; background: #edf1ff; border-color: #d7dfff; }
.status-reviewed { color: #9a641c; background: #fff5e5; border-color: #f1dfc1; }
.status-closed { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }

/* Bulk links */
.bulk-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; align-items: start; }
.bulk-upload-panel { padding: clamp(24px, 3vw, 36px); }
.limit-badge { padding: 6px 9px; color: #4055cf; background: #eef0ff; border-radius: 999px; font-size: .61rem; font-weight: 800; white-space: nowrap; }
.bulk-dropzone { position: relative; display: grid; min-height: 220px; padding: 28px; place-items: center; align-content: center; gap: 9px; text-align: center; background: linear-gradient(135deg, #f8f9ff, #fbf9ff); border: 1.5px dashed #c8cfe9; border-radius: 15px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.bulk-dropzone:hover, .bulk-dropzone:focus-within { background: #f5f7ff; border-color: #7485e7; transform: translateY(-1px); }
.bulk-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bulk-upload-icon { display: grid; width: 52px; height: 52px; place-items: center; color: #5268e8; background: #fff; border: 1px solid #e1e5f4; border-radius: 14px; box-shadow: 0 8px 20px rgba(72, 88, 170, .1); }
.bulk-upload-icon svg { width: 23px; }
.bulk-dropzone strong { font-size: .9rem; }
.bulk-dropzone small { color: var(--subtle); font-size: .68rem; }
.bulk-format { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; gap: 10px; }
.bulk-format > div { padding: 14px 15px; background: #f8f9fb; border: 1px solid #eceef2; border-radius: 10px; }
.bulk-format strong { display: block; margin-bottom: 5px; font-size: .7rem; }
.bulk-format p { margin: 0; font-size: .64rem; line-height: 1.55; }
.bulk-format code { padding: 2px 4px; color: #34428d; background: #edf1ff; border-radius: 4px; font: 650 .59rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.bulk-note { margin: 14px 0 18px; }
.bulk-domain-note { margin: 14px 0 0; color: #34428d; background: #f2f4ff; border-color: #d9def9; }
.bulk-domain-note a { color: var(--primary-dark); font-weight: 750; }
.bulk-submit { min-width: 230px; }
.bulk-guide { padding: 29px; color: #e9ecf4; background: linear-gradient(160deg, #202536, #171a24); border-color: #252a39; }
.bulk-guide h2 { margin-top: 18px; color: #fff; font-size: 1.12rem; }
.bulk-guide ol { display: grid; margin: 22px 0 0; padding: 0; gap: 20px; list-style: none; }
.bulk-guide li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.bulk-guide li > span { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: #5268e8; border-radius: 8px; font-size: .65rem; font-weight: 800; }
.bulk-guide li strong, .bulk-guide li small { display: block; }
.bulk-guide li strong { color: #fff; font-size: .72rem; }
.bulk-guide li small { margin-top: 4px; color: #aeb5c5; font-size: .62rem; line-height: 1.55; }
.privacy-note { display: flex; margin: 25px 0 0; padding-top: 18px; align-items: flex-start; gap: 9px; color: #aeb5c5; border-top: 1px solid rgba(255,255,255,.1); font-size: .62rem; line-height: 1.5; }
.privacy-note svg { width: 17px; color: #8494ed; flex: none; }
.preview-mode-badge { display: inline-flex; padding: 7px 10px; align-items: center; gap: 6px; color: #a35b0c; background: #fff3df; border: 1px solid #f1debc; border-radius: 999px; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.preview-mode-badge svg { width: 15px; }
.preview-reset { min-height: 36px; font-size: .68rem; }

/* Custom domains */
.domain-config { margin-bottom: 18px; padding: clamp(22px, 3vw, 32px); }
.domain-config form { max-width: 760px; }
.domain-config .field code { padding: 1px 4px; color: #34428d; background: #edf1ff; border-radius: 4px; }
.domain-primary-setup { margin-bottom: 18px; padding: clamp(24px, 3vw, 36px); border-color: #cfd6ff; box-shadow: 0 16px 36px rgba(46, 60, 124, .09), inset 0 4px 0 var(--primary); }
.domain-primary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.domain-primary-heading h2 { margin: 12px 0 6px; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.domain-primary-heading p { max-width: 850px; margin: 0; font-size: .76rem; line-height: 1.65; }
.domain-primary-heading code, .domain-primary-grid code { color: #34428d; font: 650 .66rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.domain-step-number { display: grid; width: 46px; height: 46px; place-items: center; color: #fff; background: var(--primary); border-radius: 13px; box-shadow: 0 8px 18px rgba(82, 104, 232, .25); font-size: .9rem; font-weight: 850; flex: none; }
.domain-primary-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); margin-top: 24px; gap: 14px; }
.domain-primary-grid article { padding: 20px; background: #f8f9fd; border: 1px solid #e5e8f2; border-radius: 12px; }
.domain-primary-grid h3, .domain-live-test h3 { margin: 7px 0 6px; font-size: .9rem; }
.domain-primary-grid p, .domain-live-test p { margin: 0; font-size: .78rem; line-height: 1.6; }
.domain-upload-warning { display: grid; margin-top: 14px; padding: 13px 14px; gap: 5px; color: #82412d; background: #fff4ef; border: 1px solid #edcbbd; border-radius: 9px; font-size: .74rem; line-height: 1.55; }
.domain-upload-warning strong { font-size: .79rem; }
.domain-upload-warning code { color: #82412d; font-size: .68rem; }
.domain-macos-hint { margin-top: 13px !important; color: #596276; font-size: .72rem !important; }
.domain-macos-hint kbd { display: inline-block; min-width: 18px; padding: 1px 4px; color: #30384c; background: #fff; border: 1px solid #cfd5e1; border-bottom-width: 2px; border-radius: 4px; font: 700 .65rem/1.25 ui-sans-serif, system-ui, sans-serif; text-align: center; }
.setup-choice { color: var(--primary-dark); font-size: .59rem; font-weight: 820; letter-spacing: .035em; text-transform: uppercase; }
.domain-primary-grid pre { margin: 14px 0 0; padding: 13px; overflow-x: auto; color: #dce2ff; background: #1b1f2c; border-radius: 9px; white-space: pre-wrap; word-break: break-word; }
.domain-primary-grid pre code { color: inherit; font-size: .58rem; }
.domain-primary-grid .download-htaccess { width: fit-content; margin-top: 17px; color: #fff; }
.domain-live-test { display: flex; margin-top: 14px; padding: 18px 20px; align-items: center; justify-content: space-between; gap: 24px; background: #eef1ff; border: 1px solid #d9def9; border-radius: 12px; }
.domain-live-test > div:first-child { max-width: 650px; }
.domain-test-action { min-width: 250px; text-align: right; }
.domain-test-action form { display: grid; justify-items: end; gap: 6px; }
.domain-test-action small { display: block; margin-top: 6px; color: #6b7387; font-size: .58rem; line-height: 1.45; }
.domain-test-button { max-width: 320px; }
.domain-test-button:disabled { opacity: .48; cursor: not-allowed; }
.domain-test-result { display: flex; margin-top: 12px; padding: 15px 17px; align-items: flex-start; gap: 11px; border: 1px solid; border-radius: 11px; }
.domain-test-result > svg { width: 20px; margin-top: 1px; flex: none; }
.domain-test-result strong { display: block; font-size: .72rem; }
.domain-test-result p { margin: 3px 0 0; font-size: .64rem; line-height: 1.55; }
.domain-test-result.success { color: #176d4a; background: #ebf8f1; border-color: #cce9da; }
.domain-test-result.error { color: #8a442f; background: #fff4ef; border-color: #efd4c9; }
.domain-test-result ul { display: flex; margin: 9px 0 0; padding: 0; gap: 6px; flex-wrap: wrap; list-style: none; }
.domain-test-result li { padding: 4px 7px; color: #176d4a; background: rgba(255,255,255,.7); border: 1px solid #cce9da; border-radius: 999px; font-size: .55rem; font-weight: 760; }
.domain-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); padding: clamp(24px, 3vw, 38px); align-items: center; gap: 32px; overflow: hidden; background: linear-gradient(135deg, #fff 35%, #f2f4ff); }
.domain-hero h2 { margin: 12px 0 7px; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.domain-hero p { max-width: 730px; margin: 0; font-size: .82rem; line-height: 1.65; }
.availability-badge, .option-label { display: inline-flex; width: fit-content; padding: 6px 9px; color: #16734b; background: #e8f7ef; border: 1px solid #cbead9; border-radius: 999px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.domain-flow { display: grid; min-width: 0; padding: 16px; align-items: stretch; grid-template-columns: minmax(0, 1.05fr) 16px minmax(0, 1.05fr) 16px minmax(108px, .8fr); gap: 8px; color: #dfe4ff; background: #1b1f2c; border-radius: 14px; box-shadow: 0 18px 35px rgba(22, 27, 40, .15); }
.domain-flow-step { display: grid; min-width: 0; padding: 10px 11px; align-content: start; gap: 6px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.06); border-radius: 9px; }
.domain-flow-label { color: #9fa8c5; font-size: .56rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.domain-flow-value { color: #f6f7fd; font-size: .7rem; font-weight: 720; line-height: 1.4; overflow-wrap: anywhere; }
.domain-flow svg { width: 15px; align-self: center; color: #7f91ff; }
.domain-guide-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr); margin-top: 18px; gap: 18px; align-items: start; }
.domain-steps, .domain-checklist { padding: clamp(22px, 3vw, 32px); }
.domain-steps ol { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }
.domain-steps li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); padding: 0 0 25px; gap: 14px; }
.domain-steps li:last-child { padding-bottom: 0; }
.domain-steps li::before { position: absolute; top: 36px; bottom: 0; left: 18px; width: 1px; background: #e1e5ef; content: ""; }
.domain-steps li:last-child::before { display: none; }
.domain-steps li > span { position: relative; z-index: 1; display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--primary); border-radius: 10px; font-size: .72rem; font-weight: 800; }
.domain-steps li strong { display: block; margin: 3px 0 5px; font-size: .82rem; }
.domain-steps li p, .domain-callout p { margin: 0; font-size: .72rem; line-height: 1.65; }
.domain-steps code, .domain-checklist code, .domain-faq code { padding: 2px 5px; color: #34428d; background: #edf1ff; border-radius: 5px; font: 650 .67rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.redirect-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; gap: 8px; }
.redirect-settings span { padding: 10px 12px; background: #f7f8fb; border: 1px solid #e8eaf0; border-radius: 9px; }
.redirect-settings small, .redirect-settings strong { display: block; }
.redirect-settings small { color: var(--subtle); font-size: .58rem; }
.redirect-settings strong { margin: 3px 0 0; font-size: .68rem; }
.domain-callout { margin-top: 24px; padding: 14px 16px; color: #5d4b21; background: #fff8e8; border: 1px solid #f0dfb9; border-radius: 10px; }
.domain-callout strong { display: block; margin-bottom: 3px; font-size: .72rem; }
.domain-checklist ul { display: grid; margin: 0; padding: 0; gap: 5px; list-style: none; }
.domain-checklist li { display: flex; padding: 12px 0; align-items: flex-start; gap: 11px; border-bottom: 1px solid var(--border); }
.domain-checklist li:last-child { border-bottom: 0; }
.domain-checklist li > svg { width: 18px; margin-top: 2px; color: var(--primary); flex: none; }
.domain-checklist strong, .domain-checklist small { display: block; }
.domain-checklist strong { font-size: .73rem; }
.domain-checklist small { margin-top: 3px; color: var(--subtle); font-size: .63rem; line-height: 1.5; }
.domain-options { margin-top: 38px; }
.section-heading { max-width: 720px; margin-bottom: 18px; }
.section-heading h2 { margin: 8px 0 5px; }
.section-heading p { margin: 0; font-size: .78rem; }
.domain-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.domain-option-grid.alternatives { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.domain-option { position: relative; padding: 26px; box-shadow: none; }
.domain-option.recommended { border-color: #cfd6ff; box-shadow: inset 0 3px 0 var(--primary); }
.domain-option .option-label { position: absolute; top: 20px; right: 20px; padding: 5px 8px; }
.domain-option .option-label.muted { color: #6d7380; background: #f0f1f4; border-color: #e1e3e8; }
.option-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 11px; }
.option-icon svg { width: 20px; }
.domain-option h3 { margin: 18px 0 7px; font-size: .9rem; }
.domain-option p { min-height: 66px; margin: 0; font-size: .69rem; line-height: 1.65; }
.domain-option pre { min-height: 82px; margin: 16px 0 0; padding: 13px; overflow-x: auto; color: #dce2ff; background: #1b1f2c; border-radius: 9px; white-space: pre-wrap; word-break: break-word; }
.domain-option pre code { font: 600 .58rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-code { display: inline-flex; margin-top: 10px; padding: 0; align-items: center; gap: 6px; color: var(--primary-dark); background: transparent; border: 0; font-size: .63rem; font-weight: 780; cursor: pointer; }
.copy-code svg { width: 14px; }
.htaccess-option p { min-height: 0; }
.htaccess-file-cases { display: grid; margin-top: 16px; gap: 9px; }
.htaccess-file-cases > div { padding: 11px 12px; color: #555d6d; background: #f7f8fb; border: 1px solid #e8eaf0; border-radius: 9px; }
.htaccess-file-cases strong, .htaccess-file-cases span { display: block; }
.htaccess-file-cases strong { margin-bottom: 3px; color: var(--ink); font-size: .66rem; }
.htaccess-file-cases span { font-size: .61rem; line-height: 1.55; }
.htaccess-file-cases code { color: #34428d; font: 650 .58rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.htaccess-actions { display: flex; margin-top: 12px; align-items: center; gap: 14px; flex-wrap: wrap; }
.htaccess-actions .copy-code { margin-top: 0; }
.download-htaccess { min-height: 34px; padding: 7px 11px; gap: 6px; font-size: .63rem; }
.download-htaccess svg { width: 14px; }
.domain-option ul { display: grid; margin: 17px 0 0; padding: 0; gap: 8px; list-style: none; }
.domain-option li { position: relative; padding-left: 16px; color: #555d6d; font-size: .66rem; }
.domain-option li::before { position: absolute; top: .38em; left: 1px; width: 6px; height: 6px; background: #6376e9; border-radius: 50%; content: ""; }
.domain-option > a { display: inline-block; margin-top: 18px; color: var(--primary-dark); font-size: .68rem; font-weight: 750; text-decoration: none; }
.domain-faq { margin-top: 18px; padding: clamp(22px, 3vw, 32px); box-shadow: none; }
.domain-faq details { border-top: 1px solid var(--border); }
.domain-faq summary { padding: 17px 30px 17px 0; font-size: .75rem; font-weight: 740; cursor: pointer; }
.domain-faq details p { max-width: 900px; margin: -5px 0 17px; font-size: .7rem; line-height: 1.65; }

/* Desktop readability: descriptions should remain effortless to scan. */
@media (min-width: 768px) {
  .page-header p, .detail-header p { font-size: 1rem; }
  .panel-heading p, .detail-analytics-head p { font-size: .9rem; }
  .field small { font-size: .82rem; }
  .metric-card small { font-size: .76rem; }
  .chart-axis { font-size: .76rem; }
  .breakdown-label { font-size: .84rem; }
  .breakdown-label > span:last-child, .breakdown-label strong { font-size: .76rem; }
  .empty-mini { font-size: .86rem; }
  .top-link-name small, .top-link-value small, .recent-panel small, .recent-panel time { font-size: .74rem; }
  .peak-summary span { font-size: .76rem; }
  .link-primary small, .link-destination small, .link-stat small, .link-last small { font-size: .72rem; }
  .empty-state p { font-size: .9rem; }
  .step-label small, .create-aside > p { font-size: .8rem; }
  .create-aside li small { font-size: .76rem; }
  .detail-list dt { font-size: .75rem; }
  .detail-list dd { font-size: .88rem; }
  .social-card p { font-size: .76rem; }
  .control-row small { font-size: .76rem; }
  .history-panel li small, .history-panel time { font-size: .72rem; }
  .method-list small, .session-list small { font-size: .74rem; }
  .feedback-aside p { font-size: .88rem; }
  .feedback-aside ul { font-size: .82rem; }
  .form-alert { font-size: .84rem; }
  .bulk-dropzone small { font-size: .8rem; }
  .bulk-format p { font-size: .76rem; }
  .bulk-guide li small, .privacy-note { font-size: .74rem; }
  .domain-primary-heading p, .domain-primary-grid p, .domain-live-test p { font-size: .88rem; }
  .domain-upload-warning { font-size: .82rem; }
  .domain-macos-hint { font-size: .8rem !important; }
  .domain-test-action small, .domain-test-result p { font-size: .72rem; }
  .domain-hero p { font-size: .92rem; }
  .domain-steps li p, .domain-callout p { font-size: .8rem; }
  .domain-checklist small { font-size: .74rem; }
  .section-heading p { font-size: .88rem; }
  .domain-option p { font-size: .8rem; }
  .htaccess-file-cases span { font-size: .72rem; }
  .domain-option li { font-size: .74rem; }
  .domain-faq details p { font-size: .8rem; }

  /* Bulk creation is instructional: give every step comfortable reading size. */
  .bulk-upload-panel .panel-heading h2 { font-size: 1.18rem; }
  .bulk-upload-panel .panel-heading p { font-size: .98rem; }
  .limit-badge { font-size: .72rem; }
  .bulk-dropzone strong { font-size: 1.08rem; }
  .bulk-dropzone small { font-size: .9rem; }
  .bulk-format strong { font-size: .88rem; }
  .bulk-format p { font-size: .84rem; }
  .bulk-format code { font-size: .72rem; }
  .bulk-note, .bulk-domain-note { font-size: .92rem; }
  .bulk-guide h2 { font-size: 1.3rem; }
  .bulk-guide li > span { font-size: .74rem; }
  .bulk-guide li strong { font-size: .88rem; }
  .bulk-guide li small { font-size: .82rem; }
  .privacy-note { font-size: .8rem; }
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metrics .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid > .timeline-panel { grid-column: 1 / -1; }
  .overview-grid > .top-links-panel, .overview-grid > .breakdown-panel, .overview-grid > .recent-panel { grid-column: span 6; }
  .link-table-head, .link-list-item { grid-template-columns: 28px 40px minmax(230px, 2fr) 105px 74px 100px 38px; }
  .link-table-head > span:nth-child(3), .link-destination { display: none; }
  .domain-hero { grid-template-columns: 1fr; }
  .domain-option-grid { grid-template-columns: 1fr 1fr; }
  .bulk-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { width: 76px; padding-inline: 10px; }
  .sidebar .brand > span:last-child, .create-link > span, .nav-item > span, .free-card, .user-email { display: none; }
  .sidebar-head { justify-content: center; }
  .create-link { padding: 0; }
  .nav-item { padding: 0; justify-content: center; }
  .user-row { justify-content: center; }
  .app-column { margin-left: 76px; }
  .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .history-panel { grid-column: auto; }
  .domain-guide-grid { grid-template-columns: 1fr; }
  .domain-primary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .route-status { left: 50%; }
  .sidebar { width: min(86vw, 290px); padding: 18px 14px; transform: translateX(-103%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(22, 27, 40, .13); }
  .sidebar .brand > span:last-child, .create-link > span, .nav-item > span, .free-card, .user-email { display: initial; }
  .sidebar-head { justify-content: space-between; }
  .sidebar-close { display: block; }
  .create-link { padding: 0 15px; }
  .nav-item { padding: 0 12px; justify-content: flex-start; }
  .user-row { justify-content: flex-start; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-scrim { position: fixed; z-index: 20; inset: 0; display: block; background: rgba(18, 21, 30, .28); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-open { overflow: hidden; }
  .nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .app-column { margin-left: 0; }
  .mobile-header { position: sticky; z-index: 15; top: 0; display: flex; min-height: 60px; padding: 0 16px; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
  .mobile-header > button { display: grid; width: 38px; height: 38px; padding: 9px; align-content: center; gap: 4px; background: transparent; border: 0; border-radius: 9px; }
  .mobile-header > button span { display: block; height: 2px; background: #333846; border-radius: 2px; }
  .mobile-header .brand-mark { width: 29px; height: 29px; }
  .mobile-header .brand { font-size: .95rem; }
  .mobile-header .avatar { width: 31px; height: 31px; }
  .app-main { padding: 23px 15px 55px; }
  .page-header, .detail-header { align-items: stretch; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .header-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-metrics .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 106px; padding: 14px; }
  .metric-card strong { font-size: 1.45rem; }
  .metric-icon { width: 35px; height: 35px; }
  .overview-grid, .analytics-grid { grid-template-columns: 1fr; }
  .overview-grid > .timeline-panel, .overview-grid > .top-links-panel, .overview-grid > .breakdown-panel, .overview-grid > .recent-panel { grid-column: auto; }
  .panel { padding: 17px; border-radius: 14px; }
  .chart-wrap { min-height: 210px; }
  .timeline-chart { height: 180px; }
  .link-filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .links-panel { padding: 10px; background: transparent; border: 0; box-shadow: none; }
  .link-table-head { display: none; }
  .link-list { display: grid; gap: 10px; }
  .link-list-item { display: grid; min-height: 0; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); grid-template-columns: 36px 1fr auto; gap: 11px; }
  .link-list-item > .select-placeholder { display: none; }
  .link-list-item > .amazon-dot { grid-column: 1; grid-row: 1; }
  .link-primary { grid-column: 2; grid-row: 1; }
  .link-status { grid-column: 1 / span 2; grid-row: 2; }
  .link-stat { grid-column: 2; grid-row: 2; align-self: center; justify-self: end; text-align: right; }
  .link-last { display: none; }
  .manage-button { grid-column: 3; grid-row: 1; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination > span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .create-grid { grid-template-columns: 1fr; }
  .create-aside { position: static; }
  .detail-content { padding: 11px; }
  .detail-tabs { overflow-x: auto; }
  .detail-grid, .preview-layout { grid-template-columns: 1fr; }
  .detail-link-group { width: 100%; }
  .detail-link-row { grid-template-columns: 1fr auto auto; }
  .detail-link-label { grid-column: 1 / -1; }
  .destination-inline-form { grid-template-columns: 1fr 1fr; }
  .destination-inline-form input { grid-column: 1 / -1; }
  .title-inline-form { grid-template-columns: 1fr 1fr; }
  .title-inline-form input { grid-column: 1 / -1; }
  .detail-header .header-actions .button { flex: 0 1 auto; }
  .share-buttons { grid-template-columns: 1fr; }
  .settings-page-grid { grid-template-columns: 1fr; }
  .feedback-layout { grid-template-columns: 1fr; }
  .domain-option-grid, .domain-option-grid.alternatives { grid-template-columns: 1fr; }
  .domain-primary-heading { gap: 14px; }
  .domain-step-number { width: 38px; height: 38px; border-radius: 10px; }
  .domain-live-test { align-items: stretch; flex-direction: column; }
  .domain-test-action { min-width: 0; text-align: left; }
  .domain-test-action form { justify-items: stretch; }
  .domain-test-button { width: 100%; max-width: none; }
  .domain-flow { padding: 13px; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(94px, .8fr); gap: 5px; }
  .domain-flow-step { padding: 8px; gap: 4px; }
  .domain-flow-value { font-size: .61rem; }
  .bulk-format { grid-template-columns: 1fr; }
  .bulk-submit { width: 100%; }
  .sessions-section, .danger-section { grid-column: auto; }
  .field-row { grid-template-columns: 1fr; }
  .control-row { align-items: stretch; flex-direction: column; }
  .control-row form, .control-row .button { width: 100%; }
  .session-list li { align-items: flex-start; flex-wrap: wrap; }
  .session-list form { width: 100%; padding-left: 48px; }
  .session-list .button { width: 100%; }
  .hour-bars { gap: 4px; }
}

@media (max-width: 430px) {
  .auth-shell { width: min(100% - 24px, 1080px); padding-top: 14px; }
  .login-card { margin-top: 4vh; padding: 24px 19px; }
  .page-header .header-actions, .detail-header .header-actions { display: grid; width: 100%; grid-template-columns: .75fr 1.25fr; }
  .range-control, .range-control select { width: 100%; }
  .metric-label { font-size: .68rem; }
  .metric-card small { display: none; }
  .metric-card strong { font-size: 1.35rem; }
  .metric-icon { width: 32px; height: 32px; }
  .panel-heading { gap: 9px; }
  .link-filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .detail-tabs a { font-size: .69rem; }
  .detail-link-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .detail-link-action { width: 34px; padding: 0; font-size: 0; }
  .detail-link-action svg { margin: 0; }
  .detail-tabs a svg { display: none; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions .button { width: 100%; }
  .redirect-settings { grid-template-columns: 1fr; }
  .domain-flow { grid-template-columns: 1fr; }
  .domain-flow svg { justify-self: center; transform: rotate(90deg); }
}

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