/* The private profile in the field-manual look, like a player card: a map-sheet
   hero with the account status on a dog tag, display-type headings and the
   card's Kills by team panel. Loaded after field-manual.css (which sets the
   tokens on .fm-page); every rule starts from #application. */
#application { --profile-surface: var(--fm-panel); --profile-line: var(--fm-rule-2); --profile-muted: var(--fm-sage); }
#application .team-red { --team: var(--fm-red); }
#application .team-blue { --team: var(--fm-blue); }
#application .team-green { --team: var(--fm-green); }
#application .fm-panel { position: relative; min-width: 0; padding: 22px 24px; border: 1px solid var(--fm-rule-2); background: var(--fm-panel); }

/* ---------- Map-sheet hero ---------- */
#application .profile-page-heading {
  min-height: 230px; margin-bottom: 20px; padding: 46px 40px 32px 56px;
  border: 1px solid var(--fm-rule-2); border-left: 3px solid var(--orange); background: var(--fm-field);
}
#application .profile-page-heading::before {
  z-index: -2; opacity: 1;
  background: linear-gradient(90deg, var(--fm-field) 12%, #1c2924e6 38%, #1c292400 72%), url("/assets/topo-hero.svg") right center / cover no-repeat;
}
#application .profile-page-heading::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #a9b69766 0 1px, transparent 1px 48px) top left / 100% 7px no-repeat,
    repeating-linear-gradient(180deg, #a9b69766 0 1px, transparent 1px 48px) top left / 7px 100% no-repeat;
}
#application .profile-page-heading .profile-member-mark { display: none; }
#application .profile-page-heading > :is(aside, div) { max-width: none; }
#application .profile-page-heading .application-intro .eyebrow { margin: 0; font-size: .8125rem; letter-spacing: .11em; color: var(--cream); }
#application .profile-page-heading h1 { margin: 14px 0 10px; font: 800 clamp(2.8rem, 5.6vw, 5rem)/.92 var(--display); letter-spacing: -.02em; color: var(--cream); overflow-wrap: anywhere; }
#application .profile-page-heading #profile-intro-copy { max-width: 520px; font-size: .9375rem; color: var(--fm-text-2); }
/* Signed in: the name on the left, the status dog tag on the right. */
#application .profile-page-heading:has(> #profile-overview:not([hidden])) {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-rows: auto 1fr;
  grid-template-areas: "intro tag" "identity tag"; align-items: start; gap: 6px 36px;
}
#application .profile-page-heading > .application-intro { grid-area: intro; min-width: 0; }
#application .profile-page-heading > #identity { grid-area: identity; align-self: start; justify-self: start; margin: 4px 0 0; }

/* The status dog tag. */
#application .profile-page-heading > #profile-overview {
  grid-area: tag; position: relative; margin: 26px 0 0; padding: 38px 24px 14px;
  border: 1px solid #ff691f99; border-radius: 30px 30px 22px 22px;
  background: linear-gradient(180deg, #ff691f12, #0000), #18221ed9;
  box-shadow: 0 24px 48px -28px #000, inset 0 1px 0 #ffffff12; backdrop-filter: blur(2px);
}
#application #profile-overview::before { content: ""; position: absolute; top: 14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 2px #6b5a4c; }
#application #profile-overview::after { content: ""; position: absolute; left: 50%; bottom: calc(100% - 23px); width: 5px; height: 100px; margin-left: -2.5px; background: radial-gradient(circle at 50% 50%, #9aa58e 0 1.7px, #4d5848 2.2px, transparent 2.6px) 0 0 / 5px 6px repeat-y; }
#application #profile-overview .profile-status-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: none; margin: 0; }
#application #profile-overview .profile-status-strip > div { display: block; min-width: 0; padding: 10px 4px 12px; border-top: 1px dashed #4b5747; }
#application #profile-overview .profile-status-strip > div:nth-child(-n + 2) { border-top: 0; }
#application #profile-overview .profile-status-strip > div:nth-child(even) { padding-left: 18px; border-left: 1px dashed #4b5747; }
#application #profile-overview .profile-status-strip > .profile-status-wide { grid-column: 1 / -1; padding-left: 4px; border-left: 0; }
#application #profile-overview dt { font: 700 .72rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--fm-sage); }
#application #profile-overview dd { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 6px 0 0; font: 800 1.45rem/1.05 var(--display); color: var(--cream); overflow-wrap: anywhere; }
#application #profile-overview dd::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--fm-sage-3); }
#application #profile-overview [data-tone="good"] dd::before { background: var(--fm-green); box-shadow: 0 0 0 3px #a4ce6d26; }
#application #profile-overview [data-tone="attention"] dd { color: var(--fm-orange-hi); }
#application #profile-overview [data-tone="attention"] dd::before { background: var(--fm-orange-hi); box-shadow: 0 0 0 3px #ff8a4c26; }
#application #profile-overview [data-tone="quiet"] dd { color: var(--fm-text-2); }
#application #profile-overview dd small { flex-basis: 100%; margin-top: 4px; font: 500 .8125rem/1.4 var(--body); color: var(--fm-sage); }
#application #profile-overview dd small:empty { display: none; }

