/* Typography and layout for the Field Notes design. */
.fieldnotes {
    --ink: #22324b;
    --accent: var(--site-brand-ink, #7e0d11);
    --accent-fill: var(--site-brand, #7e0d11);
    --accent-content: var(--site-brand-text, #fff);
    --accent-wash: color-mix(in srgb, var(--accent-fill) 9%, var(--surface));
    --accent-line: color-mix(in srgb, var(--accent) 48%, var(--surface));
    --paper: #f6f2eb;
    --surface: #fcfaf6;
    --line: #d9d3cc;
    --serif: "Songti SC", "Noto Serif CJK SC", SimSun, "STSong", serif;
    background-color: var(--surface);
}
.fieldnotes :is(h1, h2, h3, .brand strong) { font-family: var(--serif); }
.fieldnotes .site-masthead {
    color: var(--accent-content);
    border: 0;
    background: var(--accent-fill);
}
.fieldnotes .masthead-inner { min-height: 76px; gap: 20px; }
.fieldnotes .brand { color: inherit; min-width: 0; }
.fieldnotes .site-masthead .brand:hover { color: inherit; }
.fieldnotes .site-masthead .brand:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.fieldnotes .brand .brand-logo { width: auto; height: auto; max-width: 126px; max-height: 43px; object-fit: contain; }
.fieldnotes .brand-wordmark { display: grid; min-width: 0; gap: 1px; }
.fieldnotes .brand-wordmark strong { font-size: 23px; overflow-wrap: anywhere; }
.fieldnotes .brand small { color: inherit; }
.fieldnotes .brand-wordmark small { font-size: 12px; overflow-wrap: anywhere; }
.fieldnotes .site-navigation ul { justify-content: flex-end; gap: 6px 22px; }
.fieldnotes .site-navigation a,
.fieldnotes .site-navigation a[aria-current="page"] { color: var(--accent-content); }
.fieldnotes .site-navigation a[aria-current="page"] { box-shadow: inset 0 -2px currentColor; }
.fieldnotes .site-navigation a:hover { text-decoration: underline; text-underline-offset: 5px; }
.fieldnotes .site-masthead :focus-visible { outline-color: currentColor; }
.fieldnotes .site-actions :is(.login-link, .account-pill, .ui-lang > summary),
.fieldnotes .mobile-navigation { color: var(--accent-content); background: transparent; border-color: color-mix(in srgb, currentColor 50%, transparent); }
.fieldnotes .site-actions :is(.login-link, .account-pill, .ui-lang > summary):hover,
.fieldnotes .mobile-navigation:hover { background-color: color-mix(in srgb, currentColor 12%, transparent); }
.fieldnotes .site-actions :is(.ui-lang__menu,.theme-account ul) { color: var(--ink); }
.fieldnotes .mobile-navigation { display: none; }

.discovery {
    background: radial-gradient(ellipse at 78% 30%, #fcfaf7, transparent 65%), var(--paper);
    border-bottom: 1px solid #e6dfd5;
}
.discovery-inner { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 28px; min-height: 328px; padding-block: 22px; }
.discovery .field-label { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; color: var(--accent); font: 700 17px/1.5 var(--serif); letter-spacing: .14em; }
.field-label span { font: italic 16px Georgia, serif; letter-spacing: .015em; }
.field-label::after { content: ""; width: 76px; border-top: 1px solid var(--accent-line); margin-inline-start: 4px; }
.discovery h1 { width: fit-content; font-size: clamp(35px, 4.1vw, 58px); letter-spacing: .035em; text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 4px; text-underline-offset: .2em; }
.discovery .discovery-description { color: var(--ink); margin-block: 21px 24px; }
.discovery-art { width: min(100%, 402px); height: auto; justify-self: end; mix-blend-mode: multiply; mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent); }
.fieldnotes .search-form { gap: 0; }
.fieldnotes .search-form input[type="search"] { border-radius: 5px 0 0 5px; border-color: #9b9fac; }
.fieldnotes .search-form button, .fieldnotes .course-card .action {
    color: var(--accent-content); border-color: var(--accent-fill); background: var(--accent-fill); border-radius: 5px;
}
.fieldnotes .search-form button { border-radius: 0 5px 5px 0; }
.fieldnotes .search-form button:hover, .fieldnotes .course-card .action:hover { text-decoration: underline; text-underline-offset: 3px; }

.fieldnotes .home-section { border: 0; padding-block: 26px 8px; }
.fieldnotes .home-sections { padding-block: 4px 28px; }
.fieldnotes .section-heading { align-items: center; margin-bottom: 14px; }
.fieldnotes .section-heading h2,
.fieldnotes .catalog-heading h1 { position: relative; padding-inline-start: 13px; }
.fieldnotes .section-heading h2::before,
.fieldnotes .catalog-heading h1::before { content: ""; position: absolute; inset-inline-start: 0; top: .15em; width: 4px; height: 1em; background: var(--accent); }
.fieldnotes .catalog-heading h1::before { top: .05em; }
.fieldnotes .section-heading a { color: var(--ink); font-size: 14px; }
.fieldnotes .section-heading a:hover { color: var(--accent); }

.fieldnotes .course-grid { gap: 16px; }
.fieldnotes .course-card {
    padding: 9px;
    background: linear-gradient(150deg,#fffdfa,#f8f4ef);
    border-color: var(--line);
    box-shadow: 0 1px 3px #33271912;
    border-radius: 7px;
}
.fieldnotes .course-card:hover { border-color: #ad8a85; }
.fieldnotes .course-cover { border-radius: 4px; }
.fieldnotes .course-card-body { gap: 5px; padding: 8px 2px 2px; min-width: 0; }
.fieldnotes .course-card h3 { min-height: 0; font-size: 17px; line-height: 1.4; }
.fieldnotes .course-context { min-height: 21px; }
.fieldnotes .course-tags > span, .fieldnotes .course-tags summary { background: #eee9e2; }
.course-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 10px; margin-top: auto; padding-top: 4px; }
.fieldnotes .course-metadata { flex: 1 1 142px; font-size: 12px; align-self: center; margin: 0; padding: 0; }
.fieldnotes .course-card .action { flex: none; min-height: 34px; padding: 4px 10px; font-size: 13px; }

@media (min-width: 1101px) {
    .fieldnotes .home-card-grid { grid-template-columns: repeat(var(--columns, 5), minmax(0, 1fr)); }
}
.fieldnotes .home-card-grid .course-card-foot { align-items: flex-start; flex-direction: column; }
.fieldnotes .home-card-grid .course-metadata { flex: auto; align-self: flex-start; }
.fieldnotes .home-card-grid .action { align-self: flex-end; }

.fieldnotes .center-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fieldnotes .center-directory li { min-width: 0; }
.fieldnotes .center-directory a {
    height: 100%; display: grid; grid-template-columns: minmax(0, 115px) minmax(0,1fr); align-items: center;
    gap: 12px; padding: 8px; border-radius: 6px; background: #fffdfa;
}
.center-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--accent-wash); }
.center-info { min-width: 0; }
.center-info h3 { overflow-wrap: anywhere; margin-bottom: 4px; }
.center-info span { color: var(--muted); font-size: 12px; }
.fieldnotes .home-news .journal-list li { justify-content: flex-start; gap: 8px 12px; }
.fieldnotes .home-news .journal-list a { min-width: 0; overflow-wrap: anywhere; }
.journal-category { flex: none; max-width: calc(100% - 8px); padding: 0 7px; border-radius: 3px; background: var(--accent-wash); color: var(--accent); font-size: 12px; white-space: normal; }
.fieldnotes .home-news time { margin-inline-start: auto; flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.fieldnotes #experiment-catalog { padding-top: 0; }
.catalog-heading { position: relative; isolation: isolate; padding: 14px 0 18px; }
.catalog-heading .catalog-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 15px; }
.fieldnotes .catalog-heading h1 { width: fit-content; margin-bottom: 9px; line-height: 1.1; }
.catalog-heading p { margin: 0; }
.catalog-note {
    position: absolute; z-index: -1; width: 235px; right: 27px; bottom: -11px;
    display: grid; justify-items: center; padding: 19px 20px; transform: rotate(-8deg);
    border: 1px solid #d4c9bd; color: #465066; background: #f5eee4;
    background-image: linear-gradient(#89796923 1px, transparent 1px), linear-gradient(90deg,#89796923 1px,transparent 1px);
    background-size: 20px 20px;
    box-shadow: -22px -8px 0 #e8d3ce;
    font: 18px/1.5 var(--serif);
}
.catalog-note i { font: italic 17px/1.5 Georgia, serif; color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.fieldnotes .classification {
    position: relative; gap: 0; padding: 6px 16px; border: 1px solid var(--line);
    background: #f9f5ef; border-radius: 6px;
}
.filter-row { display: flex; min-width: 0; align-items: center; gap: 12px; }
.classification .filter-row + .filter-row { border-top: 1px solid #e2dad0; }
.filter-label { min-width: 71px; flex: none; font-weight: 650; font-size: 14px; }
.fieldnotes .filter-choices { min-width: 0; padding-block: 4px; }
.fieldnotes .filter-choices button { background: transparent; font-size: 14px; }
.fieldnotes .filter-choices button.active {
    color: var(--accent-content); background: var(--accent-fill); border-color: var(--accent-fill);
}
.fieldnotes .catalog-toolbar { border-top: 0; margin-bottom: 16px; }
.catalog-toolbar .filter-label { min-width: 0; }

.fieldnotes .site-footer { background: #f3eee7; color: #666d76; font-size: 13px; line-height: 1.65; }
.fieldnotes .footer-friends h2 { font-size: inherit; font-weight: 600; }

@media (max-width: 1100px) {
    .fieldnotes .brand-wordmark small { font-size: 11px; }
    .fieldnotes .site-navigation ul { gap: 6px 13px; }
}
@media (max-width: 800px) {
    .fieldnotes .masthead-inner { min-height: 64px; gap: 7px; }
    .fieldnotes .mobile-navigation { display: inline-flex; }
    .fieldnotes .site-navigation ul { justify-content: flex-start; }
    .discovery-inner { min-height: 0; gap: 12px; }
    .fieldnotes .home-card-grid, .fieldnotes .center-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-note { width: 160px; right: 10px; }
}
@media (max-width: 540px) {
    .fieldnotes .brand .brand-logo { max-width: 48px; max-height: 32px; }
    .fieldnotes .brand-wordmark strong { font-size: 16px; white-space: normal; }
    .discovery-inner { grid-template-columns: minmax(0, 1fr); position: relative; padding-block: 19px; }
    .discovery h1 { font-size: clamp(27px, 7.8vw, 34px); text-wrap: balance; }
    .discovery .field-label { margin-bottom: 12px; }
    .discovery .discovery-description { margin-block: 17px; }
    .discovery-art { display: none; }
    .fieldnotes .home-card-grid { grid-template-columns: minmax(0,1fr); }
    .fieldnotes .center-directory { grid-template-columns: minmax(0,1fr); }
    .fieldnotes .center-directory a { grid-template-columns: 98px minmax(0,1fr); }
    .fieldnotes .home-news .journal-list li { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 4px 9px; }
    .fieldnotes .home-news .journal-list a { grid-column: 2; grid-row: 1; }
    .fieldnotes .home-news .journal-list time { grid-column: 2; margin-inline-start: 0; }
    .fieldnotes .home-news .journal-list li:not(:has(.journal-category)) :is(a,time) { grid-column: 1/-1; }
    .fieldnotes .classification { padding-inline: 7px; }
    .filter-row { gap: 2px; }
    .filter-label { min-width: 63px; font-size: 12px; }
    .classification .filter-choices { flex: 1; }
    .catalog-note { display: none; }
    .catalog-heading .catalog-crumb { margin-bottom: 12px; }
}


.fieldnotes .modal.login_modal_b .modal-container { background-color: color-mix(in srgb, var(--accent-fill) 35%, #211c25); }
.fieldnotes .modal.login_modal_b .log_choose .phone,
.fieldnotes .modal.login_modal_b :is(.login_btn,.li-reg-btn,.reset_btn) {
    background: var(--accent-fill) !important; color: var(--accent-content); border-color: var(--accent-line);
}

.fieldnotes .home-news .journal-list {
    display: grid;
    grid-template-columns: repeat(var(--news-cols, 2), minmax(0,1fr));
    gap: 1px 18px;
    clip-path: inset(0 -5px -5px);
}
.fieldnotes .home-news .journal-list li {
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    position: relative; min-width: 0; padding-block: 10px; border-top: 0;
}
.fieldnotes .home-news .journal-list li::before { content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: var(--line); }
.fieldnotes .home-news .journal-list li a { font-weight: 400; line-height: 1.5; width: 100%; }
.fieldnotes .home-news .journal-list li .journal-meta {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; color: var(--muted); width: 100%;
}
.fieldnotes .home-news .journal-list li time { margin: 0; font-size: 12px; }
.fieldnotes :is(input, textarea, select):focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent-line);
}
.fieldnotes .modal.login_modal_b :is(input, textarea, select):focus {
    border-color: #e5c7c8;
    box-shadow: inset 0 0 0 1px #e5c7c8;
}
@media (max-width: 960px) {
    .fieldnotes .home-news .journal-list { grid-template-columns: repeat(clamp(1,var(--news-cols,2),2), minmax(0,1fr)); }
}
@media (max-width: 540px) {
    .fieldnotes .home-news .journal-list { grid-template-columns: minmax(0,1fr); }
}

/* Layui clearfix pseudo-elements take up cells when these rows become CSS grids. */
.fieldnotes :is(.course_area, .teacher_area) .layui-row::before,
.fieldnotes :is(.course_area, .teacher_area) .layui-row::after { display: none; content: none; }
.fieldnotes .exp_main .empty-state { padding-block: 14px; text-align: start; }
.fieldnotes .lab-card p { overflow-wrap: anywhere; }
.fieldnotes .course_area .course-main > .title-main { align-items: baseline; justify-content: space-between; }

.fieldnotes .ph-page__body { overflow-wrap: anywhere; }
.fieldnotes .ph-page__body :is(img, video, iframe) { max-width: 100%; }
.fieldnotes .ph-page__body pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
.fieldnotes .search-form input[type="search"]:focus {
    border-color: var(--accent); outline: 1px solid var(--accent-line); outline-offset: -1px;
}

.fieldnotes .home-sections .section-heading {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}
.fieldnotes .home-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(150px, auto));
    gap: 14px;
}
.fieldnotes .home-feature-grid .course-card { min-height: 0; box-shadow: none; }
.fieldnotes .home-feature-grid .course-card:first-child {
    position: relative;
    isolation: isolate;
    grid-row: span 2;
    justify-content: end;
    min-height: 314px;
    padding: 0;
    background: #243044;
    border-color: #535a65;
    color: #fff;
}
.home-feature-grid .course-card:first-child::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 14%, #10172479 43%, #101724 100%);
    content: "";
    pointer-events: none;
}
.fieldnotes .home-feature-grid .course-card:first-child .course-cover {
    position: absolute;
    inset: 0;
    z-index: -2;
    aspect-ratio: auto;
    border-radius: inherit;
}
.fieldnotes .home-feature-grid .course-card:first-child .course-card-body {
    flex: none;
    gap: 6px;
    padding: 46px 21px 16px;
}
.fieldnotes .home-feature-grid .course-card:first-child h3 {
    font-size: clamp(19px, 2.2vw, 29px);
    color: #fff;
    text-shadow: 0 1px 5px #101724;
}
.home-feature-grid .course-card:first-child h3 a:hover { color: #fff; text-decoration: underline; }
.fieldnotes .home-feature-grid .course-card:first-child :is(.course-context span,.course-metadata) { color: #fff; }
.home-feature-grid .course-card:first-child :focus-visible { outline-color: #fff; }
.fieldnotes .home-feature-grid .course-card:first-child .course-tags > span,
.fieldnotes .home-feature-grid .course-card:first-child .course-tags summary { color: #fff; background: #fff3; }
.fieldnotes .home-feature-grid .course-card:first-child .course-tags ul { color: var(--ink); }
.fieldnotes .home-feature-grid .course-card:first-child .action { border-color: #fff8; }
.fieldnotes .home-feature-grid .course-card:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    background: #fffdfa;
}
.fieldnotes .home-feature-grid .course-card:not(:first-child) .course-cover { aspect-ratio: auto; min-height: 108px; }
.fieldnotes .home-feature-grid .course-card:not(:first-child) .course-card-body { padding: 4px 3px 2px 0; }
.fieldnotes .home-feature-grid + .home-card-grid { margin-top: 14px; }
.fieldnotes .home-card-grid { grid-template-columns: repeat(clamp(1,var(--columns,4),8), minmax(0,1fr)); }
@media (max-width: 900px) {
    .fieldnotes .home-card-grid { grid-template-columns: repeat(clamp(1,var(--columns,2),2), minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .fieldnotes .home-feature-grid { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; gap: 10px; }
    .fieldnotes .home-feature-grid .course-card:first-child { grid-row: auto; min-height: clamp(220px, 67vw, 300px); }
    .fieldnotes .home-feature-grid .course-card:first-child .course-card-body { padding: 32px 14px 12px; }
    .fieldnotes .home-feature-grid .course-card:not(:first-child) .course-cover { min-height: 92px; }
}
@media (max-width: 540px) {
    .fieldnotes .home-card-grid { grid-template-columns: minmax(0,1fr); }
}

.fieldnotes .newsList_area .detailsbox { width: min(100%, 920px); margin-inline: auto; }

.fieldnotes .modal.login_modal_b {
    align-content: safe center;
    padding: 12px;
}
.fieldnotes .modal.login_modal_b .rotate_box_container {
    width: min(780px, 100%);
    margin: 0 auto;
}
.fieldnotes .modal.login_modal_b .modal-container {
    background-image: linear-gradient(180deg, rgb(15 25 42 / .46), rgb(15 25 42 / .87)),
        var(--login-image, url("../images/jsnu-campus.webp"));
    background-position: center, center 59%;
    background-size: cover;
    background-repeat: no-repeat;
}