/* ---------- Sections ---------- */
#application .profile-tools { border-color: var(--fm-rule-2); background: var(--fm-panel); }
#application .account-recorded-heading h2,
#application .profile-section-heading h2 { margin: 0; font: 800 clamp(2rem, 3.6vw, 2.9rem)/.95 var(--display); letter-spacing: -.005em; text-transform: uppercase; color: var(--cream); }
#application .profile-kicker { font: 700 .75rem/1.2 var(--display); letter-spacing: .18em; color: var(--fm-orange-hi); }
#application :is(.profile-panel-heading, .profile-table-heading) h3 { font: 800 1.5rem/1.05 var(--display); letter-spacing: 0; color: var(--cream); }
#application :is(.profile-panel-heading > span, .profile-table-heading p) { color: var(--fm-sage); }
#application .profile-data-card { border-color: var(--fm-rule-2); background: var(--fm-panel); }
#application .profile-glance { border-color: var(--fm-rule-2); background: var(--fm-panel); }
#application :is(.profile-glance, .profile-metrics) dt { font: 700 .72rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--fm-sage); }
#application .profile-glance dd { font: 800 clamp(2.1rem, 3.4vw, 2.8rem)/1 var(--display); letter-spacing: 0; }
#application .profile-metrics dd { font: 800 clamp(1.7rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: 0; }
#application .profile-cash strong { font: 800 1.9rem/1 var(--display); letter-spacing: 0; }
/* The section index, numbered like the player card's. */
#application .profile-section-nav { display: flex; flex-wrap: nowrap; gap: 2px; counter-reset: idx; margin: 0 0 18px; padding: 0; overflow-x: auto; scrollbar-width: none; border: 0; border-bottom: 1px solid var(--fm-rule); background: none; }
#application .profile-section-nav a { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 12px; border-bottom: 2px solid transparent; font-size: .875rem; font-weight: 600; color: var(--fm-text-2); text-decoration: none; white-space: nowrap; }
#application .profile-section-nav a:not([hidden])::before { counter-increment: idx; content: counter(idx, decimal-leading-zero); font: 700 .75rem/1 var(--display); letter-spacing: .08em; color: var(--fm-sage-3); }
#application .profile-section-nav a:hover { color: var(--cream); border-bottom-color: var(--orange); }
#application .profile-section-nav a:focus-visible { outline-offset: -3px; }

/* Kills by team: the card's target, split and Plays for / Hunts tags. */
#application .profile-teams { margin-top: 20px; padding: 22px 24px 24px; }
#application .profile-teams .profile-table-heading { margin-bottom: 18px; padding: 0; }

@media (max-width: 960px) {
  #application .profile-page-heading:has(> #profile-overview:not([hidden])) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "identity" "tag"; }
}
@media (max-width: 640px) {
  #application .profile-page-heading { min-height: 0; padding: 34px 20px 22px 24px; }
  #application .profile-page-heading h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  #application .profile-page-heading > #profile-overview { padding: 36px 16px 10px; }
  #application #profile-overview dd { font-size: 1.2rem; }
  #application .profile-teams { padding: 18px 16px; }
}
@media (prefers-contrast: more) {
  #application .profile-page-heading::before { opacity: .4; }
}
